post_install() {
  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
  mkdir -p /boot/extlinux/
  # Don't waste time to specify FDT, as RPI firmware will load and modify the
  # FDT, just let Uboot to pass the modified fdt to kernel
  echo "LABEL Manjaro ARM
KERNEL /Image
APPEND initrd=/initramfs-linux.img console=ttyAMA0,115200 root=LABEL=ROOT_MNJRO rw rootwait audit=0 usbhid.mousepoll=8" > /boot/extlinux/extlinux.conf
  fi
}

post_upgrade() {
  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
  mkdir -p /boot/extlinux/
  echo "LABEL Manjaro ARM
KERNEL /Image
APPEND initrd=/initramfs-linux.img console=ttyAMA0,115200 console=tty0 root=LABEL=ROOT_MNJRO rw rootwait audit=0 usbhid.mousepoll=8" > /boot/extlinux/extlinux.conf
  fi
}
 
