diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2020-07-04 22:44:59 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2020-07-04 22:44:59 +0200 |
commit | 2f0e8730567070d66609633a4006b952eb13ab40 (patch) | |
tree | 21596692c1648971dd9149eb6c1adb1cc44d27bb | |
parent | 1bc46e08861431a67d11310209dd8470ed1bd176 (diff) | |
download | eficast-2f0e8730567070d66609633a4006b952eb13ab40.tar.gz eficast-2f0e8730567070d66609633a4006b952eb13ab40.tar.bz2 eficast-2f0e8730567070d66609633a4006b952eb13ab40.zip |
Add NVMe support, fix error checking and indent. bump to linux/5.7.7, busybox/1.31, Kconfiglib/v14.1.0
-rwxr-xr-x | make-boot-image.sh | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/make-boot-image.sh b/make-boot-image.sh index 8ad8b64..dd93f38 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-alpha1" +VERSION="1.2-emac-alpha2" # Config # ########## @@ -20,8 +20,9 @@ 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.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/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 #KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.12.74.tar.xz # reset loop in qemu # old kernels 2.6, 3.x before year 2017 don't cope with recent distro/gcc defaults options (-fPIE) @@ -30,13 +31,13 @@ KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.20.17.ta #KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.11.9.tar.xz # Kconfiglib v12.13.0 can't cope with it, and gcc probably too recent #KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.4.tar.xz + # 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/v12.13.0/kconfiglib.py +KCONFIGLIB_MAIN_URL=https://raw.githubusercontent.com/ulfalizer/Kconfiglib/v14.1.0/kconfiglib.py 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/linux-firmware_1.178.4_all.deb -#BUSYBOX_SRC_URL=https://busybox.net/downloads/busybox-1.30.1.tar.bz2 -BUSYBOX_BIN_URL=https://busybox.net/downloads/binaries/1.26.2-defconfig-multiarch/busybox-x86_64 +NIC_FIRMWARE_URL=http://fr.archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/nic-firmware_1.188_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 @@ -248,10 +249,14 @@ while more_work and i < passes: if sym.name in ['EFI_VARS', 'DELL_RBU', 'USB_XHCI_HCD']: more_work = sset(sym, 1) or more_work - # Support FUSE, soft RAID (linux) and hard RAID (some cards) + # Support FUSE, NVMe, soft RAID (linux) and hard RAID (some cards) if sym.name in ['FUSE_FS', 'DM_RAID', 'MEGARAID_SAS']: more_work = sset(sym, 1) or more_work - if sym.name in ['SCSI_LOWLEVEL', 'MEGARAID_NEWGEN']: + if sym.name in ['BLK_DEV_NVME', 'SCSI_LOWLEVEL', 'MEGARAID_NEWGEN']: + more_work = sset(sym) or more_work + + # If --debug passed as arg, make kernel aware of virtual drivers (used for testing eficast on qemu/kvm) + if debug and sym.name in ['VIRTIO_PCI', 'VIRTIO_MMIO', 'VIRTIO_NET', 'VIRTIO_BLK', 'SCSI_LOWLEVEL', 'SCSI_VIRTIO']: more_work = sset(sym) or more_work # Disable thing that are unneeded or annoying for the purpose of disk cloning @@ -293,12 +298,18 @@ while more_work and i < passes: sset(sym, 0) # Write .config even if some symbols are unset -print(kconf.write_config(standard_config_filename())) +msg = kconf.write_config(standard_config_filename()) +print(msg) + +res = 0 +if not isinstance(msg, str) or not msg.startswith('Configuration saved'): + res = 2 if i == passes: print('ERROR : can\'t set some of kernel config symbols after %i passes'%passes) - sys.exit(1) -sys.exit(0) + res = 1 +sys.exit(res) + EOT chmod +x "$WORKDIR/kernel/scripts/Kconfiglib/customize.py" @@ -380,13 +391,13 @@ then ( ) fi - # Some needed data files +# Some needed data files if [ ! -s "$WORKDIR/initrd/usr/share/figlet/standard.flf" ] then - cp -ra /lib/terminfo "$WORKDIR"/initrd/lib/ - mkdir -p "$WORKDIR"/initrd/usr/lib/locale "$WORKDIR"/initrd/usr/share/figlet - cp -ra /usr/lib/locale/C.UTF-8 "$WORKDIR"/initrd/usr/lib/locale/ - cp -a /usr/share/figlet/{mono12,standard}* "$WORKDIR"/initrd/usr/share/figlet/ + cp -ra /lib/terminfo "$WORKDIR"/initrd/lib/ + mkdir -p "$WORKDIR"/initrd/usr/lib/locale "$WORKDIR"/initrd/usr/share/figlet + cp -ra /usr/lib/locale/C.UTF-8 "$WORKDIR"/initrd/usr/lib/locale/ + cp -a /usr/share/figlet/{standard,mono12}* "$WORKDIR"/initrd/usr/share/figlet/ fi # Perf tool : skip copy and deps if compilation has failed or was skipped |