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)
  Reply
#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!)
  Reply
#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:[email protected] video=HDMI-A-1:[email protected] 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:[email protected] video=HDMI-A-1:[email protected] 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!
  Reply
#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
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  postmarketOS/Alpine edge image for the Pinebook Pro MartijnBraam 15 2,114 03-26-2020, 04:38 PM
Last Post: pmjohann
  Recalbox Image is available Luke 3 335 03-18-2020, 04:32 PM
Last Post: binholz
  Cant boot into home-rolled Arch Linux image craftkiller 4 292 02-25-2020, 12:58 PM
Last Post: craftkiller
  Kernel headers for stock Debian image fader 0 87 01-18-2020, 10:35 AM
Last Post: fader
  Troubleshooting New Kernel Image wsgts 3 206 01-16-2020, 09:04 AM
Last Post: wsgts
  Bricked PBP after writing image to eMMC? wvdschel 19 1,384 12-13-2019, 10:46 AM
Last Post: tophneal
Wink Re-image Help *facepalm* xircledev 2 343 11-24-2019, 04:16 AM
Last Post: Arglebargle
  Debos (debian style os image creator) mfritsche 0 140 11-12-2019, 04:28 AM
Last Post: mfritsche
  Booting with default debian image mfritsche 15 1,176 11-11-2019, 06:50 AM
Last Post: mfritsche

Forum Jump:


Users browsing this thread: 1 Guest(s)