Compare commits
154 Commits
Author | SHA1 | Date | |
---|---|---|---|
cfcaeb766b | |||
474786d796 | |||
31c56b594a | |||
3ec0a6670c | |||
fdc2eec104 | |||
940bc767a4 | |||
6bdb5a72fe | |||
|
b9e30f2e0e | ||
|
47958f5efe | ||
|
1e780d18c2 | ||
|
744c7151fb | ||
|
8946f77e4a | ||
|
18acfd7f87 | ||
|
891df1e21e | ||
|
919f1e86b9 | ||
|
e335a4e8b6 | ||
|
da8f0063ea | ||
|
ccc23c6738 | ||
|
150246acda | ||
|
19fd60cef7 | ||
|
6453828cce | ||
|
9aa52c467b | ||
|
b040e0a64e | ||
|
17c8e48534 | ||
|
7c7d74f210 | ||
|
ecda2579eb | ||
|
94f7acf599 | ||
|
4cfc6758ff | ||
|
fd5a1e93cd | ||
|
c94d23e165 | ||
|
cdc1467e13 | ||
|
def6e65ffb | ||
|
36048218e0 | ||
|
98f522e64d | ||
|
0668700902 | ||
|
291f869713 | ||
|
48efb5fc54 | ||
|
a63eb86d7b | ||
|
0755b07f06 | ||
|
97aa847ea8 | ||
|
72b2dfd634 | ||
|
2327c5e28d | ||
|
64e205739c | ||
|
2c29fc27c5 | ||
|
7dd5b7dd59 | ||
|
8056aa3bec | ||
|
56916d4d84 | ||
|
f19ee211dd | ||
|
8273e8553b | ||
|
dd93d6280f | ||
|
3358eb36e1 | ||
|
9a13a81115 | ||
|
ff2fd5007f | ||
|
6fb311e7fb | ||
|
b4f2aeabde | ||
|
57149546cf | ||
|
a34bf65c4c | ||
|
62eeab3a86 | ||
|
94bb86632d | ||
|
70cd6f2a1e | ||
|
0fda3224f6 | ||
|
caf3d8681b | ||
|
1460069163 | ||
|
78444eaf07 | ||
|
962bf483c8 | ||
|
5f2fe0f854 | ||
|
5ef8b0d45c | ||
|
325123ff22 | ||
|
c318daf364 | ||
|
77706bd2f6 | ||
|
e484aa8581 | ||
|
a86d732f58 | ||
|
7c750947a9 | ||
|
c16e6b7dee | ||
|
0defafedd4 | ||
|
84746b2bcd | ||
|
3e8046da4c | ||
|
a2afdf78cb | ||
|
60c9ba3199 | ||
|
25e2319eff | ||
|
04d0dcb46c | ||
|
b48040b3f0 | ||
|
366bc2c8f3 | ||
|
bd2cf0e0e4 | ||
|
da6dde2aea | ||
|
2bc1f64a57 | ||
|
3dff0ce787 | ||
|
005a8c73b0 | ||
|
b37b47e559 | ||
|
3f78c2b444 | ||
|
bd85d61c05 | ||
|
827affcc11 | ||
|
4e9aaac41e | ||
|
fb582e2e67 | ||
|
ca06d62f2e | ||
|
18aee5cfb8 | ||
|
27a8050c3c | ||
|
151f3ff80f | ||
|
e5bd8d5433 | ||
|
10a538ff92 | ||
|
7073d28f22 | ||
|
d1b8a2005b | ||
|
a0ba64e5c8 | ||
|
733513aa25 | ||
|
255288909b | ||
|
4721bfe590 | ||
|
2b3ba5b2a6 | ||
|
fbe448ccdc | ||
|
61c6294e23 | ||
|
dec2743355 | ||
|
43c42bf9e4 | ||
|
69cc4146c8 | ||
|
ef933ae156 | ||
|
0f7ab62ac9 | ||
|
f81afa8282 | ||
|
45b4cc19d0 | ||
|
14a28a729e | ||
|
720f4aea86 | ||
|
c12b1df4ed | ||
|
c61f8b72fa | ||
|
edbc8b604d | ||
|
5ea223355a | ||
|
cd8a82d4fd | ||
|
cf938b0549 | ||
|
268d4c4f44 | ||
|
2e3603d228 | ||
|
5971767590 | ||
|
535ea6c7f0 | ||
|
600f7c1fa4 | ||
|
4b59b5a70d | ||
|
95ea0ba696 | ||
|
071d395635 | ||
|
7cfcace573 | ||
|
04f9b9bb5f | ||
|
2b9e8e9b22 | ||
|
4929d829f2 | ||
|
cfe65b2e64 | ||
|
88e48a8aca | ||
|
31aa04e99c | ||
|
571fe1e26b | ||
|
041b97464c | ||
|
fbdcaaf4f8 | ||
|
ec4562c7f2 | ||
|
8808124cc3 | ||
|
bc3970f9e3 | ||
|
d3553f5ec4 | ||
|
0cab554f7d | ||
|
75123fd64e | ||
|
0f41e41c8c | ||
|
a58e722bee | ||
|
c640efa6e1 | ||
|
d4049eeffb | ||
|
906c587fcd | ||
|
99399d30fc |
68
.github/workflows/build.yml
vendored
Normal file
68
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
name: Build images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- showpiece
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
build_images:
|
||||
name: Build images
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
strategy:
|
||||
fail-fast: true
|
||||
env:
|
||||
DEPLOY: startsWith(github.ref, 'refs/tags/v')
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Apply patches
|
||||
run: ./runtime-patches.sh
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update &&
|
||||
sudo apt-get install -y qemu-user-static quilt debootstrap libarchive-tools arch-test binfmt-support
|
||||
|
||||
- name: Setup binfmt_misc
|
||||
run: |
|
||||
ls /proc/sys/fs/binfmt_misc/ || true
|
||||
sudo mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc || true
|
||||
sudo update-binfmts --enable qemu-aarch64
|
||||
|
||||
- name: Run build process
|
||||
run: |
|
||||
sudo ./build.sh &&
|
||||
sudo mv deploy/*-arm64-standalone.img deploy/showpieceos-arm64-standalone.img &&
|
||||
sudo mv deploy/*-arm64-client.img deploy/showpieceos-arm64-client.img
|
||||
|
||||
- name: Compress images
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: sudo ./compress-images.sh
|
||||
|
||||
- name: Publish client
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: https://github.com/softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: ${{ github.ref_name }}
|
||||
files: deploy/*-client.img.gz
|
||||
|
||||
- name: Publish standalone
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: https://github.com/softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: ${{ github.ref_name }}
|
||||
files: deploy/*-standalone.img.gz
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,8 +1,5 @@
|
||||
deploy/*
|
||||
work/*
|
||||
config
|
||||
postrun.sh
|
||||
SKIP
|
||||
SKIP_IMAGES
|
||||
.pc
|
||||
*-pc
|
||||
|
@ -22,7 +22,7 @@ To install the required dependencies for `pi-gen` you should run:
|
||||
```bash
|
||||
apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \
|
||||
dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \
|
||||
gpg pigz xxd arch-test bmap-tools
|
||||
gpg pigz xxd arch-test
|
||||
```
|
||||
|
||||
The file `depends` contains a list of tools needed. The format of this
|
||||
@ -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`.
|
||||
|
@ -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:bookworm
|
||||
;;
|
||||
*)
|
||||
BASE_IMAGE=debian:bookworm
|
||||
;;
|
||||
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
|
||||
|
2
build.sh
2
build.sh
@ -175,7 +175,7 @@ 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 ARCH=arm64
|
||||
export RELEASE=${RELEASE:-bookworm} # Don't forget to update stage0/prerun.sh
|
||||
export IMG_NAME="${IMG_NAME:-raspios-$RELEASE-$ARCH}"
|
||||
|
||||
|
5
compress-images.sh
Executable file
5
compress-images.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
for img in "deploy/"*.img; do
|
||||
gzip -4 -v -k "$img"
|
||||
done
|
22
config
Normal file
22
config
Normal file
@ -0,0 +1,22 @@
|
||||
IMG_NAME="showpieceos-bookworm-arm64"
|
||||
PI_GEN_RELEASE="Showpiece OS Bookworm"
|
||||
RELEASE="bookworm"
|
||||
DEPLOY_COMPRESSION="none"
|
||||
COMPRESSION_LEVEL=0
|
||||
LOCALE_DEFAULT="en_US.UTF-8"
|
||||
TARGET_HOSTNAME="showpiece"
|
||||
KEYBOARD_KEYMAP="us"
|
||||
KEYBOARD_LAYOUT="English (US)"
|
||||
TIMEZONE_DEFAULT="America/Chicago"
|
||||
FIRST_USER_NAME="pi"
|
||||
FIRST_USER_PASS="letmein"
|
||||
DISABLE_FIRST_BOOT_USER_RENAME=1
|
||||
WPA_COUNTRY=US
|
||||
ENABLE_SSH=0
|
||||
STAGE_LIST=""
|
||||
for d in stage*; do
|
||||
if [ -d "$d" ] && [ ! -f "$d/SKIP" ]; then
|
||||
STAGE_LIST+="$d "
|
||||
fi
|
||||
done
|
||||
STAGE_LIST="$(echo "$STAGE_LIST" | xargs)"
|
@ -3,7 +3,6 @@
|
||||
IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
|
||||
INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info"
|
||||
SBOM_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.sbom"
|
||||
BMAP_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.bmap"
|
||||
|
||||
on_chroot << EOF
|
||||
update-initramfs -k all -c
|
||||
@ -101,12 +100,6 @@ zerofree "${ROOT_DEV}"
|
||||
|
||||
unmount_image "${IMG_FILE}"
|
||||
|
||||
if hash bmaptool 2>/dev/null; then
|
||||
bmaptool create \
|
||||
-o "${BMAP_FILE}" \
|
||||
"${IMG_FILE}"
|
||||
fi
|
||||
|
||||
mkdir -p "${DEPLOY_DIR}"
|
||||
|
||||
rm -f "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.*"
|
||||
@ -135,7 +128,4 @@ esac
|
||||
if [ -f "${SBOM_FILE}" ]; then
|
||||
xz -c "${SBOM_FILE}" > "$DEPLOY_DIR/image_$(basename "${SBOM_FILE}").xz"
|
||||
fi
|
||||
if [ -f "${BMAP_FILE}" ]; then
|
||||
xz -c "${BMAP_FILE}" > "$DEPLOY_DIR/image_$(basename "${BMAP_FILE}").xz"
|
||||
fi
|
||||
cp "$INFO_FILE" "$DEPLOY_DIR/"
|
||||
|
@ -13,7 +13,7 @@ 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="$((8 * 1024 * 1024))"
|
||||
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
|
||||
|
@ -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",
|
||||
|
6
runtime-patches.sh
Executable file
6
runtime-patches.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Patches to run before building showpieceos
|
||||
# Allows for non-destructive deletion of files
|
||||
|
||||
rm stage2/EXPORT_IMAGE
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -6,5 +6,5 @@ if [ "$RELEASE" != "bookworm" ]; then
|
||||
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
|
||||
|
@ -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
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
raspi-copies-and-fills
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
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
|
||||
@ -10,6 +10,8 @@ firefox rpi-firefox-mods
|
||||
gldriver-test
|
||||
fonts-droid-fallback
|
||||
fonts-liberation2
|
||||
fonts-noto
|
||||
fonts-noto-color-emoji
|
||||
obconf
|
||||
raindrop
|
||||
libcamera-tools
|
||||
|
@ -1,6 +1,8 @@
|
||||
xserver-xorg-video-fbdev xserver-xorg xinit
|
||||
xserver-xorg xinit
|
||||
x11-xserver-utils
|
||||
mousepad
|
||||
eom
|
||||
vim
|
||||
lxde lxtask menu-xdg
|
||||
zenity xdg-utils
|
||||
gvfs-backends gvfs-fuse
|
||||
|
6
stage3/01-showpiece-browser/01-run.sh
Executable file
6
stage3/01-showpiece-browser/01-run.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
install -d -o 1000 -g 1000 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart"
|
||||
install -m 644 files/kiosk.desktop "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart/"
|
||||
chown -R 1000:1000 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.config
|
||||
mkdir -p "${ROOTFS_DIR}/tmp"
|
6
stage3/01-showpiece-browser/files/kiosk.desktop
Normal file
6
stage3/01-showpiece-browser/files/kiosk.desktop
Normal file
@ -0,0 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Chromium
|
||||
Exec=chromium-browser --profile-directory="showpiece-browser" --kiosk https://showpiece.sanin.dev/
|
||||
StartupNotify=false
|
||||
Terminal=false
|
6
stage4/98-default-wallpaper/00-run.sh
Executable file
6
stage4/98-default-wallpaper/00-run.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
echo "Setting default wallpaper"
|
||||
for conf in "${ROOTFS_DIR}/etc/xdg/pcmanfm/LXDE-pi/desktop-items-"*.conf; do
|
||||
sed -E 's|/usr/share/rpd-wallpaper/.+$|/usr/share/rpd-wallpaper/RPiSystem.png|' -i "$conf"
|
||||
done
|
4
stage4/99-force-hdmi-2/00-run.sh
Executable file
4
stage4/99-force-hdmi-2/00-run.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
echo "Setting custom cmdline"
|
||||
sed -i 's/$/ video=HDMI-A-2:1920x1080M@60/' "${ROOTFS_DIR}/boot/firmware/cmdline.txt"
|
@ -1,4 +1,4 @@
|
||||
IMG_SUFFIX=""
|
||||
IMG_SUFFIX="-client"
|
||||
if [ "${USE_QEMU}" = "1" ]; then
|
||||
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
|
||||
fi
|
||||
|
0
stage5/SKIP
Normal file
0
stage5/SKIP
Normal file
3
stage9/01-docker/00-packages
Normal file
3
stage9/01-docker/00-packages
Normal file
@ -0,0 +1,3 @@
|
||||
apt-transport-https
|
||||
gnupg2
|
||||
software-properties-common
|
7
stage9/01-docker/01-run-chroot.sh
Executable file
7
stage9/01-docker/01-run-chroot.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
#change to "debian" if necessary:
|
||||
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
|
||||
echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
|
||||
$(lsb_release -cs) stable" | \
|
||||
tee /etc/apt/sources.list.d/docker.list
|
||||
apt update
|
3
stage9/01-docker/02-packages
Normal file
3
stage9/01-docker/02-packages
Normal file
@ -0,0 +1,3 @@
|
||||
docker-ce
|
||||
docker-compose-plugin
|
||||
cgroupfs-mount
|
5
stage9/01-docker/03-run-chroot.sh
Executable file
5
stage9/01-docker/03-run-chroot.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
systemctl enable docker
|
||||
systemctl start docker
|
||||
gpasswd -a pi docker
|
||||
newgrp docker
|
11
stage9/02-showpiece/01-run.sh
Executable file
11
stage9/02-showpiece/01-run.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece"
|
||||
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece/config"
|
||||
install -m 644 files/docker-compose.yml "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece/"
|
||||
install -m 644 files/config.json5 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece/config/"
|
||||
install -d -o 1000 -g 1000 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart"
|
||||
install -m 644 files/kiosk.desktop "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart/"
|
||||
chown -R 1000:1000 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.config
|
||||
mkdir -p "${ROOTFS_DIR}/tmp"
|
||||
echo "$FIRST_USER_NAME" > "${ROOTFS_DIR}/tmp/first_username"
|
12
stage9/02-showpiece/02-run-chroot.sh
Executable file
12
stage9/02-showpiece/02-run-chroot.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
USERNAME=$(cat /tmp/first_username)
|
||||
COMPOSEFILE="/home/$USERNAME/.config/showpiece/docker-compose.yml"
|
||||
|
||||
echo "@reboot docker compose --file '$COMPOSEFILE' up -d && chromium --kiosk 'http://localhost:8080/?w=1080'" >> /tmp/user.crontab
|
||||
echo "40 3 * * * docker compose --file '$COMPOSEFILE' pull && docker compose --file '$COMPOSEFILE' up -d" >> /tmp/user.crontab
|
||||
|
||||
crontab -u "$USERNAME" /tmp/user.crontab
|
||||
|
||||
rm /tmp/first_username
|
||||
rm /tmp/user.crontab
|
14
stage9/02-showpiece/files/config.json5
Normal file
14
stage9/02-showpiece/files/config.json5
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
// Port for the viewer
|
||||
"port": 8080,
|
||||
// Port for the control panel
|
||||
// (use a different port to restrict access to this interface)
|
||||
"controlport": 8080,
|
||||
// (optional) provide weather data to modules that support it
|
||||
"weather": {
|
||||
// Provide an OpenWeatherMap API key
|
||||
// https://openweathermap.org/price
|
||||
// "key": "not0a0real0key00281f631aef6ad3a1",
|
||||
// "city": "chicago"
|
||||
}
|
||||
}
|
10
stage9/02-showpiece/files/docker-compose.yml
Normal file
10
stage9/02-showpiece/files/docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
services:
|
||||
showpiece:
|
||||
container_name: showpiece
|
||||
image: corysanin/showpiece:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:8080
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ./config:/usr/src/showpiece/config
|
6
stage9/02-showpiece/files/kiosk.desktop
Normal file
6
stage9/02-showpiece/files/kiosk.desktop
Normal file
@ -0,0 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Chromium
|
||||
Exec=chromium-browser --profile-directory="showpiece-browser" --kiosk http://localhost:8080/?w=1080
|
||||
StartupNotify=false
|
||||
Terminal=false
|
4
stage9/EXPORT_IMAGE
Normal file
4
stage9/EXPORT_IMAGE
Normal file
@ -0,0 +1,4 @@
|
||||
IMG_SUFFIX="-standalone"
|
||||
if [ "${USE_QEMU}" = "1" ]; then
|
||||
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
|
||||
fi
|
5
stage9/prerun.sh
Executable file
5
stage9/prerun.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ ! -d "${ROOTFS_DIR}" ]; then
|
||||
copy_previous
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user