summaryrefslogtreecommitdiff
path: root/make-boot-image.sh
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2019-08-18 14:31:12 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2019-08-18 14:31:12 +0200
commita38a399f3b3958897326c9ccd590f825f504ea10 (patch)
treee4b1de1668601b2091d01b88e7ff16063366d8ad /make-boot-image.sh
parent509c0f4af9a16a79ee26aa5abdf060adec392ac3 (diff)
downloadeficast-a38a399f3b3958897326c9ccd590f825f504ea10.tar.gz
eficast-a38a399f3b3958897326c9ccd590f825f504ea10.tar.bz2
eficast-a38a399f3b3958897326c9ccd590f825f504ea10.zip
Sane defaults values
Diffstat (limited to 'make-boot-image.sh')
-rwxr-xr-xmake-boot-image.sh43
1 files changed, 22 insertions, 21 deletions
diff --git a/make-boot-image.sh b/make-boot-image.sh
index 23d048e..b3ec8df 100755
--- a/make-boot-image.sh
+++ b/make-boot-image.sh
@@ -10,24 +10,25 @@ DLDIR=./downloads
OUTDIR=./out
#OUTUSB=/dev/sdb # If enabled, it could wreck everything there !
LEGACY=n # make USB bootable key compatible with non UEFI-BIOS
-DEVEL_MODE=y # Adds debugging tools in the generated image
-INCLUDE_TCPDUMP=y # tcpdump costs few Mb with libcrypto
+DEVEL_MODE=n # Adds debugging tools in the generated image
+INCLUDE_TCPDUMP=y # tcpdump costs few Mb with libcrypto (but lspci depends on it also)
INCLUDE_PERF=n # perf costs few Mb with libpython2.7 and so
ROOTCMD=sudo
-WGET="wget" # "wget --no-check-certificate" could help but is a security concern
+WGET="wget" # "wget --no-check-certificate" could help but is a security concern
# Should be customized with your NFS server IP address or options
NFS_MOUNT_CMDLINE="mount -v -t nfs -o nolock 172.16.2.28:/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.2.9.tar.xz
-KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.20.17.tar.xz
-#KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.18.140.tar.xz
+#KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.2.9.tar.xz # no modules, kernel 5.x seems to not support /sbin/hotplug
+KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.20.17.tar.xz # ok in qemu
+#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
-#KERNEL_TARBALL_URL=https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.12.74.tar.xz
-# old kernels 2.6, 3.x until 2017 don't cope with recent distro/gcc defaults options (-fPIE)
+# old kernels 2.6, 3.x before year 2017 don't cope with recent distro/gcc defaults options (-fPIE)
# https://unix.stackexchange.com/questions/436071/compile-old-kernel-with-new-gcc
# https://lore.kernel.org/patchwork/patch/731680/
+#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 to 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
@@ -239,13 +240,13 @@ while more_work and i < passes:
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']:
- #more_work = sset(sym, 1) or more_work
- more_work = sset(sym) or more_work
+ more_work = sset(sym, 1) or more_work
+ #more_work = sset(sym) or more_work
# Support FUSE, 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
- more_work = sset(sym) or more_work
+ more_work = sset(sym, 1) or more_work
+ #more_work = sset(sym) or more_work
if sym.name in ['SCSI_LOWLEVEL', 'MEGARAID_NEWGEN']:
more_work = sset(sym) or more_work
@@ -258,14 +259,14 @@ while more_work and i < passes:
# Build all available net/ethernet drivers
if True in [ ('drivers/net/ethernet' in node.filename) for node in sym.nodes ]:
- #if sym.assignable and 1 in sym.assignable:
- # more_work = sset(sym, 1) or more_work
- if sym.assignable:
- more_work = sset(sym) or more_work
+ if sym.assignable and 1 in sym.assignable:
+ more_work = sset(sym, 1) or more_work
+ #if sym.assignable:
+ # more_work = sset(sym) or more_work
# Try to get everything in kernel, not as a module (1=='m')
- if sym.tri_value == 1 and sym.assignable and 2 in sym.assignable:
- more_work = sset(sym) or more_work
+ #if sym.tri_value == 1 and sym.assignable and 2 in sym.assignable:
+ # more_work = sset(sym) or more_work
# Following tunings are not mandatory
# Try at each pass but don't create an extra pass if anything else as asked for
@@ -273,8 +274,8 @@ while more_work and i < passes:
# 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_VIRTIO']:
- #sset(sym, 1)
- sset(sym)
+ sset(sym, 1)
+ #sset(sym)
# Compress everything with XZ if available (slower, smaller)
if support_xz:
@@ -787,7 +788,7 @@ nproc=${nproc:-4}
# This make will produce a kernel with embed initrd without modules
make -j $((nproc+1))
# This will complete the inird tree with modules
-rm -r ../initrd/lib/modules
+[ -d ../initrd/lib/modules ] && rm -r ../initrd/lib/modules
INSTALL_MOD_PATH=../initrd/ make modules_install
# XXX workaround, kernel makefile cpio preseves everything
$ROOTCMD chown -R root: ../initrd