diff --git a/bootstrap.d/10-bootstrap.sh b/bootstrap.d/10-bootstrap.sh index f57e4c3..5fd256f 100644 --- a/bootstrap.d/10-bootstrap.sh +++ b/bootstrap.d/10-bootstrap.sh @@ -8,10 +8,12 @@ VARIANT="" COMPONENTS="main" -if [ "$BUILD_KERNEL" != "uselocal" ]; then #ajout 2025 # Use non-free Debian packages if needed -# One use variable which is only needed by wifi firmware blob => reworked to use non free in /etc/apt/sources.list - we could just use ENABLE_WIRELESS here +# One use variable which is only needed by wifi firmware blob +# => reworked to use non free in /etc/apt/sources.list +#- we could just use ENABLE_WIRELESS here + if [ "$ENABLE_WIRELESS" = true ] || [ "$ENABLE_NONFREE" = true ] ; then COMPONENTS="main,non-free,contrib,non-free-firmware" fi @@ -30,19 +32,17 @@ fi # Base debootstrap (unpack only) http_proxy=${APT_PROXY} debootstrap ${APT_EXCLUDES} --arch="${RELEASE_ARCH}" --foreign ${VARIANT} --components="${COMPONENTS}" --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}/debian" +if [ "$BUILD_KERNEL" != "uselocal" ]; then # added to enable reuse the environment + # Copy qemu emulator binary to chroot + install -m 755 -o root -g root "${QEMU_BINARY}" "${R}${QEMU_BINARY}" -# Copy qemu emulator binary to chroot -install -m 755 -o root -g root "${QEMU_BINARY}" "${R}${QEMU_BINARY}" + # Copy debian-archive-keyring.pgp + mkdir -p "${R}/usr/share/keyrings" + install_readonly /usr/share/keyrings/debian-archive-keyring.gpg "${R}/usr/share/keyrings/debian-archive-keyring.gpg" -# Copy debian-archive-keyring.pgp -mkdir -p "${R}/usr/share/keyrings" -install_readonly /usr/share/keyrings/debian-archive-keyring.gpg "${R}/usr/share/keyrings/debian-archive-keyring.gpg" - - - -# Complete the bootstrapping process -chroot_exec /debootstrap/debootstrap --second-stage + # Complete the bootstrapping process + chroot_exec /debootstrap/debootstrap --second-stage fi diff --git a/bootstrap.d/11-apt.sh b/bootstrap.d/11-apt.sh index b2fe234..8e24f24 100644 --- a/bootstrap.d/11-apt.sh +++ b/bootstrap.d/11-apt.sh @@ -11,25 +11,25 @@ if [ -z "$APT_PROXY" ] ; then sed -i "s/\"\"/\"${APT_PROXY}\"/" "${ETC_DIR}/apt/apt.conf.d/10proxy" fi -# Install APT sources.list -install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list" +# Install APT sources.list.d/debian.sources +install_readonly files/apt/sources.list.d/debian.sources "${ETC_DIR}/apt/sources.list.d/debian.sources" # Use specified APT server and release -sed -i "s/\/ftp.debian.org\//\/${APT_SERVER}\//" "${ETC_DIR}/apt/sources.list" +sed -i "s/\/ftp.debian.org\//\/${APT_SERVER}\//" "${ETC_DIR}/apt/sources.list.d/debian.sources" #Fix for changing path for security updates in oldstable / bullseye -if [ "$RELEASE" = "oldstable" ] || [ "$RELEASE" = "bullseye " ] ; then -sed -i "s:bookworm-security:${RELEASE}\\/updates:" "${ETC_DIR}/apt/sources.list" -sed -i "s:security.debian.org/debian-security:security.debian.org:" "${ETC_DIR}/apt/sources.list" -fi +# not necessary anymore ????? +#if [ "$RELEASE" = "oldstable" ] || [ "$RELEASE" = "bullseye " ] ; then +#sed -i "s:bookworm-security:${RELEASE}\\/updates:" "${ETC_DIR}/apt/sources.list" +#sed -i "s:security.debian.org/debian-security:security.debian.org:" "${ETC_DIR}/apt/sources.list" +#fi if [ "$ENABLE_NONFREE" = "true" ] ; then -sed -i "s,main contrib,main contrib non-free non-free-firmware," "${ETC_DIR}/apt/sources.list" +sed -i "s,main contrib,main contrib non-free non-free-firmware," "${ETC_DIR}/apt/sources.list.d/debian.sources" fi if [ "$RELEASE" != "$RELEASE" ] ; then -# Change release in sources list -sed -i "s/ ${HOSTRELEASE}/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list" +sed -i "s/ ${HOSTRELEASE}/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list.d/debian.sources" fi # Upgrade package index and update all installed packages and changed dependencies diff --git a/functions.sh b/functions.sh index 603d917..d4c41f4 100644 --- a/functions.sh +++ b/functions.sh @@ -1,4 +1,4 @@ -# This file contains utility functions used by rpi23-gen-image.sh +# This file contains utility functions used by rpiGenImage.sh cleanup (){ set +x @@ -76,11 +76,11 @@ chroot_install_cc() { COMPILER_PACKAGES=$(chroot_exec apt-get -s install g++ make bc | grep "^Inst " | awk -v ORS=" " '{ print $2 }') -# if [ "$RELEASE" = "trixie" ] || [ "$RELEASE" = "bullseye" ] || [ "$RELEASE" = "bookworm" ] ; then -# chroot_exec apt-get -q -y --no-install-recommends install ${COMPILER_PACKAGES} -# elif [ "$RELEASE" = "bullseye" ] || [ "$RELEASE" = "bookworm" ] || [ "$RELEASE" = "bookworm" ]; then - chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES} -# fi + if [ "$RELEASE" = "forky" ] || [ "$RELEASE" = "trixie" ] || [ "$RELEASE" = "bookworm" ] ; then + chroot_exec apt -y --no-install-recommends install ${COMPILER_PACKAGES} + elif [ "$RELEASE" = "bullseye" ] || [ "$RELEASE" = "buster" ] || [ "$RELEASE" = "stretch" ]; then + chroot_exec apt -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES} + fi fi } diff --git a/rpiGenImage.sh b/rpiGenImage.sh index 37ac6b8..1a68690 100755 --- a/rpiGenImage.sh +++ b/rpiGenImage.sh @@ -42,10 +42,10 @@ set -x # Raspberry Pi model configuration defaults to 3P RPI_MODEL=${RPI_MODEL:=3P} -# Debian release defaults to trixie +# Debian release defaults to trixie /stable RELEASE=${RELEASE:=trixie} if [ "$RELEASE" = "trixie" ] ; then - RELEASE=testing + RELEASE=stable fi echo "Debian release value used : " $RELEASE @@ -55,8 +55,9 @@ KERNEL_BRANCH=${KERNEL_BRANCH:=""} # URLs KERNEL_URL=${KERNEL_URL:=https://github.com/raspberrypi/linux} FIRMWARE_URL=${FIRMWARE_URL:=https://github.com/raspberrypi/firmware/raw/master/boot} +WLAN_FIRMWARE_URL=${https://github.com/RPi-Distro/firmware-nonfree/tree/trixie/debian/config/brcm80211/brcm} +#WLAN_FIRMWARE_URL=${WLAN_FIRMWARE_URL:=https://github.com/armbian/firmware/tree/master/brcm #WLAN_FIRMWARE_URL=${WLAN_FIRMWARE_URL:=https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm} -WLAN_FIRMWARE_URL=${WLAN_FIRMWARE_URL:=https://github.com/armbian/firmware/tree/master/brcm} #WLAN_FIRMWARE_URL=${WLAN_FIRMWARE_URL:=https://github.com/reMarkable/brcmfmac-firmware/blob/master} FBTURBO_URL=${FBTURBO_URL:=https://github.com/ssvb/xf86-video-fbturbo.git} UBOOT_URL=${UBOOT_URL:=https://git.denx.de/u-boot.git} diff --git a/templates/rpi3-Met-trixie.conf b/templates/rpi3-Met-trixie.conf index 2286a02..4b21c17 100644 --- a/templates/rpi3-Met-trixie.conf +++ b/templates/rpi3-Met-trixie.conf @@ -32,7 +32,7 @@ HOSTNAME="raspife3" DEFLOCAL="fr_FR.UTF-8" TIMEZONE="Europe/Paris" EXPANDROOT=false -ENABLE_QEMU=false +ENABLE_QEMU=true #--------------------- #--- User Settings --- #--------------------- @@ -136,6 +136,6 @@ ENABLE_CRYPTFS=false BASEDIR=/home/vidal/Nano-Ordinateurs/RaspberryPi/RpiGenImage/Images/${RELEASE} #BASEDIR=/media/*******/*********/Nano-Ordinateurs/RaspberryPi/RpiGenImage/Images/${RELEASE} DATE=`date +%Y-%m-%d` -IMAGE_NAME=${BASEDIR}/${DATE}-rpi${RPI_MODEL}-${RELEASE} +IMAGE_NAME=${BASEDIR}/${DATE}-rpiRawMet${RPI_MODEL}-${RELEASE} diff --git a/templates/rpi3-Met-trixie_26-01-02.conf b/templates/rpi3-Met-trixie_26-02-21.conf similarity index 97% rename from templates/rpi3-Met-trixie_26-01-02.conf rename to templates/rpi3-Met-trixie_26-02-21.conf index 2286a02..4b21c17 100644 --- a/templates/rpi3-Met-trixie_26-01-02.conf +++ b/templates/rpi3-Met-trixie_26-02-21.conf @@ -32,7 +32,7 @@ HOSTNAME="raspife3" DEFLOCAL="fr_FR.UTF-8" TIMEZONE="Europe/Paris" EXPANDROOT=false -ENABLE_QEMU=false +ENABLE_QEMU=true #--------------------- #--- User Settings --- #--------------------- @@ -136,6 +136,6 @@ ENABLE_CRYPTFS=false BASEDIR=/home/vidal/Nano-Ordinateurs/RaspberryPi/RpiGenImage/Images/${RELEASE} #BASEDIR=/media/*******/*********/Nano-Ordinateurs/RaspberryPi/RpiGenImage/Images/${RELEASE} DATE=`date +%Y-%m-%d` -IMAGE_NAME=${BASEDIR}/${DATE}-rpi${RPI_MODEL}-${RELEASE} +IMAGE_NAME=${BASEDIR}/${DATE}-rpiRawMet${RPI_MODEL}-${RELEASE}