Stripped down image, fixed broken packages

This commit is contained in:
Logan G 2020-08-20 13:58:29 -06:00
parent ac17df04b2
commit 58b3f4ca2c
Signed by: logan
GPG key ID: E328528C921E7A7A
23 changed files with 110 additions and 89 deletions

View file

@ -159,7 +159,7 @@ export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"
export SCRIPT_DIR="${BASE_DIR}/scripts"
export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}"
export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"}
export DEPLOY_ZIP="${DEPLOY_ZIP:-1}"
export DEPLOY_ZIP="${DEPLOY_ZIP:-2}"
export LOG_FILE="${WORK_DIR}/build.log"
export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi}

View file

@ -94,6 +94,8 @@ if [ "${DEPLOY_ZIP}" == "1" ]; then
zip "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" \
"$(basename "${IMG_FILE}")"
popd > /dev/null
elif [ "${DEPLOY_ZIP}" == "2" ]; then
xz -z -c -T$(nproc) "$IMG_FILE" > "${DEPLOY_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img.xz"
else
cp "$IMG_FILE" "$DEPLOY_DIR"
fi

View file

@ -9,7 +9,7 @@ if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then
adduser --disabled-password --gecos "" ${FIRST_USER_NAME}
fi
echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd
echo "root:root" | chpasswd
echo "root:$(cat /dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c40)" | chpasswd
EOF

View file

@ -1,13 +1,36 @@
ssh less fbset sudo psmisc strace ed ncdu crda
console-setup keyboard-configuration debconf-utils parted unzip
build-essential manpages-dev python bash-completion gdb pkg-config
python-rpi.gpio v4l-utils
ssh
less
fbset
sudo
psmisc
strace
ed
ncdu
crda
console-setup
keyboard-configuration
debconf-utils
parted
unzip
build-essential
git
manpages-dev
python
bash-completion
gdb
pkg-config
python-rpi.gpio
v4l-utils
avahi-daemon
lua5.1
luajit
hardlink ca-certificates curl
fake-hwclock nfs-common usbutils
libraspberrypi-dev libraspberrypi-doc libfreetype6-dev
hardlink
ca-certificates
curl
fake-hwclock
nfs-common
usbutils
libraspberrypi-dev
libraspberrypi-doc
libfreetype6-dev
dosfstools
dphys-swapfile
raspberrypi-sys-mods
@ -29,3 +52,6 @@ ntfs-3g
pciutils
rpi-eeprom
raspinfo
rfkill
vim
unattended-upgrades

View file

@ -54,3 +54,12 @@ usermod --pass='*' root
EOF
rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key*
rm -f "${ROOTFS_DIR}/etc/sudoers.d/010_pi-nopasswd" # Fuck you :)
echo "%sudo ALL=(ALL:ALL) ALL" > ${ROOTFS_DIR}/etc/sudoers.d/group
on_chroot << EOF
echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections
dpkg-reconfigure -f noninteractive unattended-upgrades
EOF

View file

@ -1,4 +1,9 @@
wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek
raspberrypi-net-mods
dhcpcd5
wpasupplicant
wireless-tools
firmware-atheros
firmware-brcm80211
firmware-libertas
firmware-misc-nonfree
firmware-realtek
net-tools
network-manager

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,2 +0,0 @@
NOOBS_NAME="Raspbian Lite"
NOOBS_DESCRIPTION="A port of Debian with no desktop environment"

View file

@ -8,13 +8,20 @@ qpdfview
gtk2-engines
alsa-utils
desktop-base
git
raspberrypi-artwork
policykit-1
lxqt-policykit
gvfs
rfkill
gldriver-test
fonts-droid-fallback
fonts-liberation2
obconf
arandr
xfce4
xfce4-goodies
xfce4-pulseaudio-plugin
mate-screensaver
qt5ct
lxappearance
xcompmgr
firefox-esr

View file

@ -6,6 +6,6 @@ zenity
xdg-utils
gvfs-backends
gvfs-fuse
lightdm
sddm
gnome-themes-standard
gnome-icon-theme

View file

@ -1,8 +1,9 @@
#!/bin/bash -e
on_chroot << EOF
systemctl enable sddm
update-alternatives --install /usr/bin/x-www-browser \
x-www-browser /usr/bin/chromium-browser 86
x-www-browser /usr/bin/firefox-esr 86
update-alternatives --install /usr/bin/gnome-www-browser \
gnome-www-browser /usr/bin/chromium-browser 86
gnome-www-browser /usr/bin/firefox-esr 86
EOF

4
stage3/EXPORT_IMAGE Normal file
View file

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

View file

@ -1,25 +1,22 @@
python python3-pygame python-pygame python-tk
python3 python3-tk thonny
python3-pygame
python3
python3-tk
python3-pgzero
python-serial python3-serial
python-picamera python3-picamera
python3-serial
python3-picamera
debian-reference-en dillo
raspberrypi-net-mods raspberrypi-ui-mods
python-pip python3-pip
python3-numpy
pypy
raspberrypi-ui-mods
python3-pip
alacarte rc-gui sense-hat
tree
libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr
geany
piclone
wiringpi pigpio python-pigpio python3-pigpio raspi-gpio python-gpiozero python3-gpiozero python3-rpi.gpio
python-spidev python3-spidev
python-twython python3-twython
python-smbus python3-smbus
python-flask python3-flask
libgl1-mesa-dri libgles1 libgles2-mesa
wiringpi pigpio python3-pigpio raspi-gpio python3-gpiozero python3-rpi.gpio
python3-spidev
python3-twython
python3-smbus
python3-flask
pprompt
piwiz
rp-prefapps
ffmpeg
vlc
mpv

View file

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

View file

@ -1,22 +1,22 @@
python-automationhat python3-automationhat
python-blinkt python3-blinkt
python-cap1xxx python3-cap1xxx
python-drumhat python3-drumhat
python-envirophat python3-envirophat
python-explorerhat python3-explorerhat
python-fourletterphat python3-fourletterphat
python-microdotphat python3-microdotphat
python-mote python3-mote
python-motephat python3-motephat
python-phatbeat python3-phatbeat
python-pianohat python3-pianohat
python-piglow python3-piglow
python-rainbowhat python3-rainbowhat
python-scrollphat python3-scrollphat
python-scrollphathd python3-scrollphathd
python-sn3218 python3-sn3218
python-skywriter python3-skywriter
python-touchphat python3-touchphat
python-buttonshim python3-buttonshim
python-unicornhathd python3-unicornhathd
python-pantilthat python3-pantilthat
python3-automationhat
python3-blinkt
python3-cap1xxx
python3-drumhat
python3-envirophat
python3-explorerhat
python3-fourletterphat
python3-microdotphat
python3-mote
python3-motephat
python3-phatbeat
python3-pianohat
python3-piglow
python3-rainbowhat
python3-scrollphat
python3-scrollphathd
python3-sn3218
python3-skywriter
python3-touchphat
python3-buttonshim
python3-unicornhathd
python3-pantilthat

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,15 +0,0 @@
#!/bin/sh -e
BOOKSHELF_URL="https://magpi.raspberrypi.org/bookshelf.xml"
GUIDE_URL="$(curl -s "$BOOKSHELF_URL" | awk -F '[<>]' "/<TITLE>Raspberry Pi Beginner's Guide v3<\/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,4 +1,4 @@
IMG_SUFFIX=""
IMG_SUFFIX="-full"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi

View file

@ -1,2 +0,0 @@
NOOBS_NAME="Raspbian"
NOOBS_DESCRIPTION="A port of Debian with the Raspberry Pi Desktop"

View file

@ -1,2 +0,0 @@
NOOBS_NAME="Raspbian Full"
NOOBS_DESCRIPTION="A port of Debian with desktop and recommended applications"