diff --git a/configs/labsi-rpi4/config.inc.sh b/configs/labsi-rpi4/config.inc.sh index 8cf0a87..9057b34 100644 --- a/configs/labsi-rpi4/config.inc.sh +++ b/configs/labsi-rpi4/config.inc.sh @@ -7,12 +7,17 @@ KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:-"bcm2711_defconfig"} UBOOT_DEFCONFIG=${UBOOT_DEFCONFIG:-"rpi_4_defconfig"} RPI_FIRMWARE_FILES=(start4.elf fixup4.dat bcm2711-rpi-4-b.dtb - overlays/overlay_map.dtb overlays/hat_map.dtb overlays/dwc2.dtbo overlays/disable-bt.dtbo) + overlays/overlay_map.dtb overlays/hat_map.dtb overlays/upstream-pi4.dtbo + overlays/dwc2.dtbo overlays/disable-bt.dtbo) -EXTRA_PACKAGES=(raspi-firmware linux-image-generic linux-headers-generic linux-libc-dev) - -SKIP_BOOT_FILES=y RPI_SKIP_IMAGE_GEN=1 +LABSI_USE_COMPILED_KERNEL=1 +if [[ -n "LABSI_USE_COMPILED_KERNEL" ]]; then + EXTRA_PACKAGES=() +else + EXTRA_PACKAGES=(raspi-firmware linux-image-generic linux-headers-generic linux-libc-dev) + SKIP_BOOT_FILES=y +fi function rootfs_install_hook() { # copy custom install scripts to exec. dir diff --git a/configs/labsi-rpi4/files/boot/cmdline.txt b/configs/labsi-rpi4/files/boot/cmdline.txt index e47085a..cea4eac 100644 --- a/configs/labsi-rpi4/files/boot/cmdline.txt +++ b/configs/labsi-rpi4/files/boot/cmdline.txt @@ -1 +1 @@ -earlycon=pl011,mmio32,0xfe201000 console=serial0,115200 root=LABEL=RPI_ROOTFS rw rootwait +earlycon=pl011,mmio32,0xfe201000 console=tty1 console=serial0,115200 root=/dev/mmcblk0p2 rw rootwait fsck.repair=yes diff --git a/configs/labsi-rpi4/files/boot/config.txt b/configs/labsi-rpi4/files/boot/config.txt index 62d4347..49328c8 100644 --- a/configs/labsi-rpi4/files/boot/config.txt +++ b/configs/labsi-rpi4/files/boot/config.txt @@ -6,6 +6,7 @@ disable_overscan=1 disable_splash=1 # Use DesignWare Core 2 (SoC's USB 2.0 controller) for Linux OTG support +dtoverlay=upstream-pi4 dtoverlay=dwc2 # Next stage config (run U-Boot) @@ -13,8 +14,6 @@ arm_64bit=1 kernel=u-boot.bin enable_uart=1 uart_2ndstage=1 -# Not usable on latest firmware -#dtoverlay=disable-bt # include extra config, if any include extraconfig.txt diff --git a/rootfs-install/files/initramfs/rpi-post-update-hook b/rootfs-install/files/initramfs/rpi-post-update-hook index 616180e..c627610 100644 --- a/rootfs-install/files/initramfs/rpi-post-update-hook +++ b/rootfs-install/files/initramfs/rpi-post-update-hook @@ -36,7 +36,7 @@ function download_firmware_files() { # absolute path, copy it cp -f "$file" "$1/$(basename "$file")" else - # download the latest rpi firmware files (debian repo is outdated) + mkdir -p "$1/$(dirname "$file")" wget "https://github.com/raspberrypi/firmware/raw/master/boot/$file" \ -O "$1/$file" fi