Boot OpenWrt on PCEngines APU2 with RAM only

Hi everyone,
I've post this question here since I'm building my image from the ground up, and I don't know if some sort of particular build settings are needed to achieve such a solution.

What I am trying to do is boot OpenWRT on a PCEngine (APU2, AMD GX-412TC) with iPXE entirely in RAM.
Now, the part to ship the kernel and the rootfs image on the board is working (both the kernel and the rootf.cpio.gz image are downloaded by the board)

The issue is that when the kernel looks for the initrd image, it looks like it fails to find it.
The iPXE script I'm using is this one:

kernel vmlinuz console=ttyS0,115200 rootfstype=tmpfs initrd=rootfs.cpio.gz init=/sbin/init
initrd rootfs.cpio.gz

but I'm getting the following:

[    1.907148] VFS: Mounted root (tmpfs filesystem) readonly on device 0:10.
[    2.021065] Kernel panic - not syncing: Requested init /sbin/init failed (error -2).

What I'm wondering is: should I tweak some values in the build configuration with either make menuconfig or make kernel_menuconfig?.
I looked through the options listed by both fo them it but I couldn't find anything that looked critical to make this approach work.

1 Like

I might be wrong, but I think you could get away with just using the ramdisk target image, instead of dealing with a separate rootfs. That way you'll have the rootfs embedded in the kernel image.


Thank you very much for your help, it worked like a charm :smiley:

1 Like