In order to use uInitramfs
(an initramfs with an U-Boot header) you should add the line
#define CONFIG_INITRD_TAG 1
to the U-Boot source file u-boot/src/include/configs/sn9866x.h
and recompile U-Boot.
Then tell U-boot to load the uInitramfs
file and to pass it as
an ATAG enrty to the kernel:
fatload mmc 0:1 0x01000000 uImage fatload mmc 0:1 0x01A00000 uInitramfs bootm 0x01000000 0x01A00000
Or, alternatively, you could use initramfs.cpio.gz
without an U-Boot wrapper and
pass a boot argument initrd=<address_hex>,<size_in_bytes_decimal>
to the kernel cmdline:
initrd=0x01A00000,533651
and add a command for loading initramfs image to the u-boot bootcmd:
fatload mmc 0:1 0x01A00000 initramfs.cpio.gz
In both cases the 'root=' kernel cmdline argument is not used by the kernel but
you could use it by yourself in the /init
and /linuxrc
scripts in order
to extract a name of appropriate flash partition.
See https://www.kernel.org/doc/html/latest/admin-guide/initrd.html
and https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
for more information.