I’m using a tdx reference image and this guide to deploy initramfs external to the Kernel. I successfully generated a .cpio.gz file, wrapped it for U-Boot using:
mkimage -A arm -O linux -T ramdisk -n "Initial Ram Disk" -d Apalis-iMX8_Reference-Minimal-Image-rt.rootfs.cpio.gz initramfs.img
Then copied it to a USB drive. With the i.MX8 in the Ixora carrier board, I powered on, stopped it from auto-booting, and ran from U-Boot:
load usb 0:1 ${ramdisk_addr_r} initramfs.img " which spit out: "49482086 bytes read in 3085 ms (15.3 MiB/s)
Next I ran:
fatwrite mmc 0:1 ${ramdisk_addr_r} initramfs.img ${filesize}
only to see:
Error: no space left: 49482086
Error: writing contents
** Unable to write "initramfs.img" from mmc 0:1 **
I’m not sure why I am seeing this error.
Here’s additional information:
mmc info:
Device: FSL_SDHC
Manufacturer ID: 13
OEM: 14e
Name: S0J56
Bus Speed: 52000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 14.8 GiB WRREL
Boot Capacity: 31.5 MiB ENH
RPMB Capacity: 4 MiB ENH
mmc part:
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 8192 98304 ea83ffae-01 0c
2 106496 30973952 ea83ffae-02 83
fatls mmc 0:
169408 imx8qm-apalis-v1.1-ixora-v1.2.dtb
102464 dpfw.bin
43 overlays.txt
overlays/
169098 imx8qp-apalis-v1.1-ixora-v1.2.dtb
167782 imx8qm-apalis-ixora-v1.1.dtb
106496 hdmitxfw.bin
166541 imx8qp-apalis-v1.1-eval.dtb
5754 boot.scr
10625018 Image.gz
167405 imx8qp-apalis-v1.1-ixora-v1.1.dtb
167667 imx8qm-apalis-v1.1-ixora-v1.1.dtb
166842 imx8qm-apalis-eval.dtb
166807 imx8qm-apalis-v1.1-eval.dtb
13 file(s), 1 dir(s)
print filesize:
filesize=2f30966
SATA is obviously available to the Kernel (since I can Read/Write data to the SSD during normal operation) but not U-Boot by default on i.MX8, so my ultimate goal is to use an initramfs bundled or external to the kernel to then tell the kernel (init file) to bring up the root filesystem on-board the SSD. In this scenario, the kernel and U-boot will remain on the eMMC with the initramfs, but the actual filesystem that will regularly be used will reside on the SSD.