summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2022-08-28 11:25:44 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2023-02-26 02:01:46 -0500
commit68ac4b35453e3820699f1d1b3466b1b0d47d50c4 (patch)
tree7f90486036ce5166e93634984ac79fe90a64aa29
parentb9553fb8693a8a6a8bb0dd76a4f715a3dcb37855 (diff)
[uboot-pinebookpro]: WIP tweak install hookwip-pinebookpro
-rw-r--r--libre/uboot-pinebookpro/uboot-pinebookpro.install43
1 files changed, 17 insertions, 26 deletions
diff --git a/libre/uboot-pinebookpro/uboot-pinebookpro.install b/libre/uboot-pinebookpro/uboot-pinebookpro.install
index c62bafdc5..5fc1e5990 100644
--- a/libre/uboot-pinebookpro/uboot-pinebookpro.install
+++ b/libre/uboot-pinebookpro/uboot-pinebookpro.install
@@ -1,41 +1,32 @@
-notice_uboot() {
- echo "New version of U-Boot firmware can be flashed to your microSD card (mmcblk1)"
- echo "or eMMC module (mmcblk2). You can do that by running:"
+_notice_uboot() {
+ echo "You may flash it to your microSD card (mmcblk1),"
+ echo "or eMMC module (mmcblk2), 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 "timeout 1
+_create_config() {
+ if ! [ -f /boot/extlinux/extlinux.conf ]; then
+ mkdir -p /boot/extlinux
+ cat > /boot/extlinux/extlinux.conf <<'EOF'
+timeout 1
DEFAULT linux-libre-64
LABEL Parabola
KERNEL /boot/vmlinuz-linux-libre-64
FDTDIR /boot/dtbs/linux-libre-64
-APPEND initrd=/boot/initramfs-linux-libre-64.img console=ttyS2,1500000 root=LABEL=PARABOLA rw rootwait audit=0 splash plymouth.ignore-serial-consoles" \
- > /boot/extlinux/extlinux.conf
+APPEND initrd=/boot/initramfs-linux-libre-64.img console=ttyS2,1500000 root=LABEL=PARABOLA rw rootwait audit=0 splash plymouth.ignore-serial-consoles
+EOF
+ fi
}
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
+ echo "U-Boot firmware must be manually flashed onto your boot medium."
+ _notice_uboot
+ _create_config
}
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
+ echo "A new version of U-Boot firmware is ready to be flashed onto your boot medium."
+ _notice_uboot
+ _create_config
}