From 6a5b0d04eb30306e148fb974ee8922c23972b30b 2019-09-12 17:10:03 From: GĂ©rard Vidal Date: 2019-09-12 17:10:03 Subject: [PATCH] Merge pull request #24 from drtyhlpr/master merging with original master --- diff --git a/README.md b/README.md index 43105c0..3c6e26f 100644 --- a/README.md +++ b/README.md @@ -545,5 +545,5 @@ qemu-system-arm -m 2048M -M vexpress-a15 -cpu cortex-a15 -kernel kernel7.img -no * [Official Raspberry Pi Kernel on github](https://github.com/raspberrypi/linux) * [U-BOOT git repository](https://git.denx.de/?p=u-boot.git;a=summary) * [Xorg DDX driver fbturbo](https://github.com/ssvb/xf86-video-fbturbo) -* [RPi3 Wireless interface firmware](https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm80211/brcm) +* [RPi3 Wireless interface firmware](https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm) * [Collabora RPi2 Kernel precompiled](https://repositories.collabora.co.uk/debian/) diff --git a/bootstrap.d/12-locale.sh b/bootstrap.d/12-locale.sh index 79496f5..c086ee2 100644 --- a/bootstrap.d/12-locale.sh +++ b/bootstrap.d/12-locale.sh @@ -23,15 +23,15 @@ if [ "$(echo "$APT_INCLUDES" | grep ",locales")" ] ; then # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684134 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685957 # ... so we have to set locales manually if [ "$DEFLOCAL" = "en_US.UTF-8" ] ; then - chroot_exec echo "locales locales/locales_to_be_generated multiselect ${DEFLOCAL} UTF-8" | debconf-set-selections + chroot_exec echo "locales locales/locales_to_be_generated multiselect ${DEFLOCAL} UTF-8 | debconf-set-selections" else # en_US.UTF-8 should be available anyway : https://www.debian.org/doc/manuals/debian-reference/ch08.en.html#_the_reconfiguration_of_the_locale - chroot_exec echo "locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8, ${DEFLOCAL} UTF-8" | debconf-set-selections + chroot_exec echo "locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8, ${DEFLOCAL} UTF-8 | debconf-set-selections" sed -i "/en_US.UTF-8/s/^#//" "${ETC_DIR}/locale.gen" fi sed -i "/${DEFLOCAL}/s/^#//" "${ETC_DIR}/locale.gen" - chroot_exec echo "locales locales/default_environment_locale select ${DEFLOCAL}" | debconf-set-selections + chroot_exec echo "locales locales/default_environment_locale select ${DEFLOCAL} | debconf-set-selections" chroot_exec locale-gen chroot_exec update-locale LANG="${DEFLOCAL}" diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index b4abb59..b07beb1 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -252,14 +252,19 @@ if [ -n "$SET_ARCH" ] ; then KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="Image"} # Raspberry Pi model specific settings - if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then + if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then + if [ "$RPI_MODEL" != 4 ] ; then + KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig} + else + KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2711_defconfig} + fi + REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-arm64" - KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig} RELEASE_ARCH=${RELEASE_ARCH:=arm64} KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img} CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-} else - echo "error: Only Raspberry PI 3 and 3B+ support 64-bit" + echo "error: Only Raspberry PI 3, 3B+ and 4 support 64-bit" exit 1 fi fi @@ -281,9 +286,14 @@ if [ -n "$SET_ARCH" ] ; then fi # Raspberry Pi model specific settings - if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then + if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then + if [ "$RPI_MODEL" != 4 ] ; then + KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} + else + KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2711_defconfig} + fi + REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armhf" - KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} RELEASE_ARCH=${RELEASE_ARCH:=armhf} KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7.img} CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabihf-} @@ -320,6 +330,10 @@ case "$RPI_MODEL" in DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb} UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig} ;; + 4) + DTB_FILE=${DTB_FILE:=bcm2711-rpi-4-b.dtb} + UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_4_defconfig} + ;; *) echo "error: Raspberry Pi model $RPI_MODEL is not supported!" exit 1 @@ -327,7 +341,7 @@ case "$RPI_MODEL" in esac # Raspberry PI 0,3,3P with Bluetooth and Wifi onboard -if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then +if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then # Include bluetooth packages on supported boards if [ "$ENABLE_BLUETOOTH" = true ] ; then APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez"