gjdwebserver-overlay/dev-embedded/u-boot-pinephone-pro/files/uboot-pinephonepro.install

40 lines
1.2 KiB
Plaintext
Raw Normal View History

2021-12-11 19:14:30 +01:00
notice_uboot() {
echo "New version of U-Boot firmware can be flashed to your microSD card"
echo "or eMMC module. You can do that by running:"
echo "# dd if=/boot/idbloader.img of=/dev/mmcblkX seek=64 conv=notrunc,fsync"
echo "# dd if=/boot/u-boot.itb of=/dev/mmcblkX seek=16384 conv=notrunc,fsync"
}
create_config() {
mkdir -p /boot/extlinux
2022-01-01 18:04:48 +01:00
echo "LABEL Gentoo Linux 5.16.0 RC3
2021-12-11 19:14:30 +01:00
KERNEL /Image
2022-01-01 18:04:48 +01:00
FDT /dtbs/5.16.0-rc3/rockchip/rk3399-pinephone-pro.dtb
APPEND initrd=/initramfs-linux.img console=ttyS2,1500000 root=/dev/mmcblk2p3 rw rootwait quiet splash plymouth.ignore-serial-consoles" > /boot/extlinux/extlinux.conf
2021-12-11 19:14:30 +01:00
}
post_install() {
notice_uboot
if [ -f /boot/extlinux/extlinux.conf.pacsave ]; then
mv /boot/extlinux/extlinux.conf.pacsave /boot/extlinux/extlinux.conf
fi
if [ -f /boot/extlinux/extlinux.conf ]; then
echo "Keeping old extlinux.conf file..."
else
create_config
fi
}
post_upgrade() {
notice_uboot
if [ -f /boot/extlinux/extlinux.conf.pacsave ]; then
mv /boot/extlinux/extlinux.conf.pacsave /boot/extlinux/extlinux.conf
fi
if [ -f /boot/extlinux/extlinux.conf ]; then
echo "Keeping old extlinux.conf file..."
else
create_config
fi
}