diff --git a/README.md b/README.md index a074381..78d301b 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # rpi23-gen-image ## Introduction -`rpi23-gen-image.sh` is an advanced Debian Linux bootstrapping shell script for generating Debian OS images for Raspberry Pi 2 (RPi2) and Raspberry Pi 3 (RPi3) computers. The script at this time supports the bootstrapping of the Debian (armhf) releases `stretch` and `buster`. Raspberry Pi 3 images are generated for 32-bit mode only. Raspberry Pi 3 64-bit images can be generated using custom configuration parameters (```templates/rpi3-stretch-arm64-4.14.y```). +`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 3 images are generated for 32-bit mode only. Raspberry Pi 3 64-bit images can be generated using custom configuration parameters (```templates/rpi3-stretch-arm64-4.14.y```). ## Build dependencies 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. ```debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git bc psmisc dbus sudo``` -It is recommended to configure the `rpi23-gen-image.sh` script to build and install the latest Raspberry Pi Linux kernel. For the RPi3 this is mandatory. Kernel compilation and linking will be performed on the build system using an ARM (armhf) cross-compiler toolchain. +It is recommended to configure the `rpi23-gen-image.sh` script to build and install the latest Raspberry Pi Linux kernel. For the RPi3 this is mandatory. Kernel compilation and linking will be performed on the build system using an ARM (armhf/armel) cross-compiler toolchain. -The script has been tested using the default `crossbuild-essential-armhf` toolchain meta package on Debian Linux `stretch` build systems. Please check the [Debian CrossToolchains Wiki](https://wiki.debian.org/CrossToolchains) for further information. +The script has been tested using the default `crossbuild-essential-armhf` and `crossbuild-essential-armel` toolchain meta packages on Debian Linux `stretch` build systems. Please check the [Debian CrossToolchains Wiki](https://wiki.debian.org/CrossToolchains) for further information. ## Command-line parameters The script accepts certain command-line parameters to enable or disable specific OS features, services and configuration settings. These parameters are passed to the `rpi23-gen-image.sh` script via (simple) shell-variables. Unlike environment shell-variables (simple) shell-variables are defined at the beginning of the command-line call of the `rpi23-gen-image.sh` script. @@ -59,7 +59,6 @@ A comma separated list of additional packages to be installed by apt after boots #### General system settings: ##### `SET_ARCH`=32 Set Architecture to default 32bit. If you want to to compile 64bit (RPI3 or RPI3+) set it to `64`. This option will set every needed crosscompiler or boeard specific option for a successful build. -If you want to change e.g. cross-compiler -> Templates always override defaults ##### `RPI_MODEL`=2 Specifiy the target Raspberry Pi hardware model. The script at this time supports the following Raspberry Pi models: @@ -153,13 +152,13 @@ Set the IP address for the second NTP server. #### Basic system features: ##### `ENABLE_CONSOLE`=true -Enable serial console interface. Recommended if no monitor or keyboard is connected to the RPi2/3. In case of problems fe. if the network (auto) configuration failed - the serial console can be used to access the system. +Enable serial console interface. Recommended if no monitor or keyboard is connected to the RPi0/1/2/3. In case of problems fe. if the network (auto) configuration failed - the serial console can be used to access the system. ##### `ENABLE_I2C`=false -Enable I2C interface on the RPi2/3. Please check the [RPi2/3 pinout diagrams](https://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins. +Enable I2C interface on the RPi0/1/2/3. Please check the [RPi0/1/2/3 pinout diagrams](https://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins. ##### `ENABLE_SPI`=false -Enable SPI interface on the RPi2/3. Please check the [RPi2/3 pinout diagrams](https://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins. +Enable SPI interface on the RPi0/1/2/3. Please check the [RPi0/1/2/3 pinout diagrams](https://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins. ##### `ENABLE_IPV6`=true Enable IPv6 support. The network interface configuration is managed via systemd-networkd. @@ -208,7 +207,7 @@ Use debootstrap script variant `minbase` which only includes essential packages Reduce the disk space usage by deleting packages and files. See `REDUCE_*` parameters for detailed information. ##### `ENABLE_UBOOT`=false -Replace the default RPi2/3 second stage bootloader (bootcode.bin) with [U-Boot bootloader](https://git.denx.de/?p=u-boot.git;a=summary). U-Boot can boot images via the network using the BOOTP/TFTP protocol. +Replace the default RPi0/1/2/3 second stage bootloader (bootcode.bin) with [U-Boot bootloader](https://git.denx.de/?p=u-boot.git;a=summary). U-Boot can boot images via the network using the BOOTP/TFTP protocol. ##### `UBOOTSRC_DIR`="" Path to a directory (`u-boot`) of [U-Boot bootloader sources](https://git.denx.de/?p=u-boot.git;a=summary) that will be copied, configured, build and installed inside the chroot. @@ -277,7 +276,7 @@ Add SSH (v2) public key(s) from specified file to `authorized_keys` file to enab #### Kernel compilation: ##### `BUILD_KERNEL`=true -Build and install the latest RPi2/3 Linux kernel. Currently only the default RPi2/3 kernel configuration is used. +Build and install the latest RPi0/1/2/3 Linux kernel. Currently only the default RPi0/1/2/3 kernel configuration is used. ##### `CROSS_COMPILE`="arm-linux-gnueabihf-" This sets the cross compile enviornment for the compiler. @@ -400,9 +399,9 @@ The functions of this script that are required for the different stages of the b | `10-bootstrap.sh` | Debootstrap basic system | | `11-apt.sh` | Setup APT repositories | | `12-locale.sh` | Setup Locales and keyboard settings | -| `13-kernel.sh` | Build and install RPi2/3 Kernel | +| `13-kernel.sh` | Build and install RPi0/1/2/3 Kernel | | `14-fstab.sh` | Setup fstab and initramfs | -| `15-rpi-config.sh` | Setup RPi2/3 config and cmdline | +| `15-rpi-config.sh` | Setup RPi0/1/2/3 config and cmdline | | `20-networking.sh` | Setup Networking | | `21-firewall.sh` | Setup Firewall | | `30-security.sh` | Setup Users and Security settings | @@ -410,6 +409,7 @@ The functions of this script that are required for the different stages of the b | `32-sshd.sh` | Setup SSH and public keys | | `41-uboot.sh` | Build and Setup U-Boot | | `42-fbturbo.sh` | Build and Setup fbturbo Xorg driver | +| `43-videocore.sh` | Build and Setup videocore libraries | | `50-firstboot.sh` | First boot actions | | `99-reduce.sh` | Reduce the disk space usage | @@ -418,7 +418,7 @@ All the required configuration files that will be copied to the generated OS ima | Directory | Description | | --- | --- | | `apt` | APT management configuration files | -| `boot` | Boot and RPi2/3 configuration files | +| `boot` | Boot and RPi0/1/2/3 configuration files | | `dpkg` | Package Manager configuration | | `etc` | Configuration files and rc scripts | | `firstboot` | Scripts that get executed on first boot | @@ -444,7 +444,7 @@ script -c 'APT_SERVER=ftp.de.debian.org ./rpi23-gen-image.sh' ./build.log ``` ## Flashing the image file -After the image file was successfully created by the `rpi23-gen-image.sh` script it can be copied to the microSD card that will be used by the RPi2/3 computer. This can be performed by using the tools `bmaptool` or `dd`. Using `bmaptool` will probably speed-up the copy process because `bmaptool` copies more wisely than `dd`. +After the image file was successfully created by the `rpi23-gen-image.sh` script it can be copied to the microSD card that will be used by the RPi0/1/2/3 computer. This can be performed by using the tools `bmaptool` or `dd`. Using `bmaptool` will probably speed-up the copy process because `bmaptool` copies more wisely than `dd`. ##### Flashing examples: ```shell