diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2022-06-30 21:09:38 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2022-06-30 21:09:38 +0200 |
commit | 7ae74d3cc2d9e058ce9ea5f5be5b39e5b81e7f28 (patch) | |
tree | 2074ea4852943e6b19c7d13f7af57f94decf0877 /make-boot-image.sh | |
parent | aad35bab1636386a93799691a19875ed38d0d44e (diff) | |
download | eficast-7ae74d3cc2d9e058ce9ea5f5be5b39e5b81e7f28.tar.gz eficast-7ae74d3cc2d9e058ce9ea5f5be5b39e5b81e7f28.tar.bz2 eficast-7ae74d3cc2d9e058ce9ea5f5be5b39e5b81e7f28.zip |
Mise à jour pour debian 11, kernel 5.18, nécessite un bugfix de Kconfiglib
Diffstat (limited to 'make-boot-image.sh')
-rwxr-xr-x | make-boot-image.sh | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/make-boot-image.sh b/make-boot-image.sh index be002eb..eeda4f3 100755 --- a/make-boot-image.sh +++ b/make-boot-image.sh @@ -1,6 +1,6 @@ #!/bin/bash -xe PS4='+ ($LINENO) ' # To ease debugging -VERSION="1.2-emac-rc3" +VERSION="1.3-emac-rc0" # Config # ########## @@ -20,7 +20,8 @@ WGET="wget" # "wget --no-check-certificate" could help but is a security concer NFS_MOUNT_CMDLINE="mount -v -t nfs -o nolock eficast-nfs.mines-albi.fr:/masters /mnt/nfs" # You probably need to tweak version numbers in following URLs if you have an HTTP 404 - Not found error -KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.7.7.tar.xz +KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.18.4.tar.xz # needs Kconfiglib with "option module" => "module" support +#KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.7.7.tar.xz # ok on real hw with debian10, ok qemu with debian 11 #KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.2.9.tar.xz # ok in qemu, seems sane on real hardware #KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.20.17.tar.xz # ok in qemu, seems sane on real hardware #KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.18.140.tar.xz # ok in qemu @@ -34,9 +35,10 @@ KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.7.7.tar. # KConfigLib allows to create kernel .config in a programmatic manner, in a somewhat portable way # Main project URL is https://github.com/ulfalizer/Kconfiglib -KCONFIGLIB_MAIN_URL=https://raw.githubusercontent.com/ulfalizer/Kconfiglib/v14.1.0/kconfiglib.py +#KCONFIGLIB_MAIN_URL=https://raw.githubusercontent.com/ulfalizer/Kconfiglib/v14.1.0/kconfiglib.py +KCONFIGLIB_MAIN_URL=https://raw.githubusercontent.com/helmutg/Kconfiglib/bug-modules/kconfiglib.py # Provisoire, ulfalizer n'a pas mergé le patch nécessaire pour "option module" => "module" KCONFIGLIB_PATCH_URL=https://raw.githubusercontent.com/ulfalizer/Kconfiglib/master/makefile.patch -NIC_FIRMWARE_URL=http://fr.archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/nic-firmware_1.188_all.udeb +NIC_FIRMWARE_URL=http://fr.archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/nic-firmware_1.187_all.udeb BUSYBOX_BIN_URL=https://busybox.net/downloads/binaries/1.31.0-defconfig-multiarch-musl/busybox-x86_64 PCI_IDS_URL=https://pci-ids.ucw.cz/v2.2/pci.ids USB_IDS_URL=https://usb-ids.gowdy.us/usb.ids @@ -103,7 +105,7 @@ function mkchroot ################################# which lsb_release || $ROOTCMD apt install lsb-release codename=$(lsb_release -sc || true) -if [ "x$codename" != "xbuster" ] +if [ "x$codename" != "xbullseye" ] then cat >&2 <<EOT This script is tested only on GNU/Linux Debian 10 amd64 (aka Buster). The fastest way to have the right environment is : @@ -178,7 +180,6 @@ then fi cat >"$WORKDIR/kernel/scripts/Kconfiglib/customize.py" <<"EOT" -#!/usr/bin/env python import sys from kconfiglib import Kconfig, standard_config_filename, TRI_TO_STR, TRISTATE @@ -192,11 +193,11 @@ def sset(sym, value=None): print('%s is not modifiable at all for now'%sym.name) return True # Sanity check - if isinstance(value, (int, long)) and value not in sym.assignable: + if isinstance(value, int) and value not in sym.assignable: print('%s can\'t be set to %s for now'%(sym.name,TRI_TO_STR[value])) return True # Idempotency check - if isinstance(value, (int, long)): + if isinstance(value, int): old_value = sym.tri_value else: old_value = sym.str_value @@ -204,7 +205,7 @@ def sset(sym, value=None): # No more_work return False # Set value - if isinstance(value, (int, long)): + if isinstance(value, int): print('%s=%s [was: %s]'%(sym.name,TRI_TO_STR[value],TRI_TO_STR[old_value])) else: print('%s=%s [was: %s]'%(sym.name,value,old_value)) @@ -246,7 +247,7 @@ while more_work and i < passes: # Make kernel directly loadable by EFI, add USB3, Dell flash if sym.name in ['EFI_STUB', 'EARLY_PRINTK_EFI']: more_work = sset(sym) or more_work - if sym.name in ['EFI_VARS', 'DELL_RBU', 'USB_XHCI_HCD']: + if sym.name in ['EFI_VARS', 'USB_XHCI_HCD']: more_work = sset(sym, 1) or more_work # Support FUSE, NVMe, soft RAID (linux) and hard RAID (some cards) @@ -260,7 +261,7 @@ while more_work and i < passes: more_work = sset(sym) or more_work # Disable thing that are unneeded or annoying for the purpose of disk cloning - if sym.name in [ 'HAMRADIO', 'HIBERNATION', 'LOGO', 'NETFILTER', 'PCCARD', 'RFKILL', 'SECURITY', 'SOUND', 'SUSPEND', 'VIRTUALIZATION', 'WIRELESS', 'WLAN']: + if sym.name in [ 'HAMRADIO', 'HIBERNATION', 'NETFILTER', 'PCCARD', 'RFKILL', 'SECURITY', 'SOUND', 'SUSPEND', 'VIRTUALIZATION', 'WIRELESS', 'WLAN']: more_work = sset(sym, 0) or more_work # Following generic actions should done only on visible TRISTATE symbols @@ -322,7 +323,7 @@ then pushd "$WORKDIR/kernel" then extra="SCRIPT_ARG=--debug" else extra="" fi - make scriptconfig SCRIPT=scripts/Kconfiglib/customize.py $extra || ( mv .config .config-broken; exit 3 ) + make scriptconfig PYTHONCMD=python3 SCRIPT=scripts/Kconfiglib/customize.py $extra || ( mv .config .config-broken; exit 3 ) popd fi @@ -373,7 +374,7 @@ then ( mkchroot "$WORKDIR/initrd" tput setterm strace groff nroff troff grotty gtbl tmux bc pv figlet beep # Filesystem tools mkchroot "$WORKDIR/initrd" mkfs mke2fs /sbin/mkfs.ext* mkntfs mkfs.ntfs mkfs.fat mkexfatfs mkfs.exfat mkfs - mkchroot "$WORKDIR/initrd" ntfs-3g mount.ntfs mount.fuse mount.exfat-fuse mount.exfat + mkchroot "$WORKDIR/initrd" ntfs-3g mount.ntfs mount.fuse mount.exfat-fuse mkchroot "$WORKDIR/initrd" /sbin/ntfs* /bin/ntfs* # Network tools mkchroot "$WORKDIR/initrd" mii-tool ethtool @@ -382,7 +383,7 @@ then ( # Cloning tools mkchroot "$WORKDIR/initrd" /usr/sbin/partclone* efibootmgr pigz scp rsync # Some dyn-loaded libraries (ldd will not display them) - mkchroot "$WORKDIR/initrd" /lib/x86_64-linux-gnu/libusb-1.0.so.0 /lib/x86_64-linux-gnu/libusb-1.0.so.0.1.0 + mkchroot "$WORKDIR/initrd" /lib/x86_64-linux-gnu/libusb-1.0.so.* if [ "x$INCLUDE_TCPDUMP" == "xy" ] then # tcpdump costs few Mb with libcrypto |