Skip to content

Commit 37da05d

Browse files
committed
Merge branch 'devel'
2 parents 5dfae25 + d2f5cca commit 37da05d

File tree

10 files changed

+589
-678
lines changed

10 files changed

+589
-678
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: bash
22
sudo: false
3-
install: gem install mdl
3+
install: gem install chef-utils:16.6.14 mdl
44
script:
55
- bash -c 'shopt -s globstar; shellcheck **/*.sh'
66
- mdl --verbose --rules '~MD013, ~MD036' .

BUILD.md

+1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ To set buildroot options, create a file named `buildroot.conf`, which contains t
4646

4747
- `compress_bz2=1` - create a bz2-compressed image
4848
- `compress_xz=1` - create a xz-compressed image
49+
- `use_sudo=1` - use passwordless-sudo for operations which require root privileges
4950

5051
By default both bzip2 and xz compressed versions of the image will be created and the uncompressed image will deleted, but either or both can be disabled. If both are disabled, the uncompressed image will be left in place.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016-2018 Andreas Eberlein <[email protected]>
1+
Copyright (c) 2016-2020 Andreas Eberlein <[email protected]>
22
Copyright (c) 2013 Toni Spets <[email protected]>
33

44
Permission to use, copy, modify, and distribute this software for any

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,12 @@ When an error occurs during install, the logfile is placed in the `raspberrypi-u
147147

148148
## Reinstalling or replacing an existing system
149149

150-
If you want to reinstall with the same settings you did your first install you can just move the original _config.txt_ back and reboot.
150+
If you want to reinstall with the same settings you did your first install you can just copy the original _config.txt_ back and reboot.
151+
152+
Note: If the original installation was performed with `cleanup` set to `1`, then the files necessary for a reinstallation will not be available.
151153

152154
```
153-
mv /boot/raspberrypi-ua-netinst/reinstall/config.txt /boot/config.txt
155+
cp /boot/raspberrypi-ua-netinst/config.txt /boot/config.txt
154156
reboot
155157
```
156158

build.sh

+158-386
Large diffs are not rendered by default.

buildroot.sh

+29-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
2+
# shellcheck source=./buildroot.conf
3+
# shellcheck disable=SC1091
24

35
set -e # exit if any command fails
46

@@ -10,10 +12,16 @@ compress_bz2=1
1012
# Controls production of an xz-compressed image
1113
compress_xz=1
1214

15+
# Use 'sudo' for commands which require root privileges
16+
use_sudo=0
17+
1318
# If a configuration file exists, import its settings
14-
if [ -e buildroot.conf ]; then
15-
# shellcheck disable=SC1091
16-
source buildroot.conf
19+
if [ -r buildroot.conf ]; then
20+
source <(tr -d "\015" < buildroot.conf)
21+
fi
22+
23+
if [ "$use_sudo" = "1" ]; then
24+
SUDO=sudo
1725
fi
1826

1927
build_dir=build_dir
@@ -33,11 +41,12 @@ image=${build_dir}/${imagename}.img
3341

3442
# Prepare
3543
rm -f "${image}"
44+
rm -rf "${build_dir:-build_dir}/mnt/"
3645

3746
# Create image
3847
dd if=/dev/zero of="$image" bs=1M count=128
3948

40-
fdisk "${image}" <<EOF
49+
${SUDO} fdisk "${image}" <<EOF
4150
n
4251
p
4352
1
@@ -57,20 +66,24 @@ else
5766
fi
5867

5968
if [ "$losetup_lt_2_22" = "true" ]; then
60-
kpartx -as "${image}"
61-
mkfs.vfat /dev/mapper/loop0p1
62-
mount /dev/mapper/loop0p1 /mnt
63-
cp -r ${build_dir}/bootfs/* /mnt/
64-
umount /mnt
65-
kpartx -d "${image}" || true
69+
${SUDO} kpartx -as "${image}"
70+
${SUDO} mkfs.vfat /dev/mapper/loop0p1
71+
mkdir ${build_dir}/mnt
72+
${SUDO} mount /dev/mapper/loop0p1 ${build_dir}/mnt
73+
${SUDO} cp -r ${build_dir}/bootfs/* ${build_dir}/mnt
74+
${SUDO} umount ${build_dir}/mnt
75+
${SUDO} kpartx -d "${image}" || true
76+
rmdir ${build_dir}/mnt
6677
else
67-
losetup --find --partscan "${image}"
78+
${SUDO} losetup --find --partscan "${image}"
6879
LOOP_DEV="$(losetup --associated "${image}" | cut -f1 -d':')"
69-
mkfs.vfat "${LOOP_DEV}p1"
70-
mount "${LOOP_DEV}p1" /mnt
71-
cp -r ${build_dir}/bootfs/* /mnt/
72-
umount /mnt
73-
losetup --detach "${LOOP_DEV}"
80+
${SUDO} mkfs.vfat "${LOOP_DEV}p1"
81+
mkdir ${build_dir}/mnt
82+
${SUDO} mount "${LOOP_DEV}p1" ${build_dir}/mnt
83+
${SUDO} cp -r ${build_dir}/bootfs/* ${build_dir}/mnt
84+
${SUDO} umount ${build_dir}/mnt
85+
${SUDO} losetup --detach "${LOOP_DEV}"
86+
rmdir ${build_dir}/mnt
7487
fi
7588

7689
# Create archives

doc/INSTALL_CUSTOM.md

+25-7
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,32 @@
1717
| `preset` | `server` | `base`/ `minimal`/ `server` | The current packages that are installed by default are listed below. |
1818
| `packages` | | | Install these additional packages (comma separated and quoted). (e.g. "pi-bluetooth,cifs-utils,curl") |
1919
| `firmware_packages` | `0` | `0`/`1` | Set to "1" to install common firmware packages (Atheros, Broadcom, Libertas, Ralink and Realtek). |
20-
| `mirror` | `http:// mirrordirector.raspbian.org/ raspbian/` | | |
20+
| `mirror` | `http:// mirrordirector.raspbian.org/ raspbian/` or `http:// deb.debian.org/ debian/` | | default value depends on arch |
2121
| `mirror_cache` | | | Set address and port for HTTP apt-cacher or apt-cacher-ng (e.g. "192.168.0.1:3142"). If set, the cacher will be used to cache packages during installation downloaded from the repository set in `mirror` as well as "http://archive.raspberrypi.org/debian". |
22-
| `release` | `buster` | | Raspbian release name |
22+
| `release` | `bullseye` | | Raspbian release name |
23+
| `arch` | `armhf` | | Raspbian architecture: "armhf" = 32-bit (all Raspberry models), "arm64" = 64-bit (only for Model 3 and up, Zero 2) |
2324

2425
### Description: Presets
2526

27+
#### Default configuration (when `use_systemd_services` is unset or set to `0`):
28+
2629
| Preset | Packages |
2730
|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
28-
| `base` | _\<essential\>,apt,kmod_ |
31+
| `base` | _\<essential\>,apt,gnupg,kmod_ |
2932
| `minimal` | _\<base\>,cpufrequtils,fake-hwclock,ifupdown,net-tools,ntp,openssh-server,dosfstools,raspberrypi-sys-mods_ |
30-
| `server` | _\<minimal\>,systemd-sysv,vim-tiny,iputils-ping,wget,ca-certificates,rsyslog,cron,dialog,locales,tzdata,less,man-db,logrotate,bash-completion,console-setup,apt-utils,libraspberrypi-bin,raspi-copies-and-fills_ |
33+
| `server` | _\<minimal\>,systemd-sysv,vim-tiny,iputils-ping,wget,ca-certificates,rsyslog,cron,dialog,locales,tzdata,less,man-db,logrotate,bash-completion,console-setup,apt-utils,libraspberrypi-bin,raspi-copies-and-fills (raspi-copies-and-fills is not available on arm64)_ |
34+
35+
Note that if the networking configuration is set to use DHCP, `isc-dhcp-client` will also be installed.
36+
37+
#### Advanced configuration (when `use_systemd_services` is set to `1`):
38+
39+
| Preset | Packages |
40+
|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
41+
| `base` | _\<essential\>,apt,kmod_ |
42+
| `minimal` | _\<base\>,cpufrequtils,iproute2,openssh-server,dosfstools,raspberrypi-sys-mods_ |
43+
| `server` | _\<minimal\>,systemd-sysv,vim-tiny,iputils-ping,wget,ca-certificates,rsyslog,cron,dialog,locales,tzdata,less,man-db,logrotate,bash-completion,console-setup,apt-utils,libraspberrypi-bin,raspi-copies-and-fills (raspi-copies-and-fills is not available on arm64)_ |
44+
45+
Note that if the networking configuration is set to use DHCP, no additional packages will be installed as `systemd-networkd` provides DHCP client support.
3146

3247
## Device / peripheral
3348

@@ -41,7 +56,7 @@
4156
| `sound_usb_first` | `0` | `0`/`1` | Set to "1" to define USB audio as default if onboard audio is also enabled. The options `sound_enable=1` and `sound_usb_enable=1` have to be set to take effect. |
4257
| `camera_enable` | `0` | `0`/`1` | Set to "1" to enable the camera module. This enables all camera-related parameters in config.txt. |
4358
| `camera_disable_led` | `0` | `0`/`1` | Disables the camera LED. The option `camera_enable=1` has to be set to take effect. |
44-
| `rtc` | | `ds1307`/ `ds1339`/ `ds3231`/ `mcp7940x`/ `mcp7941x`/ `pcf2127`/ `pcf8523`/ `pcf8563` | Select an RTC if it is connected via I²C. |
59+
| `rtc` | | `ds1307`/ `ds1339`/ `ds3231`/ `mcp7940x`/ `mcp7941x`/ `pcf2127`/ `pcf8523`/ `pcf8563`/ `abx80x` | Select an RTC if it is connected via I²C. |
4560
| `dt_overlays` | | | Enables additional device tree overlays (comma separated and quoted). (e.g. 'dt_overlays="hifiberry-dac,lirc-rpi"') |
4661

4762
## SSH
@@ -125,9 +140,11 @@
125140
| `disable_splash` | `0` | `0`/`1` | Disables the rainbow splash screen on boot. |
126141
| `cleanup` | `0` | `0`/`1` | Remove installer files after success. To also remove log files, note the option below. |
127142
| `cleanup_logfiles` | `0` | `0`/`1` | Removes installer log files after success. |
128-
| `cmdline` | `"dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 elevator=deadline fsck.repair=yes"` | | |
143+
| `cmdline` | `"console=serial0,115200 console=tty1 fsck.repair=yes"` | | |
129144
| `final_action` | `reboot` | `reboot`/ `poweroff`/ `halt`/ `console` | Action at the end of install. |
130-
| `installer_telnet` | `1` | `0`/`1` | Send installer console output via telnet. |
145+
| `installer_telnet` | `listen` | `none`/`connect`/`listen` | Connect to, or listen for, a telnet connection to send installer console output. |
146+
| `installer_telnet_host` | | | Host name or address to use when `installer_telnet` is set to `connect`. |
147+
| `installer_telnet_port` | '9923' | | Port number to use when `installer_telnet` is set to `connect`. |
131148
| `installer_retries` | `3` | | Number of retries if installation fails. |
132149
| `installer_networktimeout` | `15` | | Timeout in seconds for network interface initialization. |
133150
| `installer_pkg_updateretries` | `3` | | Number of retries if package update fails. |
@@ -142,3 +159,4 @@
142159
| `disable_predictable_nin` | `1` | `0`/`1` | Disable Predictable Network Interface Names. Set to 0 if you want to use predictable network interface names, which means if you use the same SD card on a different RPi board, your network device might be named differently. This will result in the board having no network connectivity. |
143160
| `drivers_to_load` | | | Loads additional kernel modules at installation (comma separated and quoted). |
144161
| `online_config` | | | URL to extra config that will be executed after installer-config.txt |
162+
| `use_systemd_services` | `0` | `0`/`1` | Use systemd for networking and DNS resolution. |

res/initramfs/etc/apt/sources.list

-1
This file was deleted.

0 commit comments

Comments
 (0)