gjdwebserver-overlay/dev-embedded/u-boot-pinephone-pro/files/uboot-pinephonepro.install
Gerben Jan Dijkman ab553dab04 Updated Readme
2022-01-01 18:04:48 +01:00

40 lines
1.2 KiB
Plaintext

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
echo "LABEL Gentoo Linux 5.16.0 RC3
KERNEL /Image
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
}
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
}