From e2c8cfd64f4b8c82a8bc7f5fa89fe54356df02a0 2018-10-25 22:40:36 From: Unknown Date: 2018-10-25 22:40:36 Subject: [PATCH] All other RPI devices added --- diff --git a/README.md b/README.md index 1672c2a..6c7d6ca 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,14 @@ A comma separated list of additional packages to be installed by apt after boots #### General system settings: ##### `RPI_MODEL`=2 -Specifiy the target Raspberry Pi hardware model. The script at this time supports the Raspberry Pi models `2`,`3` and `3B`. `BUILD_KERNEL`=true will automatically be set if the Raspberry Pi model `3` or `3B` is used. +Specifiy the target Raspberry Pi hardware model. The script at this time supports the following Raspberry Pi models: +`0` = Used for Raspberry Pi 0 and Raspberry Pi 0 W +`1` = Used for Pi 1 model A and B +`1P` = Used for Pi 1 model B+ and A+ +`2` = Used for Pi 2 model B +`3` = Used for Pi 3 model B +`3P` = Used for Pi 3 model B+ +`BUILD_KERNEL`=true will automatically be set if the Raspberry Pi model `3` or `3P` is used. ##### `RELEASE`="jessie" Set the desired Debian release name. The script at this time supports the bootstrapping of the Debian releases "jessie", "stretch" and "buster". `BUILD_KERNEL`=true will automatically be set if the Debian releases `stretch` or `buster` are used. diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 03239dd..4d6bc8a 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -42,12 +42,24 @@ set -x # Raspberry Pi model configuration RPI_MODEL=${RPI_MODEL:=2} +#bcm2708-rpi-0-w.dtb (Used for Pi 0 and PI 0W) +RPI0_DTB_FILE=${RPI0_DTB_FILE:=bcm2708-rpi-0-w.dtb} +RPI0_UBOOT_CONFIG=${RPI0_UBOOT_CONFIG:=rpi_defconfig} +#bcm2708-rpi-b.dtb (Used for Pi 1 model A and B) +RPI1_DTB_FILE=${RPI1_DTB_FILE:=bcm2708-rpi-b.dtb} +RPI1_UBOOT_CONFIG=${RPI1_UBOOT_CONFIG:=rpi_defconfig} +#bcm2708-rpi-b-plus.dtb (Used for Pi 1 model B+ and A+) +RPI1P_DTB_FILE=${RPI1P_DTB_FILE:=bcm2708-rpi-b-plus.dtb} +RPI1P_UBOOT_CONFIG=${RPI1P_UBOOT_CONFIG:=rpi_defconfig} +#bcm2709-rpi-2-b.dtb (Used for Pi 2 model B) RPI2_DTB_FILE=${RPI2_DTB_FILE:=bcm2709-rpi-2-b.dtb} RPI2_UBOOT_CONFIG=${RPI2_UBOOT_CONFIG:=rpi_2_defconfig} +#bcm2710-rpi-3-b.dtb (Used for Pi 3 model B) RPI3_DTB_FILE=${RPI3_DTB_FILE:=bcm2710-rpi-3-b.dtb} RPI3_UBOOT_CONFIG=${RPI3_UBOOT_CONFIG:=rpi_3_32b_defconfig} -RPI3B_DTB_FILE=${RPI3B_DTB_FILE:=bcm2710-rpi-3-b-plus.dtb} -RPI3B_UBOOT_CONFIG=${RPI3_UBOOT_CONFIG:=rpi_3_32b_defconfig} +#bcm2710-rpi-3-b-plus.dtb (Used for Pi 3 model B+) +RPI3P_DTB_FILE=${RPI3P_DTB_FILE:=bcm2710-rpi-3-b-plus.dtb} +RPI3P_UBOOT_CONFIG=${RPI3P_UBOOT_CONFIG:=rpi_3_32b_defconfig} # Debian release RELEASE=${RELEASE:=jessie} @@ -58,10 +70,17 @@ COLLABORA_KERNEL=${COLLABORA_KERNEL:=3.18.0-trunk-rpi2} if [ "$KERNEL_ARCH" = "arm64" ] ; then KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig} KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img} +elif [RPI_MODEL] = 0 || [RPI_MODEL = 1] || [RPI_MODEL = 1P] +#RASPBERRY PI 1, PI ZERO, PI ZERO W, AND COMPUTE MODULE DEFAULT Kernel BUILD CONFIGURATION + KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig} + KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7.img} else +#RASPBERRY PI 2, PI 3, PI 3+, AND COMPUTE MODULE 3 DEFAULT Kernel BUILD CONFIGURATION +#https://www.raspberrypi.org/documentation/linux/kernel/building.md KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7.img} fi + if [ "$RELEASE_ARCH" = "arm64" ] ; then QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static} else @@ -226,16 +245,25 @@ COMPILER_PACKAGES="" set +x # Set Raspberry Pi model specific configuration -if [ "$RPI_MODEL" = 2 ] ; then +elif [ "$RPI_MODEL" = 0 ] ; then + DTB_FILE=${RPI2_DTB_FILE} + UBOOT_CONFIG=${RPI2_UBOOT_CONFIG} +elif [ "$RPI_MODEL" = 1 ] ; then + DTB_FILE=${RPI2_DTB_FILE} + UBOOT_CONFIG=${RPI2_UBOOT_CONFIG} +elif [ "$RPI_MODEL" = 1P ] ; then + DTB_FILE=${RPI2_DTB_FILE} + UBOOT_CONFIG=${RPI2_UBOOT_CONFIG} +elif [ "$RPI_MODEL" = 2 ] ; then DTB_FILE=${RPI2_DTB_FILE} UBOOT_CONFIG=${RPI2_UBOOT_CONFIG} elif [ "$RPI_MODEL" = 3 ] ; then DTB_FILE=${RPI3_DTB_FILE} UBOOT_CONFIG=${RPI3_UBOOT_CONFIG} BUILD_KERNEL=true -elif [ "$RPI_MODEL" = 3B ] ; then - DTB_FILE=${RPI3B_DTB_FILE} - UBOOT_CONFIG=${RPI3B_UBOOT_CONFIG} +elif [ "$RPI_MODEL" = 3P ] ; then + DTB_FILE=${RPI3P_DTB_FILE} + UBOOT_CONFIG=${RPI3P_UBOOT_CONFIG} BUILD_KERNEL=true else echo "error: Raspberry Pi model ${RPI_MODEL} is not supported!"