Creating bootable SD card for armsr/armv8

I'm experimenting OpenWrt in Congatec SMC1 with Congatec SMX8-Plus SoC. This has i.MX 8M Plus processor.

Imx_openwrt creates an image "openwrt-imx-imx8-imx8mplus-squashfs-sdcard.img", which can be written to SD card so the evaluation board boots first into uboot and then into kernel.
https://github.com/nxp-imx/imx_openwrt/

But when I build the image with OpenWrt's own build script, it builds images, which don't seem to have uboot. When these (or ready-built armsr/armv8 images) are written to SD card, they don't boot - there is just nothing on console.

How can I create bootable SD card from OpenWrt's own build scripts?

By doing the necessary development to port OpenWrt to this device (be it via ARMSR (which does make sense for SBC-like, very close to mainline supported devices) or as a dedicated non-ARMSR target). ARMSR does not imply 'boots on all devices', it only means to boot on supported devices. In the best of all cases, this may 'just' imply enabling some config settings.

Either way, u-boot is outside of ARMSR's focus, as this is device specific and by definition not generic - it just acts as the preloader to load up tianocore to provide efi boot services to the third stage bootloader.

Thanks for your fast response. :slightly_smiling_face:

I'll formulate this question differently. OpenWrt SystemReady page lists "SystemReady IR Certified Systems in OpenWrt" on page:
[OpenWrt Wiki] OpenWrt SystemReady

There is a row: "Congatec conga-SMX8-Plus (4 GB LPDDR4) & conga-SMC1/SMARC-ARM", but it is not tested in HW, as status field says, "Missing HW testing". How these systems can be booted to run OpenWrt?

I'm now trying to test this in that particular hardware. As I wrote, the problem is, that this particular HW needs uboot (or some other primary boot system) for booting, but images generated by OpenWrt's ARMSR environment don't have that.

I could test this also with NXP's or Variscite's EVK's (those are also on the list and I have those on my lab), but those also boot from SD card. Congatec's EVK was just the first one which caught my eye.

You have the hardware, you will have to do the development. OpenWrt is not a general purpose (~desktop) distribution, so its kernel is reduced to the minimum (which might not be enough for your hardware, but can be extended as needed).

For ARMSR, the expectation would be that the first stage bootloader providing UEFI boot services is provided by the board (similar to a BIOS), the Operating System just takes over at the grub stage.

[ u-boot(DTS) --> tianocore(UEFI boot services) ] --> grub-efi

If your board does not provide that, you will have to generate images containing the former two, but that's beyond what the System Ready specification mandates (still relatively easy to do, just not SR).

1 Like

Ok thanks. My impression was that OpenWrt would provide reference images for those listed EVKs. Now I know how to proceed.

It primarily evolved from a virtualization (armvirt) target (qemu-kvm), checking https://git.openwrt.org/?p=openwrt%2Fopenwrt.git&a=search&h=HEAD&st=commit&s=armsr suggests some extending for Broadcom (RPi4), Renesas RZ and NXP/ Freescale i.MX 8/ 9 later.

Keep in mind that this hardware is rather exotic within the OpenWrt ecosystem and only few developers/ contributors have access to it, so whatever support is there, has been driven by NXP/ Renesas to the extent they cared about it (and the RPi4 has a better known non-ARMSR target).

The above might provide some hints how an ARMSR environment is provided on the RPi4 (primarily with Debian and similar general purpose ARMv8 distributions in mind), namely with a device specific u-boot/ DTS, which then loads a tianocore UEFI-bootservices payload. On top of this infrastructure, the normal linux distribution can be booted (using grub-efi and a mainline linux kernel), obviously this kernel needs to be a) new enough for the hardware in question and b) have all necessary drivers (kernel modules) enabled. The later is easier in general purpose distribution that enables pretty much everything and the kitchen sink (and where resulting kernel weighs >150 MB).

All of this can be done for OpenWrt as well, just don't expect everything to 'just work™' there, this stuff is new and exotic/ rare.

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