##// END OF EJS Templates
Merge branch 'master' of https://github.com/g-vidal/rpi23-gen-image into gitGV
vidal -
r772:93555ad8d7c4 Fusion
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,122
1 # Configuration file raspi3 buster IFÉ 2020/01/28
2 #
3 APT_SERVER=debian.mirrors.ovh.net
4 #APT_SERVER=debian.proxad.net
5 APT_INCLUDES="gawk,gnupg,firmware-linux,\
6 firmware-linux-nonfree,firmware-misc-nonfree,\
7 firmware-realtek,firmware-brcm80211,dh-autoreconf,\
8 gettext,build-essential,git,systemd-sysv,bc,\
9 cmake,libjson-c-dev,unzip,usbutils,bison,\
10 automake,autoconf,autogen,\
11 libtool,libtool-bin,libltdl-dev,pkg-config,\
12 menulibre,libnotify-bin,pandoc,pm-utils,\
13 acpi-support,python3,python3-dev,python3-pypandoc,\
14 python3-scipy,python3-tk,python3-pandocfilters,\
15 python3-geopy,python3-pip,python,python-dev,\
16 python-tk,python-pip,\
17 python-tk,pandoc,python-configobj,python-cheetah,\
18 python-pil,python-serial,python-usb,pcre2-utils,\
19 libpcre++-dev,libpcre2-dev,libjpeg-dev,i2c-tools,\
20 python3-smbus,policykit-1,pmount,ntpdate,ntp,\
21 rsync,gnome-backgrounds,mate-backgrounds,texlive,\
22 texlive-xetex,nginx-extras,ffmpeg,network-manager,\
23 console-data,keyboard-configuration,\
24 libqt5webkit5-dev,libudev-dev,gfortran-9,\
25 libgfortran-9-dev,\
26 libzzip-dev,zlib1g-dev,libcanberra-gtk-module,\
27 libnss-myhostname,libfreetype6-dev,libpng16-16,\
28 libffi-dev,libltdl-dev,dbus-user-session,\
29 debian-archive-keyring,curl,wget,mousepad,\
30 xutils-dev,\
31 tightvncserver,geany,openbox-menu,\
32 autotools-dev,htop,ca-certificates-java,\
33 icedtea-netx,openjdk-11-jdk,\
34 openjdk-11-jre,openjdk-11-jre-headless,\
35 jed,nmap,terminator,libboost-all-dev"
36 #x11proto-randr-dev,lxrandr,\
37 #APT_INCLUDES_LATE="jed,\
38 #"
39 #----------------------
40 RPI_MODEL=3
41 RELEASE="bullseye"
42 RELEASE_ARCH="armhf"
43 SET_ARCH=32
44 HOSTNAME="raspife3"
45 PASSWORD="AChanger1$"
46 USER_PASSWORD="AChanger1$"
47 DEFLOCAL="fr_FR.UTF-8"
48 TIMEZONE="Europe/Paris"
49 EXPANDROOT=false
50 ENABLE_QEMU=false
51 #-----------------------
52 XKB_MODEL="pc105"
53 XKB_LAYOUT="fr"
54 XKB_VARIANT="latin9"
55 XKB_OPTIONS=""
56 #------------------------
57 ENABLE_DHCP=true
58 #------------------------
59 ENABLE_CONSOLE=false
60 ENABLE_BLUETOOTH=false
61 ENABLE_I2C=true
62 ENABLE_SPI=true
63 ENABLE_IPV6=true
64 ENABLE_SSHD=true
65 ENABLE_NONFREE=true
66 ENABLE_WIRELESS=true
67 ENABLE_RSYSLOG=true
68 ENABLE_SOUND=true
69 ENABLE_HWRANDOM=true
70 ENABLE_MINGPU=true
71 ENABLE_DBUS=true
72 ENABLE_XORG=true
73 ENABLE_WM="openbox"
74 ENABLE_SYSVINIT=true
75 #------------------------
76 ENABLE_MINBASE=false
77 ENABLE_REDUCE=false
78 ENABLE_UBOOT=false
79 ENABLE_FBTURBO=false
80 ENABLE_VIDEOCORE=true
81 ENABLE_IPTABLES=false
82 ENABLE_USER=true
83 USER_NAME=ens-ife
84 ENABLE_ROOT=false
85 ENABLE_HARDNET=true
86 ENABLE_INITRAMFS=true
87 ENABLE_IFNAMES=true
88 #DISABLE_UNDERVOLT_WARNINGS=
89 #------------------------
90 SSH_ENABLE_ROOT=false
91 SSH_LIMIT_USERS=false
92 SSH_ROOT_PUB_KEY="/home/vidal/.ssh/authorized_keys"
93 SSH_USER_PUB_KEY="/home/vidal/.ssh/authorized_keys"
94 #------------------------
95 BUILD_KERNEL=true
96 KERNEL_BRANCH=rpi-5.4.y
97 KERNEL_REDUCE=false
98 KERNEL_HEADERS=true
99 KERNEL_REMOVESRC=true
100 KERNELSRC_CLEAN=true
101 KERNELSRC_CONFIG=true
102 #KERNEL_DEFCONFIG=bcm2835_defconfig
103 #KERNEL_BIN_IMAGE=Image
104 #KERNEL_IMAGE=kernel7.img
105 KERNEL_CCACHE=true
106 #------------------------
107 REDUCE_APT=false
108 REDUCE_DOC=true
109 REDUCE_MAN=true
110 REDUCE_HWDB=false
111 REDUCE_BASH=false
112 REDUCE_SSHD=false
113 REDUCE_LOCALE=false
114 #-------------------------
115 ENABLE_CRYPTFS=false
116 #-------------------------
117 BASEDIR=/storage/RpiGenImage/Images/${RELEASE}
118 #BASEDIR=/media/*******/*********/Nano-Ordinateurs/RaspberryPi/RpiGenImage/Images/${RELEASE}
119 DATE=`date +%Y-%m-%d`
120 IMAGE_NAME=${BASEDIR}/${DATE}-rpi${RPI_MODEL}-${RELEASE}
121
122
@@ -0,0 +1,122
1 # Configuration file raspi3 buster IFÉ 2020/02/04
2 #
3 APT_SERVER=debian.mirrors.ovh.net
4 #APT_SERVER=debian.proxad.net
5 APT_INCLUDES="gawk,gnupg,firmware-linux,\
6 firmware-linux-nonfree,firmware-misc-nonfree,\
7 firmware-realtek,firmware-brcm80211,dh-autoreconf,\
8 gettext,build-essential,git,systemd-sysv,bc,\
9 cmake,libjson-c-dev,unzip,usbutils,bison,\
10 automake,autoconf,autogen,\
11 libtool,libtool-bin,libltdl-dev,pkg-config,\
12 menulibre,libnotify-bin,pandoc,pm-utils,\
13 acpi-support,python3,python3-dev,python3-pypandoc,\
14 python3-scipy,python3-tk,python3-pandocfilters,\
15 python3-geopy,python3-pip,python,python-dev,\
16 python-tk,python-pip,\
17 python-tk,pandoc,python-configobj,python-cheetah,\
18 python-pil,python-serial,python-usb,pcre2-utils,\
19 libpcre++-dev,libpcre2-dev,libjpeg-dev,i2c-tools,\
20 python3-smbus,policykit-1,pmount,ntpdate,ntp,\
21 rsync,gnome-backgrounds,mate-backgrounds,texlive,\
22 texlive-xetex,nginx-extras,ffmpeg,network-manager,\
23 console-data,keyboard-configuration,\
24 libqt5webkit5-dev,libudev-dev,gfortran-8,\
25 libgfortran-8-dev,\
26 libzzip-dev,zlib1g-dev,libcanberra-gtk-module,\
27 libnss-myhostname,libfreetype6-dev,libpng16-16,\
28 libffi-dev,libltdl-dev,dbus-user-session,\
29 debian-archive-keyring,curl,wget,mousepad,\
30 xutils-dev,\
31 tightvncserver,geany,openbox-menu,\
32 autotools-dev,htop,ca-certificates-java,\
33 icedtea-netx,openjdk-11-jdk,\
34 openjdk-11-jre,openjdk-11-jre-headless,\
35 jed,nmap,terminator,libboost-all-dev"
36 #x11proto-randr-dev,lxrandr,\
37 #APT_INCLUDES_LATE="jed,\
38 #"
39 #----------------------
40 RPI_MODEL=4
41 RELEASE="buster"
42 RELEASE_ARCH="arm64"
43 SET_ARCH=32
44 HOSTNAME="raspife4"
45 PASSWORD="AChanger1$"
46 USER_PASSWORD="AChanger1$"
47 DEFLOCAL="fr_FR.UTF-8"
48 TIMEZONE="Europe/Paris"
49 EXPANDROOT=false
50 ENABLE_QEMU=false
51 #-----------------------
52 XKB_MODEL="pc105"
53 XKB_LAYOUT="fr"
54 XKB_VARIANT="latin9"
55 XKB_OPTIONS=""
56 #------------------------
57 ENABLE_DHCP=true
58 #------------------------
59 ENABLE_CONSOLE=false
60 ENABLE_BLUETOOTH=false
61 ENABLE_I2C=true
62 ENABLE_SPI=true
63 ENABLE_IPV6=true
64 ENABLE_SSHD=true
65 ENABLE_NONFREE=true
66 ENABLE_WIRELESS=true
67 ENABLE_RSYSLOG=true
68 ENABLE_SOUND=true
69 ENABLE_HWRANDOM=true
70 ENABLE_MINGPU=true
71 ENABLE_DBUS=true
72 ENABLE_XORG=true
73 ENABLE_WM="openbox"
74 ENABLE_SYSVINIT=true
75 #------------------------
76 ENABLE_MINBASE=false
77 ENABLE_REDUCE=false
78 ENABLE_UBOOT=false
79 ENABLE_FBTURBO=false
80 ENABLE_VIDEOCORE=true
81 ENABLE_IPTABLES=false
82 ENABLE_USER=true
83 USER_NAME=ens-ife
84 ENABLE_ROOT=false
85 ENABLE_HARDNET=true
86 ENABLE_INITRAMFS=true
87 ENABLE_IFNAMES=true
88 #DISABLE_UNDERVOLT_WARNINGS=
89 #------------------------
90 SSH_ENABLE_ROOT=false
91 SSH_LIMIT_USERS=false
92 SSH_ROOT_PUB_KEY="/home/vidal/.ssh/authorized_keys"
93 SSH_USER_PUB_KEY="/home/vidal/.ssh/authorized_keys"
94 #------------------------
95 BUILD_KERNEL=true
96 KERNEL_BRANCH=rpi-4.19.y
97 KERNEL_REDUCE=false
98 KERNEL_HEADERS=true
99 KERNEL_REMOVESRC=true
100 KERNELSRC_CLEAN=true
101 KERNELSRC_CONFIG=true
102 #KERNEL_DEFCONFIG=bcm2835_defconfig
103 #KERNEL_BIN_IMAGE=Image
104 #KERNEL_IMAGE=kernel7.img
105 KERNEL_CCACHE=true
106 #------------------------
107 REDUCE_APT=false
108 REDUCE_DOC=true
109 REDUCE_MAN=true
110 REDUCE_HWDB=false
111 REDUCE_BASH=false
112 REDUCE_SSHD=false
113 REDUCE_LOCALE=false
114 #-------------------------
115 ENABLE_CRYPTFS=false
116 #-------------------------
117 BASEDIR=/storage/RpiGenImage/Images/${RELEASE}
118 #BASEDIR=/media/*******/*********/Nano-Ordinateurs/RaspberryPi/RpiGenImage/Images/${RELEASE}
119 DATE=`date +%Y-%m-%d`
120 IMAGE_NAME=${BASEDIR}/${DATE}-rpi${RPI_MODEL}-${RELEASE}-${SET_ARCH}
121
122
@@ -2,8 +2,6
2 2 ## Introduction
3 3 `rpi23-gen-image.sh` is an advanced Debian Linux bootstrapping shell script for generating Debian OS images for all Raspberry Pi computers. The script at this time supports the bootstrapping of the Debian (armhf/armel) releases `stretch` and `buster`. Raspberry Pi 0/1/2/3/4 images are generated for 32-bit mode only. Raspberry Pi 3 supports 64-bit images that can be generated using custom configuration parameters (```templates/rpi3-stretch-arm64-4.14.y```).
4 4
5
6
7 5 ## Build dependencies
8 6 The following list of Debian packages must be installed on the build system because they are essentially required for the bootstrapping process. The script will check if all required packages are installed and missing packages will be installed automatically if confirmed by the user.
9 7
@@ -19,6 +19,13 if [ "$ENABLE_MINBASE" = true ] ; then
19 19 VARIANT="--variant=minbase"
20 20 fi
21 21
22
23 # Exclude packages if required by Debian release
24 #if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
25 # APT_EXCLUDES="--exclude=init,systemd-sysv"
26 #fi
27
28
22 29 # Base debootstrap (unpack only)
23 30 http_proxy=${APT_PROXY} debootstrap ${APT_EXCLUDES} --arch="${RELEASE_ARCH}" --foreign ${VARIANT} --components="${COMPONENTS}" --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}/debian"
24 31
@@ -17,7 +17,7 install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list"
17 17 # Use specified APT server and release
18 18 sed -i "s/\/ftp.debian.org\//\/${APT_SERVER}\//" "${ETC_DIR}/apt/sources.list"
19 19
20 #Fix for changing path for security updates in testing/bullseye
20 #Fix for changing path for security updates in testing
21 21 if [ "$RELEASE" = "testing" ] ; then
22 22 sed -i "s,buster\\/updates,testing-security," "${ETC_DIR}/apt/sources.list"
23 23 sed -i "s/ buster/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
@@ -158,7 +158,7 if [ "$ENABLE_WIRELESS" = true ] ; then
158 158 # Create temporary directory for firmware binary blob
159 159 temp_dir=$(as_nobody mktemp -d)
160 160
161 # Fetch firmware binary blob for RPI3B+
161 # Fetch firmware binary blob for RPI3B+ or Pi4
162 162 if [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
163 163 # Fetch firmware binary blob for RPi3P
164 164 as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.bin"
@@ -74,8 +74,14 chroot_install_cc() {
74 74 # Install c/c++ build environment inside the chroot
75 75 if [ -z "${COMPILER_PACKAGES}" ] ; then
76 76 COMPILER_PACKAGES=$(chroot_exec apt-get -s install g++ make bc | grep "^Inst " | awk -v ORS=" " '{ print $2 }')
77 # Install COMPILER_PACKAGES in chroot - NEVER do "${COMPILER_PACKAGES}" -> breaks uboot
78 chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES}
77
78
79 if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] || [ "$RELEASE" = "bullseye" ] ; then
80 chroot_exec apt-get -q -y --no-install-recommends install ${COMPILER_PACKAGES}
81 elif [ "$RELEASE" = "buster" ] || [ "$RELEASE" = "bullseye" ] ; then
82 chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES}
83 fi
84
79 85 fi
80 86 }
81 87
@@ -113,4 +119,4 unset_kernel_config() {
113 119 # unsets flag with the value of $1, config must exist at "./.config"
114 120 TGT="CONFIG_${1#CONFIG_}"
115 121 sed -i "s/^${TGT}=.*/# ${TGT} is not set/" .config
116 } No newline at end of file
122 }
@@ -2,7 +2,7
2 2 ########################################################################
3 3 # rpi23-gen-image.sh 2015-2017
4 4 #
5 # Advanced Debian "stretch" and "buster" bootstrap script for Raspberry Pi
5 # Advanced Debian "buster" and "bullseye" bootstrap script for Raspberry Pi
6 6 #
7 7 # This program is free software; you can redistribute it and/or
8 8 # modify it under the terms of the GNU General Public License
@@ -65,7 +65,7 SYSTEMDSWAP_URL=${SYSTEMDSWAP_URL:=https://github.com/Nefelim4ag/systemd-swap.gi
65 65 # Kernel deb packages for 32bit kernel
66 66 RPI_32_KERNEL_URL=${RPI_32_KERNEL_URL:=https://github.com/hypriot/rpi-kernel/releases/download/v4.14.34/raspberrypi-kernel_20180422-141901_armhf.deb}
67 67 RPI_32_KERNELHEADER_URL=${RPI_32_KERNELHEADER_URL:=https://github.com/hypriot/rpi-kernel/releases/download/v4.14.34/raspberrypi-kernel-headers_20180422-141901_armhf.deb}
68 # Kernel has KVM and zswap enabled - use if KERNEL_* parameters and precompiled kernel are used
68 # Kernel has KVM and zswap enabled - use if KERNEL_* parameters and precompiled kernel are used
69 69 RPI3_64_BIS_KERNEL_URL=${RPI3_64_BIS_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel-bis/releases/download/4.19.102.20200211/bcmrpi3-kernel-bis-4.19.102.20200211.tar.xz}
70 70 # Default precompiled 64bit kernel
71 71 RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel/releases/download/4.19.102.20200211/bcmrpi3-kernel-4.19.102.20200211.tar.xz}
@@ -73,7 +73,7 RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmr
73 73 RPI4_64_BIS_KERNEL_URL=${RPI4_64_BIS_KERNEL_URL:=https://github.com/sakaki-/bcm2711-kernel-bis/releases/download/4.19.102.20200211/bcm2711-kernel-bis-4.19.102.20200211.tar.xz}
74 74 # Default precompiled 64bit kernel - https://github.com/sakaki-/bcm2711-kernel
75 75 RPI4_64_DEF_KERNEL_URL=${RPI4_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcm2711-kernel-bis/releases/download/4.19.102.20200211/bcm2711-kernel-bis-4.19.102.20200211.tar.xz}
76 # Generic
76 # Generic
77 77 RPI3_64_KERNEL_URL=${RPI3_64_KERNEL_URL:=$RPI3_64_DEF_KERNEL_URL}
78 78 RPI4_64_KERNEL_URL=${RPI4_64_KERNEL_URL:=$RPI4_64_DEF_KERNEL_URL}
79 79 # Kali kernel src - used if ENABLE_NEXMON=true (they patch the wlan kernel modul)
@@ -285,7 +285,7 if [ -n "$SET_ARCH" ] ; then
285 285 else
286 286 KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2711_defconfig}
287 287 fi
288
288
289 289 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-arm64"
290 290 RELEASE_ARCH=${RELEASE_ARCH:=arm64}
291 291 KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img}
@@ -311,7 +311,7 if [ -n "$SET_ARCH" ] ; then
311 311 RELEASE_ARCH=${RELEASE_ARCH:=armel}
312 312 KERNEL_IMAGE=${KERNEL_IMAGE:=kernel.img}
313 313 CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabi-}
314
314
315 315 if [ $ENABLE_XORG = true ] ; then
316 316 if [$RELEASE = "stretch" ] || [$RELEASE = "oldstable" ] ; then
317 317 printf "\nBest support for armel architecture is provided under Debian stretch/oldstable. Choose yes to change release to Debian stretch[y/n] "
@@ -331,10 +331,10 if [ -n "$SET_ARCH" ] ; then
331 331 KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2711_defconfig}
332 332 KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7l.img}
333 333 fi
334
334
335 335 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armhf"
336 336 RELEASE_ARCH=${RELEASE_ARCH:=armhf}
337
337
338 338 CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabihf-}
339 339 fi
340 340 fi
@@ -447,7 +447,7 if [ "$ENABLE_CRYPTFS" = true ] && [ "$BUILD_KERNEL" = true ] ; then
447 447 if [ "$CRYPTFS_DROPBEAR" = true ] && [ "$ENABLE_INITRAMFS" = true ]; then
448 448 APT_INCLUDES="${APT_INCLUDES},dropbear-initramfs"
449 449 fi
450
450
451 451 if [ -z "$CRYPTFS_PASSWORD" ] ; then
452 452 echo "error: no password defined (CRYPTFS_PASSWORD)!"
453 453 exit 1
@@ -465,7 +465,7 if [ "$ENABLE_UBOOT" = true ] ; then
465 465 APT_INCLUDES="${APT_INCLUDES},device-tree-compiler,bc"
466 466 fi
467 467
468 if [ "$ENABLE_USBBOOT" = true ] ; then
468 if [ "$ENABLE_USBBOOT" = true ] ; then
469 469 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1P ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 2 ]; then
470 470 echo "error: Booting from USB alone is only supported by Raspberry Pi 3 and 3P"
471 471 exit 1
1 NO CONTENT: file was removed
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant