Skip to content

Commit bd3f153

Browse files
authored
Update to build a bookworm image (#2)
* updated to bookworm builder * Install correct build process deps for bookworm (read deps from file) * Update allow downgrades patch for recent pi-gen * Switch used cloudsmith repo to bookwork * Changed used base package (php version, wayfire and drop libsgutils2) * Update moode specific packages where need and temp commented moode-player package * Disabled driver install until those are available * Aslong as no moode-player package is available temporary rename image to moode9-dev
1 parent f2e2886 commit bd3f153

9 files changed

+46
-45
lines changed

build.sh

+21-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
# (C) bitkeeper 2022 http://moodeaudio.org
77
# License: GPLv3
88
#
9+
# 2023:
10+
# updated for bookworm
11+
# auto depend install from depends file
12+
#
913
#########################################################################
1014

1115
ROOT_PATH=`pwd`
@@ -22,8 +26,10 @@ echo "$IS_ARM64"
2226
if [ -z "$IS_ARM64" ]
2327
then
2428
PI_GEN="$ROOT_PATH/pi-gen"
29+
echo "building 32 bit"
2530
else
2631
PI_GEN="$ROOT_PATH/pi-gen-64"
32+
echo "building 64 bit"
2733
fi
2834
PI_GEN_UTILS="$ROOT_PATH/pi-gen-utils"
2935

@@ -33,22 +39,34 @@ PI_GEN_CONFIG_DIR="moode-cfg"
3339
PP=$PI_GEN
3440

3541
function prepare_environment {
36-
array=( git coreutils quilt parted qemu-user-static debootstrap zerofree zip dosfstools libcap2-bin grep rsync xz-utils file git curl bc libarchive-tools qemu-utils kpartx )
42+
# read deps for this build and strip categories
43+
readarray -t DEPENDS < $PI_GEN/depends
44+
count=0
45+
for d in "${DEPENDS[@]}"
46+
do
47+
DEPENDS["$count"]=`echo $d | cut -d ":" -f2`
48+
count=$((count + 1))
49+
done
50+
echo ${DEPENDS[@]}
51+
52+
# check if present
3753
missing=0
38-
for i in "${array[@]}"
54+
for i in "${DEPENDS[@]}"
3955
do
4056
dpkg -s $i 2>&1 | grep Status | grep "installed" > /dev/null 2>&1
4157
if [[ ! $? -eq 0 ]]
4258
then
59+
echo "missing $i"
4360
missing=1
4461
break
4562
fi
4663

4764
done
4865

66+
#if not install the deps
4967
if [ $missing -eq 1 ]
5068
then
51-
sudo apt-get -y install coreutils quilt parted qemu-user-static debootstrap zerofree zip dosfstools libcap2-bin grep rsync xz-utils file git curl bc libarchive-tools qemu-utils kpartx
69+
echo ${DEPENDS[@]} | xargs sudo apt-get -y install
5270
fi
5371

5472
git submodule init

moode-cfg/config

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
IMG_NAME=moode-r839
2-
RELEASE=bullseye
1+
IMG_NAME=moode-r900-dev~pre1
2+
RELEASE=bookworm
33
DEPLOY_ZIP=1
44
LOCALE_DEFAULT=en_US.UTF-8
5-
TARGET_HOSTNAME=moode
5+
TARGET_HOSTNAME=moode9dev
66
KEYBOARD_KEYMAP=us
77
KEYBOARD_LAYOUT="English (US)"
88
TIMEZONE_DEFAULT=America/Detroit

moode-cfg/stage2_04-moode-install_01-packages

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ libgudev-1.0-0
2727
libmediainfo0v5
2828
libmms0
2929
libnss-winbind
30-
libsgutils2-2
30+
# libsgutils2
3131
libtool-bin
3232
libzen0v5
3333
lsb-release
@@ -38,7 +38,7 @@ ntfs-3g
3838
php-fpm
3939
php-sqlite3
4040
php-yaml
41-
php7.4-gd
41+
php8.2-gd
4242
pi-bluetooth
4343
python3-dbus
4444
python3-matplotlib
@@ -58,7 +58,8 @@ systemd-timesyncd
5858
telnet
5959
triggerhappy
6060
winbind
61+
wayfire
6162
xfsprogs
62-
xinit
63-
xorg
63+
# xinit
64+
# xorg
6465
zip

moode-cfg/stage3_00-moode-install-prereq_00-run-chroot.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "Installing cloudsmith repository"
1212

1313
curl -1sLf \
1414
'https://dl.cloudsmith.io/public/moodeaudio/m8y/setup.deb.sh' \
15-
| sudo -E distro=raspbian codename=bullseye bash
15+
| sudo -E distro=raspbian codename=bookworm bash
1616

1717
echo "Update package lists"
1818
apt-get update

moode-cfg/stage3_01-moode-install_01-packages

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
# The deps of moode-player are automatic installed
55
# But by mentioning those explicit we can set an exact version
66
#
7-
moode-player=8.3.9-1moode1
7+
# TODO: add moode-player package
8+
# moode-player=9.0.0-1moode1~pre1
89
alsa-cdsp=1.2.0-1moode1
910
alsacap=1.0.1-1moode1
10-
ashuffle=3.12.8-1moode1
11+
ashuffle=3.14.1-1moode1
1112
bluez-alsa-utils=4.1.0-2moode2
1213
boss2-oled-p3=1.0.0-1moode1
1314
camilladsp=2.0.1-1moode1

moode-cfg/stage3_02-moode-install-post_00-run-chroot.sh

+7-26
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,17 @@
88
#
99
#########################################################################
1010

11-
# Kernel hashes for rpi-update
12-
# r810p: 5.15.32 stock raspberrypi-kernel1:1.20220331-1
13-
# r801: 5.15.28 87c6654a59e0ae6d09869fffceb44c5c698a7d83
14-
# r800: 5.15.23 9e99d81910722b6f2e086f6d14e592f292bcbb8b
15-
16-
# Install kernel from rpi-update
17-
#echo "y" | sudo PRUNE_MODULES=1 rpi-update 87c6654a59e0ae6d09869fffceb44c5c698a7d83
18-
19-
# Install kernel from package
20-
# uname -r| grep 5.15.32
21-
# if [ -n $? ]
22-
# then
23-
# Expected it to be te current kernel else abort
24-
# exit 1
25-
# TODO:
26-
# Make it more flex then just an abort.
27-
# Installing kernel like below wouldn't be enough:
28-
# apt install raspberrypi-kernel1:1.20220331-1
29-
# Also other kernels should be removed and purged.
30-
# Will write that code when we actually run in this situation.
31-
# fi
32-
3311
# Install matching kernel drivers
3412
# NOTE: Starting with kernel 6.1.y the custom Allo ASIX ax88179 driver is no longer installed
3513
# due to build breakage in the driver which has been unmaintained since mid-2022. Instead the
3614
# stock ASIX ax88179 driver is used.
37-
KERNEL_VER=$(basename `ls -d /lib/modules/*-v8+` | sed -r "s/([0-9.]*)[-].*/\1/")
38-
echo "Kernel $KERNEL_VER detected, try to install drivers"
39-
apt-get install -y "aloop-$KERNEL_VER" "pcm1794a-$KERNEL_VER" "rtl88xxau-$KERNEL_VER"
15+
16+
#TODO: fix driver install
17+
# KERNEL_VER=$(basename `ls -d /lib/modules/*-v8+` | sed -r "s/([0-9.]*)[-].*/\1/")
18+
# echo "Kernel $KERNEL_VER detected, try to install drivers"
19+
# apt-get install -y "aloop-$KERNEL_VER" "pcm1794a-$KERNEL_VER" "rtl88xxau-$KERNEL_VER"
4020

4121
# Lock important package from upgrades etc
4222
echo "Post moode-player install"
43-
sudo moode-apt-mark hold
23+
#TODO: uncomment moode-apt-mark when moode-player package is also installed
24+
# sudo moode-apt-mark hold

pi-gen

Submodule pi-gen updated 48 files

pi-gen-allowdowngrades.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ index f743e2a..4072fa1 100755
66
PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages-nr")"
77
if [ -n "$PACKAGES" ]; then
88
on_chroot << EOF
9-
-apt-get -o APT::Acquire::Retries=3 install --no-install-recommends -y $PACKAGES
10-
+apt-get -o APT::Acquire::Retries=3 install --no-install-recommends --allow-downgrades -y $PACKAGES
9+
-apt-get -o Acquire::Retries=3 install --no-install-recommends -y $PACKAGES
10+
+apt-get -o Acquire::Retries=3 install --no-install-recommends --allow-downgrades -y $PACKAGES
1111
EOF
1212
if [ "${USE_QCOW2}" = "1" ]; then
1313
on_chroot << EOF
1414
@@ -36,7 +36,7 @@ EOF
1515
PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages")"
1616
if [ -n "$PACKAGES" ]; then
1717
on_chroot << EOF
18-
-apt-get -o APT::Acquire::Retries=3 install -y $PACKAGES
19-
+apt-get -o APT::Acquire::Retries=3 install --allow-downgrades -y $PACKAGES
18+
-apt-get -o Acquire::Retries=3 install -y $PACKAGES
19+
+apt-get -o Acquire::Retries=3 install --allow-downgrades -y $PACKAGES
2020
EOF
2121
if [ "${USE_QCOW2}" = "1" ]; then
2222
on_chroot << EOF

0 commit comments

Comments
 (0)