rescuing superh to linux commonplace
play

Rescuing SuperH to Linux Commonplace 1 HISAO MUNAKATA RENESAS - PowerPoint PPT Presentation

Rescuing SuperH to Linux Commonplace 1 HISAO MUNAKATA RENESAS SOLUTIONS CORP. JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace Ideal open source eco-system 2 Each party collaborate together to make total Linux eco-system major


  1. Rescuing SuperH to Linux Commonplace 1 HISAO MUNAKATA RENESAS SOLUTIONS CORP. JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  2. Ideal open source eco-system 2 Each party collaborate together to make total Linux eco-system major contributor common platform Positive etc Spiral PC mother board Committed work distribution knowledge share Project user forum Web knowledge base Mailing List Twitter Linux conference major distribution JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  3. Linux support various non-x86 CPU 3 � 2.6.31 includes 23 CPU architecture *1 support, but … � IA32 is a default development environment, and big majority of kernel code are tested only on IA32 (=80x86) environment. � All Posix compliant open source program could be run on embedded Linux environment, however its build process ( configure, make ) does not designed for embedded Linux use. � SuperH is a Renesas original 32bit RISC processor designed for embedded products like cell-phone, digital TV and Car navigation system. Linux kernel natively support SuperH (=SH) from 2.6.1. But its adoption is not straightforward like PC Linux. 1: alpha, arm, avr32, blackfin, cris, frv, h8300, ia64, m32r, m68k, m68knommu, microblaze, mips, mn10300, parisc, powerpc, s390, score, sh, sparc, um, x86, xtensa JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  4. Embedded Linux starter components 4 chip/board vendor support expected Gentoo Debian uboot uboot Community kernel OpenSource kernel.org User drivers userland application GNU Renesas Linux starter BSP toolchain FSF CodeSourcery JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  5. Common embedded Linux headache ( which Renesas had experienced a few years ago ) 5 � Hard to find proper target platform that come with Linux BSP � Platform support in kernel was not enough maintained, some are neglected � Lack of document, knowledge share point for SuperH Linux � Hard to find proper toolchain that support SuperH Linux build � Linux build requires glibc support and other extension against default gcc � Not all new kernel capabilities are available on SuperH � Hard to find pre-built SH kernel image ( no generic binary ) � SH-3, SH-4, SH-4A, SH-4AL requires different binary due to difference of ABI � Require off-tree device driver to enable on board device � No Linux distribution that support SuperH � Cross compilation of generic open source code is quite problematic � autoconf, make sometime does not work with cross build environment � Some opensource program like Postgre, Apache uses architecture depended lock mechanism that can not runs on non-x86 architecture but pthread. JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  6. Typical negative spiral ( that likely create off-tree local repos ) 6 INNOVATION never happens with this “divergence model” detached ! too late to send a bug fix code to community upstream JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  7. Gap analysis ( to renovate negative loop ) 7 testing catch up migration coverage patch submission off-tree driver toolchain code abstraction quality Tackle Target pre-build toolchain cross compile web portal problem Lack of common distribution platform JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  8. SH kernel development (3 years ago) 8 2. kernel 2.6.n kernel 2.6.n+1 kernel 2.6.n+2 upstream kernel release release release old merge merge merge kernel window window window detachment BSP update in-house Original Original Original Original BSP BSP 1 BSP 2 BSP 1 BSP 2 bug 3. report apply private 1. private private bug fix driver repository driver � Use already released kernel (3 – 6 month old kernel at earliest) � Use already released kernel (3 – 6 month old kernel at earliest) � [1] Need to add private device driver as they are not merged in kernel � [1] Need to add private device driver as they are not merged in kernel � Manage private repository to collect bug fix patches and private driver � Manage private repository to collect bug fix patches and private driver � [2] Upstream community do not accept patch for outdated old driver/kernel � [2] Upstream community do not accept patch for outdated old driver/kernel � [3] In the event of Linux BSP update, we simply pull newly released kernel, � [3] In the event of Linux BSP update, we simply pull newly released kernel, but it include neither private driver nor local bug fix patch. but it include neither private driver nor local bug fix patch. JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  9. kernel development (now) 9 kernel 2.6.n kernel 2.6.n+1 kernel 2.6.n+2 upstream kernel release release release RC3- old merge merge merge kernel patch patch window window window RC1 input input in-house test & debug test & debug development bug fix BSP update feed forward in-house BSP Original Original BSP 1 BSP 1 customer development evaluation development evaluation development � Before merge window open, we send patch as much as possible so that these � Before merge window open, we send patch as much as possible so that these request could be merged at next version kernel. request could be merged at next version kernel. � Once RC1 released, we test RC version kernel to stabilize our code. � Once RC1 released, we test RC version kernel to stabilize our code. � Create new BSP with RC version kernel, and revise it when its official release � Create new BSP with RC version kernel, and revise it when its official release � If any issue found, we send patch for next (n+1) release as well as own BSP � If any issue found, we send patch for next (n+1) release as well as own BSP [ Now our kernel development activity is fully synchronized with upstream ] [ Now our kernel development activity is fully synchronized with upstream ] JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  10. original driver enhance for embedded device driver development Embedded PC use PC use use case case case 10 � As kernel space device driver API is heavily maintained, all driver code should be reviewed at every � As kernel space device driver API is heavily maintained, all driver code should be reviewed at every kernel version migration to apply appropriate kernel/driver interface. kernel version migration to apply appropriate kernel/driver interface. � Linux common driver is the best (and may be the only) place to maintain driver for long time. � Linux common driver is the best (and may be the only) place to maintain driver for long time. � Some common driver might not support embedded usage because original driver is written for PC. � Some common driver might not support embedded usage because original driver is written for PC. You should request original driver author to enhance his code to support extended embedded use. You should request original driver author to enhance his code to support extended embedded use. � You should eliminate platform specific driver as much as possible, because these driver are quite � You should eliminate platform specific driver as much as possible, because these driver are quite easily discarded at future kernel migration. It might take a few month to negotiate with original easily discarded at future kernel migration. It might take a few month to negotiate with original driver author, but it is worth spending time for this generalize process. driver author, but it is worth spending time for this generalize process. JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  11. Example : SH7724 Linux driver status off tree patch merged 11 2.6.31 2.6.31-rc7 2.6.32-rc4 tw9910 mt9t112 tw9910 mt9t112 tw9910 mt9t112 (V4L2) (V4L2) (V4L2) (V4L2) (V4L2) (V4L2) CEU ak4642 CEU ak4642 CEU ak4642 (V4L2) (ALSA) (V4L2) (ALSA) (V4L2) (ALSA) FSI DA7210 FSI DA7210 FSI DA7210 (ALSA) (ALSA) (ALSA) (ALSA) (ALSA) (ALSA) DMA DMA DMA Platform Platform Platform Support Support Support support support support SH7724 CPU Platform support CMT clockevent CPU idle R-standby (queued) kexec_jump U-Standby kernel enhance kernel enhance kernel enhance Now you can boot SH7724 reference platform without private driver. JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace

  12. SuperH Debian support status ( We work with Debian project to add SuperH support) 12 12 http://buildd.debian-ports.org/status/architecture.php?a=sh4 Official Debian packages must be compiled upon 10 target test boards real (native) hardware. Renesas will host Debian repository server to distribute these binary JLS 2009 : 2009-10-23 Rescuing SuperH to Linux commonplace Rescuing SuperH to Linux commonplace

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend