Linux内核 - 错误:无法在0x1000000下分配0x6b3c字节

时间:2015-12-01 18:37:14

标签: linux-kernel embedded-linux u-boot powerpc device-tree

我将rootfs(android.manifest.xml)包含在我的内核中,因此内核现在的大小为17Mb:

CONFIG_INITRAMFS_SOURCE

由于它被压缩,它将占用未压缩的39Mb:

$ ls -la uImage
-rw-r--r-- 1 kkr kkr 17669274 Dec  1 18:59 uImage
$ d2h 17669274
0x10D9C9A

为什么我不能通过uBoot使用此命令启动内核?

$ dd if=uImage of=uImage-x.gz bs=64 skip=1
$ file uImage-x.gz
uImage-x.gz: gzip compressed data, max compression, from Unix
$ gunzip uImage-x.gz
$ ls -la uImage-x 
-rw-r--r-- 1 kkr kkr 39852288 Dec  1 19:18 uImage-x
$ d2h 39852288
0x2601900

由于内核本身需要=> setenv bootargs console=$consoledev,$baudrate $othbootargs => tftp 0x3000000 $bootfile Speed: 100, half duplex Using eTSEC1 device TFTP from server 192.168.32.3; our IP address is 192.168.32.32 Filename 'uImage-powerpc'. Load address: 0x3000000 Loading: ##################################################### done Bytes transferred = 17669274 (10d9c9a hex) => tftp 0x2700000 $fdtfile; Speed: 100, half duplex Using eTSEC1 device TFTP from server 192.168.32.3; our IP address is 192.168.32.32 Filename 'sat_92107.100.00C_p2020.dtb'. Load address: 0x2700000 Loading: ## done Bytes transferred = 15164 (3b3c hex) => bootm 0x3000000 - 0x2700000 ## Booting kernel from Legacy Image at 03000000 ... Image Name: Linux-4.0.0-AOA00.01-00662-g07ae Created: 2015-12-01 17:59:21 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 17669210 Bytes = 16.9 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 02700000 Booting using the fdt blob at 0x02700000 Uncompressing Kernel Image ... OK ERROR: Failed to allocate 0x6b3c bytes below 0x1000000. device tree - allocation error 字节(压缩)或0x10d9c9a字节(未压缩),因此没有机会将设备放在0x2601900之下。这个值(16Mb)是否可配置?我提取的内核是否小于16Mb?

1 个答案:

答案 0 :(得分:0)

是的,通过将环境变量bootm_lowbootm_size设置为十六进制值,可以在U-Boot中配置此值。在您的情况下,它分别是0x00x20000000

请参阅U-Boot源代码树中大型README文件的“环境变量”部分。