OpenWrt, Uefi, x86, still not solved

Hi there,
as of today there is only one short wiki page explaining how to get this running. When I tried it out, the git merge results in hundreds of conflicts, so I just sticked to the jow-staging repo on the branch jow-staging/backport-18.06.
Compiling worked fine, however I could not find the option Build EFI grub images mentioned in the wiki.
When I dd the image into the emmc of myACEPC T8 and boot, I still end up on the EFI Shell.

There is nearly zero explanations on how to do that in an alternative way. Can anybody help?
I need no virtual machine and no debian running on my mini pc, just openwrt. And the one I have doesn't support legacy boot. Is there a way to make it work?

1 Like

Use another chain boot loader

Try creating a USB stick with refind, boot from it and press ESC to allow it to find possible places to boot from, hopefully your OpenWRT even if it legacy will show up

I also used Jow build b4

1 Like

Thanks for your hint but it is still not very clear to me how to install openwrt on the integrated memory of the Acepc using refind.
Also I made some progress, I just took the master branch of the Jow build and compiled it, I could choose the GRUB EFI option this time in the make configuration menu. After writing the efi enabled image I could boot into what I think is Openwrt but I get stuck on Dmesg output. The system is active, it detects when I remove or add usb devices etc but I can't do anything else, not even text input. I plugged the pc to a router but ethernet seems to be down as well. Does anybody know what the problem might be?

Should I be expecting a login shell to appear with root@openwrt? Or is there something I am missing?

On LAN access via

1 Like

It is not the problem I think. When I tried the raspberry Pi image, the log is responsive and when I press enter i get into the openwrt terminal. I also setup my router so it doesn't collide with the I could successfully access the Rpi remotely but no signs of life for the mini pc with the UEFI image. It just displays some system logs and stops there. I can't even scroll up to see if there was some errors.
Maybe it doesn't support the drivers of the ethernet adapter and I should add them? not sure where to look for that kind of think.

The default image has only some Intel Ethernet drivers. So you most likely need to add your Realtek or whatever NIC you have

I also had some local keyboard access issues and then used a wireless keyboard with dongle

There is a PR here adding UEFI support You might be able to cherry pick the commits and apply them to latest OpenWrt master. The commits are in the branch called "x86-efi-images"

Boot a Linux liveCD and then follow the Linux install instructions. Or boot a Sergei Strelec Windows PE

and then use the Windows instructions.

Or install OpenWrt in a USB as normal, then boot from it and connect to it over ssh or with a keyboard, insert another usb drive with the installation image, then use dd to flash the openwrt image in the mmc following the Linux instructions to make the USB drive.

Check that you have compiled/integrated the HID USB interface drivers (they are under Kernel > USB menu). Without that the system will not take keyboard/mice input even if it detects that USB devices have been plugged.
Afaik they are not built/integrated by default in many OpenWrt devices.

Thanks for the explanation,
the part with booting from live usb ubuntu was no problem and I could dd the image into the internal memory of the mini pc. My question was related to the software called rEFInd proposed above by Markbirss.

I will try recompiling after checking for the HID USB drivers. I also think that the ethernet adapter in that mini pc is not supported by default to it is going to be tricky to give the system access to internet in order to update/install packages. I might copy the kernel modules manually to the system and load them. Good that it is a 64bit intel processor, saving me the hassle of cross compling.

EDIT: Just noticed that loads of devices are already supported and can just be chosen from the devices list displayed under "kernel" in the menu config. Will try that and update.

Yes. You probably just need to enable/integrate the driver for it. Afaik OpenWrt has support for all ethernet controllers.

If OpenWrt boots up you don't have to worry about EFI bootloader. OpenWrt's design is for its kernel to take direct control of peripherals rather than using BIOS (the VGA text being an exception). The release builds don't include the USB keyboard driver. You definitely need to build that in.


This is the file to download to write a bootable image to USB for refind

It allows non efi kernels to boot on efi pc (even on Mac)

use it as your first boot device
then stick in the other USB with openwrt press 'ESC' to see if it shows the legacy kernel for your openwrt

or use the EFI build open on its own

Oh I get it now, so it is kind of a boot bridge. Thanks a lot!

1 Like

So I just compiled the branch on that PR and copied the image to my mini pc after making sure all necessary kernel modules were there (could check the device names from the live boot usb ubuntu).
Unfortunately the system behaves the same way as before, I also noticed that the keyboard was somehow operational because the system reboots when i push Ctrl+Alt+Del but that's it, nothing is displayed when I type something. Also ethernet seemed to be disabled as I couldn't detect any device when I connect it to a router or to my laptop with the right network settings (worked with a raspberry pi openwrt).

My guess now is that the emmc storage of my mini pc is the problem. I did not check usb/mmc support in the kernel modules. And from the log I see that it is waiting for root device PARTUUID=... so i guess I will try that out.

But then how could't it even start and boot and reach that status if the storage cannot be found? I am a bit confused.

Yes it makes sense.
The kernel is loaded to RAM and executed by the bootloader. The text printed on screen there is from the kernel.
The "waiting for root device" text means that it is looking for the root filesystem, and I'm not seeing anything that shows it found any.

It's possible that you are loading a kernel that lacks drivers (modules) to operate storage, but afaik the x86 kernel does have emmc drivers built in so it should be able to use it.

Can you try booting the same from a USB drive, boot fully and then post here the result of "dmesg"? There might be errors in detecting it.

This is normal behaviour for your issue.
All drivers you select in the build system are placed in the root filesystem and loaded on boot (or when needed).
If the kernel can't find the root filesystem, it won't be able to load the drivers either.

Apparently, the USB keyboard drivers are compiled in the kernel for x86 targets
so the kernel can receive keyboard input.

I added the mmc/sd support but nothing changed, still stuck.

Interestingly, while stuck I plugged a usb drive with the same OpenWrt image on it and suddenly it continued the boot process and I had access to the root shell. So it was definitely the emmc problem. Maybe it is hardcoded somewhere to work with /dev/sdx and not with /dev/mmclbkx?

Anyway I dumped the whole dmesg into a text file

What else can I do to get it to find that internal emmc?

No it isn't. It's looking on any block device for a partition with partuiid aa996d6b-8043-4f8e-b20b-2cb19d414102

So the moment it sees your USB drive it sets up shop as normal.

The point here is that in the dmesg the system isn't detecting any "mmcblk" nor "sdx" apart from your USB drive (that gets assigned sda), not even later, after it completed boot from the USB drive and was a fully functional system.

I don't know what can be done as I don't see any error. You could try checking in the device BIOS/UEFI settings if you can change storage settings to "legacy" or IDE or whatever, if at all possible.

I see that this device has a SDcard slot, or at least the system does detect one (sdhci host controller), you could try installing OpenWrt there.

Maybe try to install Debian server instead? You have 32GB right? you can fit anything you want there.

I went with Ubuntu server finally, but OpenWrt from the SD card is still a good working solution. Will be playing around with both to configure a router.

As for the MMC module, it is still a mysteri why it doesn't get detected.

from the image... looks like you could use some rootdelay ...

Try this...