How to use initramfs as a rootfs

I have built a file system through busybox,and use “mkimage” to build a uImage file,and I load the uImage file through TFTP,and I get error log as bellow:

Tegra210 (P3450-0000) # tftp 84000000 uImage
Using eth_rtl8169 device
TFTP from server 192.168.1.204; our IP address is 192.168.10.77; sending through gateway 192.168.10.254
Filename 'uImage'.
Load address: 0x84000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###############################################################
         5.6 MiB/s
done
Bytes transferred = 36225096 (228c048 hex)
Tegra210 (P3450-0000) # bootm 84000000
## Booting kernel from Legacy Image at 84000000 ...
   Image Name:   Linux_Image
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    36225032 Bytes = 34.5 MiB
   Load Address: 84000000
   Entry Point:  84000000
   Verifying Checksum ... OK
   Loading Kernel Image
Image too large: increase CONFIG_SYS_BOOTM_LEN
Must RESET board to recover
 

Image too large: increase CONFIG_SYS_BOOTM_LEN
Must RESET board to recover
what should i do?
Make the kernel smaller can solve this issue?

Is this still an issue to support? Any result can be shared? Thanks

HI, I build a small rootfs into kernel as “initramfs”,The kernel increased by about 2m,that means I build my own rootfs into kernel successful.
I did the following:
1.I tried to replace the original image in path:/boot/Image
And when I reboot the device ,it still mount the rootfs in SD card rathe than “initramfs”
2.I rebuid the uboot,and change the CONFIG_SYS_BOOTM_LEN from 8M to 40 M,
build a uImage file use command:
mkimage -A arm64 -O linux -T kernel -C none -a 84000000 -e 84000040 -d zImage uImage
and load uImage from tftp server.
run command:
bootm 84000000
the kernel can not start…
The log as below:

Tegra210 (P3450-0000) # tftp 84000000 uImage
Using eth_rtl8169 device
TFTP from server 192.168.1.204; our IP address is 192.168.10.77; sending through gateway 192.168.10.254
Filename 'uImage'.
Load address: 0x84000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #
         5.5 MiB/s
done
Bytes transferred = 12413704 (bd6b08 hex)
Tegra210 (P3450-0000) # bootm 84000000
## Booting kernel from Legacy Image at 84000000 ...
   Image Name:   linux
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    12413640 Bytes = 11.8 MiB
   Load Address: 84000000
   Entry Point:  84000040
   Verifying Checksum ... OK
   Loading Kernel Image

Starting kernel ...

"Synchronous Abort" handler, esr 0x02000000
elr: 0000000005353044 lr : 00000000800827b8 (reloc)
elr: 0000000084000044 lr : 00000000fed2f7b8
x0 : 0000000000000000 x1 : 0000000000000000
x2 : 0000000000000000 x3 : 00000000fc807cf0
x4 : 0000000084000040 x5 : 0000000000000001
x6 : 0000000000000008 x7 : 0000000000000000
x8 : 00000000fc842260 x9 : 0000000001008000
x10: 000000000a200023 x11: 0000000000000002
x12: 0000000000000002 x13: 0000000000000200
x14: 0000000000000004 x15: 00000000fed2eb3c
x16: 0000000100000000 x17: 00000000001fffff
x18: 00000000fc5ffdc0 x19: 00000000fedcbd60
x20: 0000000000000000 x21: 0000000000000000
x22: 0000000000000001 x23: 00000000fc837cf8
x24: 0000000084000040 x25: 0000000000000001
x26: 00000000fc837cf8 x27: 00000000fedb9ec8
x28: 0000000000000000 x29: 00000000fc5f9f70

Code: bb5a6a59 40451e21 5b5d0132 f23caee3 (9968122a)
Resetting CPU ...

Any suggestion and help will be appreciated.!

I think the issue is most likely that your larger kernel/initramfs is overwriting some other component in RAM. The various load addresses (kernel_addr_r, ramdisk_addr_r, fdt_addr_r, etc.) are all calculated or hard-set in U-Boot based on an expected size. If you insist on loading a very large image that can’t fit, U-Boot will happily overwrite anything else that abuts that memory space. Looks like the DTB in RAM (fdt_addr/fdt_addr_r) is being corrupted, causing the kernel to fail to load/abort.

Dump your env variables using printenv, and see what everything is mapped to around 0x84000000 (kernel_addr_r, I assume - sorry, I don’t have my Nano set up right now to check). You can then either move things around manually to make more space, or you can look at the env scripts that calculate the spacing and change the ‘size’ parameters when you rebuild your U-Boot image to get more space.

HTH,

Tom

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.