From 5347af1b0a4f78d6a41db4f14b5377d3ae5da8ee Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sat, 1 Jun 2024 16:48:19 +0300 Subject: [PATCH] build kernels inside a chroot environment --- .github/workflows/build.yml | 21 +- .github/workflows/dpup-kernel.yml | 61 +- kernel-kit/build.conf | 63 -- kernel-kit/build.sh | 627 ++---------------- kernel-kit/debian-diffconfigs/bookworm | 2 + woof-code/1download | 8 +- woof-code/2buildkernel | 16 + woof-code/3builddistro | 8 +- .../usr/share/doc/puppy/woof-CE.md | 10 +- .../trixie64/DISTRO_PKGS_SPECS-debian-trixie | 24 +- 10 files changed, 99 insertions(+), 741 deletions(-) delete mode 100644 kernel-kit/build.conf create mode 100755 woof-code/2buildkernel diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f909e4b7e6..17cc014d475 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,6 @@ jobs: - name: Create cache directories run: | mkdir -p local-repositories petbuild-sources petbuild-cache petbuild-output - ln -s `pwd`/local-repositories ../local-repositories - name: Get cached local-repositories uses: actions/cache@v3 with: @@ -60,14 +59,6 @@ jobs: restore-keys: | local-repositories-${{ inputs.arch }}-${{ inputs.compat-distro }}-${{ inputs.compat-distro-version }}-${{ inputs.variant }}- local-repositories-${{ inputs.arch }}-${{ inputs.compat-distro }}-${{ inputs.compat-distro-version }}- - - name: Prepare build environment - run: | - [ -f local-repositories/vercmp ] || (curl https://raw.githubusercontent.com/puppylinux-woof-CE/initrd_progs/master/pkg/w_apps_static/w_apps/vercmp.c | gcc -x c -o ../local-repositories/vercmp -) - sudo install -m 755 local-repositories/vercmp /usr/local/bin/vercmp - echo "dash dash/sh boolean false" | sudo debconf-set-selections - sudo DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash - sudo ln -s bash /bin/ash - [ "${{ inputs.compat-distro }}" != void ] || echo "LD_LIBRARY_PATH=/lib:/usr/lib:/lib64:/usr/lib64" >> $GITHUB_ENV - name: merge2out timeout-minutes: 5 run: | @@ -90,7 +81,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update -qq - sudo apt-get install -y --no-install-recommends dc debootstrap librsvg2-bin zstd xml2 syslinux-utils extlinux + sudo apt-get install -y --no-install-recommends debootstrap [ ${{ inputs.compat-distro }} != devuan ] || curl https://git.devuan.org/devuan/debootstrap/raw/branch/master/scripts/ceres | sudo tee /usr/share/debootstrap/scripts/`echo ${{ inputs.compat-distro-version }} | sed s/64$//` - name: 0setup timeout-minutes: 10 @@ -155,15 +146,9 @@ jobs: - name: Build woof-CE.tar.gz run: | cd ../buildenv - cd woof-out_* - sudo mkdir -p kernel-kit/sources - sudo mv -f ../../woof-out_*/kernel-kit/output/linux-*.tar.xz kernel-kit/sources/ - sudo mv -f ../../woof-out_*/kernel-kit/output/DOTconfig-* kernel-kit/ - sudo mv -f ../../woof-out_*/kernel-kit/output/build.conf kernel-kit/ - sudo mv ../../woof-out_*/petbuild-sources . - cd .. + sudo mv ../../woof-out_*/petbuild-sources ../../woof-out_*/local-repositories woof-out_*/ sudo tar -c -I "gzip -9" -f $GITHUB_WORKSPACE/woof-CE.tar.gz woof-out_* - sudo mv woof-out_*/petbuild-sources $GITHUB_WORKSPACE/ + sudo mv woof-out_*/petbuild-sources woof-out_*/local-repositories $GITHUB_WORKSPACE/ - name: Move build output run: | for i in `ls ../woof-out_*/woof-output-*/*.img 2>/dev/null`; do sudo gzip -1 $i; done diff --git a/.github/workflows/dpup-kernel.yml b/.github/workflows/dpup-kernel.yml index 04cd76f8bc0..79b3bdc41ae 100644 --- a/.github/workflows/dpup-kernel.yml +++ b/.github/workflows/dpup-kernel.yml @@ -9,67 +9,32 @@ jobs: build: if: github.event_name != 'schedule' || (github.repository == 'vanilla-dpup/woof-CE' && github.ref == 'refs/heads/vanilladpup-11.0.x') runs-on: ubuntu-22.04 - container: - image: debian:${{ matrix.release }}-slim - volumes: - - /usr:/hostusr continue-on-error: ${{ matrix.release == 'sid' }} strategy: matrix: include: - release: trixie arch: x86_64 - base: config.amd64_none_amd64.xz - release: sid arch: x86_64 - base: config.amd64_none_amd64.xz steps: - uses: actions/checkout@v3 + - name: Free space + run: sudo rm -rf /usr/local/lib/android /usr/share/dotnet # increase free space, we don't need these - name: Install dependencies - run: | - rm -rf /hostusr/local/lib/android /hostusr/share/dotnet # increase free space, we don't need these - [ ${{ matrix.release }} = sid ] || echo "deb http://deb.debian.org/debian ${{ matrix.release }} main contrib non-free" > /etc/apt/sources.list - [ ${{ matrix.release }} = sid ] || echo "deb http://deb.debian.org/debian ${{ matrix.release }}-updates main contrib non-free" >> /etc/apt/sources.list - [ ${{ matrix.release }} = sid ] || echo "deb http://deb.debian.org/debian-security ${{ matrix.release }}-security main contrib non-free" >> /etc/apt/sources.list - [ ${{ matrix.arch }} != x86 ] || dpkg --add-architecture i386 - apt-get update -qq - apt-get upgrade -y - apt-get install -y --no-install-recommends curl wget ca-certificates git file squashfs-tools xz-utils diffutils patch make flex bison python3 bc bzip2 kmod rsync libelf-dev libssl-dev dwarves gcc jq - apt-get install -y linux-source - [ ${{ matrix.arch }} != x86 ] || apt-get install -y --no-install-recommends gcc-multilib `dpkg --get-selections | grep -m1 ^linux-config- | awk '{print $1}' | sed s/amd64/i386/` - curl https://raw.githubusercontent.com/puppylinux-woof-CE/initrd_progs/master/pkg/w_apps_static/w_apps/vercmp.c | gcc -x c -o /usr/local/bin/vercmp - - echo "dash dash/sh boolean false" | debconf-set-selections - DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash - - name: Build kernel - run: | - cd kernel-kit - tar -xJf /usr/src/linux-source-*.tar.xz - cfg=`ls /usr/src/linux-config-*/${{ matrix.base }}` - xz -dc $cfg > /tmp/base - ver=`grep -Fm1 "Kernel Configuration" /tmp/base | cut -f 3 -d ' '` - mv -f linux-source-* linux-$ver - mkdir -p sources/kernels - tar -c linux-$ver | xz -9 > sources/kernels/linux-$ver.tar.xz - cd linux-$ver - ./scripts/kconfig/merge_config.sh /tmp/base ../debian-diffconfigs/${{ matrix.release }} - mv -f .config ../DOTconfig-$ver-${{ matrix.arch }} - apt-get autoremove -y linux-source - cd .. - rm -rf linux-$ver - md5sum sources/kernels/linux-$ver.tar.xz | sed s~sources/kernels/~~ > sources/kernels/linux-$ver.tar.xz.md5.txt - echo "DOTconfig_file=DOTconfig-$ver-${{ matrix.arch }}" >> build.conf - echo "kernel_ver=$ver" >> build.conf - echo "package_name_suffix=kernel-kit" >> build.conf - echo "COMP=\"-comp zstd -Xcompression-level 19 -b 256K -no-exports -no-xattrs\"" >> build.conf - echo "AUTO=yes" >> build.conf - CREATE_KBUILD_SFS=yes ./build.sh - rm -rf kernel_sources-* - mkdir small-output - mv `ls sources/kernels/linux-$ver.tar.xz DOTconfig-$ver-${{ matrix.arch }} build.conf output/kbuild-*.sfs* output/*.tar* 2>/dev/null` small-output - rm -rf output + run: sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends debootstrap + - name: merge2out + timeout-minutes: 5 + run: sudo -E ./merge2out woof-distro/${{ matrix.arch }}/debian/${{ matrix.release }}64 + - name: 1download + run: cd ../woof-out_* && sudo -E ./1download + - name: 2buildkernel + run: cd ../woof-out_* && sudo -E ./2buildkernel + - name: Move build output + run: sudo mv ../woof-out_*/kernel-kit/output $GITHUB_WORKSPACE/ - name: Upload kernel uses: actions/upload-artifact@v3 with: name: kernel-kit-output-usrmerge-debian-${{ matrix.release }}-${{ matrix.arch }} - path: kernel-kit/small-output + path: output retention-days: 16 diff --git a/kernel-kit/build.conf b/kernel-kit/build.conf deleted file mode 100644 index 3821e20dd07..00000000000 --- a/kernel-kit/build.conf +++ /dev/null @@ -1,63 +0,0 @@ -#-- -# Configuration options -# ===================== -# -# **NOTE**: check the original file every once in a while -# settings might be added or removed... -# -# see http://www.kernel.org/ for the latest kernel info.. -#-- - -################################################################ -## add a Kernel .config file in one of the configs_* directories -## It must follow this syntax: -## version info -## DOTconfig-3.14.73-i686-4g -################################################################ - -## speed up the process by specifing a DOTconfig file: -#DOTconfig_file=DOTconfig -#DOTconfig_file=configs_x86/DOTconfig-3.16.85-i686-4g - -## use this version string with the current ./DOTconfig -## (in case it doesn't have usable version info inside) -kernel_ver= - -## this is the name of the pet package suffix, and source sfs -## name it whatever you like, usually put in a signifier for your distro -## eg: "s" is for slacko -## if you leave empty the script will determine a proper package suffix -package_name_suffix= - -##----------------------------------------------------------------------- - -## JOBS ### -## if you have a multicore processor you can set this var -## don't set if you have a single core! >> cooked machine -## DO NOT set it to 0 (zero) >> cooked machine -#JOBS=-j6 - -### squashfs compression ### -## unset this for the default of your mksquashfs binary -#COMP="-comp gzip" -COMP="-comp xz" -#COMP="-comp xz -b 512K" - -## Kernel download mirrors -kernel_mirrors='https://www.kernel.org/pub/linux/kernel -ftp://ftp.ntu.edu.tw/linux/kernel -ftp://ftp.heanet.ie/pub/kernel.org/pub/linux/kernel -ftp://ftp.yandex.ru/pub/linux/kernel/ -https://mirror.aarnet.edu.au/pub/ftp.kernel.org/linux/kernel -ftp://ftp.jaist.ac.jp/pub/Linux/kernel.org/linux/kernel -ftp://www.mirrorservice.org/pub/linux/kernel -ftp://ftp.be.debian.org/pub/linux/kernel' - -## -- AUTO -- -## Enforce automation of the process. Also triggered by: ./build.sh auto -## Every error is fatal, so you must specify all the needed stuff in build.conf first.. -#AUTO=yes - -## if no third party drivers will be built, the generation of a kernel sources -## SFS can be skipped -#CREATE_SOURCES_SFS=no diff --git a/kernel-kit/build.sh b/kernel-kit/build.sh index 7a03541e880..342b0f000b7 100755 --- a/kernel-kit/build.sh +++ b/kernel-kit/build.sh @@ -1,628 +1,75 @@ -#!/bin/bash # originally by Iguleder - hacked to DEATH by 01micko # see README # Compile fatdog style kernel [v3+ - 3.10+ recommended]. -. ./build.conf || exit 1 -. ./funcs.sh - -# if we're also building a Puppy, takes its SFS compression parameters -if [ -f ../_00build.conf ] ; then - . ../_00build.conf - COMP=$SFSCOMP -fi - -CWD=`pwd` -wget --help | grep -q '\--show-progress' && WGET_SHOW_PROGRESS='-q --show-progress' -WGET_OPT='--no-check-certificate '${WGET_SHOW_PROGRESS} - -MWD=$(pwd) -if [ -n "$GITHUB_ACTIONS" ] ; then - BUILD_LOG=/proc/self/fd/1 - log_msg() { echo -e "$@" ; } -else - BUILD_LOG=${MWD}/build.log - log_msg() { echo -e "$@" ; echo -e "$@" >> ${BUILD_LOG} ; } -fi -exit_error() { log_msg "$@" ; exit 1 ; } - -for i in $@ ; do - case $i in - clean) DO_CLEAN=1 ; break ;; - auto) AUTO=yes ; shift ;; - esac - # if a filename is specified on the command line it is assumed to be - # an extra build config that will be used in addition to build.conf - if [ -f "$i" ]; then - . ./${i} || exit 1 - shift - fi -done - -if [ $DO_CLEAN ] ; then - echo "Please wait..." - rm -rf ./{kernel*,build.log*,linux-*} output/* - echo "Cleaning complete" - exit 0 -fi - -#- ./sources is a symlink to $LOCAL_REPOSITORIES/kernel-kit/sources -LOCAL_REPOSITORIES='../../local-repositories' -[ -d ../local-repositories ] && LOCAL_REPOSITORIES='../local-repositories' -LOCAL_REPOSITORIES=${LOCAL_REPOSITORIES}/kernel-kit -mkdir -p ${LOCAL_REPOSITORIES}/sources ${LOCAL_REPOSITORIES}/tools -[ -e sources ] || ln -sv ${LOCAL_REPOSITORIES}/sources sources -[ -e tools ] || ln -sv ${LOCAL_REPOSITORIES}/tools tools -LOCAL_REPOSITORIES=$(cd $LOCAL_REPOSITORIES ; pwd) -export LOCAL_REPOSITORIES -#- - -## delete the previous log -[ -f build.log ] && rm -f build.log -[ -f build.log.tar.bz2 ] && mv -f build.log.${today}.tar.bz2 - -## Dependency check... -for app in git gcc make ; do - $app --version >/dev/null 2>&1 || exit_error "\033[1;31m""$app is not installed""\033[0m" -done -which mksquashfs >/dev/null 2>&1 || exit_error "\033[1;30m""mksquashfs is not installed""\033[0m" -log_ver #funcs.sh -which cc >/dev/null 2>&1 || ln -sv $(which gcc) /usr/bin/cc - -if [ "$AUTO" = "yes" ] ; then - [ ! "$DOTconfig_file" ] && exit_error "Must specify DOTconfig_file= in build.conf" -fi - -case $(uname -m) in - i?86) HOST_ARCH=x86 ;; - x86_64) HOST_ARCH=x86_64 ;; - arm*) HOST_ARCH=arm ;; - *) HOST_ARCH=$(uname -m) ;; -esac +. ../DISTRO_SPECS +. ../_00build.conf ## determine number of jobs for make -if [ ! "$JOBS" ] ; then - JOBS="-j$(nproc)" -fi -[ "$JOBS" ] && log_msg "Jobs for make: ${JOBS#-j}" && echo - -#------------------------------------------------------------------ - -if [ "$DOTconfig_file" -a ! -f "$DOTconfig_file" ] ; then - exit_error "File not found: $DOTconfig_file (see build.conf - DOTconfig_file=)" -fi - -if [ -f "$DOTconfig_file" ] ; then - CONFIGS_DIR=${DOTconfig_file%/*} #dirname $DOTconfig_file - Choice=${DOTconfig_file##*/} #basename $DOTconfig_file - [ "$CONFIGS_DIR" = "$Choice" ] && CONFIGS_DIR=. -else - [ "$AUTO" = "yes" ] && exit_error "Must specify DOTconfig_file= in build.conf" - ## .configs - [ -f /tmp/kernel_configs ] && rm -f /tmp/kernel_configs - ## CONFIG_DIR - - CONFIGS_DIR=configs_${HOST_ARCH} - CONFIGS=$(ls ./${CONFIGS_DIR}/DOTconfig* 2>/dev/null | sed 's|.*/||' | sort -n) - ## list - echo - echo "Select the config file you want to use" - NUM=1 - for C in $CONFIGS ;do - echo "${NUM}. $C" >> /tmp/kernel_configs - NUM=$(($NUM + 1)) - done - if [ -f DOTconfig ] ; then - echo "d. Default - current DOTconfig (./DOTconfig)" >> /tmp/kernel_configs - fi - echo "n. New DOTconfig" >> /tmp/kernel_configs - cat /tmp/kernel_configs - echo -n "Enter choice: " ; read Chosen - [ ! "$Chosen" -a ! -f DOTconfig ] && exit_error "\033[1;31m""ERROR: invalid choice, start again!""\033[0m" - if [ "$Chosen" ] ; then - Choice=$(grep "^$Chosen\." /tmp/kernel_configs | cut -d ' ' -f2) - [ ! "$Choice" ] && exit_error "\033[1;31m""ERROR: your choice is not sane ..quiting""\033[0m" - else - Choice=Default - fi - echo -en "\nYou chose $Choice. -If this is ok hit ENTER, if not hit CTRL|C to quit: " - read oknow -fi - -case $Choice in - Default) - kver=$(grep 'kernel_version=' DOTconfig | head -1 | tr -s ' ' | cut -d '=' -f2) - if [ "$kver" = "" ] ; then - if [ "$kernel_ver" = "" ] ; then - echo -n "Enter kernel version for DOTconfig: " - read kernel_version - [ ! $kernel_version ] && echo "ERROR" && exit 1 - echo "kernel_version=${kernel_version}" >> DOTconfig - else - kernel_version=${kernel_ver} #build.conf - fi - fi - ;; - New) - rm -f DOTconfig - echo -n "Enter kernel version (ex: 3.14.73) : " - read kernel_version - ;; - *) - case "$Choice" in DOTconfig-*) - IFS="-" read dconf kernel_version kernel_version_info <<< "$Choice" ;; - *) kernel_version="" ;; - esac - if [ ! "$kernel_version" ] ; then - kver=$(grep 'kernel_version=' ${CONFIGS_DIR}/$Choice | head -1 | tr -s ' ' | cut -d '=' -f2) - sed -i '/^kernel_version/d' ${CONFIGS_DIR}/$Choice - kernel_version=${kver} - [ "$kernel_ver" ] && kernel_version=${kernel_ver} #build.conf - if [ "$kernel_version" ] ; then - echo "kernel_version=${kernel_version}" >> DOTconfig - echo "kernel_version_info=${kernel_version_info}" >> DOTconfig - else - [ "$AUTO" = "yes" ] && exit_error "Must specify kernel_ver= in build.conf" - fi - fi - if [ "${CONFIGS_DIR}/$Choice" != "./DOTconfig" ] ; then - cp -afv ${CONFIGS_DIR}/$Choice DOTconfig - fi - [ ! "$package_name_suffix" ] && package_name_suffix=${kinfo} - ;; -esac - -log_msg "kernel_version=${kernel_version}" -log_msg "kernel_version_info=${kernel_version_info}" -case "$kernel_version" in - 3.*|4.*|5.*|6.*) ok=1 ;; #---- - *) exit_error "ERROR: Unsupported kernel version" ;; -esac - -if [ "$Choice" != "New" -a ! -f DOTconfig ] ; then - exit_error "\033[1;31m""ERROR: No DOTconfig found ..quiting""\033[0m" -fi - -export kernel_version -#------------------------------------------------------------------ - -# $package_name_suffix $kernel_ver -[ ! "$kernel_mirrors" ] && kernel_mirrors="https://www.kernel.org/pub/linux/kernel" -ksubdir_3=v3.x #http://www.kernel.org/pub/linux/kernel/v3.x -ksubdir_4=v4.x -ksubdir_5=v5.x -ksubdir_6=v6.x -#-- random kernel mirror first -rn=$(( ( RANDOM % $(echo "$kernel_mirrors" | wc -l) ) + 1 )) -x=0 -for i in $kernel_mirrors ; do - x=$((x+1)) - [ $x -eq $rn ] && first="$i" && continue - km="$km $i" -done -kernel_mirrors="$first $km" -#-- - -if [ -f DOTconfig ] ; then - echo ; tail -n10 README ; echo - BUILTINS="CONFIG_NLS_CODEPAGE_850=y" - vercmp ${kernel_version} ge 3.18 && BUILTINS="$BUILTINS CONFIG_OVERLAY_FS=y" - for i in $BUILTINS - do - grep -q "$i" DOTconfig && { echo "$i is ok" ; continue ; } - echo -e "\033[1;31m""\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n""\033[0m" - if [ "$i" = "CONFIG_OVERLAY_FS=y" ] ; then - log_msg "For your kernel to boot overlay as a built in is required:" - fs_msg="File systems -> Overlay filesystem support" - else - log_msg "For NLS to work at boot some configs are required:" - fs_msg="NLS Support" - fi - echo "$i" - echo "$i"|grep -q "CONFIG_NLS_CODEPAGE_850=y" && echo "CONFIG_NLS_CODEPAGE_852=y" - log_msg "Make sure you enable this when you are given the opportunity after - the kernel has downloaded and been patched. - Look under ' $fs_msg' - " - [ -n "$GITHUB_ACTIONS" ] && exit 1 - [ "$AUTO" != "yes" ] && echo -n "PRESS ENTER" && read zzz - done -fi - -## fail-safe switch in case someone clicks the script in ROX (real story! not fun at all!!!!) :p -echo -[ "$AUTO" != "yes" ] && read -p "Press ENTER to begin" dummy - -#------------------------------------------------------------------ - -## version info -IFS=. read -r kernel_series kernel_major_version kernel_minor_version <<< "${kernel_version}" - -kernel_branch=${kernel_major_version} #3.x 4.x kernels -kernel_major_version=${kernel_series}.${kernel_major_version} #crazy!! 3.14 2.6 etc -if [ "$kernel_minor_version" ] ; then - kmv=.${kernel_minor_version} - kernel_tarball_version=${kernel_version} -else - #single numbered kernel - kmv=".0" - kernel_version=${kernel_major_version}${kmv} - kernel_tarball_version=${kernel_major_version} - FIX_KERNEL_VER=yes -fi -[ "$kernel_minor_revision" ] && kmr=.${kernel_minor_revision} - -log_msg "Linux: ${kernel_major_version}${kmv}${kmr}" #${kernel_series}. - -# =============================== - -package_version=${kernel_version} - -# =============================== -#kernel mirror -case $kernel_series in - 3) ksubdir=${ksubdir_3} ;; - 4) ksubdir=${ksubdir_4} ;; - 5) ksubdir=${ksubdir_5} ;; - 6) ksubdir=${ksubdir_6} ;; -esac - -## create directories for the results -rm -rf output/patches-${kernel_version}-${HOST_ARCH} -[ ! -d sources/kernels ] && mkdir -p sources/kernels -[ ! -d output/patches-${kernel_version}-${HOST_ARCH} ] && mkdir -p output/patches-${kernel_version}-${HOST_ARCH} -[ ! -d output ] && mkdir -p output - -## get today's date -today=`date +%d%m%y` - -#============================================================== -# download kernel -#============================================================== - -## download the kernel -testing= -echo ${kernel_version##*-} | grep -q "rc" && testing=/testing - -DOWNLOAD_KERNEL=1 -if [ -f sources/kernels/linux-${kernel_tarball_version}.tar.xz ] ; then - DOWNLOAD_KERNEL=0 -fi -if [ -f sources/kernels/linux-${kernel_tarball_version}.tar.xz.md5.txt ] ; then - cd sources/kernels - md5sum -c linux-${kernel_tarball_version}.tar.xz.md5.txt - if [ $? -ne 0 ] ; then - log_msg "md5sum FAILED: will resume kernel download..." - DOWNLOAD_KERNEL=1 - fi - cd $MWD -else - DOWNLOAD_KERNEL=1 -fi - -if [ $DOWNLOAD_KERNEL -eq 1 ] ; then - KERROR=1 - for kernel_mirror in $kernel_mirrors ; do - kernel_mirror=${kernel_mirror}/${ksubdir} - log_msg "Downloading: ${kernel_mirror}${testing}/linux-${kernel_tarball_version}.tar.xz" - wget ${WGET_OPT} -c -P sources/kernels ${kernel_mirror}${testing}/linux-${kernel_tarball_version}.tar.xz >> ${BUILD_LOG} - if [ $? -ne 0 ] ; then - echo "Error" - else - KERROR= - break - fi - done - [ $KERROR ] && exit 1 - cd sources/kernels - md5sum linux-${kernel_tarball_version}.tar.xz > linux-${kernel_tarball_version}.tar.xz.md5.txt - sha256sum linux-${kernel_tarball_version}.tar.xz > linux-${kernel_tarball_version}.tar.xz.sha256.txt - cd $MWD -fi - -#============================================================== -# compile the kernel -#============================================================== +JOBS="-j$(nproc)" ## extract the kernel -log_msg "Extracting the kernel sources" -tar -xf sources/kernels/linux-${kernel_tarball_version}.tar.xz >> ${BUILD_LOG} 2>&1 -if [ $? -ne 0 ] ; then - rm -f sources/kernels/linux-${kernel_tarball_version}.tar.xz - exit_error "ERROR extracting kernel sources. file was deleted..." -fi - -if [ "$FIX_KERNEL_VER" = "yes" ] ; then - rm -rf linux-${kernel_version} - mv -f linux-${kernel_tarball_version} linux-${kernel_version} -fi - -#------------------------- -cd linux-${kernel_version} -#------------------------- - -cp Makefile Makefile-orig -diff -up Makefile-orig Makefile || diff -up Makefile-orig Makefile > ../output/patches-${kernel_version}-${HOST_ARCH}/version.patch -rm Makefile-orig +echo "Extracting the kernel sources" +tar -xf /usr/src/linux-source-*.tar.xz || exit 1 -log_msg "Reducing the number of consoles and verbosity level" -for i in include/linux/printk.h kernel/printk/printk.c kernel/printk.c -do - [ ! -f "$i" ] && continue - z=$(echo "$i" | sed 's|/|_|g') - cp ${i} ${i}.orig - sed -i 's|#define CONSOLE_LOGLEVEL_DEFAULT .*|#define CONSOLE_LOGLEVEL_DEFAULT 3|' $i - sed -i 's|#define DEFAULT_CONSOLE_LOGLEVEL .*|#define DEFAULT_CONSOLE_LOGLEVEL 3|' $i - sed -i 's|#define MAX_CMDLINECONSOLES .*|#define MAX_CMDLINECONSOLES 5|' $i - diff -q ${i}.orig ${i} >/dev/null 2>&1 || diff -up ${i}.orig ${i} > ../output/patches-${kernel_version}-${HOST_ARCH}/${z}.patch -done +cd linux-source-* -for patch in ../patches/*.patch ../patches/${kernel_major_version}/*.patch ; do - [ ! -f "$patch" ] && continue #../patches/ might not exist or it may be empty - vercmp ${kernel_version} ge 4.14 && [ "$(basename "$patch")" = "commoncap-symbol.patch" ] && continue - log_msg "Applying $patch" - patch -p1 < $patch >> ${BUILD_LOG} 2>&1 - [ $? -ne 0 ] && exit_error "Error: failed to apply $patch on the kernel sources." - cp $patch ../output/patches-${kernel_version}-${HOST_ARCH} -done - -log_msg "Cleaning the kernel sources" +echo "Cleaning the kernel sources" make clean make mrproper find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \) -delete -if [ -f ../DOTconfig ] ; then - cp ../DOTconfig .config - sed -i '/^kernel_version/d' .config -fi - -[ -f .config -a ! -f ../DOTconfig ] && cp .config ../DOTconfig - -##################### -# pause to configure -function do_kernel_config() { - log_msg "make $1" - make $1 ## - if [ $? -eq 0 ] ; then - if [ -f .config -a "$AUTO" != "yes" ] ; then - log_msg "\nOk, kernel is configured. hit ENTER to continue, CTRL+C to quit" - read goon - fi - else - exit 1 - fi -} - -if [ "$AUTO" = "yes" ] ; then - log_msg "make olddefconfig" - make olddefconfig - if [ "$?" != "0" ] ; then - do_kernel_config oldconfig - fi -else - if [ -f .config ] ; then - echo -en " -You now should configure your kernel. The supplied .config -should be already configured but you may want to make changes, plus -the date should be updated." - else - echo -en "\nYou must now configure the kernel" - fi +./scripts/kconfig/merge_config.sh /boot/config-* ../debian-diffconfigs/${DISTRO_COMPAT_VERSION} - echo -en " -Hit a number or s to skip: -1. make menuconfig [default] (ncurses based) -2. make gconfig (gtk based gui) -3. make xconfig (qt based gui) -4. make oldconfig -s. skip - -Enter option: " ; read kernelconfig - case $kernelconfig in - 1) do_kernel_config menuconfig ;; - 2) do_kernel_config gconfig ;; - 3) do_kernel_config xconfig ;; - 4) do_kernel_config oldconfig ;; - s) - log_msg "skipping configuration of kernel" - echo "hit ENTER to continue, CTRL+C to quit" - read goon - ;; - *) do_kernel_config menuconfig ;; - esac +make olddefconfig +if [ $? -ne 0 ] ; then + make oldconfig || exit 1 fi -[ ! -f .config ] && exit_error "\nNo config file, exiting..." - -#------------------------------------------------------------------ +kernel_version="`grep -Em1 '^# Linux/.+ [0-9]+\.[0-9]+\.[0-9]+ Kernel Configuration$' .config | awk '{print $3}'`" ## we need the arch of the system being built if grep -q 'CONFIG_X86_64=y' .config ; then - arch=x86_64 karch=x86 elif grep -q 'CONFIG_X86_32=y' .config ; then karch=x86 - if grep -q 'CONFIG_X86_32_SMP=y' .config ; then - arch=i686 - else - arch=i486 #gross assumption - fi -elif grep -q 'CONFIG_ARM=y' .config ; then - arch=arm - karch=arm else - log_msg "Your arch is unsupported." - arch=unknown #allow build anyway - karch=arm + echo "Your arch is unsupported." + exit 1 fi -#..................................................................... -linux_kernel_dir=linux_kernel-${kernel_version}-${package_name_suffix} -export linux_kernel_dir -#..................................................................... - -## kernel headers -kheaders_dir="kernel_headers-${kernel_version}-${package_name_suffix}-$arch" -rm -rf ../output/${kheaders_dir} -log_msg "Creating the kernel headers package" -make headers_check >> ${BUILD_LOG} 2>&1 -make INSTALL_HDR_PATH=${kheaders_dir}/usr headers_install >> ${BUILD_LOG} 2>&1 -find ${kheaders_dir}/usr/include \( -name .install -o -name ..install.cmd \) -delete -mv ${kheaders_dir} ../output - -#------------------------------------------------------ - -echo "make ${JOBS} bzImage modules -make INSTALL_MOD_PATH=${linux_kernel_dir}/usr INSTALL_MOD_STRIP=1 modules_install" > compile ## debug - -log_msg "Compiling the kernel" -make ${JOBS} bzImage modules >> ${BUILD_LOG} 2>&1 -KCONFIG="output/DOTconfig-${kernel_version}-${HOST_ARCH}-${today}" -cp .config ../${KCONFIG} - -if [ "$karch" = "x86" ] ; then - if [ ! -f arch/x86/boot/bzImage -o ! -f System.map ] ; then - exit_error "Error: failed to compile the kernel sources." - fi -else - if [ ! -f arch/arm/boot/zImage ] ; then #needs work - exit_error "Error: failed to compile the kernel sources." - fi -fi +echo "Compiling the kernel" +make ${JOBS} bzImage modules || exit 1 #--------------------------------------------------------------------- -log_msg "Creating the kernel package" -make INSTALL_MOD_PATH=${linux_kernel_dir}/usr INSTALL_MOD_STRIP=1 modules_install >> ${BUILD_LOG} 2>&1 -rm -f ${linux_kernel_dir}/usr/lib/modules/${kernel_version}/{build,source} -mkdir -p ${linux_kernel_dir}/boot -mkdir -p ${linux_kernel_dir}/etc/modules -## /boot/config-$(uname -m) ## http://www.h-online.com/open/features/Good-and-quick-kernel-configuration-creation-1403046.html -cp .config ${linux_kernel_dir}/boot/config-${kernel_version} -## /boot/Sytem.map-$(uname -r) ## https://en.wikipedia.org/wiki/System.map -cp System.map ${linux_kernel_dir}/boot/System.map-${kernel_version} -## /etc/moodules/.. -cp .config ${linux_kernel_dir}/etc/modules/DOTconfig-${kernel_version}-${today} -for i in `find ${linux_kernel_dir}/usr/lib/modules -type f -name "modules.*"| grep -E 'order$|builtin$'`;do - cp $i ${linux_kernel_dir}/etc/modules/${i##*/}-${kernel_version} - log_msg "copied ${i##*/} to ${linux_kernel_dir}/etc/modules/${i##*/}-${kernel_version}" -done - -#cp arch/x86/boot/bzImage ${linux_kernel_dir}/boot/vmlinuz -IMAGE=`find . -type f -name bzImage | head -1` -if [ "$IMAGE" = "" ]; then - #or cp arch/arm/boot/zImage ${linux_kernel_dir}/boot/vmlinuz - IMAGE=`find . -type f -name zImage | head -1` -fi -cp ${IMAGE} ${linux_kernel_dir}/boot -cp ${IMAGE} ${linux_kernel_dir}/boot/vmlinuz - -if [ "$karch" = "arm" ]; then - BOOT_DIR="boot-${kernel_version}" - mkdir -p ../output/${BOOT_DIR}/ - cp arch/arm/boot/dts/*.dtb ../output/${BOOT_DIR}/ - mkdir -p ../output/${BOOT_DIR}/overlays/ - cp arch/arm/boot/dts/overlays/*.dtb* ../output/${BOOT_DIR}/overlays/ - cp arch/arm/boot/dts/overlays/README ../output/${BOOT_DIR}/overlays/ -else - BOOT_DIR="" -fi - -mv ${linux_kernel_dir} ../output ## ../output/${linux_kernel_dir} - -## make fatdog kernel module package -OUTPUT_VERSION="${package_version}-${package_name_suffix}" -mv ../output/${linux_kernel_dir}/boot/vmlinuz \ - ../output/vmlinuz-${OUTPUT_VERSION} -[ -f ../output/${linux_kernel_dir}/boot/bzImage ] && \ - rm -f ../output/${linux_kernel_dir}/boot/bzImage -[ -f ../output/${linux_kernel_dir}/boot/zImage ] && \ - rm -f ../output/${linux_kernel_dir}/boot/zImage -log_msg "${linux_kernel_dir} is ready in output" +echo "Creating the kernel package" +make INSTALL_MOD_PATH=`pwd`/../output/linux_kernel-${kernel_version}/usr INSTALL_MOD_STRIP=1 modules_install +cp -f arch/x86/boot/bzImage ../output/vmlinuz-${kernel_version} +rm -f ../output/linux_kernel-${kernel_version}/usr/lib/modules/${kernel_version}/{build,source} +mkdir -p ../output/linux_kernel-${kernel_version}/boot +cp -f .config ../output/linux_kernel-${kernel_version}/boot/config-${kernel_version} +cp -f System.map ../output/linux_kernel-${kernel_version}/boot/System.map-${kernel_version} -log_msg "Cleaning the kernel sources" -make clean >> ${BUILD_LOG} 2>&1 -make prepare >> ${BUILD_LOG} 2>&1 +echo "Cleaning the kernel sources" +make clean +make prepare -#---- cd .. -#---- - -KERNEL_SOURCES_DIR="kernel_sources-${package_version}-${package_name_suffix}" -KBUILD_DIR="kbuild-${package_version}" -if [ "$CREATE_SOURCES_SFS" != "no" ]; then - log_msg "Creating a kernel sources SFS" - mkdir -p ${KERNEL_SOURCES_DIR}/usr/src - mv linux-${kernel_version} ${KERNEL_SOURCES_DIR}/usr/src/linux - KERNEL_MODULES_DIR=${KERNEL_SOURCES_DIR}/usr/lib/modules/${kernel_version} - mkdir -p ${KERNEL_MODULES_DIR} - ln -s ../../../src/linux ${KERNEL_MODULES_DIR}/build - ln -s ../../../src/linux ${KERNEL_MODULES_DIR}/source - if [ ! -f ${KERNEL_SOURCES_DIR}/usr/src/linux/include/linux/version.h ] ; then - ln -s /usr/src/linux/include/generated/uapi/linux/version.h \ - ${KERNEL_SOURCES_DIR}/usr/src/linux/include/linux/version.h - fi - rm -rf ${KERNEL_SOURCES_DIR}/usr/src/linux/.git* # don't need git history - mksquashfs ${KERNEL_SOURCES_DIR} output/${KERNEL_SOURCES_DIR}.sfs $COMP - md5sum output/${KERNEL_SOURCES_DIR}.sfs > output/${KERNEL_SOURCES_DIR}.sfs.md5.txt - sha256sum output/${KERNEL_SOURCES_DIR}.sfs > output/${KERNEL_SOURCES_DIR}.sfs.sha256.txt - - if [ "$CREATE_KBUILD_SFS" = "yes" ]; then - mkdir -p ${KBUILD_DIR}/usr/src/${KBUILD_DIR} - ./kbuild.sh ${KERNEL_SOURCES_DIR}/usr/src/linux ${KBUILD_DIR}/usr/src/${KBUILD_DIR} ${karch} || exit 1 - mkdir -p ${KBUILD_DIR}/usr/lib/modules/${kernel_version} - ln -s ../../../src/${KBUILD_DIR} ${KBUILD_DIR}/usr/lib/modules/${kernel_version}/build - ln -s ../../../src/${KBUILD_DIR} ${KBUILD_DIR}/usr/lib/modules/${kernel_version}/source - [ -n "$GITHUB_ACTIONS" ] && rm -rf ${KERNEL_SOURCES_DIR} - mksquashfs ${KBUILD_DIR} output/${KBUILD_DIR}.sfs $COMP - md5sum output/${KBUILD_DIR}.sfs > output/${KBUILD_DIR}.sfs.md5.txt - sha256sum output/${KBUILD_DIR}.sfs > output/${KBUILD_DIR}.sfs.sha256.txt - elif [ -n "$GITHUB_ACTIONS" ]; then - rm -rf ${KERNEL_SOURCES_DIR} - fi -fi - -#============================================================== - - -KERNEL_MODULES_SFS_NAME="kernel-modules-${package_version}-${package_name_suffix}.sfs" - -# copy in build.conf -cp build.conf output/${linux_kernel_dir}/etc/modules/build.conf-${kernel_version}-${today} - -mksquashfs output/${linux_kernel_dir} output/${KERNEL_MODULES_SFS_NAME} $COMP -[ $? = 0 ] || exit 1 -[ -n "$GITHUB_ACTIONS" ] && rm -rf output/${linux_kernel_dir} - -cd output/ -log_msg "Huge compatible kernel packages are ready to package." -log_msg "Packaging huge-${OUTPUT_VERSION} kernel" -tar -cjvf huge-${OUTPUT_VERSION}.tar.bz2 \ - vmlinuz-${OUTPUT_VERSION} \ - ${KERNEL_MODULES_SFS_NAME} || exit 1 -[ -n "$GITHUB_ACTIONS" ] && rm -f vmlinuz-${OUTPUT_VERSION} ${KERNEL_MODULES_SFS_NAME} -echo "huge-${OUTPUT_VERSION}.tar.bz2 is in output" -md5sum huge-${OUTPUT_VERSION}.tar.bz2 > huge-${OUTPUT_VERSION}.tar.bz2.md5.txt -sha256sum huge-${OUTPUT_VERSION}.tar.bz2 > huge-${OUTPUT_VERSION}.tar.bz2.sha256.txt -echo -cd - - -log_msg "Compressing the log" -bzip2 -9 build.log -cp build.log.bz2 output -log_msg "------------------ -Output files: -- output/huge-${OUTPUT_VERSION}.tar.bz2 - (kernel tarball: vmlinuz, modules.sfs - used in the woof process) - you can use this to replace vmlinuz and zdrv.sfs from the current wce puppy install.. +KBUILD_DIR="kbuild-${kernel_version}" +mkdir -p ${KBUILD_DIR}/usr/src/${KBUILD_DIR} +./kbuild.sh linux-source-* ${KBUILD_DIR}/usr/src/${KBUILD_DIR} ${karch} || exit 1 +mkdir -p ${KBUILD_DIR}/usr/lib/modules/${kernel_version} +ln -s ../../../src/${KBUILD_DIR} ${KBUILD_DIR}/usr/lib/modules/${kernel_version}/build +ln -s ../../../src/${KBUILD_DIR} ${KBUILD_DIR}/usr/lib/modules/${kernel_version}/source +mksquashfs ${KBUILD_DIR} output/${KBUILD_DIR}.sfs ${SFSCOMP} || exit 1 +rm -rf ${KBUILD_DIR} -- output/${KERNEL_SOURCES_DIR}.sfs - (you can use this to compile new kernel modules - load or install first..) -------------------" +KERNEL_MODULES_SFS_NAME="kernel-modules-${kernel_version}.sfs" +mksquashfs output/linux_kernel-${kernel_version} output/${KERNEL_MODULES_SFS_NAME} ${SFSCOMP} || exit 1 +rm -rf output/linux_kernel-${kernel_version} echo "Done!" -[ -n "$GITHUB_ACTIONS" -o ! -f /usr/share/sounds/2barks.au ] || aplay /usr/share/sounds/2barks.au ### END ### diff --git a/kernel-kit/debian-diffconfigs/bookworm b/kernel-kit/debian-diffconfigs/bookworm index 4ac288c4ea2..01f67eebcf2 100644 --- a/kernel-kit/debian-diffconfigs/bookworm +++ b/kernel-kit/debian-diffconfigs/bookworm @@ -35,6 +35,8 @@ CONFIG_MMC_SDHCI_ACPI=y CONFIG_MMC_SDHCI_PCI=y CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_WBSD=y +CONFIG_MODULE_COMPRESS_NONE=y +# CONFIG_MODULE_COMPRESS_XZ is not set CONFIG_MSDOS_FS=y CONFIG_NLS_ASCII=y CONFIG_NLS_CODEPAGE_437=y diff --git a/woof-code/1download b/woof-code/1download index 26cdd767641..58418a764aa 100755 --- a/woof-code/1download +++ b/woof-code/1download @@ -25,9 +25,9 @@ esac mkdir -p sandbox3 cd sandbox3 -CACHE_DIR=`pwd`/../../local-repositories/debootstrap/${DISTRO_TARGETARCH} +CACHE_DIR=`pwd`/../local-repositories mkdir -p "$CACHE_DIR" -TARBALL="${CACHE_DIR}/debootstrap-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}-usrmerge.tar.gz" +TARBALL="${CACHE_DIR}/debootstrap.tar.gz" rm -rf rootfs @@ -39,7 +39,7 @@ debootstrap --arch=$ARCH --variant=minbase --unpack-tarball=${TARBALL} ${DISTRO_ rm -f rootfs/etc/resolv.conf cat /etc/resolv.conf > rootfs/etc/resolv.conf -[ ! -e ${CACHE_DIR}/archives-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}.tar.gz ] || tar -C rootfs -xzf ${CACHE_DIR}/archives-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}.tar.gz +[ ! -d ${CACHE_DIR}/archives ] || cp -r ${CACHE_DIR}/archives/* rootfs/var/cache/apt/archives/ # configure the package manager case "$DISTRO_BINARY_COMPAT" in @@ -117,7 +117,7 @@ PKGS=`echo "$PKGS_SPECS_TABLE" | grep ^yes | grep -F "exe>dev" | cut -f 3 -d \| chroot devx apt-get install -y $PKGS # create an archive of downloaded packages -tar -C devx -c var/cache/apt/archives | gzip -1 > ${CACHE_DIR}/archives-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}.tar.gz +cp -r devx/var/cache/apt/archives ${CACHE_DIR}/ # remove any unneeded packages chroot rootfs apt-get autoremove -y --purge diff --git a/woof-code/2buildkernel b/woof-code/2buildkernel new file mode 100755 index 00000000000..d632d4ca8ab --- /dev/null +++ b/woof-code/2buildkernel @@ -0,0 +1,16 @@ +#!/bin/bash + +. ./_00func +clearenv + +mkdir -p sandbox3/rootfs-kernel sandbox3/rootfs-kernel-work sandbox3/rootfs-kernel-upper +mount -t overlay -o upperdir=sandbox3/rootfs-kernel-upper,lowerdir=sandbox3/devx,workdir=sandbox3/rootfs-kernel-work rootfs-kernel sandbox3/rootfs-kernel || exit 1 + +mkdir sandbox3/rootfs-kernel/woof-out +mount --bind . sandbox3/rootfs-kernel/woof-out + +chroot sandbox3/rootfs-kernel sh -c 'cd /woof-out/kernel-kit && ./build.sh' +RET=$? +umount -l sandbox3/rootfs-kernel/woof-out +umount -l sandbox3/rootfs-kernel +exit $RET diff --git a/woof-code/3builddistro b/woof-code/3builddistro index ddcfd7f64c1..ca4c6c2a3cd 100755 --- a/woof-code/3builddistro +++ b/woof-code/3builddistro @@ -223,13 +223,9 @@ cd ../initrd-progs cp -f ../sandbox3/rootfs-complete/etc/DISTRO_SPECS . ./build.sh || exit 1 -cd ../kernel-kit/output -tar -xjf huge-*-kernel-kit.tar.bz2 -cd ../../sandbox3 - -cp -f ../kernel-kit/output/vmlinuz-*-kernel-kit build/vmlinuz +cp -f ../kernel-kit/output/vmlinuz-* build/vmlinuz cp -f ../kernel-kit/output/kbuild-*.sfs build/ -cp -f ../kernel-kit/output/kernel-modules-*-kernel-kit.sfs build/${ZDRVSFS} +cp -f ../kernel-kit/output/kernel-modules-*.sfs build/${ZDRVSFS} mv -f ../initrd-progs/initrd.zst build/ diff --git a/woof-code/rootfs-skeleton/usr/share/doc/puppy/woof-CE.md b/woof-code/rootfs-skeleton/usr/share/doc/puppy/woof-CE.md index 7d2dc6da538..19cbd012262 100644 --- a/woof-code/rootfs-skeleton/usr/share/doc/puppy/woof-CE.md +++ b/woof-code/rootfs-skeleton/usr/share/doc/puppy/woof-CE.md @@ -43,7 +43,7 @@ The goal is to build something similar to [DebianDog](https://debiandog.github.i * The init script (/etc/rc.d/rc.sysinit) is shorter and much faster. * Caching of SFSs in RAM (`pfix=ram|copy` or automatic) happens in the background while the boot process continues. -* Most of 0setup, 1download, 2createpackages and 3builddistro is reimplemented using [debootstrap](https://wiki.debian.org/Debootstrap). Build times are much shorter than upstream's. +* 0setup, 1download, 2createpackages and 3builddistro are reimplemented using [debootstrap](https://wiki.debian.org/Debootstrap) and chroot environments. Build times are much shorter than upstream's and woof-CE itself is more portable. ### Security @@ -60,7 +60,7 @@ The goal is to build something similar to [DebianDog](https://debiandog.github.i * Only [overlay](https://docs.kernel.org/filesystems/overlayfs.html) is supported: support for aufs is gone. * PPM is gone: packages in the build come from the upstream distro, rootfs-packages or rootfs-petbuilds (built from source). * Most old tools that use [gtkdialog](https://github.com/puppylinux-woof-CE/gtkdialog) are ported to [yad](https://github.com/step-/yad). -* Support for kernel package types other than the "huge" one is gone. +* kernel-kit builds the [Debian](https://www.debian.org/) kernel source and support for other types of kernels is gone. * kernel-kit's firmware picker is gone: fdrv is built by moving /usr/lib/firmware out of the main SFS. * ISO images are gone: the woof-CE build output is a bootable flash drive image and `isoboot` is gone. * ntfs-3g is replaced with [ntfs3](https://www.kernel.org/doc/html/next/filesystems/ntfs3.html). @@ -72,7 +72,7 @@ The goal is to build something similar to [DebianDog](https://debiandog.github.i * initrd-progs/ contains the initramfs skeleton * initrd-progs/0initrd/init is the early init script, which searches for Puppy files, sets up an overlay file system and `switch_root`s into it -* kernel-kit/ contains a tool that builds Puppy-compatible kernels +* kernel-kit/ contains a tool that builds Puppy-compatible kernels from the [Debian](https://www.debian.org/) kernel * woof-distro/ contains configuration files * woof-distro/x86_64/debian/trixie64 builds a [Debian](https://www.debian.org/) 13 based Puppy, featuring [dwl](https://github.com/djpohly/dwl) with the [snail layout](https://github.com/djpohly/dwl/wiki/snail) and [yambar](https://codeberg.org/dnkl/yambar), or [labwc](https://labwc.github.io/) with [sfwbar](https://github.com/LBCrion/sfwbar) * woof-distro/x86_64/debian/trixie64/DISTRO_SPECS contains the distro name and version @@ -95,11 +95,12 @@ The goal is to build something similar to [DebianDog](https://debiandog.github.i * woof-code/1download builds: * sandbox3/rootfs, a basic root file system template * sandbox3/devx, a copy of rootfs with development packages on top + * woof-code/2buildkernel builds the kernel * woof-code/3builddistro builds the packages specified in `$PETBUILDS` inside sandbox3/devx, then adds them and packages under rootfs-packages/ to sandbox3/rootfs, then builds bootable distro images ## Usage - sudo apt-get install -y --no-install-recommends dc debootstrap librsvg2-bin zstd xml2 syslinux-utils extlinux + sudo apt-get install -y --no-install-recommends debootstrap Then: @@ -114,4 +115,5 @@ Then: ./merge2out woof-distro/x86_64/debian/trixie64 cd ../woof-out_* ./1download + ./2buildkernel ./3builddistro diff --git a/woof-distro/x86_64/debian/trixie64/DISTRO_PKGS_SPECS-debian-trixie b/woof-distro/x86_64/debian/trixie64/DISTRO_PKGS_SPECS-debian-trixie index 7ef9e68a798..47b66654b0c 100644 --- a/woof-distro/x86_64/debian/trixie64/DISTRO_PKGS_SPECS-debian-trixie +++ b/woof-distro/x86_64/debian/trixie64/DISTRO_PKGS_SPECS-debian-trixie @@ -30,10 +30,10 @@ FALLBACKS_COMPAT_VERSIONS='' PKGS_SPECS_TABLE=' yes|acl|libacl1|exe,dev,doc,nls||deps:yes yes|adduser|adduser|exe,dev,doc,nls -yes|alsa-lib|libasound2,libasound2-data,libasound2-dev,alsa-topology-conf,alsa-ucm-conf|exe,dev,doc,nls||deps:yes +yes|alsa-lib|libasound2t64,libasound2-data,libasound2-dev,alsa-topology-conf,alsa-ucm-conf|exe,dev,doc,nls||deps:yes yes|alsa-utils|alsa-utils|exe,dev,doc,nls||deps:yes -yes|atk|libatk1.0-0,libatk1.0-dev|exe,dev,doc,nls||deps:yes -yes|at-spi2-atk|libatspi2.0-0,libatk-bridge2.0-0,libatk-bridge2.0-dev,libatspi2.0-dev|exe,dev,doc,nls||deps:yes #needed by gtk+3. +yes|atk|libatk1.0-0t64,libatk1.0-dev|exe,dev,doc,nls||deps:yes +yes|at-spi2-atk|libatspi2.0-0t64,libatk-bridge2.0-0t64,libatk-bridge2.0-dev,libatspi2.0-dev|exe,dev,doc,nls||deps:yes #needed by gtk+3. yes|base-files|base-files|exe>null,dev>null,doc>null,nls>null yes|bash|bash|exe,dev,doc,nls||deps:yes yes|bash-completion|bash-completion|exe,dev>null,doc,nls||deps:yes @@ -54,7 +54,7 @@ yes|cpio|cpio|exe,dev>null,doc,nls||deps:yes yes|crda|wireless-regdb|exe,dev,doc,nls||deps:yes yes|cryptsetup|cryptsetup-bin|exe,dev,doc,nls||deps:yes yes|cups|cups,cups-bsd,printer-driver-cups-pdf,foomatic-db-compressed-ppds,libcups2-dev|exe,dev,doc,nls||deps:yes -yes|curl|curl,libcurl4,libcurl4-gnutls-dev|exe,dev,doc,nls||deps:yes +yes|curl|curl,libcurl4t64,libcurl4-gnutls-dev|exe,dev,doc,nls||deps:yes yes|dash|dash|exe,dev,doc,nls||deps:yes yes|dbus|dbus,libdbus-1-dev|exe,dev,doc,nls||deps:yes yes|dbus-x11|dbus-x11|exe,dev,doc,nls||deps:yes @@ -92,7 +92,7 @@ yes|gdmap|gdmap|exe,dev,doc,nls||deps:yes yes|gdk-pixbuf|libgdk-pixbuf-2.0-0,libgdk-pixbuf2.0-common,libgdk-pixbuf-2.0-dev,libgdk-pixbuf2.0-0,libgdk-pixbuf2.0-dev,libgdk-pixbuf-xlib-2.0-0,libgdk-pixbuf-xlib-2.0-dev|exe,dev,doc,nls||deps:yes no|geany|geany|exe,dev,doc,nls||deps:yes yes|gettext-full|gettext,gettext-base|exe,dev>exe,doc,nls||deps:yes -yes|glib|libglib2.0-bin,libglib2.0-0,libglib2.0-data,libglib2.0-dev,libglib2.0-dev-bin|exe,dev,doc,nls||deps:yes +yes|glib|libglib2.0-bin,libglib2.0-0t64,libglib2.0-data,libglib2.0-dev,libglib2.0-dev-bin|exe,dev,doc,nls||deps:yes yes|glibc|libc-bin,libc6,libc6-dev,tzdata|exe,dev,doc,nls||deps:yes yes|glibc_locales|locales|exe,dev,doc,nls>exe||deps:yes yes|gnome-icon-theme|gnome-icon-theme|exe>null,dev>null,doc>null,nls>null @@ -104,7 +104,7 @@ yes|grep|grep|exe,dev>null,doc,nls||deps:yes yes|groff|groff,groff-base|exe,dev,doc,nls||deps:yes yes|gsettings-desktop-schemas|gsettings-desktop-schemas|exe,dev,doc,nls||deps:yes #needs d-conf. yes|gsimplecal|gsimplecal|exe,dev,doc,nls||deps:yes -yes|gtk+3|libgtk-3-0,libgtk-3-dev,libgtk-3-common,gtk-update-icon-cache,adwaita-icon-theme|exe,dev,doc,nls||deps:yes #have taken out all gtk3 apps. 140127 still have gnome-mplayer --no +yes|gtk+3|libgtk-3-0t64,libgtk-3-dev,libgtk-3-common,gtk-update-icon-cache,adwaita-icon-theme|exe,dev,doc,nls||deps:yes #have taken out all gtk3 apps. 140127 still have gnome-mplayer --no yes|gtkhash|gtkhash|exe,dev,doc,nls||deps:yes yes|gxmessage|gxmessage|exe,dev,doc,nls||deps:yes yes|hardinfo-deps|libjson-glib-dev|exe,dev,doc,nls||deps:yes @@ -148,7 +148,7 @@ yes|nscd|unscd|exe||deps:yes no|ntfs-3g|ntfs-3g|exe,dev,doc,nls||deps:yes yes|ntpdate|ntpdate|exe,dev>exe,doc,nls||deps:yes #used by psync to sync local time and date from the internet. yes|openssh-client|openssh-client|exe,dev,doc,nls||deps:yes -yes|openssl|openssl,libssl3,libssl-dev|exe,dev,doc,nls||deps:yes #libssl1.0.2 = older libssl +yes|openssl|openssl,libssl3t64,libssl-dev|exe,dev,doc,nls||deps:yes #libssl1.0.2 = older libssl yes|parted|parted|exe,dev,doc,nls||deps:yes yes|passwd|passwd|exe,dev,doc,nls||deps:yes yes|patch|patch|exe>dev,dev,doc>dev,nls>dev||deps:yes @@ -162,7 +162,7 @@ yes|psmisc|psmisc|exe,dev>null,doc,nls||deps:yes yes|putty|putty|exe,dev,doc,nls||deps:yes yes|python|python-is-python3,python3|exe,dev,doc,nls||deps:yes no|python3-pkg-resources|python3-pkg-resources|exe,dev,doc,nls||deps:yes # dependency of gdebi -yes|readline|libreadline8,libreadline-dev,readline-common|exe,dev,doc,nls||deps:yes +yes|readline|libreadline8t64,libreadline-dev,readline-common|exe,dev,doc,nls||deps:yes yes|rsync|rsync|exe,dev,doc,nls||deps:yes yes|sed|sed|exe,dev>null,doc,nls||deps:yes yes|sensible-utils|sensible-utils|exe,dev,doc,nls||deps:yes @@ -228,15 +228,18 @@ yes|bison|bison|exe>dev,dev,doc>dev,nls>dev||deps:yes yes|ccache|ccache|exe>dev,dev,doc>dev,nls>dev||deps:yes yes|cmake|cmake|exe>dev,dev,doc>dev,nls>dev||deps:yes # build-time dependency of xournalpp yes|docbook|docbook|exe>dev,dev,doc>dev,nls>dev||deps:yes +yes|dwarves|dwarves|exe>dev,dev,doc>dev,nls>dev||deps:yes # kernel-kit yes|flex|flex|exe>dev,dev,doc>dev,nls>dev||deps:yes yes|g++|g++|exe>dev,dev,doc>dev,nls>dev||deps:yes yes|git|git|exe>dev,dev,doc>dev,nls>dev||deps:yes yes|help2man|help2man|exe>dev,dev,doc>dev,nls>dev||deps:yes # build-time dependency of xournalpp yes|intltool|intltool|exe>dev,dev,doc>dev,nls>dev||deps:yes #previously only in devx, but need in main f.s. to run momanager without devx. yes|itstool|itstool|exe>dev,dev,doc>dev,nls>dev||deps:yes # build-time dependency of gnumeric +yes|libelf-dev|libelf-dev|exe>dev,dev,doc>dev,nls>dev||deps:yes # kernel-kit yes|libtool|libtool,libtool-bin|exe>dev,dev,doc>dev,nls>dev||deps:yes yes|libxml2-utils|libxml2-utils|exe>dev,dev,doc>dev,nls>dev||deps:yes # build-time dependency of gnumeric yes|linux-header|linux-libc-dev|exe>dev,dev,doc>dev,nls>dev||deps:yes +yes|linux-source|linux-source|exe>dev,dev,doc>dev,nls>dev||deps:yes # kernel-kit yes|m4|m4|exe>dev,dev,doc>dev,nls>dev||deps:yes yes|meson|meson|exe>dev,dev,doc>dev,nls>dev||deps:yes yes|ninja|ninja-build|exe>dev,dev,doc>dev,nls>dev||deps:yes @@ -272,6 +275,11 @@ if [ "$DISTRO_TARGETARCH" = "x86_64" ]; then PKGS_SPECS_TABLE="$PKGS_SPECS_TABLE yes|gnu-efi|gnu-efi|exe>dev,dev,doc>dev,nls>dev||deps:yes yes|shim-signed|shim-signed,grub-efi-amd64-signed|exe>dev,dev,doc>dev,nls>dev||deps:yes +yes|linux-image-amd64|linux-image-amd64|exe>dev,dev,doc>dev,nls>dev||deps:yes # kernel-kit +" +elif [ "$DISTRO_TARGETARCH" = "x86" ]; then + PKGS_SPECS_TABLE="$PKGS_SPECS_TABLE +yes|linux-image-686-pae|linux-image-686-pae|exe>dev,dev,doc>dev,nls>dev||deps:yes # kernel-kit " fi