post_install () { if [ -f /boot/cmdline.txt.pacsave ]; then mv /boot/cmdline.txt.pacsave /boot/cmdline.txt fi if [ -f /boot/cmdline.txt ]; then echo "===> Keeping old cmdline.txt file..." else echo "===> Installing default cmdline.txt file to /boot/..." echo "root=LABEL=ROOT_MNJRO rw rootwait console=serial0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0" > /boot/cmdline.txt fi if [ -f /boot/config.txt.pacsave ]; then mv /boot/config.txt.pacsave /boot/config.txt fi if [ -f /boot/config.txt ]; then echo "===> Keeping old config.txt file..." else echo "===> Installing default config.txt file to /boot/..." echo "# See /boot/overlays/README for all available options" > /boot/config.txt echo "" >> /boot/config.txt echo "gpu_mem=64" >> /boot/config.txt echo "initramfs initramfs-linux.img followkernel" >> /boot/config.txt echo "kernel=kernel8.img" >> /boot/config.txt echo "arm_64bit=1" >> /boot/config.txt echo "disable_overscan=1" >> /boot/config.txt echo "" >> /boot/config.txt echo "#enable sound" >> /boot/config.txt echo "dtparam=audio=on" >> /boot/config.txt echo "#hdmi_drive=2" >> /boot/config.txt echo "" >> /boot/config.txt echo "#enable vc4" >> /boot/config.txt echo "dtoverlay=vc4-fkms-v3d" >> /boot/config.txt echo "max_framebuffers=2" >> /boot/config.txt fi } post_upgrade() { if [ -f /boot/cmdline.txt.pacsave ]; then mv /boot/cmdline.txt.pacsave /boot/cmdline.txt fi if [ -f /boot/cmdline.txt ]; then echo "===> Keeping old cmdline.txt file..." else echo "root=LABEL=ROOT_MNJRO rw rootwait console=serial0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0" > /boot/cmdline.txt fi if [ -f /boot/config.txt.pacsave ]; then mv /boot/config.txt.pacsave /boot/config.txt fi if [ -f /boot/config.txt ]; then echo "===> Keeping old config.txt file..." else echo "===> Installing default config.txt to /boot/..." echo "# See /boot/overlays/README for all available options" > /boot/config.txt echo "" >> /boot/config.txt echo "gpu_mem=64" >> /boot/config.txt echo "initramfs initramfs-linux.img followkernel" >> /boot/config.txt echo "kernel=kernel8.img" >> /boot/config.txt echo "arm_64bit=1" >> /boot/config.txt echo "disable_overscan=1" >> /boot/config.txt echo "" >> /boot/config.txt echo "#enable sound" >> /boot/config.txt echo "dtparam=audio=on" >> /boot/config.txt echo "#hdmi_drive=2" >> /boot/config.txt echo "" >> /boot/config.txt echo "#enable vc4" >> /boot/config.txt echo "dtoverlay=vc4-fkms-v3d" >> /boot/config.txt echo "max_framebuffers=2" >> /boot/config.txt fi } post_remove() { rm -f boot/initramfs-linux.img }