![]() |
|
Can a PBP use GRUB? - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: General Discussion on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=112) +--- Thread: Can a PBP use GRUB? (/showthread.php?tid=9261) |
Can a PBP use GRUB? - ab1jx - 02-23-2020 Assuming there's a large drive, probably NVMe, with space enough to install multiple alternative operating systems. It would be nice to boot to a GRUB menu asking which to boot. It might also be able to offer eMMC vs SD options. But I don't know if GRUB is at all compatible with ARM and u-boot. My guess is that if done right each GRUB choice could replace having u-boot for that choice. The GRUB installation might not know how to set that up, it might need doing manually. RE: Can a PBP use GRUB? - tophneal - 02-24-2020 Likely. There's a few boards out there that do use GRUB. It doesn't replace u-boot, but is rather used as a stage 2 in bootloading, after u-boot. Here's a guide from the ODROID forums that might shed some light on getting it set up, though: https://forum.odroid.com/viewtopic.php?t=26894 RE: Can a PBP use GRUB? - ab1jx - 02-25-2020 Thanks, there's also (in Raspbian anyway) grub-uboot/stable 2.02+dfsg1-10 armhf GRand Unified Bootloader, version 2 (ARM U-Boot version) grub-uboot-bin/stable 2.02+dfsg1-10 armhf GRand Unified Bootloader, version 2 (ARM U-Boot modules) grub-uboot-dbg/stable 2.02+dfsg1-10 armhf GRand Unified Bootloader, version 2 (ARM U-Boot debug files) I hadn't looked into it really. My NVMe adapter is still in China, haven't ordered an SSD. I remember Linux and OpenBSD can share a swap partition, I've done that. I thought I couldn't afford a SSD but I found an Intel 1 TB for $125 https://www.bhphotovideo.com/c/search?Ntt=NVMe&N=0&InitialSearch=yes&sts=ma and it looks good in the PBP compatibility list. 1.6 million hours MBTF, hmm calc '1600000 / 24 / 365' = 182 years, I should buy more. Can I make a RAID of them? Probably. RE: Can a PBP use GRUB? - amiraeva - 03-18-2020 So I finally got a 3V serial cable, and after playing around with uboot I managed to boot into grub as an efi executable, and then into Manjaro once I was dropped into the grub shell. The issue with my approach is that it was a manual process in the serial console. Does anyone know how I can go about automating this a little better? And more importantly, how to go about getting grub to initialize the LCD display and keyboard so this endeavor would be useful (i.e. allow one to choose between boot entries)? In the meantime I can automate some of the tedium by using a uboot script. Not familiar enough with grub to have that part automated. RE: Can a PBP use GRUB? - amiraeva - 03-18-2020 Figured out how to automate it in a janky manner - details below for posterity. Still interested in getting grub to output to the LCD with keyboard input. When only letting grub see "console=tty1" in the bootargs, it spits out "error: no suitable video mode found." on the serial console right before displaying the boot menu. boot.txt 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}grub.cfg 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
}As others online have noted, rebooting has issues but otherwise it seems to work great. Here is my boot log too in case it might help someone: Code: U-Boot TPL 2020.01-6-g365495a329 (Mar 08 2020 - 16:47:50)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...
U-Boot SPL 2020.01-6-g365495a329 (Mar 08 2020 - 16:47:50 +0000)
Trying to boot from MMC1
U-Boot 2020.01-6-g365495a329 (Mar 08 2020 - 16:47:50 +0000) Manjaro ARM
Model: Pine64 Pinebook Pro
DRAM: 3.9 GiB
PMIC: RK808
MMC: dwmmc@fe320000: 1, sdhci@fe330000: 0
In: serial@ff1a0000
Out: serial@ff1a0000
Err: serial@ff1a0000
Model: Pine64 Pinebook Pro
## Error: Can't overwrite "serial#"
## Error inserting "serial#" variable, errno=1
rockchip_dnl_key_pressed: adc_channel_single_shot fail!
Net: No ethernet found.
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
452 bytes read in 5 ms (87.9 KiB/s)
## Executing script at 00500000
80426 bytes read in 16 ms (4.8 MiB/s)
135168 bytes read in 24 ms (5.4 MiB/s)
Scanning disk dwmmc@fe320000.blk...
Card did not respond to voltage select!
Scanning disk sdhci@fe330000.blk...
Disk sdhci@fe330000.blk not ready
Found 3 disks
Welcome to GRUB!
GNU GRUB version 2.04 [28/1829]
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│*Kernel │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Use the ▲ and ▼ keys to select which entry is highlighted.
Press enter to boot the selected OS, `e' to edit the commands before booting or `c' for a command-line.
The highlighted entry will be executed automatically in 0s.
Booting `Kernel'
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map... |