dreemurrs-embedded / Pine64-Arch

:penguin: Arch Linux ARM for your PinePhone/Pro and PineTab/2
691 stars 105 forks source link

Switch to extlinux.conf #571

Open Shatur opened 11 months ago

Shatur commented 11 months ago

Recently megi released rk2aw with patched U-Boot builds This bootloaders have many benefits (especially for PPP), but looks like patched U-Boot uses extlinux.conf while boot.scr. I would suggest to migrate to simplify setup for users. I tried creating boot/extlinux/extlinux.conf with the following content:

MENU TITLE Pinephone Pro Boot Menu
MENU BACKGROUND /splash.bmp

LABEL emmc
        MENU LABEL eMMC - Arch Linux
        FDT /dtbs/rockchip/rk3399-pinephone-pro.dtb
        KERNEL /Image.gz
        INITRD /initramfs-linux.img
        APPEND loglevel=4 console=ttyS2,115200 console=tty0 root=/dev/mmcblk2p2 rw rootwait fbcon=rotate:1 pinephone_keyboard.disable_input

But it doesn't work for some reason... The issue was on U-Boot side, now creating this file and /boot/splash.bmp is enough.

Edit: Megi added support for CONFIG_CMD_UNZIP, so boot.scr can also be loaded without any configuration. But you can't set a nice label and put a background this way.

Shatur commented 11 months ago

Talked with megi, the issue were on the U-Boot side. And switching to extlinux.conf is not necessary, it should work with boot.scr too. I tried the updated version from https://megous.com/dl/tmp/ppp.tar.zst and the phone, removed extlinux.conf and now I how the output: изображение

But still unable to boot. First item just boots me into console.

Shatur commented 11 months ago

@Danct12 I think extlinux.conf is way better and simpler way configure the system. I would suggest to migrate to it.

Shatur commented 11 months ago

I talked with danct and looks like we can't because we need dynamically identify a boot device on boot up and it's impossible from extlinux.conf.

boot.scr doesn't work because we megi's builds missing CONFIG_CMD_UNZIP enabled. We could enable it.

Shatur commented 11 months ago

I talked with megi and he enabled CONFIG_CMD_UNZIP. So now it boots without configuration.

Shatur commented 11 months ago

But it will look like this: https://github.com/dreemurrs-embedded/Pine64-Arch/issues/571#issuecomment-1662549407. With extlinux.conf I can set label and background. So I would consider migration to extlinux.conf. Maybe we could generate it or let user choose correct one from the menu?

For example, here is my setup: изображение

oklopfer commented 11 months ago

An easy way to provide this in a package is by using the Mobian team's fork of u-boot-menu for a PKGBUILD.