Download presentation
Presentation is loading. Please wait.
1
Embedded Linux porting Kernel
Speaker: Yi-Ji Jheng Date:
2
Outline Embedded Linux porting - Kernel
3
Embedded Linux porting Kernel
4
Target Board LAN DSP WAN Console port MIPS 8MB * 2 SDRAM 4MB FLASH
5
Source environment hardphone/ |-linux _mvl21.tar.gz |-opt.tar.gz
6
Install Toolchain #tar zxvf opt.tar.gz
#PATH=$PATH:/usr/src/hardphone/opt/hardhat/devkit/mips/lexra_fp_be/bin #PATH=$PATH:/usr/src/hardphone/opt/tools
7
Make Kernel #tar zxvf linux-2.4.17_mvl21.tar.gz
#cd ./linux _mvl21 #make clean && make mrproper #cp ./sd.config ./.config #touch ./arch/mips/ramdisk/ramdisk.gz #make menuconfig #make dep #make zImage
8
Download in Target Board
1. Use Winscp to get zImage on PC 2. Setup Target Board 3. Execute and setup tftp 4. Execute and setup Super Terminate 5. Load Kernel Image on Target Board 6. Run
9
Work Implement below pic.
10
replenish
11
Toolchain for compiler
mips_lexra_fp_be-g++ mips_lexra_fp_be-cpp mips_lexra_fp_be-gcc mips_lexra_fp_be-ld mips_lexra_fp_be-as mips_lexra_fp_be-strip .
12
Toolchain for mkimage Add header on Kernel image to tell BootLoader some info. Header is 64 Byte (0x40) -a set load address to ''addr'' (hex) -e set entry point to ''ep'' (hex) -C set compression type 'comp'
13
Point to menuconfig (1/2)
Target Board Machine selection ---> [*] Support for Lexra LX-PB20K board (19200) Default BAUD Rate CPU CPU selection ---> (Lexra_LX45XXX) CPU type
14
Point to menuconfig (2/2)
Network device Network device support ---> [*] Network device support Ethernet (10 or 100Mbit) ---> [*] Ethernet (10 or 100Mbit) [*] MIPS SD9218 embedded ethernet controller support Cross compiler Kernel hacking ---> [*] Are you using a crosscompiler
15
Makefile Find a parameter that call CROSS_COMPILE
CROSS_COMPILE = mips_lexra_fp_be-
16
No ramdisk.gz error make[1]: Entering directory `/usr/src/hardphone/linux _mvl21/arch/mips/ramdisk' make[1]: *** No rule to make target `ramdisk.gz', needed by `ramdisk.o'. Stop. make[1]: Leaving directory `/usr/src/hardphone/linux _mvl21/arch/mips/ramdisk' make: *** [_dir_arch/mips/ramdisk] Error 2
17
Kernel Image of Location
arch/mips/zboot/zImage 474Byte
18
Setup Target Board Ethernet - LAN Console port Power
19
Execute and setup tftp Where does kernel image ?
20
Execute and Setup Super Terminate (1/3)
Any name
21
Execute and Setup Super Terminate (2/3)
Select your console port
22
Execute and Setup Super Terminate (3/3)
23
Load Kernel Image in Target Board
Power on hardphone Press any key into the Boot Mode, otherwise go into Linux
24
Boot Mode Command ? - print this menu f - load from Flash and go
l - load from TFTP server to SDRAM, no go (no save to Flash) L - load from TFTP server to SDRAM and go @ - load from TFTP server to SDRAM, no go (save to Flash) b - show boot parameters c - change boot parameters p - ping test (ping other station from the target)
25
Setup that Download from tftp
BOOT> c tftp server – <tftp ip> tftpfile zLinuxR.img – <kernel image name> ip address – <target board ip> subnetmask – <netmask> gateway – <defauly gw> bootstate <default>
26
Kernel panic Be very happy to see that
We don’t make ramdisk.gz, so we don’t mount file system
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.