Based on the PowerPC platform U-boot porting, the porting of the Linux kernel is as follows:
1. Modify the top level makefile
ARCH = PowerPC
Cross_compile? = powerpc-linux-gnu-
2. Configuration
[Email protected]:~/work/source/linux-2.6.35-r2$ make P1010rdb_defconfig
Drivers/net/kconfig:109:warning:choice value used outside its choice group
Drivers/net/kconfig:115:warning:choice value used outside its choice group
***
Can ' t find default Configuration "Arch/powerpc/configs/p1010rdb_defconfig"!
***
MAKE[1]: * * * [p1010rdb_defconfig] Error 1
Make: * * * [p1010rdb_defconfig] Error 2
[email protected]:~/work/source/linux-2.6.35-r2$ ls. config
Ls:cannot access. Config:no such file or directory
Copy P1010rdb_defconfig to directory arch/powerpc/configs/
[Email protected]:~/work/source/linux-2.6.35-r2$ make P1010rdb_defconfig
Drivers/net/kconfig:109:warning:choice value used outside its choice group
Drivers/net/kconfig:115:warning:choice value used outside its choice group
#
# configuration written to. config
#
[email protected]:~/work/source/linux-2.6.35-r2$ ls. config
. config
3. Compiling
[Email protected]:~/work/source/linux-2.6.35-r2$ make uimage
Error One:
net/ipv6/ipv6_sockglue.c:in function ' Ip6_ra_control ':
Net/ipv6/ipv6_sockglue.c:72:44:error: ' struct Inet_sock ' has no member named ' Num '
MAKE[2]: * * * [NET/IPV6/IPV6_SOCKGLUE.O] Error 1
MAKE[1]: * * * [Net/ipv6] Error 2
Make: * * * [NET] Error 2
[Email protected]:~/work/source/linux-2.6.35-r2$ make Menuconfig
< > The IPV6 protocol--->
Remove IPV6 (currently not available), then compile
WRAP Arch/powerpc/boot/uimage
Image name:linux-2.6.35
Created:sun May 24 10:26:09 2015
Image type:powerpc Linux Kernel Image (gzip compressed)
Data size:2919511 Bytes = 2851.08 KB = 2.78 MB
Load address:00000000
Entry point:00000000
[Email protected]:~/work/source/linux-2.6.35-r2$
Load address Entry Point addresses there may be a problem, first try to see if you can start
4. Test:
= TFTP 0x1000000 uimage
speed:1000, Full Duplex
Using eTSEC1 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' Uimage '.
Load address:0x1000000
Loading:t T T t tee
Retry count exceeded; Starting again
speed:100, Full Duplex
Using eTSEC2 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' Uimage '.
Load address:0x1000000
Loading: #################################################################
#################################################################
#################################################################
####
Done
Bytes transferred = 2919575 (2c8c97 hex)
= Bootm 0x1000000
Warning:adjusting available memory to 30000000
# # booting kernel from Legacy Image at 01000000 ...
Image name:linux-2.6.35
created:2015-05-24 2:26:09 UTC
Image type:powerpc Linux Kernel Image (gzip compressed)
Data size:2919511 Bytes = 2.8 MiB
Load address:00000000
Entry point:00000000
Verifying Checksum ... Ok
Uncompressing Kernel Image ... Ok
Failed to start, try again
= setenv Ethact eTSEC2
= TFTP 0x1000000 uimage
speed:100, Full Duplex
Using eTSEC2 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' Uimage '.
Load address:0x1000000
Loading: #################################################################
#################################################################
#################################################################
####
Done
Bytes transferred = 2919575 (2c8c97 hex)
= TFTP 0x2000000 P1010RDB.DTB
speed:100, Full Duplex
Using eTSEC2 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' P1010RDB.DTB '.
Load address:0x2000000
Loading: #
Done
Bytes transferred = 12994 (32c2 hex)
= Bootm 0x1000000 0x2000000
Warning:adjusting available memory to 30000000
# # booting kernel from Legacy Image at 01000000 ...
Image name:linux-2.6.35
created:2015-05-24 2:26:09 UTC
Image type:powerpc Linux Kernel Image (gzip compressed)
Data size:2919511 Bytes = 2.8 MiB
Load address:00000000
Entry point:00000000
Verifying Checksum ... Ok
# # Loading init Ramdisk from FIT Image at 02000000 ...
Bad FIT RAMDisk image format!
Ramdisk image is corrupt or invalid
Prompt RAMDisk load failure, first use BusyBox to make a file system and try again
= setenv Ethact eTSEC2
= TFTP 0x1000000 uimage
speed:100, Full Duplex
Using eTSEC2 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' Uimage '.
Load address:0x1000000
Loading: #################################################################
#################################################################
#################################################################
####
Done
Bytes transferred = 2919575 (2c8c97 hex)
= TFTP 0x2000000 P1010RDB.DTB
speed:100, Full Duplex
Using eTSEC2 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' P1010RDB.DTB '.
Load address:0x2000000
Loading: #
Done
Bytes transferred = 12994 (32c2 hex)
= TFTP 0x3000000 rootfs.ext2.gz.u-boot
speed:100, Full Duplex
Using eTSEC2 Device
TFTP from server 192.168.2.242; Our IP address is 192.168.2.21
Filename ' Rootfs.ext2.gz.u-boot '.
Load address:0x3000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
################################################################
Done
Bytes transferred = 4745428 (4868d4 hex)
= Bootm 0x1000000 0x3000000 0x2000000
Warning:adjusting available memory to 30000000
# # booting kernel from Legacy Image at 01000000 ...
Image name:linux-2.6.35
created:2015-05-24 2:26:09 UTC
Image type:powerpc Linux Kernel Image (gzip compressed)
Data size:2919511 Bytes = 2.8 MiB
Load address:00000000
Entry point:00000000
Verifying Checksum ... Ok
# # Loading init Ramdisk from Legacy Image at 03000000 ...
Image name:fsl-image-minimal-p2020rdb-20140
created:2014-01-24 6:44:46 UTC
Image type:powerpc Linux RAMDisk Image (gzip compressed)
Data size:4745364 Bytes = 4.5 MiB
Load address:00000000
Entry point:00000000
Verifying Checksum ... Ok
# # flattened Device Tree blob at 02000000
Booting using the FDT blob at 0x2000000
Uncompressing Kernel Image ... Ok
Loading Ramdisk to 2fb79000, end 2ffff894 ... Ok
Loading Device Tree to 00ff9000, end 00fff2c1 ... Ok
Warning:could not find Compatiblenode fsl-usb2-dr:fdt_err_notfound.
Using P1010 RDB Machine description
Memory CAM mapping:256/256/256 Mb, RESIDUAL:256MB
Linux version 2.6.35 ([email protected]) (GCC version 4.5.1 (sourcery g++ Lite 2010.09-55)) #1 Sun may 10:25:50 CST 20 15
Found INITRD at 0xefb79000:0xeffff894
Bootconsole [UDBG0] Enabled
Setup_arch:bootmem
......
rtc-pt7c4338 0-0068:hctosys:unable to read the hardware clock
Ramdisk:gzip image found at block 0
vfs:mounted Root (ext2 filesystem) readonly on device 1:0.
Freeing unused kernel memory:212k init
Init:version 2.88 booting
/etc/init.d/rcs:line 27:can ' t create/etc/hostname:read-only file system
Starting Udev
Missing Devtmpfs, which is required for Udev to run
Halting ...
Init:sending phwclock:can ' t open '/DEV/MISC/RTC ': No such file or directory
stopping syslogd/klogd:no syslogd found; None killed
Deconfiguring Network interfaces ... ifdown:interface LO not configured
Done.
Stopping Lighttpd Web server:no/usr/sbin/lighttpd found; None killed
Lighttpd.
Sending all processes the term signal ...
Sending all processes the KILL signal ...
/ETC/INIT.D/RC:/etc/rc0.d/s25save-rtc.sh:line 13:can ' t create/etc/timestamp:read-only file system
Urandom stop:failed.
Unmounting remote filesystems ...
Deactivating swap ...
Unmounting local filesystems ...
Power down.
System halted, OK to turn off power
Hang up the machine, kernel run up, but the file system is not up, the next step to make the porting file system.
PowerPC platform Linux porting one