-
Notifications
You must be signed in to change notification settings - Fork 42
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
Bootloader removes custom console bootargs #71
Comments
I'm also having problems with this and have the same use case.
@skeuchel Can you say a little more about how you managed to get this modification to work? Which kernel are you using and did you change any other options? I tried making the change you describe (to the Steps I followed:
The console parameter is seemingly added, but then I see this in the kernel output:
And then the console becomes garbled and the boot seems to hang. It seems to me that the problem is at least partly due to the wrong ( For example, the output from booting the SD (with the stock Fedora image) shows this:
And in that case the serial console works as expected (with Another thing I noticed is that the menu is seemingly never displayed (when booting from the nvme) even if I set |
I'm using the sg2042-master branch which I patched and rebased on 6.8.0-rc5. You can see my modifications here https://github.com/skeuchel/linux/commits/sg2042-master/ The master branch is more stable for me than the dev branch, but YMMV. Also I switched to a sata ssd because nvme seemed unstable.
Yes I ran into this as well. The problem is that an old dtb is passed to your new kernel. I assume yours comes either from an old bootloader of a provided sdcard image or and old bootloader from flash. If you update your bootloader as well it works.
Indeed, the vendor provided u-root only displays the boot menu on the graphical console, and not on the serial console. At least not anymore, because I remember it working with old images. I think I solved it by building u-root with a kernel that has this patch skeuchel/linux@38ed86b. This forced it to only display on the serial console. I am not sure anymore, because I am booting via edk2 now which displays a boot menu on serial by default, so you have to experiment a bit with it. You can easily change the kernel that u-root is compiled against, by cloning this repository and changing the kernel repository that is used in the |
Thanks so much for the info. I'll look into the details you provided and see if I can get things working.
Yeah. One thing that is strange is that if I boot from the SD card using the (latest) Fedora image, I get the boot console (at least if the NVMe is also present and also has a kernel installed, not sure otherwise). But if I restore the same image to NVMe and boot from that (which is what I've been doing), the menu is not displayed. EDIT0: I just noticed this text from ini configuration docs
I think I also remember seeing some error about I haven't tried to update the SPI just yet but it's strange that it would be missing (although I only obtained the board and not the full system), and maybe surprising that the NVMe even boots at all if that's indeed the case. EDIT1: Actually there's no |
@skeuchel Just one more question about this: I'm assuming you are using the prebuilt bootloader artifacts that you linked earlier from the MilkV forums. Is that correct? And the custom kernel is only used for the last phase of the boot flow? Or are you also compiling parts of the bsp (described here) using a custom kernel configuration also? Could you share the EDIT0: I was able to flash the Now when I boot I see I'm seeing another error though:
Referring to this part:
Not sure what that's about. I specified the device tree in the
And from the earlier files it seemingly finds it. Anyway, after flashing the SPI, the stock image fedora kernel ( The By the way, I assume the |
So the prebuild bootloader artifacts of the vendor repository are enough if you want to use graphical (or blind) boot, with a custom compiled kernel also using the sg2042-dev branch. However, to have linuxboot output on the serial console, I had to remove any mention of tty1, including the kernel that is build as part of linuxboot. For that you would have to clone the bootloader-riscv repository, and link it to your own linux fork which strips tty1 away. Also if you want to use the sg2042-master kernel branch as a distro kernel, then you should build your own bootloader against the sg2042-master branch, because the distro kernel will get the dtb from the bootloader.
I am currently booting from an sdcard. That is the contents of my ini
and this is the list of files on the sdcard
I think that error messages is related to trying to configure the mac addresses. Your output also contains More specifically, the zsbl will patch the dtb file a bit, changing memory and ethernet nodes, before it is passed to the next stage (opensbi). You can see the patching of the
Yeah the dtb of the new kernel and drivers changed somewhat, so not a good idea to boot an old kernel with a new dtb.
Still with the new dtb? Are you sure that the new dtb was loaded? Whatever is specified in
It's an image of an entire disk, but one that only contains a single partition.
|
Thanks again for all the info. I'm pretty new to this and it's difficult to find the right documentation so I really appreciate it.
I see. So you are using EDK II then with GRUB? If so, can you say a bit about how the GRUB config looks and how you have the drive partitions configured? I tried switching from:
to I'm not sure how to set things up to automatically boot from that though. The default boot device is "UEFI Misc Device" (IIRC). I see an option for the NVMe, but that's no good since I nuked the Fedora install (and only have the contents of the If I burn the Fedora image to a USB drive, I also see that in the list of boot options, but it doesn't seem to want to actually boot from it (even if I set it as the first in boot order, and hit continue). If I try, it just continues for a bit then puts me back in the UEFI shell (which if I I am able to select There's an I know I should probably be rebuilding this stuff from scratch with the new bootloader but currently I'm just trying to figure out how to get all of the pieces fit together.
This appears to fix the error, thanks!
In that case, it would still seem to be using the newer correct I'm thinking it might have to do with this commit. I notice this change is present in the |
In case anyone is also looking for using Milk-V Pioneer headlessly and run into this issue, I've made the necessary change in my forked repo and use github actions to build the modified firmware. It uses serial console as default tty. |
I have the milkv pioneer board and installed nixos on it. The contents of my
/boot/extlinux/extlinux.conf
includes bootargs for outputting onttyS0
however, when checking
/proc/cmdline
after bootingmy custom
console=ttyS0,115200
bootarg was removed and aconsole=tty1
was appended instead. As a result, the output on the serial console stops once the bootconsole is disabled.Since I intend to use my machine mainly in headless mode, I really want to see the console output on the serial port. I saw that the revyos people are forcing output on the serial console (revyos/sg2042-vendor-kernel@ac43de7) by changing the kernel config, which I am also using as a workaround
The text was updated successfully, but these errors were encountered: