diff options
29 files changed, 127 insertions, 31 deletions
@@ -432,8 +432,11 @@ maintenance and allows for more easy customization. - **stage3a_dev** - `litexdev system`. Contains full commandline development tools and developer library packages based on *stage3a* inclusive *build-essential*, gcc, clang, OpenJDK 11, etc. - - **stage3b** - `desktop system`. Contains a complete desktop system - with X11 and LXDE and web browsers. + - **stage3b_lxde** - `lxde desktop system`. Contains a complete desktop system + with X11, LXDE and a web browser. Suitable for `ROOTFS_RO`. + + - **stage3b_kde** - `kde desktop system`. Contains a complete desktop system + with X11, KDE Plasma and a web browser. Not yet working well with `ROOTFS_RO`. - **stage4** - `Python image`. System meant to fit on a 4GB card. This is the stage that installs most things to be friendly to new @@ -443,6 +446,9 @@ maintenance and allows for more easy customization. tools, an email client, learning tools like Scratch, specialized packages like sonic-pi, office productivity, etc. + - **stage_rescue** - `rescue desktop system`. Adds rescue related tools to desktop system, + best suited ontop of *stage3b_lxde* for `ROOTFS_RO` to produce a *rescue stick*. + ### Stage specification If you wish to build up to a specified stage (such as building up to `stage2` diff --git a/data/grub-image01.bin b/data/grub-i386-image01.bin Binary files differindex 5b3f6b9..5b3f6b9 100644 --- a/data/grub-image01.bin +++ b/data/grub-i386-image01.bin diff --git a/scripts/02-build-raspi-ro-smalldesk-jau.cfg b/scripts/02-build-raspi-ro-smalldesk-jau.cfg index 551508f..1ffbcf7 100644 --- a/scripts/02-build-raspi-ro-smalldesk-jau.cfg +++ b/scripts/02-build-raspi-ro-smalldesk-jau.cfg @@ -41,11 +41,11 @@ export PUBKEY_SSH_FIRST_USER="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAm2qfo3uiWT9V7E export PUBKEY2_SSH_FIRST_USER="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC+pMJr432NOaDKnVN9+KDARU3XPDCMcwlsDdFHAEuVIGiNE2yxsC+UVKqu2+ZWKIlNET0zW8b87WsWVwiTa58lkxVre3g9DYAXpV7HPsf0bpTmzKqfPUC2z52aISluH/+Mf5FlytqFgpzx1VxREjvAw2H0GFE2K7+GsVcDFxjd5hv81FVAO9KISFnVVP9i+mSR7P4QOUYmXMw7Zq1z6hjXAGxXupEx8p/6KCqgo1tdVQBefJNOJpCABDI0yHgRsXnm7CUv1a/vM7QfCsn1hugcEGilacBLBcQp6EhXvleavX3ixffNV9RmOO0X06/EVwBtgal9aH375XABWihUi3EkRvfRqo07eieWzTIj6gO+AhZmuu4X/o53W5BG+cgMRV/+VGsLijH6jdvVv9W+motjX16TSHbSBHFaiwFyreAFi/A7WiUqdcbe12nnUsHlumhJSAIynCHKy6hgFEuGQFdENcudCgNMF7SDQEB52TwiO6BZuP6VHw4nNqxm+sbmKjgKi5vTrzIe7JkuRX+eIZLFZifFS7kfIRfQY67sCerTYsnC0Y0muX+VixKG3FIL6iSlF3KLOd41LPVNmBbpZK7oC62qrXBhvgA2d9D92o5rzqFCA6obEYiEDgyN6liASJD6VFNey366FyZzsf2U2dUeHFkyUxY0EEEFNeoOPhF5SQ== [email protected]" export PUBKEY_ONLY_SSH=1 -export STAGE_LIST="stage0 stage1 stage2 stage3a stage3b" -#export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a stage3b" -export SKIP_STAGE_LIST="stage3a stage3b" -#export SKIP_STAGE_LIST="stage0 stage1 stage3a stage3b" +export STAGE_LIST="stage0 stage1 stage2 stage3a stage3b_lxde" +#export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a stage3b_lxde" +#export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a" -#export SKIP_IMAGES_LIST="stage2 stage3a stage3b" -export SKIP_IMAGES_LIST="stage3a stage3b" +#export SKIP_IMAGES_LIST="stage2 stage3a stage3b_lxde" +#export SKIP_IMAGES_LIST="stage3a stage3b_lxde" +export SKIP_IMAGES_LIST="stage2 stage3a" diff --git a/scripts/02-build-raspi-ro-smalldesk.cfg b/scripts/02-build-raspi-ro-smalldesk.cfg index a1c7cbd..94de791 100644 --- a/scripts/02-build-raspi-ro-smalldesk.cfg +++ b/scripts/02-build-raspi-ro-smalldesk.cfg @@ -39,13 +39,9 @@ export ENABLE_SSH=1 # export PUBKEY_SSH_FIRST_USER="ssh-rsa long-number my@machine" # export PUBKEY_ONLY_SSH=1 -# export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a" -export SKIP_IMAGES_LIST="stage2 stage3a" -# export SKIP_IMAGES_LIST="stage2 stage3a stage3a_dev stage3b stage4" - -export STAGE_LIST="stage0 stage1 stage2 stage3a stage3b" -#export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a stage3b" +export STAGE_LIST="stage0 stage1 stage2 stage3a stage3b_lxde" +#export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a stage3b_lxde" -#export SKIP_IMAGES_LIST="stage2 stage3a stage3b" +#export SKIP_IMAGES_LIST="stage2 stage3a stage3b_lxde" export SKIP_IMAGES_LIST="stage2 stage3a" diff --git a/scripts/03-build-debian_amd64-ro-rescue-jau.cfg b/scripts/03-build-debian_amd64-ro-rescue-jau.cfg index 4b9857e..76de7bc 100644 --- a/scripts/03-build-debian_amd64-ro-rescue-jau.cfg +++ b/scripts/03-build-debian_amd64-ro-rescue-jau.cfg @@ -41,11 +41,10 @@ export PUBKEY_SSH_FIRST_USER="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAm2qfo3uiWT9V7E export PUBKEY2_SSH_FIRST_USER="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC+pMJr432NOaDKnVN9+KDARU3XPDCMcwlsDdFHAEuVIGiNE2yxsC+UVKqu2+ZWKIlNET0zW8b87WsWVwiTa58lkxVre3g9DYAXpV7HPsf0bpTmzKqfPUC2z52aISluH/+Mf5FlytqFgpzx1VxREjvAw2H0GFE2K7+GsVcDFxjd5hv81FVAO9KISFnVVP9i+mSR7P4QOUYmXMw7Zq1z6hjXAGxXupEx8p/6KCqgo1tdVQBefJNOJpCABDI0yHgRsXnm7CUv1a/vM7QfCsn1hugcEGilacBLBcQp6EhXvleavX3ixffNV9RmOO0X06/EVwBtgal9aH375XABWihUi3EkRvfRqo07eieWzTIj6gO+AhZmuu4X/o53W5BG+cgMRV/+VGsLijH6jdvVv9W+motjX16TSHbSBHFaiwFyreAFi/A7WiUqdcbe12nnUsHlumhJSAIynCHKy6hgFEuGQFdENcudCgNMF7SDQEB52TwiO6BZuP6VHw4nNqxm+sbmKjgKi5vTrzIe7JkuRX+eIZLFZifFS7kfIRfQY67sCerTYsnC0Y0muX+VixKG3FIL6iSlF3KLOd41LPVNmBbpZK7oC62qrXBhvgA2d9D92o5rzqFCA6obEYiEDgyN6liASJD6VFNey366FyZzsf2U2dUeHFkyUxY0EEEFNeoOPhF5SQ== [email protected]" export PUBKEY_ONLY_SSH=1 -export STAGE_LIST="stage0 stage1 stage2 stage3a stage3b stage_rescue" -#export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a stage3b stage_rescue" -export SKIP_STAGE_LIST="stage3a stage3b stage_rescue" -#export SKIP_STAGE_LIST="stage0 stage1 stage3a stage3b stage_rescue" +export STAGE_LIST="stage0 stage1 stage2 stage3a stage3b_lxde stage_rescue" +#export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a stage3b_lxde stage_rescue" +#export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a stage3b_lxde" -#export SKIP_IMAGES_LIST="stage2 stage3a stage3b stage_rescue" -export SKIP_IMAGES_LIST="stage3a stage3b stage_rescue stage4" +#export SKIP_IMAGES_LIST="stage2 stage3a stage3b_lxde stage_rescue" +export SKIP_IMAGES_LIST="stage2 stage3a stage3b_lxde" diff --git a/scripts/03-build-debian_amd64-ro-rescue.cfg b/scripts/03-build-debian_amd64-ro-rescue.cfg index c5f669f..84a43d0 100644 --- a/scripts/03-build-debian_amd64-ro-rescue.cfg +++ b/scripts/03-build-debian_amd64-ro-rescue.cfg @@ -39,9 +39,9 @@ export ENABLE_SSH=1 # export PUBKEY_SSH_FIRST_USER="ssh-rsa long-number my@machine" # export PUBKEY_ONLY_SSH=1 -export STAGE_LIST="stage0 stage1 stage2 stage3a stage3b stage_rescue" -#export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a stage3b stage_rescue" +export STAGE_LIST="stage0 stage1 stage2 stage3a stage3b_lxde stage_rescue" +#export SKIP_STAGE_LIST="stage0 stage1 stage2 stage3a stage3b_lxde stage_rescue" -#export SKIP_IMAGES_LIST="stage2 stage3a stage3b stage_rescue" -export SKIP_IMAGES_LIST="stage2 stage3a stage3b" +#export SKIP_IMAGES_LIST="stage2 stage3a stage3b_lxde stage_rescue" +export SKIP_IMAGES_LIST="stage2 stage3a stage3b_lxde" diff --git a/scripts/make_dualboot_image.sh b/scripts/make_dualboot_image.sh index d3896f8..b4f55ea 100755 --- a/scripts/make_dualboot_image.sh +++ b/scripts/make_dualboot_image.sh @@ -11,7 +11,8 @@ sdir=`dirname $(readlink -f "${BASH_SOURCE[0]}")` rootdir=`dirname $sdir` usage() { - echo "Usage: $0 <image-file> <total-size in GiB> <mount-point> <provisioning-dir>" + echo "Usage: $0 <image-file> <total-size> <mount-point> <provisioning-dir>" + echo "For <total-size> use G for GiB or M for MiB denominator" } if [ -z "${1}" -o -z "${2}" -o -z "${3}" -o -z "${4}" ]; then @@ -19,14 +20,14 @@ if [ -z "${1}" -o -z "${2}" -o -z "${3}" -o -z "${4}" ]; then exit 2 fi -readonly grub_image="data/grub-image01.bin" +readonly grub_image="data/grub-i386-image01.bin" IMG_FILE="${1}" IMG_FILE_SIZE="${2}" MNT_DIR="${3}" SRC_DIR="${4}" -dd if=/dev/zero of=${IMG_FILE} bs=4M count=${IMG_FILE_SIZE}G conv=notrunc iflag=count_bytes,skip_bytes oflag=seek_bytes,dsync status=progress +dd if=/dev/zero of=${IMG_FILE} bs=4M count=${IMG_FILE_SIZE} conv=notrunc iflag=count_bytes,skip_bytes oflag=seek_bytes,dsync status=progress sfdisk ${IMG_FILE} << EOF 4MiB,,c,*; diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index ecfd633..56c7053 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -159,7 +159,7 @@ if [ "${ROOTFS_RO}" = "1" ] ; then install -m 644 files/boot/sys_arm64_000/cmdline-rootfs_ro.txt "${ROOTFS_DIR}/boot/sys_arm64_000/cmdline.txt" else install -m 644 files/grub/custom.cfg "${ROOTFS_DIR}/boot/grub/custom.cfg" - sed -i 's/sys_arm64_000/sys_${TARGET_ARCH}_000/g' "${ROOTFS_DIR}/boot/grub/custom.cfg" + sed -i "s/sys_amd64_000/sys_${TARGET_ARCH}_000/g" "${ROOTFS_DIR}/boot/grub/custom.cfg" cp "${ROOTFS_DIR}/boot/grub/custom.cfg" "${ROOTFS_DIR}/boot/sys_${TARGET_ARCH}_000/" sed -i 's/GRUB_DEFAULT=.*$/GRUB_DEFAULT=loop_rootfs/g;s/GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=0/g;s/#GRUB_TERMINAL=.*$/GRUB_TERMINAL=console/g;s/#GRUB_DISABLE_LINUX_UUID=.*$/GRUB_DISABLE_LINUX_UUID=true/g' "${ROOTFS_DIR}/etc/default/grub" echo "GRUB_DISABLE_LINUX_PARTUUID=true" >> "${ROOTFS_DIR}/etc/default/grub" diff --git a/stage3b_kde/00-install-packages/00-packages b/stage3b_kde/00-install-packages/00-packages new file mode 100644 index 0000000..02ec3d4 --- /dev/null +++ b/stage3b_kde/00-install-packages/00-packages @@ -0,0 +1,9 @@ +gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav +qpdfview gtk2-engines alsa-utils +desktop-base +git +ffmpeg +mpv +# omxplayer +gvfs +firefox-esr diff --git a/stage3b_kde/00-install-packages/00-packages-nr b/stage3b_kde/00-install-packages/00-packages-nr new file mode 100644 index 0000000..878bb78 --- /dev/null +++ b/stage3b_kde/00-install-packages/00-packages-nr @@ -0,0 +1,6 @@ +mousepad +kde-plasma-desktop kde-baseapps kate okular kdeadmin kdenetwork plasma-nm kdeutils kde-style-breeze +kdeconnect kdiff3 krdc partitionmanager ksystemlog +zenity xdg-utils +gvfs-backends gvfs-fuse +lightdm gnome-themes-standard gnome-icon-theme diff --git a/stage3b/00-install-packages/00-packages-sys-raspi b/stage3b_kde/00-install-packages/00-packages-sys-raspi index 44e1bc4..44e1bc4 100644 --- a/stage3b/00-install-packages/00-packages-sys-raspi +++ b/stage3b_kde/00-install-packages/00-packages-sys-raspi diff --git a/stage3b_kde/00-install-packages/00-packages-sys-raspi-bullseye b/stage3b_kde/00-install-packages/00-packages-sys-raspi-bullseye new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/stage3b_kde/00-install-packages/00-packages-sys-raspi-bullseye diff --git a/stage3b/04-console-autologin/00-packages-sys-raspi b/stage3b_kde/04-console-autologin/00-packages-sys-raspi index 9e91ea1..9e91ea1 100644 --- a/stage3b/04-console-autologin/00-packages-sys-raspi +++ b/stage3b_kde/04-console-autologin/00-packages-sys-raspi diff --git a/stage3b/04-console-autologin/01-run.sh b/stage3b_kde/04-console-autologin/01-run.sh index d5a4d68..d5a4d68 100755 --- a/stage3b/04-console-autologin/01-run.sh +++ b/stage3b_kde/04-console-autologin/01-run.sh diff --git a/stage3b/EXPORT_IMAGE b/stage3b_kde/EXPORT_IMAGE index cf4ee7c..c9881ca 100644 --- a/stage3b/EXPORT_IMAGE +++ b/stage3b_kde/EXPORT_IMAGE @@ -1,4 +1,4 @@ -IMG_SUFFIX="-smalldesk" +IMG_SUFFIX="-kdedesk" if [ "${USE_QEMU}" = "1" ]; then export IMG_SUFFIX="${IMG_SUFFIX}-qemu" fi diff --git a/stage3b/prerun.sh b/stage3b_kde/prerun.sh index 9acd13c..9acd13c 100755 --- a/stage3b/prerun.sh +++ b/stage3b_kde/prerun.sh diff --git a/stage3b/00-install-packages/00-packages b/stage3b_lxde/00-install-packages/00-packages index ee7a72a..ee7a72a 100644 --- a/stage3b/00-install-packages/00-packages +++ b/stage3b_lxde/00-install-packages/00-packages diff --git a/stage3b/00-install-packages/00-packages-nr b/stage3b_lxde/00-install-packages/00-packages-nr index c305ea1..10f09d4 100644 --- a/stage3b/00-install-packages/00-packages-nr +++ b/stage3b_lxde/00-install-packages/00-packages-nr @@ -3,4 +3,3 @@ lxde lxtask menu-xdg zenity xdg-utils gvfs-backends gvfs-fuse lightdm gnome-themes-standard gnome-icon-theme -lightdm diff --git a/stage3b_lxde/00-install-packages/00-packages-sys-raspi b/stage3b_lxde/00-install-packages/00-packages-sys-raspi new file mode 100644 index 0000000..44e1bc4 --- /dev/null +++ b/stage3b_lxde/00-install-packages/00-packages-sys-raspi @@ -0,0 +1 @@ +raspberrypi-artwork diff --git a/stage3b_lxde/00-install-packages/00-packages-sys-raspi-bullseye b/stage3b_lxde/00-install-packages/00-packages-sys-raspi-bullseye new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/stage3b_lxde/00-install-packages/00-packages-sys-raspi-bullseye diff --git a/stage3b_lxde/04-console-autologin/00-packages-sys-raspi b/stage3b_lxde/04-console-autologin/00-packages-sys-raspi new file mode 100644 index 0000000..9e91ea1 --- /dev/null +++ b/stage3b_lxde/04-console-autologin/00-packages-sys-raspi @@ -0,0 +1 @@ +raspi-config diff --git a/stage3b_lxde/04-console-autologin/01-run.sh b/stage3b_lxde/04-console-autologin/01-run.sh new file mode 100755 index 0000000..d5a4d68 --- /dev/null +++ b/stage3b_lxde/04-console-autologin/01-run.sh @@ -0,0 +1,10 @@ +#!/bin/bash -e + +if [ "${TARGET_RASPI}" = "1" ]; then + # B2 Console Autologin + # B4 Desktop Autologin + + on_chroot << EOF + SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_behaviour B4 +EOF +fi diff --git a/stage3b_lxde/EXPORT_IMAGE b/stage3b_lxde/EXPORT_IMAGE new file mode 100644 index 0000000..7b9cb77 --- /dev/null +++ b/stage3b_lxde/EXPORT_IMAGE @@ -0,0 +1,4 @@ +IMG_SUFFIX="-lxdedesk" +if [ "${USE_QEMU}" = "1" ]; then + export IMG_SUFFIX="${IMG_SUFFIX}-qemu" +fi diff --git a/stage3b_lxde/prerun.sh b/stage3b_lxde/prerun.sh new file mode 100755 index 0000000..9acd13c --- /dev/null +++ b/stage3b_lxde/prerun.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +if [ ! -d "${ROOTFS_DIR}" ]; then + copy_previous +fi diff --git a/stage_rescue/00-install-packages/00-packages-sys-debian b/stage_rescue/00-install-packages/00-packages-sys-debian new file mode 100644 index 0000000..293fdba --- /dev/null +++ b/stage_rescue/00-install-packages/00-packages-sys-debian @@ -0,0 +1,17 @@ +# debootstrap and iso-image requirements +debootstrap xorriso live-build syslinux isolinux squashfs-tools genisoimage memtest86+ + +hwinfo dmidecode cpuid cpufrequtils pciutils usbutils hwdata discover +gnupg gnupg-agent gnupg2 +git git-buildpackage git-cola git-core git-cvs git-doc git-email git-gui git-man git-svn gitk +nano pv vim +gparted ntfs-3g hfsprogs dosfstools chntpw partclone +xfsdump xfsprogs +isc-dhcp-client ifupdown network-manager net-tools +wireless-tools wpasupplicant wpagui +nfs-common nfs-kernel-server nfswatch +smbclient cifs-utils +rsync tcpdump wget openssh-server openssh-client iptables +lsof rpcbind iptraf iftop wireshark tcpdump pcaputils ngrep +sharutils psmisc patch less + diff --git a/stage_rescue/00-install-packages/01-run.sh b/stage_rescue/00-install-packages/01-run.sh new file mode 100755 index 0000000..f119dd0 --- /dev/null +++ b/stage_rescue/00-install-packages/01-run.sh @@ -0,0 +1,26 @@ +#!/bin/bash -e + +# +# Just mod a little for memtest86+.bin +# + +on_chroot << EOF + find /boot -maxdepth 1 -name memtest\* -exec mv \{\} /boot/sys_${TARGET_ARCH}_000/ \; +EOF + +if [ "${ROOTFS_RO}" = "1" ] ; then + if [ "${TARGET_RASPI}" != "1" ]; then + cat files/grub/custom.cfg >> "${ROOTFS_DIR}/boot/grub/custom.cfg" + sed -i "s/sys_amd64_000/sys_${TARGET_ARCH}_000/g" "${ROOTFS_DIR}/boot/grub/custom.cfg" + cp "${ROOTFS_DIR}/boot/grub/custom.cfg" "${ROOTFS_DIR}/boot/sys_${TARGET_ARCH}_000/" + sed -i 's/GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=5/g' "${ROOTFS_DIR}/etc/default/grub" + fi +fi + +on_chroot <<EOF + if [ "${ROOTFS_RO}" = "1" ]; then + mkdir -p /data/sdcard + cp -a /boot/sys_${TARGET_ARCH}_000 /data/sdcard/ + fi +EOF + diff --git a/stage_rescue/00-install-packages/files/grub/custom.cfg b/stage_rescue/00-install-packages/files/grub/custom.cfg new file mode 100644 index 0000000..86dd3fc --- /dev/null +++ b/stage_rescue/00-install-packages/files/grub/custom.cfg @@ -0,0 +1,7 @@ +menuentry "Memory test (memtest86+)" { + insmod gzio + insmod part_msdos + insmod fat + linux16 /sys_amd64_000/memtest86+.bin +} + diff --git a/stage_rescue/EXPORT_IMAGE b/stage_rescue/EXPORT_IMAGE new file mode 100644 index 0000000..6598496 --- /dev/null +++ b/stage_rescue/EXPORT_IMAGE @@ -0,0 +1,4 @@ +IMG_SUFFIX="-rescue" +if [ "${USE_QEMU}" = "1" ]; then + export IMG_SUFFIX="${IMG_SUFFIX}-qemu" +fi diff --git a/stage_rescue/prerun.sh b/stage_rescue/prerun.sh new file mode 100755 index 0000000..9acd13c --- /dev/null +++ b/stage_rescue/prerun.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +if [ ! -d "${ROOTFS_DIR}" ]; then + copy_previous +fi |