Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Embedded Linux porting Speaker: Yi-Ji Jheng Date: 2007.12.05.

Similar presentations


Presentation on theme: "1 Embedded Linux porting Speaker: Yi-Ji Jheng Date: 2007.12.05."— Presentation transcript:

1 1 Embedded Linux porting Speaker: Yi-Ji Jheng Date: 2007.12.05

2 Outline  Embedded Linux porting 2

3 EMBEDDED LINUX PORTING 3

4 ramdisk.gz Step 4 KernelFile System busyboxToolchain* buildroot Toolchain* zImage

5 Source Environment  porting/ |-filesystem |-busybox-1.1.3.tar.gz |-busybox.config |-rootfs.tar.gz |-kernel |-linux-2.4.17_mvl21.tar.gz |-opt.tar.gz |-toolchain |-buildroot-0.9.27.tar.gz |-buildroot.config |-dl 5

6 Make Toolchain  #tar zxvf buildroot-0.9.27.tar.gz  #cd./buildroot  #cp../buildroot.config./.config  #make menuconfig #make menuconfig  #cp -af../dl./. #cp -af../dl./.  #make #make  #PATH=$PATH:/usr/local/toolchain/bin 6

7 Make busybox with Toolchain  #tar zxvf busybox-1.1.3.tar.gz  #cd./busybox-1.1.3  #cp../busybox.config./.config  #make menuconfig #make menuconfig  #make  #make install #ll./_install/ 7

8 Make File System (1/2)  #cd..  #dd if=/dev/zero of=ramdisk count=1024 bs=8192  #mke2fs ramdisk  #mkdir /mnt/tmp  #mount -o loop ramdisk /mnt/tmp  #cp -af./busybox-1.1.3/_install/* /mnt/tmp/. 8

9 Make File System (2/2)  #tar zxvf rootfs.tar.gz  #cp -af./rootfs/* /mnt/tmp/.  #mkdir /mnt/tmp/var  #mkdir /mnt/tmp/tmp  #mkdir /mnt/tmp/proc  #umount ramdisk  #gzip -9 ramdisk 9

10 Make zImage (1/2)  #tar zxvf opt.tar.gz  #PATH=$PATH:/usr/src/porting/kernel/opt/ hardhat/devkit/mips/lexra_fp_be/bin  #PATH=$PATH:/usr/src/porting/kernel/opt/ tools  #tar zxvf linux-2.4.17_mvl21.tar.gz  #cd./linux-2.4.17_mvl21 10

11 Make zImage (2/2)  #cp sd.config./.config  #make menuconfig  #make dep  #cp -af../../filesystem/ramdisk.gz./arch/mips/ramdisk/.  #make zImage  Download on Target Board 11

12 Work  Compile a program on Target Board 12

13 REPLENISH 13

14 Menuconfig  Target Architecture (mips) --->  Build options ---> (/usr/local/toolchain) Toolchain and header file location?  Toolchain Options ---> --- Kernel Header Options Kernel Headers (Linux 2.4.27 kernel headers) ---> --- uClibc Options [ ] Use the daily snapshot of uClibc? --- Binutils Options Binutils Version (binutils 2.15.94.0.2) ---> --- Gcc Options GCC compiler Version (gcc 3.4.3) ---> [ ] Build/install c++ compiler and libstdc++? --- Ccache Options [ ] Enable ccache support? --- Common Toolchain Options [ ] Enable multilib support? [ ] Enable large file (files > 2 GB) support?  Package Selection for the target ---> [ ] busybox  Target Options ---> [*] ext2 root filesystem for the target device 14

15 Get Method  1. get from Internet Must to modify website  #vi./toolchain/gcc/gcc-uclibc-3.x.mk  GCC_SITE:=http://mirrors.usc.edu/pub/gn u/gcc/gcc-$(GCC_VERSION)  2. perpare in advance 15

16 Uclibc Question  Target Processor Architecture > 1. Generic (MIPS I) (CONFIG_MIPS_ISA_1) (NEW) 2. MIPS II (CONFIG_MIPS_ISA_2) (NEW) 3. MIPS III (CONFIG_MIPS_ISA_3) (NEW) 4. MIPS IV (CONFIG_MIPS_ISA_4) (NEW) 5. MIPS32 (CONFIG_MIPS_ISA_MIPS32) (NEW) 6. MIPS64 (CONFIG_MIPS_ISA_MIPS64) (NEW) choice[1-6?]:  Target Processor Endianness > 1. Little Endian (ARCH_LITTLE_ENDIAN) (NEW) 2. Big Endian (ARCH_BIG_ENDIAN) (NEW) choice[1-2?]:  Target CPU has a memory management unit (MMU) (ARCH_HAS_MMU) [Y/n/?] (NEW) 16

17 Menuconfig  Busybox Settings ---> Build Options ---> [*] Do you want to build BusyBox with a Cross Compiler? (mips-linux-) Cross Compiler prefix 17


Download ppt "1 Embedded Linux porting Speaker: Yi-Ji Jheng Date: 2007.12.05."

Similar presentations


Ads by Google