Using grub-image ?
#1
Would it be safe to use the grub-image, with all the modules (as long as it doesn't exceed 16 MB) and flash it to the spi ? Which would eliminate the need for uboot entirely ?
Just checking my options before i get an ssd, for the nvme adaper (pbp)
#2
You'll have to do some real configuring to use GRUB, and it will still rely on u-boot. If you want to flash to SPI, there are already u-boots for the SPI that are capable of booting from NVMe drives in the PBP. (Thanks to users dhivael and pcm720, respectively!)
#3
I got grub to work as an EFI payload from uboot, only caveat is that the display doesn't work. Install grub with --target=arm64-efi and --removable flags, and use the following boot script (adjust as needed to your setup):


Code:
setenv bootargs initrd=/boot/initramfs-linux.img console=ttyS0 console=tty1 root=LABEL=ROOT_MNJRO rw rootwait video=eDP-1:1920x1080@60 video=HDMI-A-1:1920x1080@60 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash
load mmc 1:1 ${fdt_addr_r} dtbs/rockchip/rk3399-pinebook-pro.dtb
load mmc 1:1 ${kernel_addr_r} efi/EFI/BOOT/BOOTAA64.EFI
bootefi ${kernel_addr_r} ${fdt_addr_r}
And grub.cfg (adjust to your setup)

Code:
set timeout_style="menu"
set timeout=5
menuentry "Kernel" {
linux (hd0,msdos1)/Image console=tty1 root=LABEL=ROOT_MNJRO rw rootwait video=eDP-1:1920x1080@60 video=HDMI-A-1:1920x1080@60 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash
devicetree (hd0,msdos1)/dtbs/rockchip/rk3399-pinebook-pro.dtb
initrd (hd0,msdos1)/initramfs-linux.img
}


I've been poking around the u-boot source code to try and get the eDP and LCD drivers working <https://github.com/amiraeva/uboot-pbp>. So far I can get the display to flicker for a brief second before the u-boot serial console loads, and have run out of things to try. Any ideas/suggestions would be appreciated!
#4
@ScarFez, you don't want to flash Grub to the SPI. There are more things in the U-Boot package than just booting. One of the sections is for the dual control processors, which handle the speed adjustment and thermal limiting, (if I understand it correctly). Many vendors use closed source code for this function. We do have some work alike open source for that code, (can't remember it's name). Plus, there is DRAM initialization and other SoC specific code that needs to run.

Anyway, you want U-Boot, (or similar firmware), to be in SPI, (eventually), and have Grub as the payload. Thus, we can change kernels, boot devices, password protect booting, or editing grub menu entries, all from Grub.

That's my ideal end result. Stable, fully open source SPI firmware that will check USB, SD card, NVMe and then eMMC for booting. Whence a device has been selected, Grub takes over from that specific device. (So if Grub gets screwed up on your eMMC, you can boot using USB or SD card to recover.)
--
Arwen Evenstar
Princess of Rivendale
#5
(03-25-2020, 01:40 PM)amiraeva Wrote: I got grub to work as an EFI payload from uboot, only caveat is that the display doesn't work. Install grub with --target=arm64-efi and --removable flags, and use the following boot script (adjust as needed to your setup):


Code:
setenv bootargs initrd=/boot/initramfs-linux.img console=ttyS0 console=tty1 root=LABEL=ROOT_MNJRO rw rootwait video=eDP-1:1920x1080@60 video=HDMI-A-1:1920x1080@60 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash
load mmc 1:1 ${fdt_addr_r} dtbs/rockchip/rk3399-pinebook-pro.dtb
load mmc 1:1 ${kernel_addr_r} efi/EFI/BOOT/BOOTAA64.EFI
bootefi ${kernel_addr_r} ${fdt_addr_r}
And grub.cfg (adjust to your setup)

Code:
set timeout_style="menu"
set timeout=5
menuentry "Kernel" {
linux (hd0,msdos1)/Image console=tty1 root=LABEL=ROOT_MNJRO rw rootwait video=eDP-1:1920x1080@60 video=HDMI-A-1:1920x1080@60 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash
devicetree (hd0,msdos1)/dtbs/rockchip/rk3399-pinebook-pro.dtb
initrd (hd0,msdos1)/initramfs-linux.img
}


I've been poking around the u-boot source code to try and get the eDP and LCD drivers working <https://github.com/amiraeva/uboot-pbp>. So far I can get the display to flicker for a brief second before the u-boot serial console loads, and have run out of things to try. Any ideas/suggestions would be appreciated!

Did you get the grub serial console to work?
I only seem to get this output when booting grub from u-boot:

Code:
139264 bytes read in 12 ms (11.1 MiB/s)
error: no suitable video mode found.
EFI stub: Booting Linux Kernel...
EFI stub: EFI_RNG_PROTOCOL unavailable, no randomness supplied
EFI stub: ERROR: Could not determine UEFI Secure Boot status.
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]

But no menu.

Edit:
Figured it out, if anyone ever feels like they are nuking something, remember to change this:
Code:
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
to
Code:
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pinebook Pro upgrading from the factory image yamsoup 12 4,108 02-22-2024, 04:02 PM
Last Post: tllim
Question Manjaro with Full Disk Encryption and GRUB dumetrulo 1 2,316 02-02-2024, 02:45 AM
Last Post: frankkinney
  postmarketOS/Alpine edge image for the Pinebook Pro MartijnBraam 74 129,570 08-24-2022, 02:06 PM
Last Post: petersen77
  Debian/unstable SD card rescue image vajak 4 4,726 10-28-2021, 02:53 PM
Last Post: vajak
  Recalbox Image is available Luke 8 16,317 01-31-2021, 12:00 PM
Last Post: rimaille
  eMMC Trouble After Flashing WRONG Image balin 7 8,776 12-29-2020, 04:24 PM
Last Post: KC9UDX
  PBP not starting up sometimes / [Firmware Bug]: Kernel image misaligned at boot pato3 8 11,348 10-17-2020, 09:52 AM
Last Post: wdt
Information How to make the Manjaro Gnome image update TDC_PBP 2 4,763 07-13-2020, 02:24 PM
Last Post: TDC_PBP
  Can't boot up Manjaro 20.04 eMMc image from SD card... User 6582 25 40,854 06-23-2020, 07:27 PM
Last Post: nathanielwheeler
  Reinstalling factory debian image ippl3 2 4,948 06-15-2020, 08:02 AM
Last Post: ippl3

Forum Jump:


Users browsing this thread: 1 Guest(s)