Compare commits

..

153 Commits

Author SHA1 Message Date
c66784a6a0 First Stable OS 2025-03-21 10:25:29 -07:00
Serge Schneider
b9e30f2e0e Merge branch 'master' into arm64 2025-01-22 13:58:26 +00:00
Stefan Becker
e071d0de36 Switch docker build to Debian Bookworm 2025-01-22 13:55:04 +00:00
Serge Schneider
47958f5efe Merge branch 'master' into arm64 2025-01-02 13:27:07 +00:00
Stefan Becker
fb5180d3de Dockerfile: fix ENV warning (#791)
Newer versions of docker generate the following warning

   - LegacyKeyValueFormat: "ENV key=value" should be used instead of
     legacy "ENV key value" format (line 4)
2025-01-02 13:26:42 +00:00
Serge Schneider
1e780d18c2 Merge branch 'master' into arm64 2025-01-02 09:32:25 +00:00
Serge Schneider
fc280356b1 Escape the ? expression in sed
Fixes #817, fixes #820
2025-01-02 09:27:21 +00:00
marcone
ca08900c66 README.md: Fix typo (#813) 2024-11-28 11:05:29 +00:00
Serge Schneider
744c7151fb Merge branch 'master' into arm64 2024-11-22 14:38:36 +00:00
Serge Schneider
8e30e79434 stage5: install code-the-classics-2 2024-11-22 14:38:27 +00:00
Serge Schneider
8946f77e4a Merge branch 'master' into arm64 2024-11-21 15:57:29 +00:00
Serge Schneider
18acfd7f87 Merge branch 'master' into arm64 2024-11-21 12:43:41 +00:00
Serge Schneider
891df1e21e Merge branch 'master' into arm64 2024-11-19 13:28:23 +00:00
Serge Schneider
919f1e86b9 Merge branch 'master' into arm64 2024-11-11 13:34:14 +00:00
Serge Schneider
e335a4e8b6 Merge branch 'master' into arm64 2024-11-01 12:43:15 +00:00
Serge Schneider
da8f0063ea Merge branch 'master' into arm64 2024-10-31 13:28:46 +00:00
Serge Schneider
ccc23c6738 Merge branch 'master' into arm64 2024-10-30 11:33:22 +00:00
Serge Schneider
150246acda Merge branch 'master' into arm64 2024-10-29 15:33:28 +00:00
Serge Schneider
19fd60cef7 Merge branch 'master' into arm64 2024-10-29 10:16:06 +00:00
Serge Schneider
6453828cce Merge branch 'master' into arm64 2024-10-28 15:00:29 +00:00
Serge Schneider
9aa52c467b Merge branch 'master' into arm64 2024-10-28 08:27:07 +00:00
Serge Schneider
b040e0a64e Update release notes 2024-10-28 08:26:59 +00:00
Serge Schneider
17c8e48534 Merge branch 'master' into arm64 2024-10-28 08:15:53 +00:00
Serge Schneider
7c7d74f210 Update release notes 2024-10-28 08:11:44 +00:00
Serge Schneider
ecda2579eb Merge branch 'master' into arm64 2024-10-07 15:16:24 +01:00
Serge Schneider
94f7acf599 Update release notes 2024-10-07 15:16:04 +01:00
Serge Schneider
4cfc6758ff Merge branch 'master' into arm64 2024-09-25 11:58:30 +01:00
Serge Schneider
fd5a1e93cd stage4: install squeekboard 2024-09-25 11:57:45 +01:00
Serge Schneider
c94d23e165 Replace python3-rpi.gpio with python3-rpi-lgpio 2024-09-25 11:57:45 +01:00
Serge Schneider
cdc1467e13 stage3: switch from arandr to raindrop 2024-09-11 13:39:38 +01:00
Serge Schneider
def6e65ffb stage3: switch to labwc by default 2024-09-11 13:38:16 +01:00
Serge Schneider
36048218e0 Merge branch 'master' into arm64 2024-08-27 13:01:06 +01:00
Serge Schneider
98f522e64d stage3: Switch chromium package and remove unnecessary steps 2024-08-27 13:00:07 +01:00
Serge Schneider
0668700902 Merge branch 'master' into arm64 2024-07-28 21:06:21 +01:00
Serge Schneider
291f869713 export-image: generate sbom file if syft is available 2024-07-28 21:06:03 +01:00
Serge Schneider
48efb5fc54 Merge branch 'master' into arm64 2024-06-24 14:01:51 +01:00
Serge Schneider
a63eb86d7b Merge branch 'master' into arm64 2024-05-27 13:48:46 +01:00
Serge Schneider
0755b07f06 Merge branch 'master' into arm64 2024-05-15 15:52:53 +01:00
Serge Schneider
97aa847ea8 Merge branch 'master' into arm64 2024-05-13 16:41:38 +01:00
Serge Schneider
72b2dfd634 build.sh: set ARCH to arm64 2024-05-13 16:28:34 +01:00
Serge Schneider
2327c5e28d Merge branch 'master' into arm64 2024-05-13 16:28:00 +01:00
Serge Schneider
64e205739c Merge branch 'master' into arm64 2024-04-29 14:38:09 +01:00
Serge Schneider
2c29fc27c5 Merge branch 'master' into arm64 2024-04-29 10:53:31 +01:00
Serge Schneider
7dd5b7dd59 Merge branch 'master' into arm64 2024-04-18 11:35:15 +01:00
Serge Schneider
8056aa3bec Merge branch 'master' into arm64 2024-04-09 15:51:52 +01:00
Serge Schneider
56916d4d84 Merge branch 'master' into arm64 2024-04-09 15:30:05 +01:00
Serge Schneider
f19ee211dd Merge branch 'master' into arm64 2024-03-15 14:55:13 +00:00
Serge Schneider
8273e8553b Merge branch 'master' into arm64 2024-03-13 19:53:20 +00:00
Serge Schneider
dd93d6280f Merge branch 'master' into arm64 2024-03-13 18:17:33 +00:00
Serge Schneider
3358eb36e1 Merge branch 'master' into arm64 2024-03-13 15:46:15 +00:00
Serge Schneider
9a13a81115 Merge branch 'master' into arm64 2024-03-11 14:53:03 +00:00
Serge Schneider
ff2fd5007f Merge branch 'master' into arm64 2024-03-07 23:18:15 +00:00
Serge Schneider
6fb311e7fb Merge branch 'master' into arm64 2024-03-04 08:54:54 +00:00
Serge Schneider
b4f2aeabde Merge branch 'master' into arm64 2024-02-26 14:15:02 +00:00
Serge Schneider
57149546cf Merge branch 'master' into arm64 2024-01-30 14:43:42 +00:00
Serge Schneider
a34bf65c4c Merge branch 'master' into arm64 2024-01-23 15:14:38 +00:00
Serge Schneider
62eeab3a86 Merge branch 'master' into arm64 2024-01-22 14:49:34 +00:00
Serge Schneider
94bb86632d Merge branch 'master' into arm64 2024-01-17 17:37:07 +00:00
Serge Schneider
70cd6f2a1e Merge branch 'master' into arm64 2023-11-29 16:14:49 +00:00
Serge Schneider
0fda3224f6 Merge branch 'master' into arm64 2023-11-29 01:34:19 +00:00
Serge Schneider
caf3d8681b Merge branch 'master' into arm64 2023-11-28 14:25:40 +00:00
Serge Schneider
1460069163 Merge branch 'master' into arm64 2023-11-27 15:34:52 +00:00
Serge Schneider
78444eaf07 Merge branch 'master' into arm64 2023-10-17 14:42:49 +01:00
Serge Schneider
962bf483c8 Merge branch 'master' into arm64 2023-10-04 14:18:52 +01:00
Serge Schneider
5f2fe0f854 pi5 support 2023-09-27 16:04:18 +01:00
Serge Schneider
5ef8b0d45c Remove 32-bit kernels and install 64-bit headers 2023-09-27 16:04:06 +01:00
Serge Schneider
325123ff22 stage0: add non-free-firmware 2023-09-27 16:02:00 +01:00
Serge Schneider
c318daf364 Merge branch 'master' into arm64 2023-09-27 16:01:28 +01:00
Reuben Miller
77706bd2f6 fix: support bash v3 by removing array usage (#705) 2023-09-25 14:59:25 +01:00
Serge Schneider
e484aa8581 Merge branch 'master' into arm64 2023-08-17 16:51:11 +01:00
Stefan Becker
a86d732f58 Register aarch64 in binfmt misc (#694)
This modifies commit 6dc45a80e7 for the
arm64 branch. For 64-bit builds we need to register qemu-aarch64-static
instead.

Improves on #685
2023-05-09 14:27:36 +01:00
Serge Schneider
7c750947a9 Update chromium install 2023-04-25 21:46:39 +01:00
Serge Schneider
c16e6b7dee Merge branch 'master' into arm64 2023-04-25 15:44:25 +01:00
Serge Schneider
0defafedd4 Merge branch 'master' into arm64 2023-03-29 07:59:56 +01:00
Serge Schneider
84746b2bcd Merge branch 'master' into arm64 2023-03-28 17:21:32 +01:00
Stefan Becker
3e8046da4c Update qemu ARM binary name in README.md (#684)
When running a 64 bit build you need the QEMU aarch64 binary installed
on the host system.

Fixes #678
2023-03-27 16:02:46 +01:00
Serge Schneider
a2afdf78cb Merge branch 'master' into arm64 2023-03-27 14:44:45 +01:00
Serge Schneider
60c9ba3199 Re-enable wolfram-engine on arm64 2023-03-09 15:12:33 +00:00
Serge Schneider
25e2319eff Merge branch 'master' into arm64 2023-02-14 15:26:22 +00:00
Serge Schneider
04d0dcb46c Merge branch 'master' into arm64 2023-02-14 15:23:58 +00:00
Serge Schneider
b48040b3f0 Merge branch 'master' into arm64 2023-02-09 12:28:47 +00:00
Serge Schneider
366bc2c8f3 Merge branch 'master' into arm64 2022-11-11 08:58:33 +00:00
Serge Schneider
bd2cf0e0e4 Merge branch 'master' into arm64 2022-11-08 12:07:33 +00:00
Serge Schneider
da6dde2aea Merge branch 'master' into arm64 2022-11-08 11:09:30 +00:00
Serge Schneider
2bc1f64a57 Merge branch 'master' into arm64 2022-09-26 12:15:33 +01:00
Serge Schneider
3dff0ce787 Merge branch 'master' into arm64 2022-09-22 13:07:48 +01:00
Serge Schneider
005a8c73b0 Merge branch 'master' into arm64 2022-09-21 16:15:08 +01:00
Serge Schneider
b37b47e559 Merge branch 'master' into arm64 2022-09-15 15:41:32 +01:00
Serge Schneider
3f78c2b444 Merge branch 'master' into arm64 2022-09-14 16:51:02 +01:00
Serge Schneider
bd85d61c05 Merge branch 'master' into arm64 2022-09-07 13:00:42 +01:00
Serge Schneider
827affcc11 Merge branch 'master' into arm64 2022-09-06 11:28:59 +01:00
Serge Schneider
4e9aaac41e Merge branch 'master' into arm64 2022-09-01 16:32:50 +01:00
Serge Schneider
fb582e2e67 Merge remote-tracking branch 'origin/master' into arm64 2022-07-26 12:08:25 +01:00
XECDesign
ca06d62f2e Docker: always use debian:bullseye for arm64 image
Fixes #613
2022-04-25 15:11:28 +01:00
Serge Schneider
18aee5cfb8 Merge branch 'master' into arm64 2022-04-08 15:29:02 +01:00
Serge Schneider
27a8050c3c Merge branch 'master' into arm64 2022-04-04 12:42:35 +01:00
Serge Schneider
151f3ff80f Merge branch 'master' into arm64 2022-03-29 10:59:31 +01:00
Serge Schneider
e5bd8d5433 Merge branch 'master' into arm64 2022-03-28 19:44:49 +01:00
Serge Schneider
10a538ff92 Merge branch 'master' into arm64 2022-03-21 11:48:48 +00:00
Serge Schneider
7073d28f22 Merge branch 'master' into arm64 2022-03-01 16:25:28 +00:00
Serge Schneider
d1b8a2005b Merge branch 'master' into arm64 2022-02-28 14:19:38 +00:00
Serge Schneider
a0ba64e5c8 Merge branch 'master' into arm64 2022-02-23 18:36:52 +00:00
Serge Schneider
733513aa25 Enable APT_PROXY for arm64 builds
Closes #598
2022-02-22 11:34:06 +00:00
Serge Schneider
255288909b Merge branch 'master' into arm64 2022-02-03 15:51:14 +00:00
Serge Schneider
4721bfe590 Update os.json 2022-02-02 14:32:09 +00:00
Serge Schneider
2b3ba5b2a6 Merge branch 'master' into arm64 2022-02-02 14:26:31 +00:00
Serge Schneider
fbe448ccdc Merge branch 'master' into arm64 2022-01-20 15:32:05 +00:00
Serge Schneider
61c6294e23 Merge branch 'master' into arm64 2022-01-14 09:18:35 +00:00
Serge Schneider
dec2743355 Merge branch 'master' into arm64 2022-01-13 15:39:30 +00:00
Serge Schneider
43c42bf9e4 Merge branch 'master' into arm64 2022-01-12 10:22:21 +00:00
Serge Schneider
69cc4146c8 Build complete set of arm64 images 2022-01-11 11:20:35 +00:00
Serge Schneider
ef933ae156 Merge branch 'master' into arm64 2022-01-10 12:41:54 +00:00
Serge Schneider
0f7ab62ac9 Revert "Update chromium install"
This reverts commit 69cd27944c.
2021-12-22 15:55:04 +00:00
Serge Schneider
f81afa8282 Merge branch 'master' into arm64 2021-12-22 15:54:16 +00:00
XECDesign
45b4cc19d0 Remove use of setarch for arm64
Fixes #572
2021-12-22 15:43:06 +00:00
Serge Schneider
14a28a729e Merge branch 'master' into arm64 2021-11-12 12:14:10 +00:00
Serge Schneider
720f4aea86 Merge branch 'master' into arm64 2021-11-08 08:44:58 +00:00
Serge Schneider
c12b1df4ed Merge branch 'master' into arm64 2021-10-29 20:38:23 +01:00
Serge Schneider
c61f8b72fa Merge branch 'master' into arm64 2021-10-29 10:24:20 +01:00
Serge Schneider
edbc8b604d Merge branch 'master' into arm64 2021-10-29 10:21:19 +01:00
Serge Schneider
5ea223355a Add debian-security repo 2021-10-26 12:28:11 +01:00
Serge Schneider
cd8a82d4fd Merge branch 'master' into arm64 2021-10-15 16:04:49 +01:00
Serge Schneider
cf938b0549 Merge branch 'master' into arm64 2021-10-07 10:08:40 +01:00
Serge Schneider
268d4c4f44 Remove debian-security bullseye/updates repo 2021-10-06 14:59:29 +01:00
Serge Schneider
2e3603d228 Merge branch 'master' into arm64 2021-10-05 17:43:06 +01:00
Serge Schneider
5971767590 Merge branch 'master' into arm64 2021-09-21 16:36:50 +01:00
Serge Schneider
535ea6c7f0 Merge branch 'master' into arm64 2021-09-01 14:07:47 +01:00
Serge Schneider
600f7c1fa4 Merge branch 'master' into arm64 2021-09-01 11:10:57 +01:00
Serge Schneider
4b59b5a70d Merge remote-tracking branch 'upstream/master' into arm64 2021-06-22 15:57:11 +01:00
Serge Schneider
95ea0ba696 Merge branch 'master' into arm64 2021-06-17 16:53:05 +01:00
Serge Schneider
071d395635 Merge branch 'master' into arm64 2021-05-07 15:37:59 +01:00
Serge Schneider
7cfcace573 Merge branch 'master' into arm64 2021-03-31 12:29:10 +01:00
Serge Schneider
04f9b9bb5f Install gpiozero in lite images 2021-03-31 12:28:30 +01:00
Serge Schneider
2b9e8e9b22 Merge branch 'master' into arm64 2021-03-04 22:43:17 +00:00
Serge Schneider
4929d829f2 Merge branch 'master' into arm64 2021-03-04 00:37:55 +00:00
Serge Schneider
cfe65b2e64 Merge branch 'master' into arm64 2021-01-11 12:48:15 +00:00
Serge Schneider
88e48a8aca Switch to KMS 2020-12-15 13:35:23 +00:00
Serge Schneider
31aa04e99c Merge branch 'master' into arm64 2020-12-02 16:56:57 +00:00
Serge Schneider
571fe1e26b Merge branch 'master' into arm64 2020-11-27 15:51:11 +00:00
Serge Schneider
041b97464c Merge branch 'master' into arm64 2020-11-17 15:22:34 +00:00
Serge Schneider
fbdcaaf4f8 Merge branch 'master' into arm64 2020-11-17 15:15:11 +00:00
Serge Schneider
ec4562c7f2 Merge remote-tracking branch 'upstream/master' into arm64 2020-10-14 14:51:20 +01:00
Serge Schneider
8808124cc3 Merge branch 'master' into arm64 2020-09-23 20:02:52 +01:00
Serge Schneider
bc3970f9e3 Merge branch 'master' into arm64 2020-09-09 15:12:53 +01:00
Serge Schneider
d3553f5ec4 Merge branch 'master' into arm64 2020-08-24 17:06:36 +01:00
Serge Schneider
0cab554f7d Merge branch 'master' into arm64 2020-08-24 15:49:08 +01:00
Serge Schneider
75123fd64e export lite image 2020-08-06 10:29:04 +01:00
Serge Schneider
0f41e41c8c Switch to FKMS 2020-07-30 15:32:03 +01:00
Serge Schneider
a58e722bee Install RealVNC server 2020-07-30 15:31:16 +01:00
Serge Schneider
c640efa6e1 Revert "fix vlc installation"
This reverts commit f644fa284871341f89b153679339bcc233d7990f.
2020-07-30 15:29:40 +01:00
Serge Schneider
d4049eeffb fix vlc installation 2020-07-30 15:29:40 +01:00
Serge Schneider
906c587fcd Package changes
Install vlc

Remove realvnc server

Switch to Full KMS
2020-07-30 15:29:40 +01:00
Serge Schneider
99399d30fc aarch64 2020-07-30 15:29:40 +01:00
57 changed files with 372 additions and 250 deletions

View File

@@ -1,7 +1,7 @@
ARG BASE_IMAGE=debian:bullseye
FROM ${BASE_IMAGE}
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && \
apt-get -y install --no-install-recommends \

View File

@@ -423,7 +423,7 @@ work from a Raspberry Pi with a 64-bit capable processor (i.e. Raspberry Pi Zero
## `binfmt_misc`
Linux is able execute binaries from other architectures, meaning that it should be
Linux is able to execute binaries from other architectures, meaning that it should be
possible to make use of `pi-gen` on an x86_64 system, even though it will be running
ARM binaries. This requires support from the [`binfmt_misc`](https://en.wikipedia.org/wiki/Binfmt_misc)
kernel module.
@@ -443,7 +443,7 @@ To resolve this, ensure that the following files are available (install them if
```
/lib/modules/$(uname -r)/kernel/fs/binfmt_misc.ko
/usr/bin/qemu-arm-static
/usr/bin/qemu-aarch64-static
```
You may also need to load the module by hand - run `modprobe binfmt_misc`.

View File

@@ -82,16 +82,7 @@ fi
# Modify original build-options to allow config file to be mounted in the docker container
BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')"
# Check the arch of the machine we're running on. If it's 64-bit, use a 32-bit base image instead
case "$(uname -m)" in
x86_64|aarch64)
BASE_IMAGE=i386/debian:bullseye
;;
*)
BASE_IMAGE=debian:bullseye
;;
esac
${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}"
${DOCKER} build --build-arg BASE_IMAGE=debian:bookworm -t pi-gen "${DIR}"
if [ "${CONTAINER_EXISTS}" != "" ]; then
DOCKER_CMDLINE_NAME="${CONTAINER_NAME}_cont"
@@ -114,10 +105,10 @@ case $(uname -m) in
;;
esac
# Check if qemu-arm-static and /proc/sys/fs/binfmt_misc are present
# Check if qemu-aarch64-static and /proc/sys/fs/binfmt_misc are present
if [[ "${binfmt_misc_required}" == "1" ]]; then
if ! qemu_arm=$(which qemu-arm-static) ; then
echo "qemu-arm-static not found (please install qemu-user-static)"
if ! qemu_arm=$(which qemu-aarch64-static) ; then
echo "qemu-aarch64-static not found (please install qemu-user-static)"
exit 1
fi
if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then
@@ -128,13 +119,13 @@ if [[ "${binfmt_misc_required}" == "1" ]]; then
fi
echo "binfmt_misc mounted"
fi
if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-arm* ; then
# Register qemu-arm for binfmt_misc
reg="echo ':qemu-arm-rpi:M::"\
"\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:"\
if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-aarch64* ; then
# Register qemu-aarch64 for binfmt_misc
reg="echo ':qemu-aarch64-rpi:M::"\
"\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:"\
"\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\
"${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register"
echo "Registering qemu-arm for binfmt_misc..."
echo "Registering qemu-aarch64 for binfmt_misc..."
sudo bash -c "${reg}" 2>/dev/null || true
fi
fi
@@ -151,7 +142,7 @@ time ${DOCKER} run \
pi-gen \
bash -e -o pipefail -c "
dpkg-reconfigure qemu-user-static &&
# binfmt_misc is sometimes not mounted with debian bullseye image
# binfmt_misc is sometimes not mounted with debian bookworm image
(mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc || true) &&
cd /pi-gen; ./build.sh ${BUILD_OPTS} &&
rsync -av work/*/build.log deploy/

View File

@@ -108,8 +108,10 @@ run_stage(){
log "End ${STAGE_DIR}/prerun.sh"
fi
for SUB_STAGE_DIR in "${STAGE_DIR}"/*; do
if [ -d "${SUB_STAGE_DIR}" ] && [ ! -f "${SUB_STAGE_DIR}/SKIP" ]; then
run_sub_stage
if [ -d "${SUB_STAGE_DIR}" ]; then
if [ ! -f "${SUB_STAGE_DIR}/SKIP" ] && [ ! -f "${SUB_STAGE_DIR}/SKIP_${ARCH}" ]; then
run_sub_stage
fi
fi
done
fi
@@ -175,9 +177,9 @@ export PI_GEN=${PI_GEN:-pi-gen}
export PI_GEN_REPO=${PI_GEN_REPO:-https://github.com/RPi-Distro/pi-gen}
export PI_GEN_RELEASE=${PI_GEN_RELEASE:-Raspberry Pi reference}
export ARCH=armhf
export RELEASE=${RELEASE:-bookworm} # Don't forget to update stage0/prerun.sh
export IMG_NAME="${IMG_NAME:-raspios-$RELEASE-$ARCH}"
export ARCH=arm64
export RELEASE=${RELEASE:-bookworm}
export IMG_NAME="${IMG_NAME:-chillcraftos-$RELEASE-$ARCH}"
export USE_QEMU="${USE_QEMU:-0}"
export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}"
@@ -202,7 +204,7 @@ export LOG_FILE="${WORK_DIR}/build.log"
export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi}
export FIRST_USER_NAME=${FIRST_USER_NAME:-pi}
export FIRST_USER_NAME=${FIRST_USER_NAME:-setup}
export FIRST_USER_PASS
export DISABLE_FIRST_BOOT_USER_RENAME=${DISABLE_FIRST_BOOT_USER_RENAME:-0}
export WPA_COUNTRY
@@ -211,10 +213,10 @@ export PUBKEY_ONLY_SSH="${PUBKEY_ONLY_SSH:-0}"
export LOCALE_DEFAULT="${LOCALE_DEFAULT:-en_GB.UTF-8}"
export KEYBOARD_KEYMAP="${KEYBOARD_KEYMAP:-gb}"
export KEYBOARD_LAYOUT="${KEYBOARD_LAYOUT:-English (UK)}"
export KEYBOARD_KEYMAP="${KEYBOARD_KEYMAP:-us}"
export KEYBOARD_LAYOUT="${KEYBOARD_LAYOUT:-English (US)}"
export TIMEZONE_DEFAULT="${TIMEZONE_DEFAULT:-Europe/London}"
export TIMEZONE_DEFAULT="${TIMEZONE_DEFAULT:-Americas/Los_Angeles}"
export GIT_HASH=${GIT_HASH:-"$(git rev-parse HEAD)"}

View File

@@ -3,6 +3,7 @@
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete
on_chroot << EOF
apt-file update
apt-get update
apt-get -y dist-upgrade --auto-remove --purge
apt-get clean

73
export-image/mk-img.sh Executable file
View File

@@ -0,0 +1,73 @@
#!/bin/bash -e
IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
unmount_image "${IMG_FILE}"
rm -f "${IMG_FILE}"
rm -rf "${ROOTFS_DIR}"
mkdir -p "${ROOTFS_DIR}"
BOOT_SIZE="$((512 * 1024 * 1024))"
ROOT_SIZE=$(du -x --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1)
# All partition sizes and starts will be aligned to this size
ALIGN="$((4 * 1024 * 1024))"
# Add this much space to the calculated file size. This allows for
# some overhead (since actual space usage is usually rounded up to the
# filesystem block size) and gives some free space on the resulting
# image.
ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 200 * 1024 * 1024) / 1" | bc)"
BOOT_PART_START=$((ALIGN))
BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))
ROOT_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE))
ROOT_PART_SIZE=$(((ROOT_SIZE + ROOT_MARGIN + ALIGN - 1) / ALIGN * ALIGN))
IMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + ROOT_PART_SIZE))
truncate -s "${IMG_SIZE}" "${IMG_FILE}"
parted --script "${IMG_FILE}" mklabel msdos
parted --script "${IMG_FILE}" unit B mkpart primary fat32 "${BOOT_PART_START}" "$((BOOT_PART_START + BOOT_PART_SIZE - 1))"
parted --script "${IMG_FILE}" unit B mkpart primary ext4 "${ROOT_PART_START}" "$((ROOT_PART_START + ROOT_PART_SIZE - 1))"
echo "Creating loop device..."
cnt=0
until ensure_next_loopdev && LOOP_DEV="$(losetup --show --find --partscan "$IMG_FILE")"; do
if [ $cnt -lt 5 ]; then
cnt=$((cnt + 1))
echo "Error in losetup. Retrying..."
sleep 5
else
echo "ERROR: losetup failed; exiting"
exit 1
fi
done
ensure_loopdev_partitions "$LOOP_DEV"
BOOT_DEV="${LOOP_DEV}p1"
ROOT_DEV="${LOOP_DEV}p2"
ROOT_FEATURES="^huge_file"
for FEATURE in 64bit; do
if grep -q "$FEATURE" /etc/mke2fs.conf; then
ROOT_FEATURES="^$FEATURE,$ROOT_FEATURES"
fi
done
if [ "$BOOT_SIZE" -lt 134742016 ]; then
FAT_SIZE=16
else
FAT_SIZE=32
fi
mkdosfs -n bootfs -F "$FAT_SIZE" -s 4 -v "$BOOT_DEV" > /dev/null
mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null
mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4
mkdir -p "${ROOTFS_DIR}/boot/firmware"
mount -v "$BOOT_DEV" "${ROOTFS_DIR}/boot/firmware" -t vfat
rsync -aHAXx --exclude /var/cache/apt/archives --exclude /boot/firmware "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/"
rsync -rtx "${EXPORT_ROOTFS_DIR}/boot/firmware/" "${ROOTFS_DIR}/boot/firmware/"

92
export-image/mk-iso.sh Executable file
View File

@@ -0,0 +1,92 @@
#!/bin/bash -e
ISO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.iso"
unmount_image "${ISO_FILE}"
rm -f "${ISO_FILE}"
rm -rf "${ROOTFS_DIR}"
mkdir -p "${ROOTFS_DIR}"
BOOT_SIZE="$((512 * 1024 * 1024))"
ROOT_SIZE=$(du -x --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1)
# All partition sizes and starts will be aligned to this size
ALIGN="$((4 * 1024 * 1024))"
# Add this much space to the calculated file size. This allows for
# some overhead (since actual space usage is usually rounded up to the
# filesystem block size) and gives some free space on the resulting
# image.
ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 200 * 1024 * 1024) / 1" | bc)"
BOOT_PART_START=$((ALIGN))
BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))
ROOT_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE))
ROOT_PART_SIZE=$(((ROOT_SIZE + ROOT_MARGIN + ALIGN - 1) / ALIGN * ALIGN))
IMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + ROOT_PART_SIZE))
truncate -s "${IMG_SIZE}" "${ISO_FILE}"
parted --script "${ISO_FILE}" mklabel msdos
parted --script "${ISO_FILE}" unit B mkpart primary fat32 "${BOOT_PART_START}" "$((BOOT_PART_START + BOOT_PART_SIZE - 1))"
parted --script "${ISO_FILE}" unit B mkpart primary ext4 "${ROOT_PART_START}" "$((ROOT_PART_START + ROOT_PART_SIZE - 1))"
echo "Creating loop device..."
cnt=0
until ensure_next_loopdev && LOOP_DEV="$(losetup --show --find --partscan "$ISO_FILE")"; do
if [ $cnt -lt 5 ]; then
cnt=$((cnt + 1))
echo "Error in losetup. Retrying..."
sleep 5
else
echo "ERROR: losetup failed; exiting"
exit 1
fi
done
ensure_loopdev_partitions "$LOOP_DEV"
BOOT_DEV="${LOOP_DEV}p1"
ROOT_DEV="${LOOP_DEV}p2"
ROOT_FEATURES="^huge_file"
for FEATURE in 64bit; do
if grep -q "$FEATURE" /etc/mke2fs.conf; then
ROOT_FEATURES="^$FEATURE,$ROOT_FEATURES"
fi
done
if [ "$BOOT_SIZE" -lt 134742016 ]; then
FAT_SIZE=16
else
FAT_SIZE=32
fi
mkdosfs -n bootfs -F "$FAT_SIZE" -s 4 -v "$BOOT_DEV" > /dev/null
mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null
mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4
mkdir -p "${ROOTFS_DIR}/boot/firmware"
mount -v "$BOOT_DEV" "${ROOTFS_DIR}/boot/firmware" -t vfat
rsync -aHAXx --exclude /var/cache/apt/archives --exclude /boot/firmware "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/"
rsync -rtx "${EXPORT_ROOTFS_DIR}/boot/firmware/" "${ROOTFS_DIR}/boot/firmware/"
# Create bootable ISO with GRUB
echo "Creating bootable ISO..."
mkdir -p "${ROOTFS_DIR}/boot/grub"
# Install GRUB bootloader
cat > "${ROOTFS_DIR}/boot/grub/grub.cfg" <<EOF
set default=0
set timeout=5
menuentry "Linux" {
linux /boot/vmlinuz root=/dev/sda2
initrd /boot/initrd.img
}
EOF
grub-mkrescue -o "${ISO_FILE}" "${ROOTFS_DIR}"
echo "Bootable ISO created at ${ISO_FILE}"

View File

@@ -1,73 +1,10 @@
#!/bin/bash -e
IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
unmount_image "${IMG_FILE}"
rm -f "${IMG_FILE}"
rm -rf "${ROOTFS_DIR}"
mkdir -p "${ROOTFS_DIR}"
BOOT_SIZE="$((512 * 1024 * 1024))"
ROOT_SIZE=$(du -x --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1)
# All partition sizes and starts will be aligned to this size
ALIGN="$((4 * 1024 * 1024))"
# Add this much space to the calculated file size. This allows for
# some overhead (since actual space usage is usually rounded up to the
# filesystem block size) and gives some free space on the resulting
# image.
ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 200 * 1024 * 1024) / 1" | bc)"
BOOT_PART_START=$((ALIGN))
BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))
ROOT_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE))
ROOT_PART_SIZE=$(((ROOT_SIZE + ROOT_MARGIN + ALIGN - 1) / ALIGN * ALIGN))
IMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + ROOT_PART_SIZE))
truncate -s "${IMG_SIZE}" "${IMG_FILE}"
parted --script "${IMG_FILE}" mklabel msdos
parted --script "${IMG_FILE}" unit B mkpart primary fat32 "${BOOT_PART_START}" "$((BOOT_PART_START + BOOT_PART_SIZE - 1))"
parted --script "${IMG_FILE}" unit B mkpart primary ext4 "${ROOT_PART_START}" "$((ROOT_PART_START + ROOT_PART_SIZE - 1))"
echo "Creating loop device..."
cnt=0
until ensure_next_loopdev && LOOP_DEV="$(losetup --show --find --partscan "$IMG_FILE")"; do
if [ $cnt -lt 5 ]; then
cnt=$((cnt + 1))
echo "Error in losetup. Retrying..."
sleep 5
else
echo "ERROR: losetup failed; exiting"
exit 1
fi
done
ensure_loopdev_partitions "$LOOP_DEV"
BOOT_DEV="${LOOP_DEV}p1"
ROOT_DEV="${LOOP_DEV}p2"
ROOT_FEATURES="^huge_file"
for FEATURE in 64bit; do
if grep -q "$FEATURE" /etc/mke2fs.conf; then
ROOT_FEATURES="^$FEATURE,$ROOT_FEATURES"
fi
done
if [ "$BOOT_SIZE" -lt 134742016 ]; then
FAT_SIZE=16
# Check if the architecture is arm64 or armhf
if [[ "$ARCH" == "arm64" || "$ARCH" == "armhf" ]]; then
# If the architecture is arm64 or armhf, run mk-img.sh
./mk-img.sh
else
FAT_SIZE=32
fi
mkdosfs -n bootfs -F "$FAT_SIZE" -s 4 -v "$BOOT_DEV" > /dev/null
mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null
mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4
mkdir -p "${ROOTFS_DIR}/boot/firmware"
mount -v "$BOOT_DEV" "${ROOTFS_DIR}/boot/firmware" -t vfat
rsync -aHAXx --exclude /var/cache/apt/archives --exclude /boot/firmware "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/"
rsync -rtx "${EXPORT_ROOTFS_DIR}/boot/firmware/" "${ROOTFS_DIR}/boot/firmware/"
# Otherwise, run mk-iso.sh
./mk-iso.sh
fi

View File

@@ -1,18 +1,15 @@
{
"description": "NOOBS_DESCRIPTION",
"feature_level": 35120124,
"kernel": "KERNEL",
"name": "NOOBS_NAME",
"password": "raspberry",
"release_date": "UNRELEASED",
"supported_hex_revisions": "2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,1040,1041,0092,0093,2082",
"supported_models": [
"Pi Model",
"Pi 2",
"Pi Zero",
"Pi Zero 2",
"Pi 3",
"Pi 4",
"Pi Compute Module 3",
"Pi 4"
"Pi Compute Module 4"
],
"url": "http://www.raspbian.org/",
"username": "pi",

0
export-noobs/00-release/files/partition_setup.sh Normal file → Executable file
View File

View File

@@ -9,15 +9,16 @@ bootstrap(){
export http_proxy=${APT_PROXY}
BOOTSTRAP_ARGS+=(--arch armhf)
BOOTSTRAP_ARGS+=(--arch arm64)
BOOTSTRAP_ARGS+=(--include gnupg)
BOOTSTRAP_ARGS+=(--components "main,contrib,non-free")
BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
#BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
BOOTSTRAP_ARGS+=(--exclude=info,ifupdown)
BOOTSTRAP_ARGS+=(--include=ca-certificates)
BOOTSTRAP_ARGS+=("$@")
printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}"
setarch linux32 capsh $CAPSH_ARG -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
capsh $CAPSH_ARG -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then
cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}"
@@ -100,7 +101,7 @@ on_chroot() {
mount -t tmpfs tmpfs "${ROOTFS_DIR}/tmp"
fi
setarch linux32 capsh $CAPSH_ARG "--chroot=${ROOTFS_DIR}/" -- -e "$@"
capsh $CAPSH_ARG "--chroot=${ROOTFS_DIR}/" -- -e "$@"
}
export -f on_chroot

View File

@@ -2,8 +2,10 @@
install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/"
install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
#install -m 644 files/oxmc.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list"
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list"
#sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/oxmc.list"
if [ -n "$APT_PROXY" ]; then
install -m 644 files/51cache "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
@@ -14,6 +16,8 @@ fi
cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg"
install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
#cat files/oxmc.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/oxmc.gpg"
#install -m 644 "${STAGE_WORK_DIR}/oxmc.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
on_chroot <<- \EOF
ARCH="$(dpkg --print-architecture)"
if [ "$ARCH" = "armhf" ]; then

View File

@@ -0,0 +1,53 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
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
JwmNXcU=
=JjzN
-----END PGP PUBLIC KEY BLOCK-----

View File

@@ -0,0 +1,3 @@
deb http://apt.oxmc.me/ RELEASE main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://apt.oxmc.me/ RELEASE main

View File

@@ -1,3 +1,7 @@
deb [ arch=armhf ] http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi
deb http://deb.debian.org/debian RELEASE main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security/ RELEASE-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian RELEASE-updates main contrib non-free non-free-firmware
# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
#deb-src http://deb.debian.org/debian RELEASE main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian-security/ RELEASE-security main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian RELEASE-updates main contrib non-free non-free-firmware

View File

@@ -1,9 +1,6 @@
initramfs-tools
raspi-firmware
linux-image-rpi-v6
linux-image-rpi-v7
linux-image-rpi-v7l
linux-image-rpi-v8
linux-headers-rpi-v6
linux-headers-rpi-v7
linux-headers-rpi-v7l
linux-image-rpi-2712
linux-headers-rpi-v8
linux-headers-rpi-2712

View File

@@ -1,10 +1,5 @@
#!/bin/bash -e
if [ "$RELEASE" != "bookworm" ]; then
echo "WARNING: RELEASE does not match the intended option for this branch."
echo " Please check the relevant README.md section."
fi
if [ ! -d "${ROOTFS_DIR}" ]; then
bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.com/raspbian/
bootstrap ${RELEASE} "${ROOTFS_DIR}" http://deb.debian.org/debian/
fi

View File

@@ -30,6 +30,9 @@ max_framebuffers=2
# Use the kernel's default instead.
disable_fw_kms_setup=1
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan
disable_overscan=1

View File

@@ -1,6 +1,8 @@
#!/bin/bash -e
install -v -m 644 files/fstab "${ROOTFS_DIR}/etc/fstab"
# SteamOS like readonly root
install -m 644 files/system-readonly "${ROOTFS_DIR}/sbin/"
on_chroot << EOF
if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then

View File

@@ -1,3 +1,5 @@
proc /proc proc defaults 0 0
BOOTDEV /boot/firmware vfat defaults 0 2
ROOTDEV / ext4 defaults,noatime 0 1
# For /home (always writable):
LABEL=home /home ext4 defaults 0 2

View File

@@ -0,0 +1,30 @@
#!/bin/bash
FSTAB_FILE="/etc/fstab"
if [ "$1" == "enable" ]; then
echo "Enabling read-only mode..."
# Modify fstab to set root filesystem as read-only
sudo sed -i 's|\(ROOTDEV.* / .* ext4 \)defaults,noatime|\1ro,noatime|' "$FSTAB_FILE"
# Remount root as read-only
sudo mount -o remount,ro /
echo "System is now read-only. Reboot for changes to persist."
elif [ "$1" == "disable" ]; then
echo "Disabling read-only mode..."
# Modify fstab to set root filesystem as writable
sudo sed -i 's|\(ROOTDEV.* / .* ext4 \)ro,noatime|\1defaults,noatime|' "$FSTAB_FILE"
# Remount root as writable
sudo mount -o remount,rw /
echo "System is now writable. Reboot for changes to persist."
else
echo "Usage: system-readonly enable|disable"
exit 1
fi

View File

@@ -1 +0,0 @@
raspi-copies-and-fills

View File

@@ -1,6 +0,0 @@
#!/bin/bash -e
if [ -f "${ROOTFS_DIR}/etc/ld.so.preload" ]; then
mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled"
fi

View File

@@ -3,9 +3,6 @@ console-setup keyboard-configuration debconf-utils parted
build-essential manpages-dev bash-completion gdb pkg-config
python-is-python3
v4l-utils
gpiod python3-libgpiod
python3-gpiozero
pigpio python3-pigpio raspi-gpio python3-rpi-lgpio
python3-spidev
python3-smbus2
avahi-daemon
@@ -18,6 +15,7 @@ dphys-swapfile
raspberrypi-sys-mods
pi-bluetooth
apt-listchanges
apt-file
usb-modeswitch
libpam-chksshpwd
rpi-update

View File

@@ -1,3 +1,2 @@
cifs-utils
rpicam-apps-lite
mkvtoolnix

View File

@@ -71,8 +71,8 @@ on_chroot << EOF
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration
EOF
sed -i 's/^#?Storage=.*/Storage=volatile/' "${ROOTFS_DIR}/etc/systemd/journald.conf"
sed -i 's/^#\?Storage=.*/Storage=volatile/' "${ROOTFS_DIR}/etc/systemd/journald.conf"
if [ -e "${ROOTFS_DIR}/etc/avahi/avahi-daemon.conf" ]; then
sed -i 's/^#?publish-workstation=.*/publish-workstation=yes/' "${ROOTFS_DIR}/etc/avahi/avahi-daemon.conf"
sed -i 's/^#\?publish-workstation=.*/publish-workstation=yes/' "${ROOTFS_DIR}/etc/avahi/avahi-daemon.conf"
fi

View File

@@ -1,2 +0,0 @@
# Do you accept the Wolfram - Raspberry Pi® Bundle License Agreement?
wolfram-engine shared/accepted-wolfram-eula boolean true

View File

@@ -1,4 +0,0 @@
IMG_SUFFIX="-lite"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi

View File

@@ -1,20 +1,15 @@
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav
gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav
evince gtk2-engines alsa-utils
desktop-base
git
policykit-1
gvfs
rfkill
chromium rpi-chromium-mods libwidevinecdm0
firefox rpi-firefox-mods
firefox rpi-firefox-mods libwidevinecdm0
gldriver-test
fonts-droid-fallback
fonts-liberation2
obconf
raindrop
libcamera-tools
rpicam-apps
python3-picamera2
python3-pyqt5
python3-opengl
vulkan-tools mesa-vulkan-drivers

View File

@@ -1,8 +1,8 @@
xserver-xorg-video-fbdev xserver-xorg xinit
xserver-xorg xinit
mousepad
eom
lxde lxtask menu-xdg
zenity xdg-utils
menu-xdg
yad zenity xdg-utils
gvfs-backends gvfs-fuse
lightdm gnome-themes-extra-data gnome-icon-theme
gdm3 gnome-themes-extra-data gnome-icon-theme
gnome-keyring

View File

@@ -0,0 +1,16 @@
python3-pygame
python3-tk
python3-pgzero
python3-serial
python3-pip
python3-numpy
rc-gui
tree
libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr
geany
piclone
python3-twython
pprompt
ffmpeg
vlc
rpi-imager

View File

@@ -0,0 +1,2 @@
pi-package
gnome-core gnome-tweaks gnome-shell-extension-no-annoyance gnome-shell-extension-manager gnome-shell-extension-gsconnect gnome-shell-extension-dash-to-panel gnome-shell-extension-bluetooth-quick-connect gnome-shell-extension-appindicator gnome-initial-setup

View File

@@ -0,0 +1,4 @@
hunspell-en-us
hyphen-en-us
wamerican
wbritish

View File

@@ -0,0 +1 @@
command-not-found

4
stage3/02-extras/00-run.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash -e
#polkit fixes
install -m 644 files/polkit-admin.conf "${ROOTFS_DIR}/etc/polkit-1/localauthority.conf.d/51-admin.conf"

View File

@@ -0,0 +1 @@
AdminIdentities=unix-group:sudo;unix-group:admin

17
stage3/05-setup/00-run.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash -e
# Include custom vendor file for gnome-inital-setup
mkdir -p "${ROOTFS_DIR}/usr/share/gnome-initial-setup/"
install -m 644 files/vendor.conf "${ROOTFS_DIR}/usr/share/gnome-initial-setup/"
# Configure default GDM3 Session to Xorg
on_chroot << EOF
sed -i 's/#WaylandEnable=false/WaylandEnable=false/' /etc/gdm3/daemon.conf
mkdir -p /var/lib/gdm
touch /var/lib/gdm/run-initial-setup
EOF
# Remove setup user (chill) [This allows for the user to be created in the first boot from the gnome-initial-setup]
on_chroot << EOF
deluser --remove-home --remove-all-files ${FIRST_USER_NAME}
EOF

View File

@@ -0,0 +1,5 @@
[pages]
# Pages to show when a user already exists
existing_user_only=language;keyboard;timezone;goa;
# Only show the privacy page in the 'first boot' situation
new_user_only=welcome;language;keyboard;network;account;privacy;

0
stage3/EXPORT_IMAGE Normal file
View File

View File

@@ -1,27 +0,0 @@
python3-pygame
python3-tk thonny
python3-pgzero
python3-serial
debian-reference-en dillo
raspberrypi-net-mods raspberrypi-ui-mods
python3-pip
python3-numpy
alacarte rc-gui sense-hat
tree
libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr
geany
piclone
python3-twython
python3-flask
pprompt
piwiz
rp-prefapps
ffmpeg
vlc
rpi-connect
rpi-imager
labwc
squeekboard
# ninja-build and openocd needed for vscode pico extension
meson openocd

View File

@@ -1,2 +0,0 @@
pi-package
realvnc-vnc-server

View File

@@ -1,4 +0,0 @@
hunspell-en-gb
hyphen-en-gb
wamerican
wbritish

View File

@@ -1,5 +0,0 @@
#!/bin/bash -e
on_chroot << EOF
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_behaviour B4
EOF

View File

@@ -1,7 +0,0 @@
#!/bin/bash -e
#Alacarte fixes
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local"
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share"
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share/applications"
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share/desktop-directories"

View File

@@ -1,15 +0,0 @@
#!/bin/sh -e
BOOKSHELF_URL="https://magpi.raspberrypi.com/bookshelf.xml"
GUIDE_URL="$(curl -s "$BOOKSHELF_URL" | awk -F '[<>]' "/<TITLE>Raspberry Pi Beginner's Guide .*<\/TITLE>/ {f=1; next} f==1 && /PDF/ {print \$3; exit}")"
OUTPUT="$(basename "$GUIDE_URL" | cut -f1 -d'?')"
if [ ! -f "files/$OUTPUT" ]; then
rm files/*.pdf -f
curl -s "$GUIDE_URL" -o "files/$OUTPUT"
fi
file "files/$OUTPUT" | grep -q "PDF document"
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Bookshelf"
install -v -o 1000 -g 1000 -m 644 "files/$OUTPUT" "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Bookshelf/"

View File

@@ -1 +0,0 @@
*.pdf

View File

@@ -1,5 +0,0 @@
#!/bin/bash -e
on_chroot << EOF
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wayland W3
EOF

View File

@@ -1,4 +0,0 @@
IMG_SUFFIX=""
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi

View File

@@ -1,5 +0,0 @@
#!/bin/bash -e
if [ ! -d "${ROOTFS_DIR}" ]; then
copy_previous
fi

View File

@@ -1,7 +0,0 @@
mu-editor
scratch nuscratch scratch3
wolfram-engine
claws-mail
realvnc-vnc-viewer
code-the-classics
kicad

View File

@@ -1,3 +0,0 @@
libreoffice-pi openjdk-11-jre-
libreoffice-help-en-gb
libreoffice-l10n-en-gb

View File

@@ -1,4 +0,0 @@
IMG_SUFFIX="-full"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi

View File

@@ -1,5 +0,0 @@
#!/bin/bash -e
if [ ! -d "${ROOTFS_DIR}" ]; then
copy_previous
fi