PowerPC平台 linux移植一
来源:互联网 发布:淘宝还要营业执照 编辑:程序博客网 时间:2024/05/18 01:36
在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跑起来了,但文件系统没有起来,下一步制作移植文件系统。
- PowerPC平台 linux移植一
- PowerPC平台 Linux移植二
- PowerPC平台 Linux移植三
- PowerPC平台 u-boot 移植
- Linux内核移植(powerpc)
- PowerPC DTS 移植
- ARM平台下的嵌入式linux移植大纲(一)
- PowerPC 平台 下 Linux rpm 包的一个安装问题
- 嵌入式 PowerPC Linux 平台扁平设备树FDT解析
- boost在powerpc(E500)linux平台上的编译
- linux设备树dts之powerpc 平台解析过程
- linux新平台移植
- 移植android代码到powerpc平台,在这个平台的支持实在是少之又少,艰辛的踏着每一步...
- pppoe向powerpc上移植
- 向powerpc上移植dhcp
- ACE网管平台移植Linux
- ACE网管平台移植Linux
- linux内核移植x86平台
- 数值的整数次方
- elipse不显示代码行数
- JS复选框的全选和反选
- 穷举法
- C语言运算符"黑马程序员"
- PowerPC平台 linux移植一
- 贪心算法
- 鸟哥的Linux私房菜之Linux 的文件权限与目录管理(一)
- 清除浮动
- STL::list
- Zookeeper入门
- 8_1
- 分治法
- autoresizing布局