uboot-pine-h64.install 1.13 KB
Newer Older
Dan Johansen's avatar
Dan Johansen committed
1
2
3
4
5
6
7
8
9
10
11
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:"
  echo "# dd if=/boot/u-boot-sunxi-with-spl-pine-h64.bin of=/dev/mmcblk0 bs=128k seek=1 for Pine-h64 SD"
}

create_config() {
  mkdir -p /boot/extlinux
  echo "LABEL Manjaro ARM
KERNEL /Image
FDT /dtbs/allwinner/sun50i-h6-pine-h64-model-b.dtb
Dan Johansen's avatar
Dan Johansen committed
12
APPEND initrd=/initramfs-linux.img console=ttyS0,115200 root=LABEL=ROOT_MNJRO rw rootwait audit=0 splash plymouth.ignore-serial-consoles" > /boot/extlinux/extlinux.conf
Dan Johansen's avatar
Dan Johansen committed
13
14
15
}

post_install() {
Dan Johansen's avatar
Dan Johansen committed
16
  notice_uboot
Dan Johansen's avatar
Dan Johansen committed
17
  if [ -f /boot/extlinux/extlinux.conf.pacsave ]; then
Dan Johansen's avatar
Dan Johansen committed
18
    mv /boot/extlinux/extlinux.conf.pacsave /boot/extlinux/extlinux.conf
Dan Johansen's avatar
Dan Johansen committed
19
20
  fi
  if [ -f /boot/extlinux/extlinux.conf ]; then
Dan Johansen's avatar
Dan Johansen committed
21
    echo "Keeping old extlinux.conf file..."
Dan Johansen's avatar
Dan Johansen committed
22
  else
Dan Johansen's avatar
Dan Johansen committed
23
    create_config
Dan Johansen's avatar
Dan Johansen committed
24
  fi
Dan Johansen's avatar
Dan Johansen committed
25
26
27
}

post_upgrade() {
Dan Johansen's avatar
Dan Johansen committed
28
  notice_uboot
Dan Johansen's avatar
Dan Johansen committed
29
  if [ -f /boot/extlinux/extlinux.conf.pacsave ]; then
Dan Johansen's avatar
Dan Johansen committed
30
    mv /boot/extlinux/extlinux.conf.pacsave /boot/extlinux/extlinux.conf
Dan Johansen's avatar
Dan Johansen committed
31
32
  fi
  if [ -f /boot/extlinux/extlinux.conf ]; then
Dan Johansen's avatar
Dan Johansen committed
33
    echo "Keeping old extlinux.conf file..."
Dan Johansen's avatar
Dan Johansen committed
34
  else
Dan Johansen's avatar
Dan Johansen committed
35
    create_config
Dan Johansen's avatar
Dan Johansen committed
36
  fi
Dan Johansen's avatar
Dan Johansen committed
37
}