make sure we create cmdline.txt and config.txt during rpi4 installs
Signed-off-by: Dan Johansen <strit@manjaro.org>
This commit is contained in:
parent
6da9314090
commit
910c0d10e3
|
|
@ -228,8 +228,8 @@ create_install() {
|
|||
sed -i 's/setenv bootargs "/&rootflags=subvol=@ /' $TMPDIR/boot/boot.ini
|
||||
elif [ -f $TMPDIR/boot/uEnv.ini ]; then
|
||||
sed -i 's/setenv bootargs "/&rootflags=subvol=@ /' $TMPDIR/boot/uEnv.ini
|
||||
elif [ -f $TMPDIR/boot/cmdline.txt ]; then
|
||||
sed -i 's/^/rootflags=subvol=@ rootfstype=btrfs /' $TMPDIR/boot/cmdline.txt
|
||||
#elif [ -f $TMPDIR/boot/cmdline.txt ]; then
|
||||
# sed -i 's/^/rootflags=subvol=@ rootfstype=btrfs /' $TMPDIR/boot/cmdline.txt
|
||||
elif [ -f $TMPDIR/boot/boot.txt ]; then
|
||||
sed -i 's/setenv bootargs/& rootflags=subvol=@/' $TMPDIR/boot/boot.txt
|
||||
$NSPAWN $TMPDIR/root mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d /boot/boot.txt /boot/boot.scr
|
||||
|
|
@ -408,11 +408,38 @@ cleanup () {
|
|||
sed -i "s/LABEL=ROOT_MNJRO/PARTUUID=$ROOT_PARTUUID/g" $TMPDIR/boot/boot.ini
|
||||
elif [ -f $TMPDIR/boot/uEnv.ini ]; then
|
||||
sed -i "s/LABEL=ROOT_MNJRO/PARTUUID=$ROOT_PARTUUID/g" $TMPDIR/boot/uEnv.ini
|
||||
elif [ -f $TMPDIR/boot/cmdline.txt ]; then
|
||||
sed -i "s/PARTUUID=/PARTUUID=$ROOT_PARTUUID/g" $TMPDIR/boot/cmdline.txt
|
||||
#elif [ -f $TMPDIR/boot/cmdline.txt ]; then
|
||||
# sed -i "s/PARTUUID=/PARTUUID=$ROOT_PARTUUID/g" $TMPDIR/boot/cmdline.txt
|
||||
fi
|
||||
sync
|
||||
|
||||
if [[ "$DEVICE" = "rpi4" ]] && [[ "$FSTYPE" = "btrfs" ]]; then
|
||||
echo "===> Installing default btrfs RPi cmdline.txt /boot..."
|
||||
echo "rootflags=subvol=@ root=PARTUUID=$ROOT_PARTUUID rw rootwait console=serial0,115200 console=tty3 selinux=0 quiet splash plymouth.ignore-serial-consoles smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 usbhid.mousepoll=8 audit=0" > $TMPDIR/boot/cmdline.txt
|
||||
elif [[ "$DEVICE" = "rpi4" ]]; then
|
||||
echo "===> Installing default ext4 RPi cmdline.txt /boot..."
|
||||
echo "root=PARTUUID=$ROOT_PARTUUID rw rootwait console=serial0,115200 console=tty3 selinux=0 quiet splash plymouth.ignore-serial-consoles smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 usbhid.mousepoll=8 audit=0" > $TMPDIR/boot/cmdline.txt
|
||||
fi
|
||||
if [[ "$DEVICE" = "rpi4" ]]; then
|
||||
echo "===> Installing default config.txt file to /boot/..."
|
||||
echo "# See /boot/overlays/README for all available options" > $TMPDIR/boot/config.txt
|
||||
echo "" >> $TMPDIR/boot/config.txt
|
||||
echo "#gpu_mem=64" >> $TMPDIR/boot/config.txt
|
||||
echo "initramfs initramfs-linux.img followkernel" >> $TMPDIR/boot/config.txt
|
||||
echo "kernel=kernel8.img" >> $TMPDIR/boot/config.txt
|
||||
echo "arm_64bit=1" >> $TMPDIR/boot/config.txt
|
||||
echo "disable_overscan=1" >> $TMPDIR/boot/config.txt
|
||||
echo "" >> $TMPDIR/boot/config.txt
|
||||
echo "#enable sound" >> $TMPDIR/boot/config.txt
|
||||
echo "dtparam=audio=on" >> $TMPDIR/boot/config.txt
|
||||
echo "#hdmi_drive=2" >> $TMPDIR/boot/config.txt
|
||||
echo "" >> $TMPDIR/boot/config.txt
|
||||
echo "#enable vc4" >> $TMPDIR/boot/config.txt
|
||||
echo "dtoverlay=vc4-fkms-v3d" >> $TMPDIR/boot/config.txt
|
||||
echo "max_framebuffers=2" >> $TMPDIR/boot/config.txt
|
||||
echo "disable_splash=1" >> $TMPDIR/boot/config.txt
|
||||
fi
|
||||
|
||||
case "$FSTYPE" in
|
||||
btrfs|f2fs)
|
||||
sed -i "s/LABEL=ROOT_MNJRO/PARTUUID=$ROOT_PARTUUID/g" $TMPDIR/root/etc/fstab
|
||||
|
|
|
|||
Loading…
Reference in New Issue