-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem of LinuxBoot Implementation on QEMU-ARM64 #44
Comments
Just for the record, what kernel version is your image and which version of Ubuntu and Ubuntu's kernel? Sometimes when you don't see any prints, it's because the kernel doesn't know where to find the serial device (a result of not being able to get the ACPI tables). For debugging, you can hard-code the location of the serial device into the kernel command line with:
Where is something you can extract from qemu with:
Additionally, I'm curious if this path works:
I am of course curious why a vanilla Linux kernel can't generate the uefi-secure-boot node and whether Ubuntu has some special patches. |
I used the linux-5.4 for the Linuxboot, and the version of Ubuntu is also linux-5.4.
For the 3rd question, I have to say, Ubuntu indeed has some special patches. :) |
Phenomenon
This happened in the implementation of LinuxBoot on QEMU-ARM64.
When I replace UEFI shell with my Linux kernel Image, I found a weird Phenomenon:
UEFI -->Kernel+U-Root
means UEFI directly boot Kernel after BDS phase by EFI_stub.Reason
When UEFI using ACPI to config kernel, the kernel will generate an empty DT which contains some EFI map messages, command line, physical address for Linux, etc.
However, when Ubuntu is booted by grub, the fdt file (empty DT) it generated contains a node called "uefi-secure-boot", which cannot be generated by the kernel built by my own.
Thus, when my Linux with u-root is booting Ubuntu by kexec, Ubuntu cannot find the "uefi-secure-boot" node from the fdt, and consequently goes wrong.
Temporary solution
I commented the line blow in the source code of Ubuntu, then reinstalled Ubuntu.
Thus Ubuntu would not try to find this node and could be successfully booted by my Linux kernel.
Suggestion
The true solution to this problem is supposed to be modifying the source code of Linux kernel built on my own, to generate an additional
"uefi-secure-boot"
node.This problem is important for LinuxBoot because it means we have to customize the Linux kernel in firmware to adapt to various target Runtime OS like Ubuntu and CentOS.
I just discovered the problem when I implemented LinuxBoot on ARM64. I hope this group could take it into consideration and come out with a good solution.
The text was updated successfully, but these errors were encountered: