Switch to new kernel and firmware packages
This commit is contained in:
parent
88ac5235d6
commit
c856800c72
@ -12,7 +12,6 @@ if [ "${NO_PRERUN_QCOW2}" = "0" ]; then
|
|||||||
sed -i "s/BOOTDEV/PARTUUID=${BOOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab"
|
sed -i "s/BOOTDEV/PARTUUID=${BOOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab"
|
||||||
sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab"
|
sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab"
|
||||||
|
|
||||||
sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/boot/cmdline.txt"
|
sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/boot/firmware/cmdline.txt"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -3,7 +3,10 @@
|
|||||||
IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
|
IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
|
||||||
INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info"
|
INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info"
|
||||||
|
|
||||||
|
sed -i 's/^update_initramfs=.*/update_initramfs=all/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf"
|
||||||
|
|
||||||
on_chroot << EOF
|
on_chroot << EOF
|
||||||
|
update-initramfs -u
|
||||||
if [ -x /etc/init.d/fake-hwclock ]; then
|
if [ -x /etc/init.d/fake-hwclock ]; then
|
||||||
/etc/init.d/fake-hwclock stop
|
/etc/init.d/fake-hwclock stop
|
||||||
fi
|
fi
|
||||||
@ -53,7 +56,7 @@ rm -f "${ROOTFS_DIR}/root/.vnc/private.key"
|
|||||||
rm -f "${ROOTFS_DIR}/etc/vnc/updateid"
|
rm -f "${ROOTFS_DIR}/etc/vnc/updateid"
|
||||||
|
|
||||||
update_issue "$(basename "${EXPORT_DIR}")"
|
update_issue "$(basename "${EXPORT_DIR}")"
|
||||||
install -m 644 "${ROOTFS_DIR}/etc/rpi-issue" "${ROOTFS_DIR}/boot/issue.txt"
|
install -m 644 "${ROOTFS_DIR}/etc/rpi-issue" "${ROOTFS_DIR}/boot/firmware/issue.txt"
|
||||||
|
|
||||||
cp "$ROOTFS_DIR/etc/rpi-issue" "$INFO_FILE"
|
cp "$ROOTFS_DIR/etc/rpi-issue" "$INFO_FILE"
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ if [ "${NO_PRERUN_QCOW2}" = "0" ]; then
|
|||||||
rm -rf "${ROOTFS_DIR}"
|
rm -rf "${ROOTFS_DIR}"
|
||||||
mkdir -p "${ROOTFS_DIR}"
|
mkdir -p "${ROOTFS_DIR}"
|
||||||
|
|
||||||
BOOT_SIZE="$((256 * 1024 * 1024))"
|
BOOT_SIZE="$((512 * 1024 * 1024))"
|
||||||
ROOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot --block-size=1 | cut -f 1)
|
ROOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1)
|
||||||
|
|
||||||
# All partition sizes and starts will be aligned to this size
|
# All partition sizes and starts will be aligned to this size
|
||||||
ALIGN="$((4 * 1024 * 1024))"
|
ALIGN="$((4 * 1024 * 1024))"
|
||||||
@ -59,9 +59,9 @@ if [ "${NO_PRERUN_QCOW2}" = "0" ]; then
|
|||||||
mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null
|
mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null
|
||||||
|
|
||||||
mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4
|
mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4
|
||||||
mkdir -p "${ROOTFS_DIR}/boot"
|
mkdir -p "${ROOTFS_DIR}/boot/firmware"
|
||||||
mount -v "$BOOT_DEV" "${ROOTFS_DIR}/boot" -t vfat
|
mount -v "$BOOT_DEV" "${ROOTFS_DIR}/boot/firmware" -t vfat
|
||||||
|
|
||||||
rsync -aHAXx --exclude /var/cache/apt/archives --exclude /boot "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/"
|
rsync -aHAXx --exclude /var/cache/apt/archives --exclude /boot/firmware "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/"
|
||||||
rsync -rtx "${EXPORT_ROOTFS_DIR}/boot/" "${ROOTFS_DIR}/boot/"
|
rsync -rtx "${EXPORT_ROOTFS_DIR}/boot/firmware/" "${ROOTFS_DIR}/boot/firmware/"
|
||||||
fi
|
fi
|
||||||
|
@ -15,6 +15,7 @@ fi
|
|||||||
cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg"
|
cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg"
|
||||||
install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
|
install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
|
||||||
on_chroot << EOF
|
on_chroot << EOF
|
||||||
|
dpkg --add-architecture arm64
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
EOF
|
EOF
|
||||||
|
@ -1,2 +1,6 @@
|
|||||||
raspberrypi-bootloader
|
initramfs-tools
|
||||||
raspberrypi-kernel
|
raspi-firmware
|
||||||
|
linux-image-rpi-v6
|
||||||
|
linux-image-rpi-v7
|
||||||
|
linux-image-rpi-v7l
|
||||||
|
linux-image-rpi-v8
|
||||||
|
3
stage0/02-firmware/02-run.sh
Executable file
3
stage0/02-firmware/02-run.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
sed -i 's/^update_initramfs=.*/update_initramfs=no/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf"
|
@ -1,4 +1,17 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
install -m 644 files/cmdline.txt "${ROOTFS_DIR}/boot/"
|
mkdir -p "${ROOTFS_DIR}/boot/firmware"
|
||||||
install -m 644 files/config.txt "${ROOTFS_DIR}/boot/"
|
|
||||||
|
if ! [ -L "${ROOTFS_DIR}/boot/overlays" ]; then
|
||||||
|
ln -s firmware/overlays "${ROOTFS_DIR}/boot/overlays"
|
||||||
|
fi
|
||||||
|
|
||||||
|
install -m 644 files/cmdline.txt "${ROOTFS_DIR}/boot/firmware/"
|
||||||
|
if ! [ -L "${ROOTFS_DIR}/boot/cmdline.txt" ]; then
|
||||||
|
ln -s firmware/cmdline.txt "${ROOTFS_DIR}/boot/cmdline.txt"
|
||||||
|
fi
|
||||||
|
|
||||||
|
install -m 644 files/config.txt "${ROOTFS_DIR}/boot/firmware/"
|
||||||
|
if ! [ -L "${ROOTFS_DIR}/boot/config.txt" ]; then
|
||||||
|
ln -s firmware/config.txt "${ROOTFS_DIR}/boot/config.txt"
|
||||||
|
fi
|
||||||
|
@ -1,70 +1,41 @@
|
|||||||
# For more options and information see
|
# For more options and information see
|
||||||
# http://rpf.io/configtxt
|
# http://rptl.io/configtxt
|
||||||
# Some settings may impact device functionality. See link above for details
|
# Some settings may impact device functionality. See link above for details
|
||||||
|
|
||||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
|
||||||
#hdmi_safe=1
|
|
||||||
|
|
||||||
# uncomment the following to adjust overscan. Use positive numbers if console
|
|
||||||
# goes off screen, and negative if there is too much border
|
|
||||||
#overscan_left=16
|
|
||||||
#overscan_right=16
|
|
||||||
#overscan_top=16
|
|
||||||
#overscan_bottom=16
|
|
||||||
|
|
||||||
# uncomment to force a console size. By default it will be display's size minus
|
|
||||||
# overscan.
|
|
||||||
#framebuffer_width=1280
|
|
||||||
#framebuffer_height=720
|
|
||||||
|
|
||||||
# uncomment if hdmi display is not detected and composite is being output
|
|
||||||
#hdmi_force_hotplug=1
|
|
||||||
|
|
||||||
# uncomment to force a specific HDMI mode (this will force VGA)
|
|
||||||
#hdmi_group=1
|
|
||||||
#hdmi_mode=1
|
|
||||||
|
|
||||||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
|
||||||
# DMT (computer monitor) modes
|
|
||||||
#hdmi_drive=2
|
|
||||||
|
|
||||||
# uncomment to increase signal to HDMI, if you have interference, blanking, or
|
|
||||||
# no display
|
|
||||||
#config_hdmi_boost=4
|
|
||||||
|
|
||||||
# uncomment for composite PAL
|
|
||||||
#sdtv_mode=2
|
|
||||||
|
|
||||||
#uncomment to overclock the arm. 700 MHz is the default.
|
|
||||||
#arm_freq=800
|
|
||||||
|
|
||||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||||
#dtparam=i2c_arm=on
|
#dtparam=i2c_arm=on
|
||||||
#dtparam=i2s=on
|
#dtparam=i2s=on
|
||||||
#dtparam=spi=on
|
#dtparam=spi=on
|
||||||
|
|
||||||
# Uncomment this to enable infrared communication.
|
|
||||||
#dtoverlay=gpio-ir,gpio_pin=17
|
|
||||||
#dtoverlay=gpio-ir-tx,gpio_pin=18
|
|
||||||
|
|
||||||
# Additional overlays and parameters are documented /boot/overlays/README
|
|
||||||
|
|
||||||
# Enable audio (loads snd_bcm2835)
|
# Enable audio (loads snd_bcm2835)
|
||||||
dtparam=audio=on
|
dtparam=audio=on
|
||||||
|
|
||||||
|
# Additional overlays and parameters are documented
|
||||||
|
# /boot/firmware/overlays/README
|
||||||
|
|
||||||
# Automatically load overlays for detected cameras
|
# Automatically load overlays for detected cameras
|
||||||
camera_auto_detect=1
|
camera_auto_detect=1
|
||||||
|
|
||||||
# Automatically load overlays for detected DSI displays
|
# Automatically load overlays for detected DSI displays
|
||||||
display_auto_detect=1
|
display_auto_detect=1
|
||||||
|
|
||||||
|
# Automatically load initramfs files, if found
|
||||||
|
auto_initramfs=1
|
||||||
|
|
||||||
# Enable DRM VC4 V3D driver
|
# Enable DRM VC4 V3D driver
|
||||||
dtoverlay=vc4-kms-v3d
|
dtoverlay=vc4-kms-v3d
|
||||||
max_framebuffers=2
|
max_framebuffers=2
|
||||||
|
|
||||||
|
# Don't have the firmware create an initial video= setting in cmdline.txt.
|
||||||
|
# Use the kernel's default instead.
|
||||||
|
disable_fw_kms_setup=1
|
||||||
|
|
||||||
# Disable compensation for displays with overscan
|
# Disable compensation for displays with overscan
|
||||||
disable_overscan=1
|
disable_overscan=1
|
||||||
|
|
||||||
|
# Run as fast as firmware / board allows
|
||||||
|
arm_boost=1
|
||||||
|
|
||||||
[cm4]
|
[cm4]
|
||||||
# Enable host mode on the 2711 built-in XHCI USB controller.
|
# Enable host mode on the 2711 built-in XHCI USB controller.
|
||||||
# This line should be removed if the legacy DWC2 controller is required
|
# This line should be removed if the legacy DWC2 controller is required
|
||||||
@ -73,8 +44,3 @@ otg_mode=1
|
|||||||
|
|
||||||
[all]
|
[all]
|
||||||
|
|
||||||
[pi4]
|
|
||||||
# Run as fast as firmware / board allows
|
|
||||||
arm_boost=1
|
|
||||||
|
|
||||||
[all]
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
proc /proc proc defaults 0 0
|
proc /proc proc defaults 0 0
|
||||||
BOOTDEV /boot vfat defaults 0 2
|
BOOTDEV /boot/firmware vfat defaults 0 2
|
||||||
ROOTDEV / ext4 defaults,noatime 0 1
|
ROOTDEV / ext4 defaults,noatime 0 1
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--- stage2.orig/rootfs/boot/cmdline.txt
|
--- stage2.orig/rootfs/boot/firmware/cmdline.txt
|
||||||
+++ stage2/rootfs/boot/cmdline.txt
|
+++ stage2/rootfs/boot/firmware/cmdline.txt
|
||||||
@@ -1 +1 @@
|
@@ -1 +1 @@
|
||||||
-console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait
|
-console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait
|
||||||
+console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/lib/raspberrypi-sys-mods/firstboot
|
+console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/lib/raspberrypi-sys-mods/firstboot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user