-
-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
8551456
to
6b04b9a
Compare
Some notes from more testing: Disabling both the RNG and USB patches from patchwork with this u-boot build makes the graphics init in Linux work much more often. Instead of something like a 5% success rate, it looks more like 75% success rate. Having any of the two patches applied, or both, makes it flaky. This makes no sense if you assume the hang is in the display side of things. Though I never assumed this, to me it looks like something else than display hangs in parallel. |
I was able to get this working as well. I had a couple issues which I'll describe below: Before following these instructions, I had the default uboot from the factory on the eMMC. According to the instructions, I created a "firmware installer image" on an SD card and then zero'd out the bootloader stuff on the eMMC. After this, I could not get the firmware installer image (or my existing system for that matter) to boot. It is possible the issue is the SD card I used, which is a pretty old one from my closet that I hadn't used before. In any case, I was able to directly write the image to SPI flash using Next, I tried using uboot's UEFI support with For the time being, I've switched to just using the standard uboot extlinux menu entry support instead of UEFI. This boots up consistently for me. |
I haven't taken the time to test UEFI boot yet. Though it wouldn't surprise me if the USB issues (wonky) end up affecting the boot. And on top of this, it wouldn't surprise me if it makes the boot act different once handed to the kernel. Good news that you have it working. I'm wondering why you couldn't boot the SD image. Can you look into this? If you use that image and boot it from SPI (using the menu) you can erase the SPI to get back to eMMC -> SD boot order. Obviously you can reach me on IRC if you want to probe at my thoughts. |
6b04b9a
to
fad3d88
Compare
This is the first time ive ever seen a graphical uboot. something ive been waiting to see since Novena! |
I went and did a bisect with the following approach. It seems to be an interaction of this merge, but the annoying part is that both sides of the merge tested successfully. Or it could be a red herring? To my inexperienced eye in these parts of the kernel, it looks like it could be any of the changes in
Or it could still be a red herring. |
The good eye of @steev on the pine64 community discussion chat thing saw It seems to work fine with that reverted (or with an equivalent to the revert). Will test properly with a full NixOS system and not my minified test case. If it all ends up working fine I'll push that right here. |
Updated to the latest patch set. As far as I know, no behavioural change compared to the previous patch set, so users do not need to worry about updating yet. Users that already have my opinionated u-boot installed to their SPI can simply boot from SD from that u-boot, which will show the menu. This menu can be used to flash over. |
@steev is a kernel expert :)
The only main change is reserving the framebuffer memory, in order to avoid any issue like kernel memory (or anything like that) being overwritten by the efi framebuffer. |
I have tentatively pushed a commit with support for 5.8... Though don't update yet as 5.8 is not in Nixpkgs yet! This comes from stashed WIP work, and was tested to boot against a previous RC of 5.8. I don't think I would have taken the time until maybe the next week-end to update this PR, so when 5.8 lands in Nixpkgs, this should be ready. |
I noticed that the default boot order includes NVMe, but the boot menu doesn't have it as an option. I'm fine in the interim since I can just leave the EMMC zeroed out and let it reach NVMe naturally, but this could get quite annoying in a multi-boot setup. Edit: Also, I can confirm the 5.8 patches boot just fine. Master has the new version available, and pointing at that builds a perfectly usable image. |
So this PR right now works with graphical uboot on 5.8? Or it just boots on 5.8? |
@jbaum98 Graphical boot, verified with 5.7, not yet with 5.8 but in theory it should, as @dkabot states. @dkabot I don't have the hardware to test and validate, and have no known contributor that have the hardware and who can test and validate. Thus, I'm uneasy adding the option without being able to test and confirm. If you're in a situation to confirm it works or not, it should be relatively trivial to add. An interim option is to cancel the boot, go to the U-Boot console and use |
The graphical u-boot was able to boot an installer image with 5.8, currently slowly working on an install and will test further once that's done. |
Alright, the command for nvme seems to work fine. |
I flashed uboot to the emmc and it works! Using 5.8 kernel with the patches in this repo. |
@samueldr - I have tested adding nvme boot to the menu. Generally it works but the CTRL-C key combination has to be pressed at the right moment. Meaning after nvme drive has been initiated. Otherwise drive is invisible. |
I changed the default in my build to be the NVME drive instead of EMMC, but it only boots in 1/4 or 1/5 attempts (Manjaro Will switch to LTS to see if that's more stable. |
@samueldr, Thank you so much for your work. This is high on my wish list. I've been testing with the Pinebook Pro's original OS, the default Debian with kernel 4.4 and your U-Boot works great. If I can, I'd like to suggest that option zero / 0 in the OS / Kernel selection menu be used for the device selection. Meaning if you let it go til the OS / Kernel selection menu comes up, you can still select an alternate device. I've successfully hit Control-C at that menu and have gotten the device selection menu. But, making it an easy to use option would be nice. Again, thank you. |
9f99a8a
to
7cd026b
Compare
I never ended up explaining the latest commit. Arnaud Patard shared the solution for the wonky USB. With this keyboard works as expected, and USB boots are as quick as expected. |
7cd026b
to
ee3d667
Compare
Sorry @Lady-Galadriel it took so much time to reply, this got under a pile-up of other things to do :).
Nice to hear, so I guess 4.4 with the default Debian means it's using the BSP kernel? I had only had tests on mainline-based 5.x versions.
It's kind of not possible to do that. I'm assuming "OS / Kernel selection menu" is the extlinux.conf menu, right? U-Boot doesn't really have a concept of "menus" quite clearly. The extlinux.conf menu is totally independent from the other menus in U-Boot. The "extlinux.conf" menu is actually the The menu which is used here is the
While writing this, I figured out that So, why this boring story? We can't really merge those two menus using stock U-Boot commands. The Though, I think I'm in agreement that it would be interesting to have a more tightly integrated user-facing boot menu, which could integrate detected sources, and not only blindly present all options. Maybe a future project.
You're welcome, don't forget to also thank those who worked on the code. |
Updated the graphics init patchset with Arnaud Patard's latest patchset. Since the series file includes the USB patch, it's been removed and I'm using the series directly. I see no change compared to before, though I haven't tested whether it is expected that display init works without the custom patch. There is no changelog about the patchset. I see no special reason to or not to update to this latest revision (004) if you had updated to the better USB version from yesterday. Though if you didn't, do update! |
e.g. to disable cpu5 you can do: echo 0 > /sys/devices/system/cpu/cpu5/online |
@samueldr I've not yet tested, but I see in linux-next:
This is a different way of fixing the crash at boot with PWM and graphical uboot than what I wrote but looks fine to me. You may want to take it. |
Oh, this is one of the commit identified previously.
yes... Currently building a test image. I would assume this is not something that requires an update by end-users, except for total correctness. Thanks for noticing! |
yes, for end-users, no change. For us, it's different:
|
I have been working on u-boot -> grub-efi -> linux kernel and have been watching your progress as well. Thanks to Arnaud's vop and edp patches, the graphical u-boot (and grub-efi) works well. On u-boot USB, be aware that you have to stop usb prior to booting OS. See "How it Works" in https://gitlab.denx.de/u-boot/u-boot/-/blob/master/doc/README.usb. So using USB in u-boot is useless in my desired use case. Additionally, the stock u-boot pinebook-pro-rk3399_defconfig (as of v2020.10) will set ROCKCHIP_USB2_PHY=y, but the rk3399 uses Inno, so CONFIG_PHY_ROCKCHIP_INNO_USB2=y should be set instead. And also, CONFIG_PHY_ROCKCHIP_TYPEC can be set if desired. |
Using u-boot's link instead |
Are you sure it's not a left over of old usb support ? this comments is from the initial commit of the document. The device model is supposed to handled that.. Moreover, in order to use the usb keyboard in grub-efi, stopping the usb before launching grub seems counter-productive. Anyway, in the uefi case (even if it's working on my PBP), this reminds me of a recent patch I've seen on uboot mailing list: https://patchwork.ozlabs.org/project/uboot/patch/20201021220421.1926180-2-ilias.apalodimas@linaro.org/ |
@samueldr I've uploaded a newer patchset at the usual place but this version has to be tested by people who don't fear regressions.
|
@apatard I tested the new patchset on gru-kevin by chainloading (except the patches explicitly for Pinebook Pro). I had to replace |
@apatard I have tested new patches. Display seems ok but there are some problems with starting USB: starting USB... |
@alpernebbi I wonder why it was building before, I've fixed it. I've also refreshed the patches to make checkpatch and you happy :)
|
@apatard - you were right. I was missing options. Interestingly in 2020.07 they were working. |
@apatard - thanks. |
@as400l oh that sucks. Reboot is working fine here. The edp_reset.patch and vop_reset.patch patches were supposed to replace the hack-reset.patch patch. Can you try with it added again ? (You can still find it in the patches directory.) |
@apatard - sure I can. I applied these patches (as in the series file) Should I apply hack-reset.patch on top of them ? Or revert edp_reset and vop_reset and then apply hack-reset.patch ? |
Please apply it on top of them. vop_reset and edp_reset are needed anyway. |
@apatard - so I have applied hack-reset.patch additionally and reboot works as expected. But the side effect is that screen power management under Plasma (probably any DE) stops working. I mean when screen enters sleep mode there is no way to wake it back up. I am also applying Samuel patches - but I don't think they have anything to do with the reboot screen problems. |
@as400l I'd like to try reproducing the reset issue. Which kernel are you using ? |
@apatard I am using 5.8.16 with PWM patch applied. As to the power management - I tried multiple times. Always when using u-boot with hack-reset.patch applied PM is not working. |
I am having the same boot issues expected with 5.8 but on 5.7 as well. Not sure why. |
Small update for the ones not being on Cc: of the mails: My latest version of the patchset is on its way to uboot: https://lists.denx.de/pipermail/u-boot/2021-April/446395.html For the reset issue (which may lead to the PM issues ?!? ), I got some interesting discussions on #linux-rockchip channel the other day. I've not checked yet due to -ENOTIME, but disabling the hdmi nodes instead of resetting may help: https://freenode.irclog.whitequark.org/linux-rockchip/2021-03-19#29433344 Also, for people who may got troubles with all USB controllers enabled, leading to a freeze [leading them to disable the usb keyboard], there's a work in progress about the issue, see this thread: https://lists.denx.de/pipermail/u-boot/2021-April/446439.html |
I think I tracked the patches mentioned in the #linux-rockchip log: Haven't tried yet, but will soon~ish. EDIT: Oh, it's for reset issues, I wasn't reading carefully. With Linux, it looks like the panel being enabled on mainline still hangs. Is it expected? |
@samueldr Not sure which kernel hang you're talking about. Can you detail please ? |
I was talking about the issue that once required this revert patch. Though to be fair, I still haven't properly investigated running mainline with this updated patch set. I have tried running the UEFI NixOS iso with it, something is likely missing from the config as all RK3399 devices I have on hand fails to init their displays. |
I can see a bunch of fixes in the rockchip pwm driver so it's possible that one or more merged patch is solving this. |
Oh, forgot to return with more info. Apparently there is known issue (I don't know known how, and where, but apparently known) with UEFI boot on RK3399, where rockchipdrm somehow won't render the VT consoles. |
Closing, see #24. This branch is a dead-end, as progress in external projects mostly obsoletes it. |
What is this?
This is the future of booting the Pinebook Pro.
This is also how it should have been from the beginning.
This PR introduces an opinionated build of U-Boot that, more importantly, has
display init working with caveats.
It also introduces an installer image that can be burned on SD card to
install U-Boot to SPI for booting without involving U-Boot on eMMC or SD.
See it in action here: https://youtu.be/rdosT2yyA4g
How can I test?
Simple!
Read the contents of
FIRMWARE.md
. If it is not enough to get you going it isa documentation bug in this PR.
Why do I want this?
So, in the boot chain, the Pinebook Pro acts more like a normal laptop. No more
are you forced to keep an offset of your eMMC free for the bootloader. No more
are you forced to use MBR partitioning, because the GPT conflicts with the
offset for the bootloader.
You are free to choose any of the ways U-Boot can boot. Among those, bog
standard UEFI works!
With USB, the installation instructions in the upcoming future will be about
the same as any other computer. Rejoice!
What are the current issues?
From the added
FIRMWARE.md
fileMore details about the kernel issue
It has been reduced to when the combination of those three are loaded:
modprobe -a pwm_bl panel_simple rockchipdrm
They depend on each-other, AFAICT no order works better.
The system completely hangs, but not in a way where the hung task timeout is
triggered.
I need your help
Well, we all need each other's help.
The kernel issue with 5.6+ are out of my league. I spent too much time (days)
trying to understand what was going on. Fruitlessly.
What is probably going to help is get a limited version of tsys' patchset that
applies both on 5.5 and 5.6 without changes, reproduces the success on 5.5 and
issues on 5.6, and starting from that a bisect of the kernel can be done
without too much hairloss.
Acknowledgements
Without access to a nearly final revision of the Graphics fixes for the
Pinebook Pro, this wouldn't have been possible. Thank you Arnaud Patard from
Hupstream for allowing me to release the preview build to the benefit of Pine
users all around the world.