powerpc如何移植Linux系统,PowerPC平台 linux移植一

在PowerPC平台 u-boot移植基础上,移植Linux内核,具体移植过程如下:

1.修改顶层Makefile ARCH        ?= powerpc CROSS_COMPILE    ?= powerpc-linux-gnu- 2.配置 freescale@freescale-sdk:~/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 freescale@freescale-sdk:~/work/source/linux-2.6.35-r2$ ls .config ls: cannot access .config: No such file or directory 拷贝p1010rdb_defconfig至改目录arch/powerpc/configs/ freescale@freescale-sdk:~/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 # freescale@freescale-sdk:~/work/source/linux-2.6.35-r2$ ls .config .config 3.编译 freescale@freescale-sdk:~/work/source/linux-2.6.35-r2$ make uImage 错误一: 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 freescale@freescale-sdk:~/work/source/linux-2.6.35-r2$ make menuconfig < >   The IPv6 protocol  ---> 去掉IPv6(目前用不到),再编译   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 freescale@freescale-sdk:~/work/source/linux-2.6.35-r2$ Load Address Entry Point地址可能有问题,先试一下看能否启动 4.测试: => 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 T T T T T T 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 启动失败,再次尝试 => 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 提示Ramdisk加载失败,先用busybox做个文件系统再试试 => 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 (freescale@freescale-sdk) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-55) ) #1 Sun May 24 10:25:50 CST 2015 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 挂机,kernel跑起来了,但文件系统没有起来,下一步制作移植文件系统。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值