summarylogtreecommitdiffstats
path: root/linux-manjaro-rpi4-mainline-cacule.install
blob: aad1de80d47bd8b006aa5793292147b361cd9c62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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
}