├── .gitattributes ├── .gitignore ├── .gitlab-ci.yml ├── AUTHORS ├── Makefile ├── README.md ├── arch ├── alpha │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── arm │ ├── config.sh │ └── modules_load ├── ia64 │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── mips │ ├── config.sh │ ├── ip22r4k-2006_1.cf │ ├── ip22r5k-2006_1.cf │ ├── ip27r10k-2006_1.cf │ ├── ip28r10k-2006_1.cf │ ├── ip30r10k-2006_1.cf │ ├── ip32r5k-2006_1.cf │ ├── ip32rm5k-2006_1.cf │ ├── modules_load │ └── nb-busybox.cf ├── parisc │ ├── config.sh │ └── modules_load ├── parisc64 │ ├── config.sh │ └── modules_load ├── ppc │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── ppc64 │ ├── config.sh │ ├── kernel-2.6-pSeries │ ├── kernel-2.6.g5 │ └── modules_load ├── sparc │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── sparc64 │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── um │ ├── busy-config │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── x86 │ ├── config.sh │ ├── kernel-config │ └── modules_load └── x86_64 │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── defaults ├── busy-config ├── config.sh ├── initrd.d │ ├── 00-common.sh │ ├── 00-crypt.sh │ ├── 00-devmgr.sh │ ├── 00-fsdev.sh │ ├── 00-iscsi.sh │ ├── 00-keymaps.sh │ ├── 00-livecd.sh │ ├── 00-modules.sh │ ├── 00-nfs.sh │ ├── 00-rootdev.sh │ ├── 00-splash.sh │ ├── 00-suspend.sh │ └── 00-zfs.sh ├── initrd.defaults ├── initrd.scripts ├── kernel-config ├── keymaps │ ├── 1.map │ ├── 10.map │ ├── 11.map │ ├── 12.map │ ├── 13.map │ ├── 14.map │ ├── 15.map │ ├── 16.map │ ├── 17.map │ ├── 18.map │ ├── 19.map │ ├── 2.map │ ├── 20.map │ ├── 21.map │ ├── 22.map │ ├── 23.map │ ├── 24.map │ ├── 25.map │ ├── 26.map │ ├── 27.map │ ├── 28.map │ ├── 29.map │ ├── 3.map │ ├── 30.map │ ├── 31.map │ ├── 32.map │ ├── 33.map │ ├── 34.map │ ├── 35.map │ ├── 36.map │ ├── 37.map │ ├── 39.map │ ├── 4.map │ ├── 40.map │ ├── 41.map │ ├── 42.map │ ├── 43.map │ ├── 5.map │ ├── 6.map │ ├── 7.map │ ├── 8.map │ ├── 9.map │ ├── azerty.map │ ├── be.map │ ├── bg.map │ ├── br-a.map │ ├── br-l.map │ ├── by.map │ ├── cf.map │ ├── croat.map │ ├── cz.map │ ├── de.map │ ├── dk.map │ ├── dvorak.map │ ├── es.map │ ├── et.map │ ├── fi.map │ ├── fr.map │ ├── gr.map │ ├── hu.map │ ├── il.map │ ├── is.map │ ├── it.map │ ├── jp.map │ ├── keymapList │ ├── la.map │ ├── lt.map │ ├── mk.map │ ├── nl.map │ ├── no.map │ ├── pl.map │ ├── pt.map │ ├── ro.map │ ├── ru.map │ ├── se.map │ ├── sf.map │ ├── sg.map │ ├── sk-y.map │ ├── sk-z.map │ ├── slovene.map │ ├── trf.map │ ├── ua.map │ ├── uk.map │ ├── us.map │ └── wangbe.map ├── linuxrc ├── modules_load ├── software.sh └── udhcpc.scripts ├── doc ├── asciidoc.conf └── genkernel.8.txt ├── gen_arch.sh ├── gen_bootloader.sh ├── gen_cmdline.sh ├── gen_compile.sh ├── gen_configkernel.sh ├── gen_determineargs.sh ├── gen_funcs.sh ├── gen_initramfs.sh ├── gen_moddeps.sh ├── gen_package.sh ├── genkernel ├── genkernel.bash ├── genkernel.conf ├── initramfs.mounts ├── maintenance └── docmatcher.py ├── modules └── README ├── netboot ├── busy-config ├── linuxrc.x └── misc │ ├── bin │ ├── ashlogin │ └── net-setup │ ├── etc │ ├── fstab │ ├── group │ ├── inittab │ ├── passwd │ ├── profile │ ├── resolv.conf │ ├── shadow │ └── shells │ └── usr │ └── share │ └── terminfo │ └── p │ └── putty ├── patches └── busybox │ └── 1.20.2 │ ├── 1.18.1-openvt.diff │ ├── busybox-1.20.1-strict-atime.patch │ ├── busybox-1.20.2-glibc-sys-resource.patch │ └── busybox-1.7.4-signal-hack.patch └── tarballs └── busybox-1.20.2.tar.bz2 /.gitattributes: -------------------------------------------------------------------------------- 1 | AUTHORS ident 2 | BUGS ident 3 | ChangeLog ident 4 | HACKING ident 5 | README ident 6 | TODO ident 7 | genkernel ident 8 | *.conf ident 9 | *.sh ident 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /*.tar.* 2 | artifacts/ 3 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | image: quay.io/mudler/sabayon-builder-noentrypoint-amd64 2 | stages: 3 | - build 4 | 5 | variables: 6 | ACCEPT_LICENSE: '*' 7 | FEATURES: '-userpriv -sandbox -usersandbox keepwork' 8 | 9 | compile: 10 | stage: build 11 | script: 12 | - mkdir artifacts && mkdir artifacts/logs && mkdir artifacts/tmp 13 | - ( equo up && equo i -q --bdeps -o genkernel-next ) &>artifacts/logs/equo.log 14 | - ( equo i -q bison sys-block/open-iscsi sabayon-artwork-plymouth-default gentoolkit layman git gcc ) &>artifacts/logs/equo.log 15 | - ( eix-sync && layman -S ) &>/dev/null 16 | - export available_kernel=$(equo match sys-kernel/linux-sabayon -q --showslot) 17 | - equo i --bdeps -q $available_kernel &>artifacts/logs/equo.log 18 | - echo "Testing genkernel installation and kernel compilation ($available_kernel)" && make && make install && emerge -j1 -b -q -t $available_kernel 19 | - mv /usr/portage/packages/* ./artifacts/ 20 | - mv /var/log/portage/* ./artifacts/logs/ 21 | - mv /var/tmp/portage/* ./artifacts/tmp/ 22 | artifacts: 23 | paths: 24 | - artifacts 25 | 26 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | This list is split into two alphabetical lists. The first is a listing of the 2 | authors of the original Gentoo package. The copyrights for all of those code 3 | contributions belong to the Gentoo Foundation. The second list is the authors 4 | whom have contributed significant code to the new project. All code added to 5 | the new project is copyrighted by the respective authors. 6 | 7 | Gentoo Foundation authors: 8 | ------ 9 | Luca Barbato 10 | Eric Edgar 11 | Mike Frysinger 12 | Tom Gall 13 | Andrew Gaffney 14 | Chris Gianelloni 15 | Brad House 16 | Brain Jackson 17 | Robin H. Johnson 18 | Joshua Kinard 19 | Seemant Kulleen 20 | Guy Martin 21 | Daniel Robbins 22 | Travis Tilley 23 | Pieter van den Abeele 24 | Jason Wever 25 | Tim Yamin 26 | Fabio Erculiani 27 | Ettore Di Giacinto 28 | 29 | Copyright authors: 30 | ------ 31 | Andrew Gaffney 32 | Chris Gianelloni 33 | Stefan Behte 34 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PREFIX ?= /usr 2 | BINDIR ?= $(PREFIX)/bin 3 | LIBDIR ?= $(PREFIX)/lib 4 | SYSCONFDIR ?= /etc 5 | DESTDIR ?= 6 | VERSION ?= 7 | distdir = genkernel-next-$(VERSION) 8 | 9 | # Add off-Git/generated files here that need to be shipped with releases 10 | EXTRA_DIST = genkernel.8 11 | 12 | default: genkernel.8 13 | 14 | genkernel.8: doc/genkernel.8.txt doc/asciidoc.conf Makefile genkernel 15 | a2x --conf-file=doc/asciidoc.conf --attribute="genkernelversion=$(VERSION)" \ 16 | --format=manpage -D . "$<" 17 | 18 | install: default 19 | 20 | install -d $(DESTDIR)/$(SYSCONFDIR) 21 | install -m 644 genkernel.conf $(DESTDIR)/$(SYSCONFDIR)/ 22 | 23 | install -d $(DESTDIR)/$(BINDIR) 24 | install -m 755 genkernel $(DESTDIR)/$(BINDIR)/ 25 | 26 | install -d $(DESTDIR)/$(PREFIX)/share/genkernel 27 | install -m 755 gen_arch.sh $(DESTDIR)/$(PREFIX)/share/genkernel 28 | install -m 755 gen_bootloader.sh $(DESTDIR)/$(PREFIX)/share/genkernel 29 | install -m 755 gen_cmdline.sh $(DESTDIR)/$(PREFIX)/share/genkernel 30 | install -m 755 gen_compile.sh $(DESTDIR)/$(PREFIX)/share/genkernel 31 | install -m 755 gen_configkernel.sh $(DESTDIR)/$(PREFIX)/share/genkernel 32 | install -m 755 gen_determineargs.sh $(DESTDIR)/$(PREFIX)/share/genkernel 33 | install -m 755 gen_funcs.sh $(DESTDIR)/$(PREFIX)/share/genkernel 34 | install -m 755 gen_initramfs.sh $(DESTDIR)/$(PREFIX)/share/genkernel 35 | install -m 755 gen_moddeps.sh $(DESTDIR)/$(PREFIX)/share/genkernel 36 | install -m 755 gen_package.sh $(DESTDIR)/$(PREFIX)/share/genkernel 37 | 38 | install -m 644 initramfs.mounts $(DESTDIR)/$(SYSCONFDIR)/ 39 | 40 | cp -rp arch $(DESTDIR)/$(PREFIX)/share/genkernel/ 41 | cp -rp defaults $(DESTDIR)/$(PREFIX)/share/genkernel/ 42 | cp -rp modules $(DESTDIR)/$(PREFIX)/share/genkernel/ 43 | cp -rp netboot $(DESTDIR)/$(PREFIX)/share/genkernel/ 44 | cp -rp patches $(DESTDIR)/$(PREFIX)/share/genkernel/ 45 | 46 | install -d $(DESTDIR)/var/lib/genkernel/src 47 | install -m 644 tarballs/* $(DESTDIR)/var/lib/genkernel/src/ 48 | 49 | clean: 50 | rm -f $(EXTRA_DIST) 51 | 52 | check-git-repository: 53 | git diff --quiet || { echo 'STOP, you have uncommitted changes in the working directory' ; false ; } 54 | git diff --cached --quiet || { echo 'STOP, you have uncommitted changes in the index' ; false ; } 55 | 56 | dist: check-git-repository $(EXTRA_DIST) 57 | test -n "$(VERSION)" || { echo "VERSION not set" >&2; exit 1; } 58 | git archive --prefix=$(distdir)/ --format=tar "v$(VERSION)" > $(distdir).tar 59 | rm -f $(distdir).tar.xz 60 | xz $(distdir).tar 61 | scp $(distdir).tar.xz lxnay@dev.gentoo.org:~/public_html/genkernel-next/ 62 | 63 | .PHONY: clean check-git-repository dist default install 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [![build status](https://gitlab.com/mudler/genkernel-next/badges/master/build.svg)](https://gitlab.com/mudler/genkernel-next/commits/master) Genkernel-next 2 | An improved and modern remake of Gentoo genkernel (in: udev, plymouth; out: cross compiler support) 3 | -------------------------------------------------------------------------------- /arch/alpha/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 68805fdd05ab9f92bc0faefcea6907a21bb8339b $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="boot" 6 | KERNEL_MAKE_DIRECTIVE_2="" 7 | KERNEL_BINARY="arch/alpha/boot/vmlinux.gz" 8 | 9 | # 10 | # Arch-specific defaults that can be overridden in the config file or on the 11 | # command line. 12 | # 13 | DEFAULT_COMPRESS_INITRD=yes 14 | DEFAULT_COMPRESS_INITRD_TYPE=best 15 | 16 | DEFAULT_MAKEOPTS="-j2" 17 | 18 | DEFAULT_KERNEL_MAKE=make 19 | DEFAULT_UTILS_MAKE=make 20 | 21 | DEFAULT_KERNEL_CC=gcc 22 | DEFAULT_KERNEL_AS=as 23 | DEFAULT_KERNEL_LD=ld 24 | 25 | DEFAULT_UTILS_CC=gcc 26 | DEFAULT_UTILS_AS=as 27 | DEFAULT_UTILS_LD=ld 28 | -------------------------------------------------------------------------------- /arch/alpha/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | 30 | -------------------------------------------------------------------------------- /arch/arm/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 240a0270b5aba6a41f1ce08d8d4fd794bbc34bff $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="" 6 | KERNEL_MAKE_DIRECTIVE_2="" 7 | KERNEL_BINARY="arch/arm/boot/zImage" 8 | 9 | # 10 | # Arch-specific defaults that can be overridden in the config file or on the 11 | # command line. 12 | # 13 | DEFAULT_COMPRESS_INITRD=yes 14 | DEFAULT_COMPRESS_INITRD_TYPE=best 15 | 16 | DEFAULT_MAKEOPTS="-j2" 17 | 18 | DEFAULT_KERNEL_MAKE=make 19 | DEFAULT_UTILS_MAKE=make 20 | 21 | DEFAULT_KERNEL_CC=gcc 22 | DEFAULT_KERNEL_AS=as 23 | DEFAULT_KERNEL_LD=ld 24 | 25 | DEFAULT_UTILS_CC=gcc 26 | DEFAULT_UTILS_AS=as 27 | DEFAULT_UTILS_LD=ld 28 | -------------------------------------------------------------------------------- /arch/arm/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | 30 | -------------------------------------------------------------------------------- /arch/ia64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 3e9fd844aca6f6e61f5e1adb19cfa7a07c5d45c7 $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="" 6 | KERNEL_MAKE_DIRECTIVE_2="" 7 | KERNEL_BINARY="vmlinux.gz" 8 | 9 | # 10 | # Arch-specific defaults that can be overridden in the config file or on the 11 | # command line. 12 | # 13 | DEFAULT_COMPRESS_INITRD=yes 14 | DEFAULT_COMPRESS_INITRD_TYPE=best 15 | 16 | DEFAULT_MAKEOPTS="-j2" 17 | 18 | DEFAULT_KERNEL_MAKE=make 19 | DEFAULT_UTILS_MAKE=make 20 | 21 | DEFAULT_KERNEL_CC=gcc 22 | DEFAULT_KERNEL_AS=as 23 | DEFAULT_KERNEL_LD=ld 24 | 25 | DEFAULT_UTILS_CC=gcc 26 | DEFAULT_UTILS_AS=as 27 | DEFAULT_UTILS_LD=ld 28 | -------------------------------------------------------------------------------- /arch/ia64/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | -------------------------------------------------------------------------------- /arch/mips/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 49b4050731bdd04f20548d44119220ef51a8294b $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="vmlinux" 6 | KERNEL_MAKE_DIRECTIVE_2="" 7 | KERNEL_BINARY="./vmlinux" 8 | 9 | # Initrd/Initramfs Options 10 | USECOLOR="yes" 11 | NOINITRDMODULES="yes" 12 | BUSYBOX=1 13 | DMRAID=0 14 | DISKLABEL=0 15 | 16 | # genkernel on mips is only used for LiveCDs && netboots. Catalyst 17 | # will know where to get the kernels at. 18 | CMD_INSTALL=0 19 | 20 | # 21 | # Arch-specific defaults that can be overridden in the config file or on the 22 | # command line. 23 | # 24 | DEFAULT_COMPRESS_INITRD=yes 25 | DEFAULT_COMPRESS_INITRD_TYPE=best 26 | DEFAULT_KERNEL_MAKE=make 27 | DEFAULT_UTILS_MAKE=make 28 | DEFAULT_UTILS_CC=gcc 29 | DEFAULT_UTILS_AS=as 30 | DEFAULT_UTILS_LD=ld 31 | 32 | -------------------------------------------------------------------------------- /arch/mips/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | 30 | -------------------------------------------------------------------------------- /arch/parisc/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: e74e1a371593d832c822ebfe92904940b9b18256 $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="vmlinux" 6 | KERNEL_MAKE_DIRECTIVE_2="" 7 | KERNEL_BINARY="vmlinux" 8 | 9 | # 10 | # Arch-specific defaults that can be overridden in the config file or on the 11 | # command line. 12 | # 13 | DEFAULT_COMPRESS_INITRD=yes 14 | DEFAULT_COMPRESS_INITRD_TYPE=best 15 | 16 | DEFAULT_MAKEOPTS="-j2" 17 | 18 | DEFAULT_KERNEL_MAKE=make 19 | DEFAULT_UTILS_MAKE=make 20 | 21 | DEFAULT_KERNEL_CC=gcc 22 | DEFAULT_KERNEL_AS=as 23 | DEFAULT_KERNEL_LD=ld 24 | 25 | DEFAULT_UTILS_CC=gcc 26 | DEFAULT_UTILS_AS=as 27 | DEFAULT_UTILS_LD=ld 28 | -------------------------------------------------------------------------------- /arch/parisc/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | 30 | -------------------------------------------------------------------------------- /arch/parisc64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: e74e1a371593d832c822ebfe92904940b9b18256 $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="vmlinux" 6 | KERNEL_MAKE_DIRECTIVE_2="" 7 | KERNEL_BINARY="vmlinux" 8 | 9 | # 10 | # Arch-specific defaults that can be overridden in the config file or on the 11 | # command line. 12 | # 13 | DEFAULT_COMPRESS_INITRD=yes 14 | DEFAULT_COMPRESS_INITRD_TYPE=best 15 | 16 | DEFAULT_MAKEOPTS="-j2" 17 | 18 | DEFAULT_KERNEL_MAKE=make 19 | DEFAULT_UTILS_MAKE=make 20 | 21 | DEFAULT_KERNEL_CC=gcc 22 | DEFAULT_KERNEL_AS=as 23 | DEFAULT_KERNEL_LD=ld 24 | 25 | DEFAULT_UTILS_CC=gcc 26 | DEFAULT_UTILS_AS=as 27 | DEFAULT_UTILS_LD=ld 28 | -------------------------------------------------------------------------------- /arch/parisc64/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | -------------------------------------------------------------------------------- /arch/ppc/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: c40ba0fc69a7e08e23778d654e949696ac874066 $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="vmlinux" 6 | KERNEL_BINARY="vmlinux" 7 | 8 | # 9 | # Arch-specific defaults that can be overridden in the config file or on the 10 | # command line. 11 | # 12 | DEFAULT_COMPRESS_INITRD=yes 13 | DEFAULT_COMPRESS_INITRD_TYPE=best 14 | 15 | DEFAULT_MAKEOPTS="-j2" 16 | 17 | DEFAULT_KERNEL_MAKE=make 18 | DEFAULT_UTILS_MAKE=make 19 | 20 | DEFAULT_KERNEL_CC=gcc 21 | DEFAULT_KERNEL_AS=as 22 | DEFAULT_KERNEL_LD=ld 23 | 24 | DEFAULT_UTILS_CC=gcc 25 | DEFAULT_UTILS_AS=as 26 | DEFAULT_UTILS_LD=ld 27 | -------------------------------------------------------------------------------- /arch/ppc/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | 30 | -------------------------------------------------------------------------------- /arch/ppc64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: c40ba0fc69a7e08e23778d654e949696ac874066 $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="vmlinux" 6 | KERNEL_BINARY="vmlinux" 7 | 8 | # 9 | # Arch-specific defaults that can be overridden in the config file or on the 10 | # command line. 11 | # 12 | DEFAULT_COMPRESS_INITRD=yes 13 | DEFAULT_COMPRESS_INITRD_TYPE=best 14 | 15 | DEFAULT_MAKEOPTS="-j2" 16 | 17 | DEFAULT_KERNEL_MAKE=make 18 | DEFAULT_UTILS_MAKE=make 19 | 20 | DEFAULT_KERNEL_CC=gcc 21 | DEFAULT_KERNEL_AS=as 22 | DEFAULT_KERNEL_LD=ld 23 | 24 | DEFAULT_UTILS_CC=gcc 25 | DEFAULT_UTILS_AS=as 26 | DEFAULT_UTILS_LD=ld 27 | -------------------------------------------------------------------------------- /arch/ppc64/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | -------------------------------------------------------------------------------- /arch/sparc/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: fc87defdd3886ffe32e934a0ef920d6367c081d2 $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="vmlinux" 6 | KERNEL_MAKE_DIRECTIVE_2="" 7 | KERNEL_BINARY="vmlinux" 8 | 9 | USECOLOR="no" 10 | 11 | # 12 | # Arch-specific defaults that can be overridden in the config file or on the 13 | # command line. 14 | # 15 | DEFAULT_COMPRESS_INITRD=yes 16 | DEFAULT_COMPRESS_INITRD_TYPE=best 17 | 18 | DEFAULT_MAKEOPTS="-j1" 19 | 20 | DEFAULT_KERNEL_MAKE=make 21 | DEFAULT_UTILS_MAKE=make 22 | 23 | DEFAULT_KERNEL_CC=gcc 24 | 25 | DEFAULT_UTILS_CC=gcc 26 | DEFAULT_UTILS_AS=as 27 | DEFAULT_UTILS_LD=ld 28 | -------------------------------------------------------------------------------- /arch/sparc/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | 30 | -------------------------------------------------------------------------------- /arch/sparc64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 618a0abfde8e55ac5710699f0170562453e37170 $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="vmlinux" 6 | KERNEL_MAKE_DIRECTIVE_2="image" 7 | KERNEL_BINARY="arch/sparc64/boot/image arch/sparc/boot/image" 8 | 9 | USECOLOR="no" 10 | 11 | # 12 | # Arch-specific defaults that can be overridden in the config file or on the 13 | # command line. 14 | # 15 | DEFAULT_COMPRESS_INITRD=yes 16 | DEFAULT_COMPRESS_INITRD_TYPE=best 17 | 18 | DEFAULT_MAKEOPTS="-j2" 19 | 20 | DEFAULT_KERNEL_MAKE=make 21 | DEFAULT_UTILS_MAKE=make 22 | 23 | DEFAULT_KERNEL_CC=sparc64-linux-gcc 24 | #DEFAULT_KERNEL_AS=as 25 | #DEFAULT_KERNEL_LD=ld 26 | 27 | DEFAULT_UTILS_CC=gcc 28 | DEFAULT_UTILS_AS=as 29 | DEFAULT_UTILS_LD=ld 30 | -------------------------------------------------------------------------------- /arch/sparc64/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | -------------------------------------------------------------------------------- /arch/um/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 2abe9359eab55dfc951c53880cfd016703d13c83 $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="linux" 6 | KERNEL_MAKE_DIRECTIVE_2="" 7 | KERNEL_BINARY="linux" 8 | 9 | ARCH_HAVENOPREPARE=yes 10 | 11 | # 12 | # Arch-specific defaults that can be overridden in the config file or on the 13 | # command line. 14 | # 15 | DEFAULT_COMPRESS_INITRD=yes 16 | DEFAULT_COMPRESS_INITRD_TYPE=best 17 | 18 | DEFAULT_MAKEOPTS="-j2" 19 | 20 | DEFAULT_KERNEL_MAKE="make ARCH=um" 21 | DEFAULT_UTILS_MAKE=make 22 | 23 | DEFAULT_KERNEL_CC=gcc 24 | DEFAULT_KERNEL_AS=as 25 | DEFAULT_KERNEL_LD=ld 26 | 27 | DEFAULT_UTILS_CC=gcc 28 | DEFAULT_UTILS_AS=as 29 | DEFAULT_UTILS_LD=ld 30 | -------------------------------------------------------------------------------- /arch/um/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initrd/initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | 30 | -------------------------------------------------------------------------------- /arch/x86/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: d34afb2b1dffa50f5f5d48ec3b6c301fdf2fe700 $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="bzImage" 6 | KERNEL_MAKE_DIRECTIVE_2="" 7 | KERNEL_BINARY="arch/i386/boot/bzImage" 8 | 9 | # 10 | # Arch-specific defaults that can be overridden in the config file or on the 11 | # command line. 12 | # 13 | DEFAULT_COMPRESS_INITRD=yes 14 | DEFAULT_COMPRESS_INITRD_TYPE=best 15 | 16 | DEFAULT_MAKEOPTS="-j2" 17 | 18 | DEFAULT_KERNEL_MAKE=make 19 | DEFAULT_UTILS_MAKE=make 20 | 21 | DEFAULT_KERNEL_CC=gcc 22 | DEFAULT_KERNEL_AS=as 23 | DEFAULT_KERNEL_LD=ld 24 | 25 | DEFAULT_UTILS_CC=gcc 26 | DEFAULT_UTILS_AS=as 27 | DEFAULT_UTILS_LD=ld 28 | -------------------------------------------------------------------------------- /arch/x86/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid_logitech_hidpp hid_logitech_dj hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | 30 | # Crypto 31 | MODULES_CRYPTO="sha1_generic sha256_generic sha512_generic cbc ecb aes_generic aes-x86_64 xts" 32 | # Backward compatibility with previous releases 33 | MODULES_CRYPT="${MODULES_CRYPTO}" 34 | 35 | # Virtio support (KVM mainly) 36 | MODULES_VIRTIO="virtio virtio_balloon virtio_console virtio_net virtio_blk virtio_scsi virtio_pci virtio_ring" 37 | 38 | # Microsoft Hyper-V support 39 | MODULES_HYPERV="hv_storvsc hv_netvsc hyperv_fb" 40 | -------------------------------------------------------------------------------- /arch/x86_64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 78b9167abc7a3f62c17f29699e72e0ec6c5010dc $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="bzImage" 6 | KERNEL_MAKE_DIRECTIVE_2="" 7 | KERNEL_BINARY="arch/x86_64/boot/bzImage" 8 | 9 | # 10 | # Arch-specific defaults that can be overridden in the config file or on the 11 | # command line. 12 | # 13 | DEFAULT_COMPRESS_INITRD=yes 14 | DEFAULT_COMPRESS_INITRD_TYPE=best 15 | 16 | DEFAULT_MAKEOPTS="-j2" 17 | 18 | DEFAULT_KERNEL_MAKE=make 19 | DEFAULT_UTILS_MAKE=make 20 | 21 | DEFAULT_KERNEL_CC=gcc 22 | DEFAULT_KERNEL_AS=as 23 | DEFAULT_KERNEL_LD=ld 24 | 25 | DEFAULT_UTILS_CC=gcc 26 | DEFAULT_UTILS_AS=as 27 | DEFAULT_UTILS_LD=ld 28 | -------------------------------------------------------------------------------- /arch/x86_64/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="atl1c bnx2 e1000 igb pcnet32 r8169 sky2 tg3 virtio_net vmxnet3 macvlan vxlan bonding vxge cxgb4 cxgb cxgb3 tulip samsung-sxgbe ixgbe ixgb" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-pci ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd xhci-plat usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid_logitech_hidpp hid_logitech_dj hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | 30 | # Crypto 31 | MODULES_CRYPTO="sha1_generic sha256_generic sha512_generic cbc ecb aes_generic aes-x86_64 xts" 32 | # Backward compatibility with previous releases 33 | MODULES_CRYPT="${MODULES_CRYPTO}" 34 | 35 | # Virtio support (KVM mainly) 36 | MODULES_VIRTIO="virtio virtio_balloon virtio_console virtio_net virtio_blk virtio_scsi virtio_pci virtio_ring" 37 | 38 | # Microsoft Hyper-V support 39 | MODULES_HYPERV="hv_storvsc hv_netvsc hyperv_fb" 40 | -------------------------------------------------------------------------------- /defaults/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 7ee9ef20ae9d3edbaa1343765e788c280d9482ee $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="bzImage" 6 | # since "" is allowed (this will translate in `make `, which is nice 7 | # for xen-based kernels, the default value of 8 | # KERNEL_MAKE_DIRECTIVE_OVERRIDE cannot be "" 9 | DEFAULT_KERNEL_MAKE_DIRECTIVE_OVERRIDE="--INVALID--" 10 | KERNEL_MAKE_DIRECTIVE_OVERRIDE="${DEFAULT_KERNEL_MAKE_DIRECTIVE_OVERRIDE}" 11 | KERNEL_MAKE_DIRECTIVE_2="" 12 | KERNEL_BINARY="arch/i386/boot/bzImage" 13 | KERNEL_BINARY_OVERRIDE="" 14 | 15 | DEFAULT_COMPRESS_INITRD=yes 16 | DEFAULT_COMPRESS_INITRD_TYPE=best 17 | 18 | # 19 | # Arch-specific defaults that can be overridden in the config file or on the 20 | # command line. 21 | # 22 | DEFAULT_MAKEOPTS="-j2" 23 | 24 | DEFAULT_KERNEL_MAKE=make 25 | DEFAULT_UTILS_MAKE=make 26 | 27 | DEFAULT_KERNEL_CC=gcc 28 | DEFAULT_KERNEL_AS=as 29 | DEFAULT_KERNEL_LD=ld 30 | 31 | DEFAULT_UTILS_CC=gcc 32 | DEFAULT_UTILS_AS=as 33 | DEFAULT_UTILS_LD=ld 34 | -------------------------------------------------------------------------------- /defaults/initrd.d/00-common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.defaults 4 | 5 | is_nfs() { 6 | [ "${REAL_ROOT}" = "/dev/nfs" ] && return 0 7 | return 1 8 | } 9 | 10 | is_livecd() { 11 | [ "${CDROOT}" = "1" ] && return 0 12 | return 1 13 | } 14 | 15 | good_msg() { 16 | [ -n "${QUIET}" ] && [ -z "${DEBUG}" ] && return 0 17 | 18 | msg_string=$1 19 | msg_string="${msg_string:-...}" 20 | [ "$2" != 1 ] && \ 21 | echo -e "${GOOD}>>${NORMAL}${BOLD} ${msg_string} ${NORMAL}" 22 | } 23 | 24 | warn_msg() { 25 | msg_string=$1 26 | msg_string="${msg_string:-...}" 27 | [ "$2" != 1 ] && \ 28 | echo -e "${WARN}**${NORMAL}${BOLD} ${msg_string} ${NORMAL}" 29 | } 30 | 31 | bad_msg() { 32 | msg_string=$1 33 | msg_string="${msg_string:-...}" 34 | if [ "$2" != 1 ]; then 35 | # TODO(lxnay): fix circular dep with 00-splash.sh 36 | splashcmd verbose 37 | echo -e "${BAD}!!${NORMAL}${BOLD} ${msg_string} ${NORMAL}" 38 | fi 39 | } 40 | 41 | quiet_kmsg() { 42 | # if QUIET is set make the kernel less chatty 43 | [ -n "${QUIET}" ] && echo "0" > /proc/sys/kernel/printk 44 | } 45 | 46 | verbose_kmsg() { 47 | # if QUIET is set make the kernel less chatty 48 | [ -n "${QUIET}" ] && echo "6" > /proc/sys/kernel/printk 49 | } 50 | 51 | test_success() { 52 | local ret=${?} 53 | local error_string="${1:-run command}" 54 | 55 | if [ "${ret}" != "0" ]; then 56 | bad_msg "Failed to ${1}; failing back to the shell..." 57 | run_shell 58 | fi 59 | } 60 | 61 | sdelay() { 62 | if [ -n "${SDELAY}" ]; then 63 | good_msg "Waiting ${SDELAY} seconds..." 64 | sleep ${SDELAY} 65 | 66 | elif is_livecd; then 67 | local msg="Hint: Use scandelay[=seconds] if" 68 | msg="${msg} your live medium is slowand boot fails" 69 | good_msg "${msg}" 70 | fi 71 | } 72 | 73 | run_shell() { 74 | /bin/ash 75 | } 76 | 77 | do_rundebugshell() { 78 | # TODO(lxnay): fix circular dep with 00-splash.sh 79 | splashcmd verbose 80 | good_msg 'Type "exit" to continue with normal bootup.' 81 | [ -x /bin/sh ] && /bin/sh || /bin/ash 82 | } 83 | 84 | rundebugshell() { 85 | if [ -n "${DEBUG}" ]; then 86 | good_msg "Starting debug shell as requested." 87 | good_msg "Stopping by: ${1}" 88 | do_rundebugshell 89 | fi 90 | } 91 | 92 | maybe_setup_ld_cache() { 93 | # This calls ldconfig if /etc/ld.so.cache was not 94 | # created at initramfs build time. This may happen 95 | # if the initramfs was generated by an unprivileged user 96 | # since running ldconfig -r requires root privileges. 97 | if [ ! -e "/etc/ld.so.cache" ]; then 98 | ldconfig 99 | fi 100 | } -------------------------------------------------------------------------------- /defaults/initrd.d/00-devmgr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.d/00-common.sh 4 | 5 | is_udev() { 6 | [ -x "${UDEVD}" ] && [ -z "${USE_MDEV}" ] && return 0 7 | return 1 8 | } 9 | 10 | is_mdev() { 11 | if [ ! -x "${UDEVD}" ] || [ -n "${USE_MDEV}" ]; then 12 | return 0 13 | fi 14 | return 1 15 | } 16 | 17 | devmgr_init() { 18 | if is_udev; then 19 | good_msg "Activating udev" 20 | "${UDEVD}" --daemon --resolve-names=never && \ 21 | udevadm trigger --action=add && \ 22 | udevadm settle || bad_msg "udevd failed to run" 23 | elif is_mdev; then 24 | good_msg "Activating mdev" 25 | # Ensure that device nodes are properly configured 26 | "${MDEVD}" -s || bad_msg "mdev -s failed" 27 | else 28 | bad_msg "Cannot find either udev or mdev" 29 | fi 30 | } 31 | 32 | # Terminate the device manager, this happens right before pivot_root 33 | devmgr_terminate() { 34 | if is_udev; then 35 | udevadm settle 36 | udevadm control --exit || bad_msg "Unable to terminate udevd" 37 | fi 38 | # mdev doesn't require anything, it seems 39 | } 40 | 41 | _fs_type_in_use() { 42 | local fs_type=${1} 43 | cut -d " " -f 3 < /proc/mounts | fgrep -q "${fs_type}" 44 | } 45 | 46 | mount_devfs() { 47 | # Use devtmpfs if enabled in kernel, 48 | # else tmpfs. Always run mdev just in case 49 | local devfs=tmpfs 50 | if grep -qs devtmpfs /proc/filesystems ; then 51 | devfs=devtmpfs 52 | fi 53 | 54 | # Options copied from /etc/init.d/udev-mount 55 | # should probably be kept in sync 56 | if ! _fs_type_in_use devtmpfs; then 57 | mount -t "${devfs}" -o "exec,nosuid,mode=0755,size=10M" \ 58 | udev /dev || bad_msg "Failed to mount /dev as ${devfs}" 59 | fi 60 | 61 | # http://git.busybox.net/busybox/plain/docs/mdev.txt 62 | if ! _fs_type_in_use devpts; then 63 | mkdir -m 0755 /dev/pts 64 | mount -t devpts -o gid=5,mode=0620 devpts /dev/pts \ 65 | || bad_msg "Failed to mount /dev/pts" 66 | fi 67 | 68 | mkdir -p -m 1777 /dev/shm 69 | mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs \ 70 | /dev/shm || bad_msg "Failed to mount /dev/shm" 71 | } 72 | 73 | device_list() { 74 | # Locate the cdrom device with our media on it. 75 | # CDROM devices 76 | local devices="/dev/cdroms/* /dev/ide/cd/* /dev/sr*" 77 | # USB Keychain/Storage 78 | devices="${devices} /dev/sd*" 79 | # IDE devices 80 | devices="${devices} /dev/hd*" 81 | # virtio devices 82 | devices="${devices} /dev/vd*" 83 | # USB using the USB Block Driver 84 | devices="${devices} /dev/ubd* /dev/ubd/*" 85 | # iSeries devices 86 | devices="${devices} /dev/iseries/vcd*" 87 | # builtin mmc/sd card reader devices 88 | devices="${devices} /dev/mmcblk* /dev/mmcblk*/*" 89 | 90 | # fallback scanning, this might scan something twice, but it's better than 91 | # failing to boot. 92 | local parts=$(awk '/([0-9]+[[:space:]]+)/{print "/dev/" $4}' \ 93 | /proc/partitions) 94 | [ -e /proc/partitions ] && devices="${devices} ${parts}" 95 | 96 | echo ${devices} 97 | } 98 | -------------------------------------------------------------------------------- /defaults/initrd.d/00-fsdev.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.d/00-common.sh 4 | . /etc/initrd.d/00-devmgr.sh 5 | 6 | MDADM_BIN="/sbin/mdadm" 7 | 8 | _is_mdadm() { 9 | [ -x "${MDADM_BIN}" ] || return 1 10 | [ "${USE_MDADM}" = "1" ] || return 1 11 | return 0 12 | } 13 | 14 | mount_sysfs() { 15 | mount -t sysfs sysfs /sys -o noexec,nosuid,nodev \ 16 | >/dev/null 2>&1 && return 0 17 | bad_msg "Failed to mount /sys!" 18 | } 19 | 20 | # If devtmpfs is mounted, try move it to the new root 21 | # If that fails, try to unmount all possible mounts of devtmpfs as 22 | # stuff breaks otherwise 23 | move_mounts_to_chroot() { 24 | for fs in /run /dev /sys /proc; do 25 | if grep -qs "$fs" /proc/mounts; then 26 | local chroot_dir="${CHROOT}${fs}" 27 | mkdir -p "${chroot_dir}" 28 | if ! mount --move $fs "${chroot_dir}" 29 | then 30 | umount $fs || \ 31 | bad_msg "Failed to move and umount $fs!" 32 | fi 33 | fi 34 | done 35 | } 36 | 37 | find_real_device() { 38 | local device="${1}" 39 | local out= 40 | case "${device}" in 41 | UUID=*|LABEL=*) 42 | local real_device="" 43 | local retval=1 44 | 45 | if [ "${retval}" -ne 0 ]; then 46 | real_device=$(findfs "${device}" 2>/dev/null) 47 | retval=$? 48 | fi 49 | 50 | if [ "$retval" -ne 0 ]; then 51 | real_device=$(busybox findfs "${device}" 2>/dev/null) 52 | retval=$? 53 | fi 54 | 55 | if [ "${retval}" -ne 0 ]; then 56 | real_device=$(blkid -o device -l -t "${device}") 57 | retval=$? 58 | fi 59 | 60 | if [ "${retval}" -eq 0 ] && [ -n "${real_device}" ]; then 61 | out="${real_device}" 62 | fi 63 | ;; 64 | *) 65 | out="${device}" 66 | ;; 67 | esac 68 | echo -n "${out}" 69 | } 70 | 71 | get_device_fstype() { 72 | # This function expects a real or UUID=,LABEL= based reference 73 | # that can be resolved to a real device node. Using this 74 | # function in combination with ZFS may lead to unexpected behaviour. 75 | local device=$(find_real_device "${1}") 76 | if [ -n "${device}" ]; then 77 | blkid -o value -s TYPE "${device}" 78 | return ${?} # readability 79 | else 80 | bad_msg "Cannot resolve device: ${1}" 81 | return 1 82 | fi 83 | } 84 | 85 | media_find() { 86 | # $1 = mount dir name / media name 87 | # $2 = recognition file 88 | # $3 = variable to have the device path 89 | # $4 = actual mount dir path (full path) 90 | # args remaining are possible devices 91 | 92 | local media="${1}" recon="${2}" vrbl="${3}" mntdir="${4}" 93 | shift 4 94 | 95 | good_msg "Looking for the ${media}" 96 | 97 | if [ "$#" -gt "0" ]; then 98 | 99 | [ ! -d "${mntdir}" ] && \ 100 | mkdir -p "${mntdir}" 2>/dev/null >/dev/null 101 | 102 | local mntcddir="${mntdir}" 103 | if [ -n "${ISOBOOT}" ]; then 104 | mntcddir="${mntdir%${media}}iso" 105 | if [ ! -f "${mntcddir}" ]; then 106 | mkdir "${mntcddir}" 107 | fi 108 | fi 109 | 110 | for x in ${*}; do 111 | 112 | # Check for a block device to mount 113 | if [ ! -b "${x}" ]; then 114 | continue 115 | fi 116 | 117 | # 118 | # If disk and it has at least one partition, skip. 119 | # We use /sys/block/${bsn}/${bsn}[0-9]* to make sure that we 120 | # don't skip device mapper devices. Even the craziest scenario 121 | # deserves a fair chance. 122 | # 123 | local bsn=$(basename "${x}") 124 | local bpath="/sys/block/${bsn}" 125 | local parts=$(find "${bpath}/" \ 126 | -regex "${bpath}/${bsn}[0-9]" -type d 2>/dev/null) 127 | [ -n "${parts}" ] && continue 128 | 129 | good_msg "Attempting to mount media: ${x}" 130 | mount -r -t "${CDROOT_TYPE}" "${x}" "${mntcddir}" >/dev/null 2>&1 \ 131 | || continue 132 | 133 | if [ -n "${ISOBOOT}" ] && [ -f "${mntcddir}/${ISOBOOT}" ]; then 134 | mount -o loop "${mntcddir}/${ISOBOOT}" "${mntdir}" && \ 135 | good_msg "iso mounted on ${mntdir}" 136 | fi 137 | 138 | # Check for the media 139 | if [ -f "${mntdir}/${recon}" ]; then 140 | # Set REAL_ROOT, CRYPT_ROOT_KEYDEV or whatever ${vrbl} is 141 | eval ${vrbl}'='"${x}" 142 | good_msg "Media found on ${x}" 143 | break 144 | else 145 | umount "${mntcddir}" 146 | fi 147 | done 148 | fi 149 | 150 | eval local result='$'${vrbl} 151 | 152 | [ -n "${result}" ] || bad_msg "Media not found" 153 | } 154 | 155 | start_md_volumes() { 156 | good_msg "Starting md devices" 157 | "${MDADM_BIN}" --assemble --scan 158 | # do not bad_msg, user could have this enabled even though 159 | # no RAID is currently available. 160 | } 161 | 162 | start_volumes() { 163 | # Here, we check for /dev/device-mapper, and if it exists, we setup a 164 | # a symlink, which should hopefully fix bug #142775 and bug #147015 165 | if [ -e /dev/device-mapper ] && [ ! -e /dev/mapper/control ]; then 166 | mkdir -p /dev/mapper 167 | ln -sf /dev/device-mapper /dev/mapper/control 168 | fi 169 | 170 | _is_mdadm && start_md_volumes 171 | 172 | if [ "${USE_MULTIPATH_NORMAL}" = "1" ]; then 173 | good_msg "Scanning for multipath devices" 174 | good_msg ":: Populating scsi_id info for libudev queries" 175 | mkdir -p /run/udev/data 176 | for ech in /sys/block/* ; do 177 | local tgtfile=b$(cat ${ech}/dev) 178 | /lib/udev/scsi_id -g -x /dev/${ech##*/} |sed -e 's/^/E:/' >/run/udev/data/${tgtfile} 179 | done 180 | multipath -v 0 181 | 182 | is_udev && udevadm settle 183 | is_mdev && sleep 2 184 | 185 | good_msg "Activating multipath devices" 186 | dmsetup ls --target multipath --exec "/sbin/kpartx -a -v" 187 | fi 188 | 189 | if [ "${USE_DMRAID_NORMAL}" = "1" ]; then 190 | good_msg "Activating device-mapper raid devices" 191 | dmraid -ay ${DMRAID_OPTS} || \ 192 | bad_msg "dmraid failed to run, skipping raid assembly!" 193 | fi 194 | 195 | # make sure that all the devices had time to be configured 196 | is_udev && udevadm settle 197 | 198 | if [ "${USE_LVM_NORMAL}" = "1" ]; then 199 | for lvm_path in /sbin/lvm /bin/lvm MISSING ; do 200 | [ -x "$lvm_path" ] && break 201 | done 202 | if [ "${lvm_path}" = "MISSING" ] 203 | then 204 | bad_msg "dolvm invoked, but LVM binary not available! skipping LVM volume group activation!" 205 | else 206 | # This is needed for /sbin/lvm to accept the following logic 207 | local cmds="#! ${lvm_path}" 208 | 209 | # If there is a cahe, update it. Unbreak at least dmcrypt 210 | [ -d /etc/lvm/cache ] && cmds="${cmds} \nvgscan" 211 | 212 | # To activate volumegroups on all devices in the cache 213 | cmds="${cmds} \nvgchange -ay --sysinit" 214 | if is_mdev; then 215 | # To create symlinks so users can use 216 | # real_root=/dev/vg/root 217 | # This needs to run after vgchange, using 218 | # vgchange --mknodes is too early. 219 | cmds="${cmds} \nvgmknodes --ignorelockingfailure" 220 | fi 221 | 222 | # And finally execute it all (/proc/... needed if lvm 223 | # is compiled without readline) 224 | good_msg "Activating Logical Volume Groups" 225 | printf "%b\n" "${cmds}" | $lvm_path /proc/self/fd/0 226 | fi 227 | fi 228 | 229 | is_udev && udevadm settle 230 | } 231 | -------------------------------------------------------------------------------- /defaults/initrd.d/00-iscsi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.d/00-common.sh 4 | 5 | start_iscsi() { 6 | if [ ! -e /usr/sbin/iscsistart ]; then 7 | return 0 # disabled 8 | fi 9 | 10 | if [ ! -n "${ISCSI_NOIBFT}" ]; then 11 | good_msg "Activating iSCSI via iBFT" 12 | iscsistart -b 13 | fi 14 | 15 | if [ -z "${ISCSI_INITIATORNAME}" ]; then 16 | warn_msg "No iSCSI initiator found" 17 | return 0 18 | fi 19 | 20 | if [ -z "${ISCSI_TARGET}" ]; then 21 | warn_msg "No iSCSI target found" 22 | return 0 23 | fi 24 | 25 | if [ -z "${ISCSI_ADDRESS}" ]; then 26 | warn_msg "No iSCSI address found" 27 | return 0 28 | fi 29 | 30 | good_msg "Activating iSCSI via cmdline" 31 | 32 | if [ "${ISCSI_TGPT}" ]; then 33 | ADDITIONAL="${ADDITIONAL} -g ${ISCSI_TGPT}" 34 | else 35 | ADDITIONAL="${ADDITIONAL} -g 1" 36 | fi 37 | 38 | if [ "${ISCSI_PORT}" ]; then 39 | ADDITIONAL="${ADDITIONAL} -p ${ISCSI_PORT}" 40 | fi 41 | 42 | if [ "${ISCSI_USERNAME}" ]; then 43 | ADDITIONAL="${ADDITIONAL} -u ${ISCSI_USERNAME}" 44 | fi 45 | 46 | if [ "${ISCSI_PASSWORD}" ]; then 47 | ADDITIONAL="${ADDITIONAL} -w ${ISCSI_PASSWORD}" 48 | fi 49 | 50 | if [ "${ISCSI_USERNAME_IN}" ]; then 51 | ADDITIONAL="${ADDITIONAL} -U ${ISCSI_USERNAME_IN}" 52 | fi 53 | 54 | if [ "${ISCSI_PASSWORD_IN}" ]; then 55 | ADDITIONAL="${ADDITIONAL} -W ${ISCSI_PASSWORD_IN}" 56 | fi 57 | 58 | if [ "${ISCSI_DEBUG}" ]; then 59 | ADDITIONAL="${ADDITIONAL} -d ${ISCSI_DEBUG}" 60 | fi 61 | 62 | if [ "${ISCSI_IFACE_NAME}" ]; then 63 | ADDITIONAL="${ADDITIONAL} --param iface.iscsi_ifacename=${ISCSI_IFACE_NAME}" 64 | fi 65 | if [ "${ISCSI_NETDEV_NAME}" ]; then 66 | ADDITIONAL="${ADDITIONAL} --param iface.net_ifacename=${ISCSI_NETDEV_NAME}" 67 | fi 68 | 69 | iscsistart -i "${ISCSI_INITIATORNAME}" -t "${ISCSI_TARGET}" \ 70 | -a "${ISCSI_ADDRESS}" ${ADDITIONAL} 71 | } 72 | 73 | parse_dracut_iscsi_root() { 74 | # Adapted from dracut 75 | v=${1#iscsi:} 76 | 77 | # extract authentication info 78 | case "$v" in 79 | *@*:*:*:*:*) 80 | authinfo=${v%%@*} 81 | v=${v#*@} 82 | # allow empty authinfo to allow having an @ in 83 | # ISCSI_TARGET like this: 84 | # netroot=iscsi:@192.168.1.100::3260::iqn.2009-01.com.example:testdi@sk 85 | if [ -n "${authinfo}" ]; then 86 | OLDIFS="${IFS}" 87 | IFS=: 88 | set ${authinfo} 89 | IFS="${OLDIFS}" 90 | if [ $# -gt 4 ]; then 91 | bad_msg "Wrong auth info in iscsi: parameter" 92 | return 1 93 | fi 94 | ISCSI_USERNAME="${1}" 95 | ISCSI_PASSWORD="${2}" 96 | if [ $# -gt 2 ]; then 97 | ISCSI_USERNAME_IN="${3}" 98 | ISCSI_PASSWORD_IN="${4}" 99 | fi 100 | fi 101 | ;; 102 | esac 103 | 104 | # extract target ip 105 | case "${v}" in 106 | [[]*[]]:*) 107 | ISCSI_ADDRESS=${v#[[]} 108 | ISCSI_ADDRESS=${ISCSI_ADDRESS%%[]]*} 109 | v=${v#[[]$ISCSI_ADDRESS[]]:} 110 | ;; 111 | *) 112 | ISCSI_ADDRESS=${v%%[:]*} 113 | v=${v#$ISCSI_ADDRESS:} 114 | ;; 115 | esac 116 | 117 | # extract target name 118 | case "${v}" in 119 | *:iqn.*) 120 | ISCSI_TARGET=iqn.${v##*:iqn.} 121 | v=${v%:iqn.*}: 122 | ;; 123 | *:eui.*) 124 | ISCSI_TARGET=iqn.${v##*:eui.} 125 | v=${v%:iqn.*}: 126 | ;; 127 | *:naa.*) 128 | ISCSI_TARGET=iqn.${v##*:naa.} 129 | v=${v%:iqn.*}: 130 | ;; 131 | *) 132 | bad_msg "iscsi target name should begin with 'iqn.', 'eui.', 'naa.'" 133 | return 1 134 | ;; 135 | esac 136 | 137 | # parse the rest 138 | OLDIFS="${IFS}" 139 | IFS=: 140 | set ${v} 141 | IFS="${OLDIFS}" 142 | 143 | iscsi_protocol="${1}"; shift # ignored 144 | 145 | ISCSI_PORT="${1}"; shift 146 | if [ $# -eq 3 ]; then 147 | ISCSI_IFACE_NAME="${1}"; shift 148 | fi 149 | if [ $# -eq 2 ]; then 150 | ISCSI_NETDEV_NAME="${1}"; shift 151 | fi 152 | 153 | iscsi_lun="${1}"; shift # ignored 154 | if [ $# -ne 0 ]; then 155 | warn "Invalid parameter in iscsi: parameter!" 156 | return 1 157 | fi 158 | } 159 | -------------------------------------------------------------------------------- /defaults/initrd.d/00-keymaps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.d/00-splash.sh 4 | . /etc/initrd.d/00-common.sh 5 | . /etc/initrd.d/00-livecd.sh 6 | 7 | setup_keymap() { 8 | if [ -z "${USE_KEYMAP}" ]; then 9 | return 0 10 | fi 11 | 12 | [ ! -e /dev/tty0 ] && ln -s /dev/tty1 /dev/tty0 13 | 14 | [ -f /lib/keymaps/keymapList ] && choose_keymap 15 | } 16 | 17 | choose_keymap() { 18 | good_msg "Loading keyboard mappings" 19 | 20 | if [ -n "${DO_keymap}" ]; then 21 | splashcmd verbose 22 | cat /lib/keymaps/keymapList 23 | read -t 10 -p '<< Load keymap (Enter for default): ' USE_KEYMAP 24 | fi 25 | 26 | case ${USE_KEYMAP} in 27 | 1|azerty) USE_KEYMAP=azerty ;; 28 | 2|be) USE_KEYMAP=be ;; 29 | 3|bg) USE_KEYMAP=bg ;; 30 | 4|br-a) USE_KEYMAP=br-a ;; 31 | 5|br-l) USE_KEYMAP=br-l ;; 32 | 6|by) USE_KEYMAP=by ;; 33 | 7|cf) USE_KEYMAP=cf ;; 34 | 8|croat) USE_KEYMAP=croat ;; 35 | 9|cz) USE_KEYMAP=cz ;; 36 | 10|de) USE_KEYMAP=de ;; 37 | 11|dk) USE_KEYMAP=dk ;; 38 | 12|dvorak) USE_KEYMAP=dvorak ;; 39 | 13|es) USE_KEYMAP=es ;; 40 | 14|et) USE_KEYMAP=et ;; 41 | 15|fi) USE_KEYMAP=fi ;; 42 | 16|fr) USE_KEYMAP=fr ;; 43 | 17|gr) USE_KEYMAP=gr ;; 44 | 18|hu) USE_KEYMAP=hu ;; 45 | 19|il) USE_KEYMAP=il ;; 46 | 20|is) USE_KEYMAP=is ;; 47 | 21|it) USE_KEYMAP=it ;; 48 | 22|jp) USE_KEYMAP=jp ;; 49 | 23|la) USE_KEYMAP=la ;; 50 | 24|lt) USE_KEYMAP=lt ;; 51 | 25|mk) USE_KEYMAP=mk ;; 52 | 26|nl) USE_KEYMAP=nl ;; 53 | 27|no) USE_KEYMAP=no ;; 54 | 28|pl) USE_KEYMAP=pl ;; 55 | 29|pt) USE_KEYMAP=pt ;; 56 | 30|ro) USE_KEYMAP=ro ;; 57 | 31|ru) USE_KEYMAP=ru ;; 58 | 32|se) USE_KEYMAP=se ;; 59 | 33|sg) USE_KEYMAP=sg ;; 60 | 34|sk-y) USE_KEYMAP=sk-y ;; 61 | 35|sk-z) USE_KEYMAP=sk-z ;; 62 | 36|slovene) USE_KEYMAP=slovene ;; 63 | 37|trf) USE_KEYMAP=trf ;; 64 | 38|trq) USE_KEYMAP=trq ;; 65 | 39|ua) USE_KEYMAP=ua ;; 66 | 40|uk) USE_KEYMAP=uk ;; 67 | 41|us) USE_KEYMAP=us ;; 68 | 42|wangbe) USE_KEYMAP=wangbe ;; 69 | 43|sf|ch*) USE_KEYMAP=sf ;; 70 | esac 71 | 72 | if [ -e "/lib/keymaps/${USE_KEYMAP}.map" ]; then 73 | good_msg "Loading the ''${USE_KEYMAP}'' keyboard mapping" 74 | loadkmap < "/lib/keymaps/${USE_KEYMAP}.map" 75 | splashcmd set_msg "Set keyboard mapping to ${USE_KEYMAP}" 76 | elif [ -z "${USE_KEYMAP}" ]; then 77 | good_msg "Keeping default keyboard mapping" 78 | splashcmd set_msg "Keeping default keyboard mapping" 79 | else 80 | bad_msg "Sorry, but keyboard mapping ${USE_KEYMAP} is invalid" 81 | unset USE_KEYMAP 82 | choose_keymap 83 | fi 84 | } 85 | -------------------------------------------------------------------------------- /defaults/initrd.d/00-modules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.d/00-common.sh 4 | . /etc/initrd.d/00-devmgr.sh 5 | 6 | 7 | _modules_load() { 8 | for module in ${*}; do 9 | echo ${module} >> /etc/modules/extra_load 10 | done 11 | _modules_scan extra_load 12 | } 13 | 14 | _modules_scan() { 15 | local mods 16 | local loaded 17 | 18 | mods=$(cat /etc/modules/${1} 2>/dev/null) 19 | [ -n "${mods}" ] && [ -z "${QUIET}" ] && \ 20 | echo -ne "${BOLD} ::${NORMAL} Loading from ${1}: " 21 | 22 | for x in ${mods}; do 23 | local mload=$(echo ${MLIST} | sed -e "s/.*${x}.*/${x}/") 24 | if [ "${mload}" = "${x}" ]; then 25 | # Only module to no-load 26 | [ -z "${QUIET}" ] && \ 27 | echo -e "${BOLD} ::${NORMAL} Skipping ${x}..." 28 | elif [ "${mload}" = "${MLIST}" ]; then 29 | if [ -n "${DEBUG}" ]; then 30 | echo -ne "${BOLD} ::${NORMAL} " 31 | echo -ne "Scanning for ${x}..." 32 | fi 33 | modprobe ${x} > /dev/null 2>&1 34 | loaded=${?} 35 | 36 | [ -n "${DEBUG}" -a "${loaded}" = "0" ] && \ 37 | echo "loaded" 38 | [ -n "${DEBUG}" -a "${loaded}" != "0" ] && \ 39 | echo "not loaded" 40 | 41 | [ -z "${DEBUG}" -a "${loaded}" = "0" ] && \ 42 | [ -z "${QUIET}" ] && \ 43 | echo -en "${x} " 44 | else 45 | [ -z "${QUIET}" ] && \ 46 | echo -e "${BOLD} ::${NORMAL} Skipping ${x}..." 47 | fi 48 | done 49 | [ -n "${mods}" ] && [ -z "${QUIET}" ] && echo 50 | } 51 | 52 | modules_init() { 53 | if [ -z "${DO_modules}" ]; then 54 | good_msg 'Skipping module load; disabled via commandline' 55 | elif [ -d "/lib/modules/${KV}" ]; then 56 | good_msg 'Loading modules' 57 | # Load appropriate kernel modules 58 | if [ "${NODETECT}" != "1" ]; then 59 | for modules in ${MY_HWOPTS}; do 60 | _modules_scan ${modules} 61 | done 62 | fi 63 | # Always eval doload=... 64 | _modules_load ${MDOLIST} 65 | else 66 | good_msg 'Skipping module load; no modules in the ramdisk!' 67 | fi 68 | 69 | # Give udev time to execute all the rules. This may be beneficial 70 | # for usb-storage devices. 71 | is_udev && udevadm settle 72 | } 73 | 74 | cmdline_hwopts() { 75 | # Scan CMDLINE for any "doscsi" or "noscsi"-type arguments 76 | for x in ${HWOPTS}; do 77 | for y in ${CMDLINE}; do 78 | if [ "${y}" = "do${x}" ]; then 79 | MY_HWOPTS="${MY_HWOPTS} $x" 80 | elif [ "${y}" = "no${x}" ]; then 81 | MY_HWOPTS="$(echo ${MY_HWOPTS} | sed -e \"s/${x}//g\" -)" 82 | fi 83 | done 84 | done 85 | 86 | local tmp_hwopts 87 | for x in ${MY_HWOPTS}; do 88 | local found=0 89 | for y in ${tmp_hwopts}; do 90 | if [ "${y}" = "${x}" ]; then 91 | continue 2 92 | fi 93 | done 94 | tmp_hwopts="${tmp_hwopts} ${x}" 95 | eval DO_$(echo ${x} | sed 's/-//')=1 96 | done 97 | 98 | MY_HWOPTS="${tmp_hwopts}" 99 | } 100 | -------------------------------------------------------------------------------- /defaults/initrd.d/00-nfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.d/00-common.sh 4 | 5 | find_nfs() { 6 | if [ -z "${IP}" ]; then 7 | # IP is not set, return straight away 8 | return 1 9 | fi 10 | 11 | if ! udhcpc -n -T 15 -q; then 12 | bad_msg "udhcpc returned error, skipping nfs setup..." 13 | return 1 14 | fi 15 | 16 | local options= 17 | 18 | [ -e /rootpath ] && NFSROOT=$(cat /rootpath) 19 | if [ -z "${NFSROOT}" ]; then 20 | # Obtain NFSIP 21 | # TODO: this is bogus, because dmesg is a circular buffer... 22 | options=$(dmesg | grep rootserver | sed -e "s/,/ /g") 23 | 24 | local opt= optn= 25 | 26 | for opt in ${options}; do 27 | optn=$(echo $opt | sed -e "s/=/ /g" | cut -d " " -f 1) 28 | if [ "${optn}" = "rootserver" ]; then 29 | NFSIP=$(echo $opt | sed -e "s/=/ /g" | cut -d " " -f 2) 30 | fi 31 | done 32 | 33 | # Obtain NFSPATH 34 | # TODO: this is bogus, because dmesg is a circular buffer... 35 | options=$(dmesg | grep rootpath | sed -e "s/,/ /g") 36 | 37 | for opt in ${options}; do 38 | optn=$(echo $opt | sed -e "s/=/ /g" | cut -d " " -f 1) 39 | if [ "${optn}" = "rootpath" ]; then 40 | NFSPATH=$(echo $opt | sed -e "s/=/ /g" | cut -d " " -f 2) 41 | fi 42 | done 43 | 44 | # Setup NFSROOT 45 | if [ -n "${NFSIP}" ] && [ -n "$NFSPATH" ]; then 46 | NFSROOT="${NFSIP}:${NFSPATH}" 47 | else 48 | bad_msg "The DHCP Server did not send a valid root-path." 49 | bad_msg "Please check your DHCP setup, or set nfsroot=<...>" 50 | return 1 51 | fi 52 | fi 53 | 54 | # expecting a valid NFSROOT here, or the code should have returned 55 | NFSOPTIONS=${NFSROOT#*,} 56 | NFSROOT=${NFSROOT%%,*} 57 | if [ "${NFSOPTIONS}" = "${NFSROOT}" ]; then 58 | NFSOPTIONS="${DEFAULT_NFSOPTIONS}" 59 | else 60 | NFSOPTIONS="${DEFAULT_NFSOPTIONS},${NFSOPTIONS}" 61 | fi 62 | 63 | local path= 64 | # override path if on livecd 65 | if is_livecd; then 66 | path="${CDROOT_PATH}" 67 | good_msg "Attempting to mount NFS CD image on ${NFSROOT}." 68 | else 69 | path="${NEW_ROOT}" 70 | good_msg "Attempting to mount NFS root on ${NFSROOT}." 71 | fi 72 | 73 | good_msg "NFS options: ${NFSOPTIONS}" 74 | mount -t nfs -o ${NFSOPTIONS} "${NFSROOT}" "${path}" 75 | if [ "${?}" = "0" ]; then 76 | REAL_ROOT="/dev/nfs" 77 | return 0 78 | else 79 | bad_msg "NFS Mounting failed. Is the path corrent ?" 80 | return 1 81 | fi 82 | } 83 | -------------------------------------------------------------------------------- /defaults/initrd.d/00-rootdev.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.d/00-common.sh 4 | . /etc/initrd.d/00-splash.sh 5 | . /etc/initrd.d/00-zfs.sh 6 | 7 | _fstype_init() { 8 | local fstype="${1}" 9 | if [ "${fstype}" = "btrfs" ]; then 10 | # start BTRFS volume detection, if available 11 | [ -x /sbin/btrfs ] && /sbin/btrfs device scan 12 | elif [ -z "${fstype}" ]; then 13 | warn_msg "Unable to detect the filesystem type (empty variable)" 14 | fi 15 | } 16 | 17 | _rootdev_detect() { 18 | local got_good_root=0 19 | while [ "${got_good_root}" != "1" ]; do 20 | 21 | case "${REAL_ROOT}" in 22 | LABEL=*|UUID=*) 23 | local root_dev=$(find_real_device "${REAL_ROOT}") 24 | if [ -n "${root_dev}" ]; then 25 | REAL_ROOT="${root_dev}" 26 | good_msg "Detected root: ${REAL_ROOT}" 27 | else 28 | bad_msg "Unable to resolve root: ${REAL_ROOT}" 29 | 30 | got_good_root=0 31 | prompt_user "REAL_ROOT" "root block device" 32 | continue 33 | fi 34 | ;; 35 | 36 | ZFS*) 37 | # zfs_rootdev_init will tweak ${REAL_ROOT} 38 | zfs_rootdev_init 39 | if [ "${?}" = "0" ]; then 40 | got_good_root=1 41 | else 42 | got_good_root=0 43 | prompt_user "REAL_ROOT" "root block device" 44 | continue 45 | fi 46 | ;; 47 | esac 48 | 49 | if [ -z "${REAL_ROOT}" ]; then 50 | # No REAL_ROOT determined/specified. 51 | # Prompt user for root block device. 52 | prompt_user "REAL_ROOT" "root block device" 53 | got_good_root=0 54 | 55 | # Check for a block device, NFS or ZFS 56 | # Here we assume that zfs_rootdev_init has correctly 57 | # initialized ZFS volumes 58 | elif [ -b "${REAL_ROOT}" ] || is_nfs || is_zfs; then 59 | got_good_root=1 60 | else 61 | bad_msg "${REAL_ROOT} is an invalid root device..." 62 | REAL_ROOT="" 63 | got_good_root=0 64 | fi 65 | done 66 | 67 | return 0 68 | } 69 | 70 | _rootdev_mount() { 71 | local mount_opts=ro 72 | local mount_fstype="${ROOTFSTYPE}" 73 | local fstype=$(get_device_fstype "${REAL_ROOT}") 74 | 75 | # handle ZFS special case. Thanks to Jordan Patterson 76 | # for reporting this. 77 | if [ -z "${fstype}" ] && is_zfs; then 78 | # here we assume that if ${fstype} is empty 79 | # and ZFS is enabled, we may well force the 80 | # fstype value to zfs_member 81 | fstype=$(zfs_member_fstype) 82 | fi 83 | 84 | if is_zfs_fstype "${fstype}"; then 85 | [ -z "${mount_fstype}" ] && mount_fstype=zfs 86 | mount_opts=$(zfs_get_real_root_mount_flags) 87 | fi 88 | 89 | [ -z "${mount_fstype}" ] && mount_fstype="${fstype}" 90 | 91 | good_msg "Detected fstype: ${fstype}" 92 | good_msg "Using mount fstype: ${mount_fstype}" 93 | _fstype_init "${fstype}" 94 | 95 | local mopts="${mount_opts}" 96 | [ -n "${REAL_ROOTFLAGS}" ] && \ 97 | mopts="${mopts},${REAL_ROOTFLAGS}" 98 | good_msg "Using mount opts: -o ${mopts}" 99 | 100 | mount -t "${mount_fstype}" -o "${mopts}" \ 101 | "${REAL_ROOT}" "${NEW_ROOT}" && return 0 102 | 103 | bad_msg "Cannot mount ${REAL_ROOT}, trying with -t auto" 104 | mount -t "auto" -o "${mopts}" \ 105 | "${REAL_ROOT}" "${NEW_ROOT}" && return 0 106 | 107 | bad_msg "Cannot mount ${REAL_ROOT} with -t auto, giving up" 108 | 109 | return 1 110 | } 111 | 112 | _get_mounts_list() { 113 | awk ' 114 | /^[[:blank:]]*#/ { next } 115 | { print $1 } 116 | ' ${NEW_ROOT}/etc/initramfs.mounts 117 | } 118 | 119 | _get_mount_fstype() { 120 | [ -e "${NEW_ROOT}"/etc/fstab ] || return 1 121 | awk -v fs="$1" ' 122 | /^[[:blank:]]*#/ { next } 123 | $2 == fs { print $3 } 124 | ' ${NEW_ROOT}/etc/fstab 125 | } 126 | 127 | _get_mount_options() { 128 | [ -e "${NEW_ROOT}"/etc/fstab ] || return 1 129 | awk -v fs="$1" ' 130 | /^[[:blank:]]*#/ { next } 131 | $2 == fs { print $4 } 132 | ' ${NEW_ROOT}/etc/fstab 133 | } 134 | 135 | _get_mount_device() { 136 | [ -e "${NEW_ROOT}"/etc/fstab ] || return 1 137 | awk -v fs="$1" ' 138 | /^[[:blank:]]*#/ { next } 139 | $2 == fs { print $1 } 140 | ' ${NEW_ROOT}/etc/fstab 141 | } 142 | 143 | # If the kernel is handed a mount option is does not recognize, it 144 | # WILL fail to mount. util-linux handles auto/noauto, but busybox 145 | # passes it straight to the kernel which then rejects the mount. To 146 | # make like a little easier, busybox mount does not care about 147 | # leading, trailing or duplicate commas. 148 | _strip_mount_options() { 149 | sed -r \ 150 | -e 's/(,|^)(no)?auto(,|$)/,/g' \ 151 | -e 's/(,|^)iversion(,|$)/,/g' 152 | } 153 | 154 | real_root_init() { 155 | if [ -z "${REAL_ROOT}" ] && [ "${FAKE_ROOT}" != "/dev/ram0" ]; then 156 | REAL_ROOT="${FAKE_ROOT}" 157 | fi 158 | 159 | if [ -z "${REAL_ROOTFLAGS}" ]; then 160 | REAL_ROOTFLAGS="${FAKE_ROOTFLAGS}" 161 | fi 162 | } 163 | 164 | real_init_init() { 165 | local default_init="/sbin/init" 166 | if [ -z "${REAL_INIT}" ] && [ -z "${FAKE_INIT}" ]; then 167 | # if none of REAL_INIT and FAKE_INIT are set, default 168 | # to ${default_init} 169 | REAL_INIT="${default_init}" 170 | elif [ -z "${REAL_INIT}" ]; then 171 | if [ "${FAKE_INIT}" = "/linuxrc" ]; then 172 | # if init=/linuxrc is given, ignore linuxrc 173 | # this is for backward compatibility with very old setups 174 | REAL_INIT="${default_init}" 175 | else 176 | REAL_INIT="${FAKE_INIT}" 177 | fi 178 | fi 179 | } 180 | 181 | # Read /etc/initramfs.mounts from ${NEW_ROOT} and mount the 182 | # listed filesystem mountpoints. For instance, /usr, which is 183 | # required by udev & systemd. 184 | ensure_initramfs_mounts() { 185 | local fslist= 186 | 187 | if [ -f "${NEW_ROOT}/etc/initramfs.mounts" ]; then 188 | fslist="$(_get_mounts_list)" 189 | else 190 | fslist="/usr" 191 | fi 192 | 193 | local dev= fstype= opts= mnt= cmd= 194 | for fs in ${fslist}; do 195 | 196 | mnt="${NEW_ROOT}${fs}" 197 | if mountpoint -q "${mnt}"; then 198 | good_msg "${fs} already mounted, skipping..." 199 | continue 200 | fi 201 | 202 | dev=$(_get_mount_device "${fs}") 203 | [ -z "${dev}" ] && continue 204 | # Resolve it like util-linux mount does 205 | [ -L "${dev}" ] && dev=$(realpath "${dev}") 206 | # In this case, it's probably part of the filesystem 207 | # and not a mountpoint 208 | [ -z "${dev}" ] && continue 209 | 210 | fstype=$(_get_mount_fstype "${fs}") 211 | if _get_mount_options "${fs}" | fgrep -q bind; then 212 | opts="bind" 213 | dev="${NEW_ROOT}${dev}" 214 | else 215 | # ro must be trailing, and the options will always 216 | # contain at least 'defaults' 217 | opts="$(_get_mount_options ${fs} | _strip_mount_options)" 218 | opts="${opts},ro" 219 | fi 220 | 221 | cmd="mount -t ${fstype} -o ${opts} ${dev} ${mnt}" 222 | good_msg "Mounting ${dev} as ${fs}: ${cmd}" 223 | if ! ${cmd}; then 224 | bad_msg "Unable to mount ${dev} for ${fs}" 225 | fi 226 | done 227 | } 228 | 229 | rootdev_init() { 230 | good_msg "Initializing root device..." 231 | 232 | while true; do 233 | 234 | if ! _rootdev_detect; then 235 | bad_msg "Could not mount specified ROOT, try again" 236 | prompt_user "REAL_ROOT" "root block device" 237 | continue 238 | fi 239 | 240 | if is_livecd && ! is_nfs; then 241 | # CD already mounted; no further checks necessary 242 | break 243 | fi 244 | if [ "${LOOPTYPE}" = "sgimips" ]; then 245 | # sgimips mounts the livecd root partition directly 246 | # there is no isofs filesystem to worry about 247 | break 248 | fi 249 | 250 | good_msg "Mounting ${REAL_ROOT} as root..." 251 | 252 | # Try to mount the device as ${NEW_ROOT} 253 | local out=1 254 | if is_nfs; then 255 | find_nfs && out=0 256 | else 257 | _rootdev_mount && out=0 258 | fi 259 | 260 | if [ "${out}" != "0" ]; then 261 | bad_msg "Could not mount specified ROOT, try again" 262 | prompt_user "REAL_ROOT" "root block device" 263 | continue 264 | fi 265 | 266 | # now that the root filesystem is mounted, before 267 | # checking the validity of ${NEW_ROOT} and ${REAL_INIT}, 268 | # ensure that ${NEW_ROOT}/etc/initramfs.mounts entries 269 | # are mounted. 270 | ensure_initramfs_mounts 271 | 272 | # NFS does not need further checks here. 273 | is_nfs && break 274 | 275 | if [ ! -d "${NEW_ROOT}/dev" ]; then 276 | _msg="The filesystem ${REAL_ROOT}," 277 | _msg="${_msg} mounted at ${NEW_ROOT}" 278 | _msg="${_msg} does not contain /dev" 279 | _msg="${_msg}, init will likely fail..." 280 | bad_msg "${_msg}" 281 | prompt_user "REAL_ROOT" "root block device" 282 | continue 283 | fi 284 | if [ ! -x "${NEW_ROOT}${REAL_INIT}" ]; then 285 | _msg="The filesystem ${REAL_ROOT}," 286 | _msg="${_msg} mounted at ${NEW_ROOT}" 287 | _msg="${_msg} does not contain a valid" 288 | _msg="${_msg} init=${REAL_INIT}" 289 | bad_msg "${_msg}" 290 | prompt_user "REAL_ROOT" "root block device" 291 | continue 292 | fi 293 | break 294 | done 295 | } 296 | -------------------------------------------------------------------------------- /defaults/initrd.d/00-splash.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.d/00-common.sh 4 | . /etc/initrd.d/00-devmgr.sh 5 | 6 | splash() { 7 | return 0 8 | } 9 | 10 | # this redefines splash() 11 | [ -e "${INITRD_SPLASH}" ] && . "${INITRD_SPLASH}" 12 | 13 | is_fbsplash() { 14 | if [ -e "${INITRD_SPLASH}" ] && [ "${FBSPLASH}" = '1' ] 15 | then 16 | return 0 17 | fi 18 | return 1 19 | } 20 | 21 | is_plymouth() { 22 | if [ "${PLYMOUTH}" = '1' ] && [ "${QUIET}" = '1' ] \ 23 | && [ -e "${PLYMOUTHD_BIN}" ] 24 | then 25 | return 0 26 | fi 27 | return 1 28 | } 29 | 30 | is_plymouth_started() { 31 | [ -n "${PLYMOUTH_FAILURE}" ] && return 1 32 | is_plymouth && "${PLYMOUTH_BIN}" --ping 2>/dev/null && return 0 33 | return 1 34 | } 35 | 36 | splash_init() { 37 | if is_udev; then 38 | # if udev, we can load the splash earlier 39 | # In the plymouth case, udev will load KMS automatically 40 | splashcmd init 41 | fi 42 | } 43 | 44 | splashcmd() { 45 | # plymouth support 46 | local cmd="${1}" 47 | shift 48 | 49 | case "${cmd}" in 50 | init) 51 | is_fbsplash && splash init 52 | is_plymouth && _plymouth_init 53 | ;; 54 | 55 | verbose) 56 | is_fbsplash && splash verbose 57 | _plymouth_hide 58 | ;; 59 | 60 | quiet) 61 | # no fbsplash support 62 | _plymouth_show 63 | ;; 64 | 65 | set_msg) 66 | is_fbsplash && splash set_msg "${1}" 67 | _plymouth_message "${1}" 68 | ;; 69 | 70 | hasroot) 71 | # no fbsplash support 72 | _plymouth_newroot "${1}" 73 | ;; 74 | esac 75 | } 76 | 77 | # Courtesy of dracut. Licensed under GPL-2. 78 | # Taken from: dracut/modules.d/90crypt/crypt-lib.sh 79 | # ask_for_password 80 | # 81 | # Wraps around plymouth ask-for-password and adds fallback to tty password ask 82 | # if plymouth is not present. 83 | # 84 | # --cmd command 85 | # Command to execute. Required. 86 | # --prompt prompt 87 | # Password prompt. Note that function already adds ':' at the end. 88 | # Recommended. 89 | # --tries n 90 | # How many times repeat command on its failure. Default is 3. 91 | # --ply-[cmd|prompt|tries] 92 | # Command/prompt/tries specific for plymouth password ask only. 93 | # --tty-[cmd|prompt|tries] 94 | # Command/prompt/tries specific for tty password ask only. 95 | # --tty-echo-off 96 | # Turn off input echo before tty command is executed and turn on after. 97 | # It's useful when password is read from stdin. 98 | ask_for_password() { 99 | local cmd; local prompt; local tries=3 100 | local ply_cmd; local ply_prompt; local ply_tries=3 101 | local tty_cmd; local tty_prompt; local tty_tries=3 102 | local ret 103 | 104 | while [ $# -gt 0 ]; do 105 | case "$1" in 106 | --cmd) ply_cmd="$2"; tty_cmd="$2" shift;; 107 | --ply-cmd) ply_cmd="$2"; shift;; 108 | --tty-cmd) tty_cmd="$2"; shift;; 109 | --prompt) ply_prompt="$2"; tty_prompt="$2" shift;; 110 | --ply-prompt) ply_prompt="$2"; shift;; 111 | --tty-prompt) tty_prompt="$2"; shift;; 112 | --tries) ply_tries="$2"; tty_tries="$2"; shift;; 113 | --ply-tries) ply_tries="$2"; shift;; 114 | --tty-tries) tty_tries="$2"; shift;; 115 | --tty-echo-off) tty_echo_off=yes;; 116 | esac 117 | shift 118 | done 119 | 120 | { flock -s 9; 121 | # Prompt for password with plymouth, if installed and running. 122 | if is_plymouth_started 123 | then 124 | "${PLYMOUTH_BIN}" ask-for-password \ 125 | --prompt="$ply_prompt" \ 126 | --number-of-tries=$ply_tries \ 127 | --command="$ply_cmd" 128 | ret=$? 129 | else 130 | splashcmd verbose 131 | if [ "$tty_echo_off" = yes ]; then 132 | stty_orig="$(stty -g)" 133 | stty -echo 134 | fi 135 | 136 | local i=1 137 | while [ $i -le $tty_tries ]; do 138 | [ -n "$tty_prompt" ] && \ 139 | printf "$tty_prompt [$i/$tty_tries]:" >&2 140 | eval "$tty_cmd" && ret=0 && break 141 | ret=$? 142 | i=$(($i+1)) 143 | [ -n "$tty_prompt" ] && printf '\n' >&2 144 | done 145 | 146 | [ "$tty_echo_off" = yes ] && stty $stty_orig 147 | 148 | # no need for: splashcmd quiet 149 | # since fbsplash does not support it 150 | if [ $ret -ne 0 ] && is_fbsplash 151 | then 152 | splashcmd set_msg 'Disk unlocked.' 153 | fi 154 | fi 155 | } 9>/.console_lock 156 | 157 | [ $ret -ne 0 ] && bad_msg "Wrong password" 158 | return $ret 159 | } 160 | 161 | prompt_user() { 162 | # $1 = variable whose value is the path (examples: "REAL_ROOT", 163 | # "LUKS_KEYDEV") 164 | # $2 = label 165 | # $3 = optional explanations for failure 166 | 167 | eval local oldvalue='$'${1} 168 | 169 | if [ $# != 2 -a $# != 3 ]; then 170 | bad_msg "Bad invocation of function prompt_user." 171 | bad_msg "Please file a bug report with this message" 172 | exit 1 173 | fi 174 | [ -n "${3}" ] && local explnt=" or : ${3}" || local explnt="." 175 | 176 | splashcmd verbose 177 | bad_msg "Could not find the ${2} in ${oldvalue}${explnt}" 178 | bad_msg "Please specify another value or:" 179 | bad_msg "- press Enter for the same" 180 | bad_msg '- type "shell" for a shell' 181 | bad_msg '- type "q" to skip...' 182 | echo -n "${2}(${oldvalue}) :: " 183 | read ${1} 184 | case $(eval echo '$'${1}) in 185 | 'q') 186 | eval ${1}'='${oldvalue} 187 | warn_msg "Skipping step, this will likely cause a boot failure." 188 | break 189 | ;; 190 | 'shell') 191 | eval ${1}'='${oldvalue} 192 | warn_msg "To leave and try again just press +D" 193 | run_shell 194 | ;; 195 | '') 196 | eval ${1}'='${oldvalue} 197 | ;; 198 | esac 199 | splashcmd quiet 200 | } 201 | 202 | _plymouth_init() { 203 | good_msg "Enabling Plymouth" 204 | mkdir -p /run/plymouth || return 1 205 | 206 | # Make sure that udev is done loading tty and drm 207 | if is_udev 208 | then 209 | udevadm trigger --action=add --attr-match=class=0x030000 \ 210 | >/dev/null 2>&1 211 | udevadm trigger --action=add --subsystem-match=graphics \ 212 | --subsystem-match=drm --subsystem-match=tty \ 213 | >/dev/null 2>&1 214 | udevadm settle 215 | fi 216 | 217 | local consoledev= 218 | local other= 219 | read consoledev other < /sys/class/tty/console/active 220 | consoledev=${consoledev:-tty0} 221 | "${PLYMOUTHD_BIN}" --attach-to-session --pid-file /run/plymouth/pid \ 222 | || { 223 | PLYMOUTH_FAILURE=1; 224 | return 1; 225 | } 226 | _plymouth_show 227 | good_msg "Plymouth enabled" 228 | } 229 | 230 | _plymouth_hide() { 231 | is_plymouth_started && "${PLYMOUTH_BIN}" --hide-splash 232 | } 233 | 234 | _plymouth_show() { 235 | is_plymouth_started && "${PLYMOUTH_BIN}" --show-splash 236 | } 237 | 238 | _plymouth_message() { 239 | is_plymouth_started && "${PLYMOUTH_BIN}" --update="${1}" 240 | } 241 | 242 | _plymouth_newroot() { 243 | is_plymouth_started && "${PLYMOUTH_BIN}" --newroot="${1}" 244 | } 245 | -------------------------------------------------------------------------------- /defaults/initrd.d/00-suspend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | resume_init() { 4 | if [ -z "${REAL_RESUME}" ]; then 5 | return 0 6 | fi 7 | if [ "${NORESUME}" = "1" ]; then 8 | return 0 9 | fi 10 | 11 | local resume_dev=$(find_real_device "${REAL_RESUME}") 12 | if [ -n "${resume_dev}" ]; then 13 | REAL_RESUME="${resume_dev}" 14 | good_msg "Detected real_resume=${resume_dev}" 15 | else 16 | bad_msg "Cannot resolve real_resume=${REAL_RESUME}" 17 | bad_msg "Something bad may happen, crossing fingers" 18 | fi 19 | 20 | swsusp_resume 21 | } 22 | 23 | swsusp_resume() { 24 | # determine swap resume partition 25 | local device=$(ls -lL "${REAL_RESUME}" | sed 's/\ */ /g' | \ 26 | cut -d \ -f 5-6 | sed 's/,\ */:/') 27 | [ -f /sys/power/resume -a -n "${device}" ] && \ 28 | echo "${device}" > /sys/power/resume 29 | } 30 | -------------------------------------------------------------------------------- /defaults/initrd.d/00-zfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.d/00-common.sh 4 | . /etc/initrd.d/00-fsdev.sh 5 | . /etc/initrd.d/00-devmgr.sh 6 | 7 | is_zfs() { 8 | # Note: this only works after zfs_real_root_init 9 | # (thus, only after real_root_init) 10 | [ "${USE_ZFS}" = "1" ] && return 0 11 | return 1 12 | } 13 | 14 | # This piece of information can be used by external 15 | # functions to return the default filesystem type 16 | # for zfs members. 17 | zfs_member_fstype() { 18 | echo "zfs_member" 19 | } 20 | 21 | is_zfs_fstype() { 22 | local fstype="${1}" 23 | [ "${fstype}" = "$(zfs_member_fstype)" ] && return 0 24 | return 1 25 | } 26 | 27 | zfs_real_root_init() { 28 | case "${REAL_ROOT}" in 29 | ZFS=*) 30 | ZFS_POOL=${REAL_ROOT#*=} 31 | ZFS_POOL=${ZFS_POOL%%/*} 32 | USE_ZFS=1 33 | ;; 34 | ZFS) 35 | USE_ZFS=1 36 | ;; 37 | esac 38 | 39 | # Verify that zfs support has been compiled in 40 | if [ "${USE_ZFS}" = "1" ]; then 41 | for i in /sbin/zfs /sbin/zpool; do 42 | if [ ! -x "${i}" ]; then 43 | USE_ZFS=0 44 | bad_msg 'Aborting use of zfs because ${i} not found!' 45 | break 46 | fi 47 | done 48 | fi 49 | } 50 | 51 | # This helper function is to be called using _call_func_timeout. This 52 | # works around the inability of busybox modprobe to handle complex 53 | # module dependencies. This also enables us to wait a reasonable 54 | # amount of time until /dev/zfs appears. 55 | wait_for_zfs() { 56 | while [ ! -c /dev/zfs ]; do modprobe zfs 2> /dev/null; done; 57 | } 58 | 59 | _call_func_timeout() { 60 | local func=$1 timeout=$2 pid watcher 61 | 62 | ( ${func} ) & pid=$! 63 | ( sleep ${timeout} && kill -HUP ${pid} ) 2>/dev/null & watcher=$! 64 | if wait ${pid} 2>/dev/null; then 65 | kill -HUP $watcher 2> /dev/null 66 | wait $watcher 2>/dev/null 67 | return 1 68 | fi 69 | 70 | return 0 71 | } 72 | 73 | zfs_start_volumes() { 74 | # is ZFS enabled? 75 | is_zfs || return 0 76 | 77 | # Avoid race involving asynchronous module loading 78 | if _call_func_timeout wait_for_zfs 5; then 79 | bad_msg "Cannot import ZFS pool because /dev/zfs is missing" 80 | 81 | elif [ -z "${ZFS_POOL}" ]; then 82 | good_msg "Importing ZFS pools" 83 | 84 | zpool import -N -a ${ZPOOL_FORCE} 85 | if [ "${?}" = "0" ]; then 86 | good_msg "Importing ZFS pools succeeded" 87 | else 88 | warn_msg "Imported ZFS pools failed" 89 | fi 90 | 91 | else 92 | local pools=$(zpool list -H -o name ${ZFS_POOL} 2>&1) 93 | if [ "${pools}" = "${ZFS_POOL}" ]; then 94 | good_msg "ZFS pool ${ZFS_POOL} already imported." 95 | 96 | if [ -n "${CRYPT_ROOTS}" ] || [ -n "${CRYPT_SWAPS}" ]; then 97 | good_msg "LUKS detected. Reimporting ${ZFS_POOL}" 98 | zpool export -f "${ZFS_POOL}" 99 | zpool import -N ${ZPOOL_FORCE} "${ZFS_POOL}" 100 | fi 101 | else 102 | good_msg "Importing ZFS pool ${ZFS_POOL}" 103 | zpool import -N ${ZPOOL_FORCE} "${ZFS_POOL}" 104 | 105 | if [ "${?}" = "0" ]; then 106 | good_msg "Import of ${ZFS_POOL} succeeded" 107 | else 108 | warn_msg "Import of ${ZFS_POOL} failed" 109 | fi 110 | fi 111 | fi 112 | 113 | is_udev && udevadm settle 114 | } 115 | 116 | # Initialize the zfs root filesystem device and 117 | # tweak ${REAL_ROOT}. In addition, set ${ZFS_POOL} 118 | # for later use. 119 | # Return 0 if initialization is successful. 120 | zfs_rootdev_init() { 121 | local root_dev="${REAL_ROOT#*=}" 122 | ZFS_POOL="${root_dev%%/*}" 123 | 124 | if [ "${root_dev}" != "ZFS" ]; then 125 | local ztype=$(zfs get type -o value -H "${root_dev}") 126 | if [ "${ztype}" = "filesystem" ]; then 127 | REAL_ROOT="${root_dev}" 128 | good_msg "Detected zfs root: ${REAL_ROOT}" 129 | return 0 130 | else 131 | bad_msg "${root_dev} is not a zfs filesystem" 132 | return 1 133 | fi 134 | fi 135 | 136 | local bootfs=$(zpool list -H -o bootfs) 137 | [ "${bootfs}" = "-" ] && return 1 138 | 139 | for i in ${bootfs}; do 140 | if zfs get type "${i}" > /dev/null; then 141 | REAL_ROOT="${i}" 142 | good_msg "Detected zfs bootfs root: ${REAL_ROOT}" 143 | return 0 144 | fi 145 | done 146 | return 1 147 | } 148 | 149 | zfs_get_real_root_mount_flags() { 150 | local flags=rw,zfsutil 151 | local zmtype=$(zfs get -H -o value mountpoint "${REAL_ROOT}") 152 | [ "${zmtype}" = "legacy" ] && flags=rw 153 | echo "${flags}" 154 | } 155 | -------------------------------------------------------------------------------- /defaults/initrd.defaults: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | 3 | PATH="/usr/sbin:/usr/bin:/sbin:/bin" 4 | 5 | # Insert ctrl character 6 | # ctrl-V then esc will print ^[ 7 | # ctrl-V then ctrl-shift-m will print ^M 8 | BACK_UP="\033[1K\033[0G" 9 | NORMAL="\033[0m" 10 | WARN="\033[33;1m" 11 | BAD="\033[31;1m" 12 | BOLD="\033[1m" 13 | GOOD="\033[32;1m" 14 | 15 | # From KNOPPIX LINUXRC 16 | # Reset fb color mode 17 | RESET="]R" 18 | # ANSI COLORS 19 | # Erase to end of line 20 | CRE=" 21 | " 22 | # Clear and reset Screen 23 | CLEAR="c" 24 | # Normal color 25 | NORMAL="" 26 | # RED: Failure or error message 27 | RED="" 28 | # GREEN: Success message 29 | GREEN="" 30 | # YELLOW: Descriptions 31 | YELLOW="" 32 | # BLUE: System mesages 33 | BLUE="" 34 | # MAGENTA: Found devices or drivers 35 | MAGENTA="" 36 | # CYAN: Questions 37 | CYAN="" 38 | # BOLD WHITE: Hint 39 | WHITE="" 40 | 41 | # Clear screen with colormode reset 42 | # echo "$CLEAR$RESET" 43 | # echo "$CLEAR" 44 | # Just go to the top of the screen 45 | # echo -n "" 46 | 47 | KV=$(uname -r) 48 | KMAJOR=$(echo $KV | cut -f1 -d.) 49 | KMINOR=$(echo $KV | cut -f2 -d.) 50 | KVER="${KMAJOR}.${KMINOR}" 51 | MISCOPTS="debug detect" 52 | 53 | ROOT_LINKS="bin sbin lib lib32 lib64 boot usr opt emul" 54 | ROOT_TREES="etc root home var" 55 | KSUFF=".ko" 56 | 57 | # systemd-207 dropped /sbin/udevd 58 | UDEVD="/sbin/udevd" 59 | [ ! -e "${UDEVD}" ] && UDEVD="/usr/lib/systemd/systemd-udevd" 60 | [ ! -e "${UDEVD}" ] && UDEVD="/lib/systemd/systemd-udevd" 61 | 62 | MDEVD="/sbin/mdev" 63 | INITRD_SPLASH="/etc/initrd.splash" 64 | # latest plymouth ebuild in gentoo has it in /usr/bin 65 | PLYMOUTHD_BIN="/sbin/plymouthd" 66 | [ ! -e "${PLYMOUTHD_BIN}" ] && PLYMOUTHD_BIN="/usr/sbin/plymouthd" 67 | 68 | PLYMOUTH_BIN="/bin/plymouth" 69 | [ ! -e "${PLYMOUTH_BIN}" ] && PLYMOUTH_BIN="/usr/bin/plymouth" 70 | 71 | REAL_ROOT="" 72 | CONSOLE="/dev/console" 73 | NEW_ROOT="/newroot" 74 | CDROOT="0" 75 | CDROOT_DEV="" 76 | CDROOT_TYPE="auto" 77 | CDROOT_PATH="/mnt/cdrom" 78 | # This is the file that the cdroot will be checked for as a 79 | # marker. It must exist RELATIVE to the cdroot. 80 | CDROOT_MARKER="/livecd" 81 | 82 | LOOPS="/livecd.loop /zisofs /livecd.squashfs /image.squashfs /livecd.gcloop" 83 | 84 | DEFAULT_NFSOPTIONS="ro,nolock,rsize=1024,wsize=1024" 85 | 86 | # Only sections that are in by default or those that 87 | # are not module groups need to be defined here... 88 | HWOPTS="keymap cache modules pata sata scsi usb firewire waitscan lvm dmraid mdadm fs net virtio hyperv" 89 | MY_HWOPTS="modules pata sata scsi usb firewire waitscan dmraid mdadm fs net iscsi crypto plymouth virtio" 90 | -------------------------------------------------------------------------------- /defaults/initrd.scripts: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.defaults 4 | . /etc/initrd.d/00-splash.sh 5 | . /etc/initrd.d/00-common.sh 6 | . /etc/initrd.d/00-fsdev.sh 7 | . /etc/initrd.d/00-devmgr.sh 8 | . /etc/initrd.d/00-zfs.sh 9 | . /etc/initrd.d/00-modules.sh 10 | . /etc/initrd.d/00-livecd.sh 11 | . /etc/initrd.d/00-nfs.sh 12 | . /etc/initrd.d/00-keymaps.sh 13 | . /etc/initrd.d/00-crypt.sh 14 | . /etc/initrd.d/00-suspend.sh 15 | . /etc/initrd.d/00-iscsi.sh 16 | . /etc/initrd.d/00-rootdev.sh 17 | -------------------------------------------------------------------------------- /defaults/keymaps/1.map: -------------------------------------------------------------------------------- 1 | azerty.map -------------------------------------------------------------------------------- /defaults/keymaps/10.map: -------------------------------------------------------------------------------- 1 | de.map -------------------------------------------------------------------------------- /defaults/keymaps/11.map: -------------------------------------------------------------------------------- 1 | dk.map -------------------------------------------------------------------------------- /defaults/keymaps/12.map: -------------------------------------------------------------------------------- 1 | dvorak.map -------------------------------------------------------------------------------- /defaults/keymaps/13.map: -------------------------------------------------------------------------------- 1 | es.map -------------------------------------------------------------------------------- /defaults/keymaps/14.map: -------------------------------------------------------------------------------- 1 | et.map -------------------------------------------------------------------------------- /defaults/keymaps/15.map: -------------------------------------------------------------------------------- 1 | fi.map -------------------------------------------------------------------------------- /defaults/keymaps/16.map: -------------------------------------------------------------------------------- 1 | fr.map -------------------------------------------------------------------------------- /defaults/keymaps/17.map: -------------------------------------------------------------------------------- 1 | gr.map -------------------------------------------------------------------------------- /defaults/keymaps/18.map: -------------------------------------------------------------------------------- 1 | hu.map -------------------------------------------------------------------------------- /defaults/keymaps/19.map: -------------------------------------------------------------------------------- 1 | il.map -------------------------------------------------------------------------------- /defaults/keymaps/2.map: -------------------------------------------------------------------------------- 1 | be.map -------------------------------------------------------------------------------- /defaults/keymaps/20.map: -------------------------------------------------------------------------------- 1 | is.map -------------------------------------------------------------------------------- /defaults/keymaps/21.map: -------------------------------------------------------------------------------- 1 | it.map -------------------------------------------------------------------------------- /defaults/keymaps/22.map: -------------------------------------------------------------------------------- 1 | jp.map -------------------------------------------------------------------------------- /defaults/keymaps/23.map: -------------------------------------------------------------------------------- 1 | la.map -------------------------------------------------------------------------------- /defaults/keymaps/24.map: -------------------------------------------------------------------------------- 1 | lt.map -------------------------------------------------------------------------------- /defaults/keymaps/25.map: -------------------------------------------------------------------------------- 1 | mk.map -------------------------------------------------------------------------------- /defaults/keymaps/26.map: -------------------------------------------------------------------------------- 1 | nl.map -------------------------------------------------------------------------------- /defaults/keymaps/27.map: -------------------------------------------------------------------------------- 1 | no.map -------------------------------------------------------------------------------- /defaults/keymaps/28.map: -------------------------------------------------------------------------------- 1 | pl.map -------------------------------------------------------------------------------- /defaults/keymaps/29.map: -------------------------------------------------------------------------------- 1 | pt.map -------------------------------------------------------------------------------- /defaults/keymaps/3.map: -------------------------------------------------------------------------------- 1 | bg.map -------------------------------------------------------------------------------- /defaults/keymaps/30.map: -------------------------------------------------------------------------------- 1 | ro.map -------------------------------------------------------------------------------- /defaults/keymaps/31.map: -------------------------------------------------------------------------------- 1 | ru.map -------------------------------------------------------------------------------- /defaults/keymaps/32.map: -------------------------------------------------------------------------------- 1 | se.map -------------------------------------------------------------------------------- /defaults/keymaps/33.map: -------------------------------------------------------------------------------- 1 | sg.map -------------------------------------------------------------------------------- /defaults/keymaps/34.map: -------------------------------------------------------------------------------- 1 | sk-y.map -------------------------------------------------------------------------------- /defaults/keymaps/35.map: -------------------------------------------------------------------------------- 1 | sk-z.map -------------------------------------------------------------------------------- /defaults/keymaps/36.map: -------------------------------------------------------------------------------- 1 | slovene.map -------------------------------------------------------------------------------- /defaults/keymaps/37.map: -------------------------------------------------------------------------------- 1 | trf.map -------------------------------------------------------------------------------- /defaults/keymaps/39.map: -------------------------------------------------------------------------------- 1 | ua.map -------------------------------------------------------------------------------- /defaults/keymaps/4.map: -------------------------------------------------------------------------------- 1 | br-a.map -------------------------------------------------------------------------------- /defaults/keymaps/40.map: -------------------------------------------------------------------------------- 1 | uk.map -------------------------------------------------------------------------------- /defaults/keymaps/41.map: -------------------------------------------------------------------------------- 1 | us.map -------------------------------------------------------------------------------- /defaults/keymaps/42.map: -------------------------------------------------------------------------------- 1 | wangbe.map -------------------------------------------------------------------------------- /defaults/keymaps/43.map: -------------------------------------------------------------------------------- 1 | sf.map -------------------------------------------------------------------------------- /defaults/keymaps/5.map: -------------------------------------------------------------------------------- 1 | br-l.map -------------------------------------------------------------------------------- /defaults/keymaps/6.map: -------------------------------------------------------------------------------- 1 | by.map -------------------------------------------------------------------------------- /defaults/keymaps/7.map: -------------------------------------------------------------------------------- 1 | cf.map -------------------------------------------------------------------------------- /defaults/keymaps/8.map: -------------------------------------------------------------------------------- 1 | croat.map -------------------------------------------------------------------------------- /defaults/keymaps/9.map: -------------------------------------------------------------------------------- 1 | cz.map -------------------------------------------------------------------------------- /defaults/keymaps/azerty.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/azerty.map -------------------------------------------------------------------------------- /defaults/keymaps/be.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/be.map -------------------------------------------------------------------------------- /defaults/keymaps/bg.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/bg.map -------------------------------------------------------------------------------- /defaults/keymaps/br-a.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/br-a.map -------------------------------------------------------------------------------- /defaults/keymaps/br-l.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/br-l.map -------------------------------------------------------------------------------- /defaults/keymaps/by.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890-= q w e r t y u i o p []a s d f g h j k l ;'`\z x c v b n m ,./       2 | < 3 |     !@#$%^&*()_+ Q W E R T Y U I O P {}A S D F G H J K L :"~|Z X C V B N M <>?       4 | > !   5 |      6 |  7 |   8 |  "#$%&'()*+       9 |  10 | |,-   1234567890-= qwertyuiop[] asdfghjkl;'`\zxcvbnm,./        11 |    < 12 |     ~!@#$%^&*((_+ QWERTYUIOP{} ASDFGHJKL:"~|ZXCVBNM<>?       13 | >      14 |          15 |  | 16 |       -------------------------------------------------------------------------------- /defaults/keymaps/cf.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/cf.map -------------------------------------------------------------------------------- /defaults/keymaps/croat.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/croat.map -------------------------------------------------------------------------------- /defaults/keymaps/cz.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/cz.map -------------------------------------------------------------------------------- /defaults/keymaps/de.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/de.map -------------------------------------------------------------------------------- /defaults/keymaps/dk.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/dk.map -------------------------------------------------------------------------------- /defaults/keymaps/dvorak.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890[] ',.p y f g c r l /=a o e u i d h t n s -`\;q j k x b m w v z        2 | < 3 |     !@#$%^&*(){} "<>P Y F G C R L ?+A O E U I D H T N S _~|:Q J K X B M W V Z        4 | > !   5 |   ~@${[]}~ p y f g c r l a o e u i d h t n s \q j k x b m w v z            6 | |      7 |   "#$%&'()*+   8 | ,-   ~    9 |       10 |  ~    11 |       12 |    1234567890[] ',.pyfgcrl/= aoeuidhtns-`\;qjkxbmwvz         13 |    < 14 |     ~!@#$%^&*(){} "<>PYFGCRL?+AOEUIDHTNS_~|:QJKXBMWVZ     15 | >     16 |        17 |   18 |       -------------------------------------------------------------------------------- /defaults/keymaps/es.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/es.map -------------------------------------------------------------------------------- /defaults/keymaps/et.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/et.map -------------------------------------------------------------------------------- /defaults/keymaps/fi.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/fi.map -------------------------------------------------------------------------------- /defaults/keymaps/fr.map: -------------------------------------------------------------------------------- 1 | bkeymap&{"'(-}_/@)= a z e r t y u i o p ^$q s d f g h j k l m |**w x c v b n ,;:!       2 | < 3 |     1234567890]+ A Z E R T Y U I O P <>Q S D F G H J K L M %~#W X C V B N ?./\       4 | > !   5 |   ~~#{[|`\^@]}a z e r t y u i o p ~q s d f g h j k l m w x c v b n             6 | |      7 |  "#$%&'()*+   8 | ,-   ~  9 |     10 |      1234567890-= azertyuiop[] qsdfghjklm'`\wxcvbn,./         11 |    < 12 |       13 |         14 |   15 |       -------------------------------------------------------------------------------- /defaults/keymaps/gr.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890-= q w e r t y u i o p []a s d f g h j k l ;'`\z x c v b n m ,./       2 | < 3 |      4 | !@#$%^&*()_+ Q W E R T Y U I O P {}A S D F G H J K L :"~|Z X C V B N M <>?  5 |      6 | > !   7 |    8 | ~@${[]}\q w e r t y u i o p ~a s d f g h j k l z x c v b n m              9 | |     10 |   11 |   "#$%&'()*+   12 | ,-    13 | ~  14 |       15 |   16 | ~  17 |       18 |       19 | 1234567890-= qwertyuiop[] asdfghjkl;'` 20 | \zxcvbnm,./         21 |    < 22 |      23 | ~!@#$%^QWERTYUIOP{}ASDFGHJKL|ZXCVBNM<>     24 |   25 |   26 |          27 |   28 |       29 | -------------------------------------------------------------------------------- /defaults/keymaps/hu.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/hu.map -------------------------------------------------------------------------------- /defaults/keymaps/il.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/il.map -------------------------------------------------------------------------------- /defaults/keymaps/is.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/is.map -------------------------------------------------------------------------------- /defaults/keymaps/it.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/it.map -------------------------------------------------------------------------------- /defaults/keymaps/jp.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890-^ q w e r t y u i o p @[a s d f g h j k l ;:]z x c v b n m ,./       2 | < 3 |  \   \!"#$%&'()~=~ Q W E R T Y U I O P `{A S D F G H J K L +*}Z X C V B N M <>?       4 | > !_     5 | |   6 |   "#$%&'()*+   7 | ,-   ~   8 |       9 |    1234567890-^ qwertyuiop@[ asdfghjkl;:]zxcvbnm,./        10 |    < 11 |  \   \~!"#$%&'()~=~ QWERTYUIOP`{ASDFGHJKL+*}ZXCVBNM<>?     12 | >_   |   13 |         14 |   15 |       -------------------------------------------------------------------------------- /defaults/keymaps/keymapList: -------------------------------------------------------------------------------- 1 | Please select a keymap from the following list by typing in the appropriate 2 | name or number. Hit Enter for the default "us/41" US English keymap. 3 | 4 | 1 azerty 8 croat 15 fi 22 jp 29 pt 36 slovene 43 sf 5 | 2 be 9 cz 16 fr 23 la 30 ro 37 trf 6 | 3 bg 10 de 17 gr 24 lt 31 ru 38 -- 7 | 4 br-a 11 dk 18 hu 25 mk 32 se 39 ua 8 | 5 br-l 12 dvorak 19 il 26 nl 33 sg 40 uk 9 | 6 by 13 es 20 is 27 no 34 sk-y 41 us 10 | 7 cf 14 et 21 it 28 pl 35 sk-z 42 wangbe 11 | -------------------------------------------------------------------------------- /defaults/keymaps/la.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/la.map -------------------------------------------------------------------------------- /defaults/keymaps/lt.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/lt.map -------------------------------------------------------------------------------- /defaults/keymaps/mk.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/mk.map -------------------------------------------------------------------------------- /defaults/keymaps/nl.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890/= q w e r t y u i o p [*a s d f g h j k l +'@<z x c v b n m ,.-       2 | ] 3 |      4 | !"#$%&_())?~ Q W E R T Y U I O P ^|A S D F G H J K L :`~>Z X C V B N M ;:=       5 | > !   6 |    7 | ~@${[]}\ q w e r t y u i o p ~a s d f g h j k l z x c v b n m             8 | | 9 |       10 |    11 |   "#$%&'()*+   12 | ,-    13 | ~   14 |    ./01234567   15 | 89    16 | ~   17 |    "#$%&'()*+   18 |  ,-     19 | 1234567890/= qwertyuiop[* asdfghjkl+'@<zxcvbnm,.-         20 |    ] 21 |      22 | ~!"#$%&_())?~ QWERTYUIOP^|ASDFGHJKL:`~>ZXCVBNM;:=       23 | >    24 |    25 |         26 |   27 |       28 | -------------------------------------------------------------------------------- /defaults/keymaps/no.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890+\ q w e r t y u i o p }~a s d f g h j k l |{|'z x c v b n m ,.-       2 | < 3 |      4 | !"#$%&/()=?` Q W E R T Y U I O P ]^A S D F G H J K L \[|*Z X C V B N M ;:_       5 | > !   6 |    7 | ~@${[]}' q w e r t y u i o p ~a s d f g h j k l |z x c v b n m             8 |  9 |       10 |    11 |   "#$%&'()*+   12 | ,-    13 | ~   14 | |   "#$%&'()*+   15 |  ,-     16 | 1234567890-= qwertyuiop[] asdfghjkl;'`\zxcvbnm,./         17 |    < 18 |      19 |    20 |   |       21 |   22 |       23 | -------------------------------------------------------------------------------- /defaults/keymaps/pl.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/pl.map -------------------------------------------------------------------------------- /defaults/keymaps/pt.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/pt.map -------------------------------------------------------------------------------- /defaults/keymaps/ro.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/ro.map -------------------------------------------------------------------------------- /defaults/keymaps/ru.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/ru.map -------------------------------------------------------------------------------- /defaults/keymaps/se.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/se.map -------------------------------------------------------------------------------- /defaults/keymaps/sf.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890'^ q w e r t z u i o p a s d f g h j k l $y x c v b n m ,.-       2 | < 3 |     +"*4%&/()=?` Q W E R T Z U I O P !A S D F G H J K L $Y X C V B N M ;:_       4 | > !   5 |   @#4|'~q w e r t z u i o p []a s d f g h j k l {}y x c v b n m             6 | \      7 |   "#$%&'()*+   8 | ,-   4  9 | $     10 |    ~4  11 | $     12 |    1234567890-= qwertzuiop[] asdfghjkl;'`\yxcvbnm,./         13 |    < 14 |     4  15 |   $      16 |   17 |       -------------------------------------------------------------------------------- /defaults/keymaps/sg.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890'^ q w e r t z u i o p a s d f g h j k l $y x c v b n m ,.-       2 | < 3 |    4 | +"*4%&/()=?` Q W E R T Z U I O P !A S D F G H J K L $Y X C V B N M ;:_       5 | > !   6 |  7 | ~@#4|'~q w e r t z u i o p []a s d f g h j k l {}y x c v b n m            8 | \ 9 |     10 |   11 |   "#$%&'()*+   12 | ,-  13 | ~4  14 | $     15 |   16 | ~4  17 | $      18 |   19 |     20 | 1234567890-= qwertzuiop[] asdfghjkl;'`\yxcvbnm,./         21 |    < 22 |    23 | 4  24 |   $      25 |   26 |     27 |  -------------------------------------------------------------------------------- /defaults/keymaps/sk-y.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/sk-y.map -------------------------------------------------------------------------------- /defaults/keymaps/sk-z.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/sk-z.map -------------------------------------------------------------------------------- /defaults/keymaps/slovene.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/slovene.map -------------------------------------------------------------------------------- /defaults/keymaps/trf.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/trf.map -------------------------------------------------------------------------------- /defaults/keymaps/ua.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890-= q w e r t y u i o p []a s d f g h j k l ;'`\z x c v b n m ,./       2 | < 3 |   4 |  5 |   !@#$%^&*()_+ Q W E R T Y U I O P {}A S D F G H J K L :"~|Z X C V B N M <>?       6 | > ! 7 |  8 |   9 |   ~@${[]}\q w e r t y u i o p ~a s d f g h j k l z x c v b n m       10 | | 11 |  12 |     13 |   "#$%&'()*+   14 | ,- 15 |  16 |   ~  17 |   ./01234567   18 | 89 19 |  20 |   ~  21 |      22 |   23 |  24 |    123456789)-= qwertyuiop[] asdfghjkl;'`\zxcvbnm,./         25 |    < 26 |   27 |  28 |   ~!@#$%^&*(_+QWERTYUIOP{}ASDFGHJKL:"~|ZXCVBNM<>    29 |  30 |  31 |     32 |         33 |   34 |   35 |  36 |     -------------------------------------------------------------------------------- /defaults/keymaps/uk.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/uk.map -------------------------------------------------------------------------------- /defaults/keymaps/us.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/us.map -------------------------------------------------------------------------------- /defaults/keymaps/wangbe.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/defaults/keymaps/wangbe.map -------------------------------------------------------------------------------- /defaults/linuxrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.defaults 4 | . /etc/initrd.scripts 5 | 6 | # Clean input/output 7 | exec >${CONSOLE} <${CONSOLE} 2>&1 8 | 9 | if [ "$$" != "1" ]; then 10 | echo "/linuxrc has to be run as the init process as the one" 11 | echo "with a PID of 1. Try adding init=/linuxrc to the" 12 | echo "kernel command line or running "exec /linuxrc"." 13 | exit 1 14 | fi 15 | 16 | mount -t proc -o noexec,nosuid,nodev proc /proc >/dev/null 2>&1 17 | mount -o remount,rw / >/dev/null 2>&1 18 | mount -t tmpfs -o rw,nosuid,nodev,relatime,mode=755 none /run 2>&1 19 | 20 | /bin/busybox --install -s 21 | 22 | if [ "$0" = "/init" ]; then 23 | rm -f /linuxrc 24 | fi 25 | 26 | # make sure that /sbin and /usr/sbin are in PATH 27 | # dmraid for instance is in /usr/sbin 28 | PATH="${PATH}:/sbin:/usr/sbin" 29 | 30 | CMDLINE=$(cat /proc/cmdline) 31 | FAKE_ROOT="" 32 | FAKE_INIT="" 33 | REAL_INIT="" 34 | FAKE_ROOTFLAGS="" 35 | INIT_OPTS="" 36 | CRYPT_SILENT=0 37 | QUIET="" 38 | 39 | mkdir -p /etc/cmdline /etc/modprobe.d 40 | for x in ${CMDLINE}; do 41 | case "${x}" in 42 | real_root=*) 43 | REAL_ROOT=${x#*=} 44 | ;; 45 | root=*) 46 | FAKE_ROOT=${x#*=} 47 | ;; 48 | subdir=*) 49 | SUBDIR=${x#*=} 50 | ;; 51 | real_init=*) 52 | REAL_INIT=${x#*=} 53 | ;; 54 | init=*) 55 | FAKE_INIT=${x#*=} 56 | ;; 57 | init_opts=*) 58 | INIT_OPTS=${x#*=} 59 | ;; 60 | cdroot) 61 | CDROOT=1 62 | ;; 63 | cdroot=*) 64 | CDROOT=1 65 | CDROOT_DEV=${x#*=} 66 | ;; 67 | cdroot_type=*) 68 | CDROOT_TYPE=${x#*=} 69 | ;; 70 | cdroot_marker=*) 71 | CDROOT_MARKER=${x#*=} 72 | ;; 73 | loop=*) 74 | LOOP=${x#*=} 75 | ;; 76 | looptype=*) 77 | LOOPTYPE=${x#*=} 78 | ;; 79 | isoboot=*) 80 | ISOBOOT=${x#*=} 81 | ;; 82 | domdev) 83 | USE_MDEV=1 84 | ;; 85 | dolvm|rd.lvm.lv=*) 86 | USE_LVM_NORMAL=1 87 | ;; 88 | domdadm|rd.md.uuid=*) 89 | USE_MDADM=1 90 | ;; 91 | dodmraid|rd.dm.uuid=*) 92 | USE_DMRAID_NORMAL=1 93 | ;; 94 | dodmraid=*|rd.dm.uuid=*) 95 | DMRAID_OPTS=${x#*=} 96 | USE_DMRAID_NORMAL=1 97 | ;; 98 | domultipath) 99 | good_msg "Booting with multipath activated." 100 | USE_MULTIPATH_NORMAL=1 101 | ;; 102 | dozfs=*) 103 | ZFS_OPTS=${x#*=} 104 | if [ "${ZFS_OPTS}" = "force" ]; then 105 | ZPOOL_FORCE=-f 106 | fi 107 | ;; 108 | quiet) 109 | QUIET=1 110 | ;; 111 | debug) 112 | DEBUG="yes" 113 | ;; 114 | scandelay=*) 115 | SDELAY=${x#*=} 116 | ;; 117 | scandelay) 118 | SDELAY=3 119 | ;; 120 | doload=*) 121 | MDOLIST=${x#*=} 122 | MDOLIST=$(echo ${MDOLIST} | sed -e "s/,/ /g") 123 | ;; 124 | nodetect) 125 | NODETECT=1 126 | ;; 127 | noload=*) 128 | MLIST=${x#*=} 129 | MLIST="$(echo ${MLIST} | sed -e "s/,/ /g")" 130 | export MLIST 131 | ;; 132 | CONSOLE=*|console=*) 133 | CONSOLE=${x#*=} 134 | CONSOLE=$(basename ${CONSOLE}) 135 | ;; 136 | splash) 137 | PLYMOUTH=1 138 | ;; 139 | splash=*) 140 | FBSPLASH=1 141 | ;; 142 | lvmraid=*) 143 | RAID_DEVICES="${x#*=}" 144 | RAID_DEVICES="$(echo ${RAID_DEVICES} | sed -e "s/,/ /g")" 145 | USE_LVM_NORMAL=1 146 | ;; 147 | part=*) 148 | MDPART=${x#*=} 149 | ;; 150 | part|partitionable) 151 | MDPART=1 152 | ;; 153 | ip=*) 154 | IP=${x#*=} 155 | ;; 156 | nfsroot=*) 157 | NFSROOT=${x#*=} 158 | ;; 159 | 160 | netroot=iscsi:*) 161 | x=${x#*=} 162 | parse_dracut_iscsi_root "${x}" 163 | ;; 164 | iscsi_initiatorname=*|iscsi_initiator=*) 165 | ISCSI_INITIATORNAME=${x#*=} 166 | ;; 167 | iscsi_target=*) 168 | ISCSI_TARGET=${x#*=} 169 | ;; 170 | iscsi_tgpt=*) 171 | ISCSI_TGPT=${x#*=} 172 | ;; 173 | iscsi_address=*) 174 | ISCSI_ADDRESS=${x#*=} 175 | ;; 176 | iscsi_port=*) 177 | ISCSI_PORT=${x#*=} 178 | ;; 179 | iscsi_username=*) 180 | ISCSI_USERNAME=${x#*=} 181 | ;; 182 | iscsi_password=*) 183 | ISCSI_PASSWORD=${x#*=} 184 | ;; 185 | iscsi_username_in=*) 186 | ISCSI_USERNAME_IN=${x#*=} 187 | ;; 188 | iscsi_password_in=*) 189 | ISCSI_PASSWORD_IN=${x#*=} 190 | ;; 191 | iscsi_debug=*) 192 | ISCSI_DEBUG=${x#*=} 193 | ;; 194 | iscsi_noibft) 195 | ISCSI_NOIBFT=1 196 | ;; 197 | 198 | crypt_root=*) 199 | # kept for backward compatibility 200 | CRYPT_ROOTS=${x#*=} 201 | ;; 202 | crypt_swap=*) 203 | # kept for backward compatibility 204 | CRYPT_SWAPS=${x#*=} 205 | ;; 206 | 207 | crypt_roots=*) 208 | # The first entry will be the one that 209 | # is going to be mapped to ${REAL_ROOT}. 210 | # Multiple "roots" devices are needed 211 | # in order to support multiple dmcrypts 212 | # aggregated through software raid arrays. 213 | CRYPT_ROOTS="${CRYPT_ROOTS} ${x#*=}" 214 | ;; 215 | crypt_swaps=*) 216 | CRYPT_SWAPS="${CRYPT_SWAPS} ${x#*=}" 217 | ;; 218 | 219 | root_key=*) 220 | CRYPT_ROOT_KEY=${x#*=} 221 | ;; 222 | root_keydev=*) 223 | CRYPT_ROOT_KEYDEV=${x#*=} 224 | ;; 225 | root_trim=*) 226 | CRYPT_ROOT_TRIM=${x#*=} 227 | ;; 228 | 229 | swap_key=*) 230 | CRYPT_SWAP_KEY=${x#*=} 231 | ;; 232 | swap_keydev=*) 233 | CRYPT_SWAP_KEYDEV=${x#*=} 234 | ;; 235 | real_resume=*|resume=*) 236 | REAL_RESUME=${x#*=} 237 | ;; 238 | noresume) 239 | NORESUME=1 240 | ;; 241 | crypt_silent) 242 | CRYPT_SILENT=1 243 | ;; 244 | real_rootflags=*) 245 | REAL_ROOTFLAGS=${x#*=} 246 | ;; 247 | rootflags=*) 248 | FAKE_ROOTFLAGS=${x#*=} 249 | ;; 250 | rootfstype=*) 251 | ROOTFSTYPE=${x#*=} 252 | ;; 253 | keymap=*|vconsole.keymap=*) 254 | USE_KEYMAP=${x#*=} 255 | ;; 256 | aufs) 257 | USE_AUFS=1 258 | ;; 259 | overlayfs) 260 | USE_OVERLAYFS=1 261 | ;; 262 | esac 263 | done 264 | 265 | quiet_kmsg 266 | 267 | maybe_setup_ld_cache 268 | 269 | real_init_init 270 | 271 | is_livecd || { 272 | real_root_init && zfs_real_root_init; 273 | } 274 | 275 | cmdline_hwopts 276 | 277 | mount_devfs 278 | 279 | mount_sysfs 280 | 281 | devmgr_init 282 | 283 | splash_init 284 | 285 | modules_init 286 | 287 | # If we're mdev, we better wait for all the modules to be loaded. 288 | is_mdev && splashcmd init 289 | 290 | cd / 291 | 292 | start_iscsi 293 | 294 | # Apply scan delay if specified 295 | sdelay 296 | 297 | start_volumes 298 | zfs_start_volumes 299 | 300 | setup_keymap 301 | 302 | # Initialize LUKS root device except for livecd's 303 | is_livecd || start_luks 304 | 305 | start_volumes 306 | zfs_start_volumes 307 | 308 | # Initialize resume from hibernation 309 | is_livecd || resume_init 310 | 311 | mkdir -p "${NEW_ROOT}" 312 | CHROOT="${NEW_ROOT}" 313 | 314 | # Run debug shell if requested 315 | rundebugshell "before setting up the root filesystem" 316 | 317 | # Setup Live system mounts 318 | is_livecd && livecd_init 319 | 320 | # Determine root device 321 | rootdev_init 322 | 323 | # If CD root is set determine the looptype to boot 324 | is_livecd && livecd_mount 325 | 326 | # Re-run this here, which makes sure that it at least had a chance 327 | # to be called. 328 | ensure_initramfs_mounts 329 | 330 | splashcmd hasroot "${NEW_ROOT}" 331 | 332 | # Execute script on the cdrom just before boot to update 333 | # things if necessary 334 | is_livecd && cd_update 335 | 336 | if [ "${SUBDIR}" != "" ] && [ -e "${CHROOT}/${SUBDIR}" ]; then 337 | good_msg "Entering ${SUBDIR} to boot" 338 | CHROOT="${CHROOT}/${SUBDIR}" 339 | fi 340 | 341 | verbose_kmsg 342 | 343 | devmgr_terminate 344 | 345 | good_msg "Booting (initramfs)" 346 | 347 | cd "${CHROOT}" 348 | 349 | move_mounts_to_chroot 350 | 351 | # Run debug shell if requested 352 | rundebugshell "before entering switch_root" 353 | 354 | exec /sbin/switch_root -c "/dev/console" "${CHROOT}" \ 355 | "${REAL_INIT}" "${INIT_OPTS}" 356 | 357 | # If we get here, something bad has happened 358 | splashcmd verbose 359 | 360 | bad_msg "A fatal error has occurred since ${REAL_INIT} did not" 361 | bad_msg "boot correctly. Trying to open a shell..." 362 | 363 | exec /bin/bash 364 | exec /bin/sh 365 | exec /bin/ash 366 | exec /bin/dash 367 | exec sh 368 | -------------------------------------------------------------------------------- /defaults/modules_load: -------------------------------------------------------------------------------- 1 | # Module groups for genkernel initramfs auto-loading 2 | 3 | # RAID 4 | MODULES_ATARAID="ataraid pdcraid hptraid" 5 | MODULES_DMRAID="dm-mod dm-mirror dm-crypt" 6 | MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr dm-bufio dm-crypt dm-delay dm-flakey dm-log dm-log-userspace dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin dm-service-time dm-thin-pool dm-persistent-data libcrc32c dm-zero" 7 | MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr dm-raid dm-crypt raid0 raid1 raid456 raid5 raid6 raid10 linear multipath" 8 | MODULES_MULTIPATH="dm-mod dm-multipath dm-round-robin dm-rdac dm-queue-length dm-service-time" 9 | 10 | # Hardware (IDE/SCSI/SATA) 11 | MODULES_PATA="pata_mpiix pata_pdc2027x pata_radisys pata_sil680 pata_rz1000 pata_efar pata_cmd64x pata_hpt366 pata_hpt37x pata_hpt3x3 pata_hpt3x2n pata_optidma pata_it821x pata_artop pata_oldpiix pata_cypress pata_platform pata_serverworks pata_legacy pata_ns87410 pata_ns87415 pata_pcmcia pata_isapnp pata_it8213 pata_ali pata_amd pata_opti pata_atiixp pata_triflex pata_pdc202xx_old pata_sc1200 pata_qdi pata_netcell pata_sis pata_hpt3x2n pata_marvell pata_jmicron pata_via pata_cs5520 pata_cs5530 pata_cs5535 pata_sl82c105 libata" 12 | MODULES_SATA="sata_promise sata_sil sata_sil24 sata_svw sata_via sata_nv sata_sx4 sata_sis sata_uli sata_vsc sata_qstor ahci libata ata_piix sata_mv sata_inic162x pdc_adma" 13 | MODULES_SCSI="sd_mod sg sr_mod aic79xx aic7xxx aic7xxx_old arcmsr BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x dtc fdomain gdth pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp qlogicpti seagate t128 u14-34f ultrastor wd7000 sym53c8xx dmx3191d imm in2000 ips qla1280 sim710 sym53c416 dc395x atp870u mptbase mptscsih mptspi mptfc mptsas 3w-xxxx 3w-9xxx cpqarray cciss hpsa DAC960 sx8 aacraid megaraid megaraid_mbox megaraid_mm megaraid_sas qla2xxx lpfc scsi_transport_fc aic94xx mpt2sas" 14 | MODULES_WAITSCAN="scsi_wait_scan" 15 | 16 | # Hardware (Network) 17 | MODULES_NET="e1000 tg3" 18 | 19 | # iSCSI support 20 | MODULES_ISCSI="scsi_transport_iscsi libiscsi iscsi_tcp" 21 | 22 | # Hardware (Pluggable) 23 | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" 24 | MODULES_PCMCIA="pcmcia pcmcia_core yenta_socket pd6729 i82092 i82365 tcic ds ide-cs firmware_class" 25 | MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-pci ohci-hcd xhci-hcd xhci-pci xhci-plat xhci-plat-hcd usbhid hid-generic sl811-hcd hid-a4tech hid-apple hid-belkin hid-cherry hid-chicony hid-cypress hid-dummy hid-ezkey hid-gyration hid-logitech hid_logitech_hidpp hid_logitech_dj hid-microsoft hid-monterey hid-petalynx hid-pl hid-samsung hid-sony hid-sunplus" 26 | 27 | # Filesystems 28 | MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs overlay fuse" 29 | 30 | # Crypto 31 | MODULES_CRYPTO="sha1_generic sha256_generic sha512_generic cbc ecb aes_generic aes-x86_64 xts" 32 | # Backward compatibility with previous releases 33 | MODULES_CRYPT="${MODULES_CRYPTO}" 34 | 35 | # Virtio support (KVM mainly) 36 | MODULES_VIRTIO="virtio virtio_balloon virtio_console virtio_net virtio_blk virtio_scsi virtio_pci virtio_ring" 37 | 38 | # Microsoft Hyper-V support 39 | MODULES_HYPERV="hv_storvsc hv_netvsc hyperv_fb" 40 | -------------------------------------------------------------------------------- /defaults/software.sh: -------------------------------------------------------------------------------- 1 | # NOTE: 2 | # - This file (software.sh) is sourced by genkernel. 3 | # Rather than changing this very file, please override specific versions/variables 4 | # somewhere in /etc/genkernel.conf . 5 | # 6 | # - Any VERSION_* magic strings below will be filled (or already have been) 7 | # with actual version strings by the genkernel ebuild. 8 | # 9 | # - This file should not override previously defined variables, as their values may 10 | # originate from user changes to /etc/genkernel.conf . 11 | 12 | BUSYBOX_VER="${BUSYBOX_VER:-1.20.2}" 13 | BUSYBOX_SRCTAR="${BUSYBOX_SRCTAR:-${DISTDIR}/busybox-${BUSYBOX_VER}.tar.bz2}" 14 | BUSYBOX_DIR="${BUSYBOX_DIR:-busybox-${BUSYBOX_VER}}" 15 | BUSYBOX_BINCACHE="${BUSYBOX_BINCACHE:-%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2}" 16 | -------------------------------------------------------------------------------- /defaults/udhcpc.scripts: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 4 | 5 | case ${1} in 6 | renew|bound) 7 | [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" 8 | [ -n "$subnet" ] && NETMASK="netmask $subnet" 9 | [ -n "$rootpath" ] && echo "$rootpath" > /rootpath 10 | [ -n "$hostname" ] && hostname ${hostname} 11 | 12 | busybox ifconfig $interface $ip $BROADCAST $NETMASK 13 | if [ -n "${router}" ] 14 | then 15 | while route del default gw 0.0.0.0 dev $interface; do 16 | : 17 | done 18 | 19 | for i in ${router} 20 | do 21 | busybox route add default gw ${i} 22 | done 23 | fi 24 | [ -n "$domain" ] && echo "domain ${domain}" >> /etc/resolv.conf 25 | if [ -n "${dns}" ] 26 | then 27 | for i in ${dns} 28 | do 29 | echo "nameserver ${i}" >> /etc/resolv.conf 30 | done 31 | fi 32 | ;; 33 | deconfig) 34 | busybox ifconfig $interface 0.0.0.0 35 | ;; 36 | esac 37 | 38 | -------------------------------------------------------------------------------- /doc/asciidoc.conf: -------------------------------------------------------------------------------- 1 | # 2 | # asciidoc.conf for genkernel's man page 3 | # 4 | -------------------------------------------------------------------------------- /gen_arch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: 74290fb0795daf4451ed00ee8cc9fd9e825b6dba $ 3 | 4 | get_official_arch() { 5 | if [ "${CMD_ARCHOVERRIDE}" != '' ] 6 | then 7 | ARCH=${CMD_ARCHOVERRIDE} 8 | else 9 | if [ "${ARCH_OVERRIDE}" != '' ] 10 | then 11 | ARCH=${ARCH_OVERRIDE} 12 | else 13 | ARCH=`uname -m` 14 | case "${ARCH}" in 15 | i?86) 16 | ARCH="x86" 17 | ;; 18 | mips|mips64) 19 | ARCH="mips" 20 | ;; 21 | arm*) 22 | ARCH=arm 23 | ;; 24 | *) 25 | ;; 26 | esac 27 | fi 28 | fi 29 | 30 | if [ "${CMD_UTILS_ARCH}" != '' ] 31 | then 32 | UTILS_ARCH=${CMD_UTILS_ARCH} 33 | else 34 | if [ "${UTILS_ARCH}" != '' ] 35 | then 36 | UTILS_ARCH=${UTILS_ARCH} 37 | fi 38 | fi 39 | 40 | # sparc64 klibc is b0rked, so we force to 32 41 | if [ "${ARCH}" = 'sparc64' ] 42 | then 43 | UTILS_ARCH='sparc' 44 | fi 45 | 46 | ARCH_CONFIG="${GK_SHARE}/arch/${ARCH}/config.sh" 47 | [ -f "${ARCH_CONFIG}" ] || gen_die "${ARCH} not yet supported by genkernel. Please add the arch-specific config file, ${ARCH_CONFIG}" 48 | } 49 | 50 | set_kernel_arch() { 51 | KERNEL_ARCH=${ARCH} 52 | case ${ARCH} in 53 | ppc|ppc64) 54 | if [ "${VER}" -ge "3" ] 55 | then 56 | KERNEL_ARCH=powerpc 57 | elif [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] 58 | then 59 | if [ "${PAT}" -eq "6" -a "${SUB}" -ge "16" ] || [ "${PAT}" -gt "6" ] 60 | then 61 | KERNEL_ARCH=powerpc 62 | fi 63 | fi 64 | ;; 65 | x86) 66 | if [ "${VER}" -ge "3" ] 67 | then 68 | KERNEL_ARCH=x86 69 | elif [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] || [ "${VER}" -gt "2" ] 70 | then 71 | if [ "${PAT}" -eq "6" -a "${SUB}" -ge "24" ] || [ "${PAT}" -gt "6" ] 72 | then 73 | KERNEL_ARCH=x86 74 | else 75 | KERNEL_ARCH=i386 76 | fi 77 | fi 78 | ;; 79 | x86_64) 80 | if [ "${VER}" -ge "3" ] 81 | then 82 | KERNEL_ARCH=x86 83 | elif [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] || [ "${VER}" -gt "2" ] 84 | then 85 | if [ "${PAT}" -eq "6" -a "${SUB}" -ge "24" ] || [ "${PAT}" -gt "6" ] 86 | then 87 | KERNEL_ARCH=x86 88 | fi 89 | fi 90 | ;; 91 | esac 92 | export KERNEL_ARCH 93 | print_info 2 "KERNEL_ARCH=${KERNEL_ARCH}" 94 | } 95 | -------------------------------------------------------------------------------- /gen_bootloader.sh: -------------------------------------------------------------------------------- 1 | # $Id: 6098adfaf68411da73c6591171daec7a051b5d14 $ 2 | 3 | set_bootloader() { 4 | case "${BOOTLOADER}" in 5 | grub) 6 | set_bootloader_grub 7 | ;; 8 | grub2) 9 | set_bootloader_grub2 10 | ;; 11 | *) 12 | print_warning "Bootloader ${BOOTLOADER} is not currently supported" 13 | ;; 14 | esac 15 | } 16 | 17 | set_bootloader_read_fstab() { 18 | local ROOTFS=$(awk 'BEGIN{RS="((#[^\n]*)?\n)"}( $2 == "/" ) { print $1; exit }' /etc/fstab) 19 | local BOOTFS=$(awk 'BEGIN{RS="((#[^\n]*)?\n)"}( $2 == "'${BOOTDIR}'") { print $1; exit }' /etc/fstab) 20 | 21 | # If ${BOOTDIR} is not defined in /etc/fstab, it must be the same as / 22 | [ -z "${BOOTFS}" ] && BOOTFS=${ROOTFS} 23 | 24 | echo "${ROOTFS} ${BOOTFS}" 25 | } 26 | 27 | set_bootloader_grub_read_device_map() { 28 | # Read GRUB device map 29 | [ ! -d ${TEMP} ] && mkdir ${TEMP} 30 | echo "quit" | grub --batch --device-map=${TEMP}/grub.map &>/dev/null 31 | echo "${TEMP}/grub.map" 32 | } 33 | 34 | set_bootloader_grub2() { 35 | local GRUB_CONF 36 | for candidate in \ 37 | "${BOOTDIR}/grub2/grub.cfg" \ 38 | "${BOOTDIR}/grub/grub.cfg" \ 39 | ; do 40 | if [[ -e "${candidate}" ]]; then 41 | GRUB_CONF=${candidate} 42 | break 43 | fi 44 | done 45 | 46 | if [[ -z "${GRUB_CONF}" ]]; then 47 | print_error 1 "Error! Grub2 configuration file does not exist, please ensure grub2 is correctly setup first." 48 | return 0 49 | fi 50 | 51 | print_info 1 "You can customize Grub2 parameters in /etc/default/grub." 52 | print_info 1 "Running grub2-mkconfig to create ${GRUB_CONF}..." 53 | grub2-mkconfig -o "${GRUB_CONF}" 2> /dev/null || grub-mkconfig -o "${GRUB_CONF}" 2> /dev/null || gen_die "grub-mkconfig failed" 54 | [ "${BUILD_RAMDISK}" -ne 0 ] && sed -i 's/ro single/ro debug/' "${GRUB_CONF}" 55 | } 56 | 57 | set_bootloader_grub() { 58 | local GRUB_CONF="${BOOTDIR}/grub/grub.conf" 59 | 60 | print_info 1 "Adding kernel to ${GRUB_CONF}..." 61 | 62 | if [ ! -e ${GRUB_CONF} ] 63 | then 64 | local GRUB_BOOTFS 65 | if [ -n "${BOOTFS}" ] 66 | then 67 | GRUB_BOOTFS=$BOOTFS 68 | else 69 | GRUB_BOOTFS=$(set_bootloader_read_fstab | cut -d' ' -f2) 70 | fi 71 | 72 | # Get the GRUB mapping for our device 73 | local GRUB_BOOT_DISK1=$(echo ${GRUB_BOOTFS} | sed -e 's#\(/dev/.\+\)[[:digit:]]\+#\1#') 74 | local GRUB_BOOT_DISK=$(awk '{if ($2 == "'${GRUB_BOOT_DISK1}'") {gsub(/(\(|\))/, "", $1); print $1;}}' ${TEMP}/grub.map) 75 | local GRUB_BOOT_PARTITION=$(($(echo ${GRUB_BOOTFS} | sed -e 's#/dev/.\+\([[:digit:]]?*\)#\1#') - 1)) 76 | 77 | if [ -n "${GRUB_BOOT_DISK}" -a -n "${GRUB_BOOT_PARTITION}" ] 78 | then 79 | 80 | # Create grub configuration directory and file if it doesn't exist. 81 | [ ! -d `dirname ${GRUB_CONF}` ] && mkdir -p `dirname ${GRUB_CONF}` 82 | 83 | touch ${GRUB_CONF} 84 | echo 'default 0' >> ${GRUB_CONF} 85 | echo 'timeout 5' >> ${GRUB_CONF} 86 | echo "root (${GRUB_BOOT_DISK},${GRUB_BOOT_PARTITION})" >> ${GRUB_CONF} 87 | echo >> ${GRUB_CONF} 88 | 89 | # Add grub configuration to grub.conf 90 | echo "# Genkernel generated entry, see GRUB documentation for details" >> ${GRUB_CONF} 91 | echo "title=Gentoo Linux ($KV)" >> ${GRUB_CONF} 92 | echo -e "\tkernel /kernel-${KNAME}-${ARCH}-${KV}${KAPPENDNAME} root=${GRUB_ROOTFS}" >> ${GRUB_CONF} 93 | if [ "${BUILD_INITRD}" = '1' ] 94 | then 95 | if [ "${PAT}" -gt '4' ] 96 | then 97 | echo -e "\tinitrd /initramfs-${KNAME}-${ARCH}-${KV}${KAPPENDNAME}" >> ${GRUB_CONF} 98 | fi 99 | fi 100 | echo >> ${GRUB_CONF} 101 | else 102 | print_error 1 "Error! ${BOOTDIR}/grub/grub.conf does not exist and the correct settings can not be automatically detected." 103 | print_error 1 "Please manually create your ${BOOTDIR}/grub/grub.conf file." 104 | fi 105 | 106 | else 107 | # The grub.conf already exists, so let's try to duplicate the default entry 108 | if set_bootloader_grub_check_for_existing_entry "${GRUB_CONF}"; then 109 | print_warning 1 "An entry was already found for a kernel/initramfs with this name...skipping update" 110 | return 0 111 | fi 112 | 113 | set_bootloader_grub_duplicate_default "${GRUB_CONF}" 114 | fi 115 | 116 | } 117 | 118 | set_bootloader_grub_duplicate_default_replace_kernel_initrd() { 119 | sed -r -e "/^[[:space:]]*kernel/s/kernel-[[:alnum:][:punct:]]+/kernel-${KNAME}-${ARCH}-${KV}${KAPPENDNAME}/" - | 120 | sed -r -e "/^[[:space:]]*initrd/s/init(rd|ramfs)-[[:alnum:][:punct:]]+/init\1-${KNAME}-${ARCH}-${KV}${KAPPENDNAME}/" 121 | } 122 | 123 | set_bootloader_grub_check_for_existing_entry() { 124 | local GRUB_CONF=$1 125 | if grep -q "^[[:space:]]*kernel[[:space:]=]*.*/kernel-${KNAME}-${ARCH}-${KV}${KAPPENDNAME}\([[:space:]]\|$\)" "${GRUB_CONF}" && 126 | grep -q "^[[:space:]]*initrd[[:space:]=]*.*/initramfs-${KNAME}-${ARCH}-${KV}${KAPPENDNAME}\([[:space:]]\|$\)" "${GRUB_CONF}" 127 | then 128 | return 0 129 | fi 130 | return 1 131 | } 132 | 133 | set_bootloader_grub_duplicate_default() { 134 | local GRUB_CONF=$1 135 | local GRUB_CONF_TMP="${GRUB_CONF}.tmp" 136 | 137 | line_count=$(wc -l < "${GRUB_CONF}") 138 | line_nums="$(grep -n "^title" "${GRUB_CONF}" | cut -d: -f1)" 139 | if [ -z "${line_nums}" ]; then 140 | print_error 1 "No current 'title' entries found in your grub.conf...skipping update" 141 | return 0 142 | fi 143 | line_nums="${line_nums} $((${line_count}+1))" 144 | 145 | # Find default entry 146 | default=$(sed -rn '/^[[:space:]]*default[[:space:]=]/s/^.*default[[:space:]=]+([[:alnum:]]+).*$/\1/p' "${GRUB_CONF}") 147 | if [ -z "${default}" ]; then 148 | print_warning 1 "No default entry found...assuming 0" 149 | default=0 150 | fi 151 | if ! echo ${default} | grep -q '^[0-9]\+$'; then 152 | print_error 1 "We don't support non-numeric (such as 'saved') default values...skipping update" 153 | return 0 154 | fi 155 | 156 | # Grub defaults are 0 based, cut is 1 based 157 | # Figure out where the default entry lives 158 | startstop=$(echo ${line_nums} | cut -d" " -f$((${default}+1))-$((${default}+2))) 159 | startline=$(echo ${startstop} | cut -d" " -f1) 160 | stopline=$(echo ${startstop} | cut -d" " -f2) 161 | 162 | # Write out the bits before the default entry 163 | sed -n 1,$((${startline}-1))p "${GRUB_CONF}" > "${GRUB_CONF_TMP}" 164 | 165 | # Put in our title 166 | echo "title=Gentoo Linux (${KV})" >> "${GRUB_CONF_TMP}" 167 | 168 | # Pass the default entry (minus the title) through to the replacement function and pipe the output to GRUB_CONF_TMP 169 | sed -n $((${startline}+1)),$((${stopline}-1))p "${GRUB_CONF}" | set_bootloader_grub_duplicate_default_replace_kernel_initrd >> "${GRUB_CONF_TMP}" 170 | 171 | # Finish off with everything including the previous default entry 172 | sed -n ${startline},${line_count}p "${GRUB_CONF}" >> "${GRUB_CONF_TMP}" 173 | 174 | cp "${GRUB_CONF}" "${GRUB_CONF}.bak" 175 | cp "${GRUB_CONF_TMP}" "${GRUB_CONF}" 176 | rm "${GRUB_CONF_TMP}" 177 | } 178 | -------------------------------------------------------------------------------- /gen_configkernel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: 0428955c168ff5d01e87df90de5524e816a0bd6a $ 3 | 4 | # Fills variable KERNEL_CONFIG 5 | determine_config_file() { 6 | if [ "${CMD_KERNEL_CONFIG}" != "" ] 7 | then 8 | KERNEL_CONFIG="${CMD_KERNEL_CONFIG}" 9 | elif [ -f "/etc/kernels/kernel-config-${ARCH}-${KV}" ] 10 | then 11 | KERNEL_CONFIG="/etc/kernels/kernel-config-${ARCH}-${KV}" 12 | elif [ -f "${GK_SHARE}/arch/${ARCH}/kernel-config-${KV}" ] 13 | then 14 | KERNEL_CONFIG="${GK_SHARE}/arch/${ARCH}/kernel-config-${KV}" 15 | elif [ "${DEFAULT_KERNEL_CONFIG}" != "" -a -f "${DEFAULT_KERNEL_CONFIG}" ] 16 | then 17 | KERNEL_CONFIG="${DEFAULT_KERNEL_CONFIG}" 18 | elif [ -f "${GK_SHARE}/arch/${ARCH}/kernel-config-${VER}.${PAT}" ] 19 | then 20 | KERNEL_CONFIG="${GK_SHARE}/arch/${ARCH}/kernel-config-${VER}.${PAT}" 21 | elif [ -f "${GK_SHARE}/arch/${ARCH}/kernel-config" ] 22 | then 23 | KERNEL_CONFIG="${GK_SHARE}/arch/${ARCH}/kernel-config" 24 | else 25 | gen_die 'Error: No kernel .config specified, or file not found!' 26 | fi 27 | KERNEL_CONFIG="$(readlink -f "${KERNEL_CONFIG}")" 28 | } 29 | 30 | config_kernel() { 31 | determine_config_file 32 | cd "${KERNEL_DIR}" || gen_die 'Could not switch to the kernel directory!' 33 | 34 | # Backup current kernel .config 35 | if isTrue "${MRPROPER}" || [ ! -f "${KERNEL_OUTPUTDIR}/.config" ] 36 | then 37 | print_info 1 "kernel: Using config from ${KERNEL_CONFIG}" 38 | if [ -f "${KERNEL_OUTPUTDIR}/.config" ] 39 | then 40 | NOW=`date +--%Y-%m-%d--%H-%M-%S` 41 | cp "${KERNEL_OUTPUTDIR}/.config" "${KERNEL_OUTPUTDIR}/.config${NOW}.bak" \ 42 | || gen_die "Could not backup kernel config (${KERNEL_OUTPUTDIR}/.config)" 43 | print_info 1 " Previous config backed up to .config${NOW}.bak" 44 | fi 45 | fi 46 | 47 | if isTrue ${MRPROPER} 48 | then 49 | print_info 1 'kernel: >> Running mrproper...' 50 | compile_generic mrproper kernel 51 | else 52 | print_info 1 "kernel: --mrproper is disabled; not running 'make mrproper'." 53 | fi 54 | 55 | # If we're not cleaning a la mrproper, then we don't want to try to overwrite the configs 56 | # or we might remove configurations someone is trying to test. 57 | if isTrue "${MRPROPER}" || [ ! -f "${KERNEL_OUTPUTDIR}/.config" ] 58 | then 59 | local message='Could not copy configuration file!' 60 | if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then 61 | # Support --kernel-config=/proc/config.gz, mainly 62 | zcat "${KERNEL_CONFIG}" > "${KERNEL_OUTPUTDIR}/.config" || gen_die "${message}" 63 | else 64 | cp "${KERNEL_CONFIG}" "${KERNEL_OUTPUTDIR}/.config" || gen_die "${message}" 65 | fi 66 | fi 67 | 68 | # Support kernel config fragment merging. 69 | if isTrue "${MERGE_KCONFIG}" 70 | then 71 | KCONFIG_FRAGMENT=${KCONFIG_FRAGMENT:-/etc/default/genkernel_kconfig_fragment} 72 | local message="Error: Config fragment ${KCONFIG_FRAGMENT} not found!" 73 | print_info 1 "kernel: Merging config with ${KCONFIG_FRAGMENT}" 74 | [[ -f "${KCONFIG_FRAGMENT}" ]] || gen_die "${message}" 75 | KCONFIG_CONFIG="${KERNEL_OUTPUTDIR}/.config" \ 76 | "${KERNEL_DIR}"/scripts/kconfig/merge_config.sh \ 77 | "${KERNEL_OUTPUTDIR}/.config" \ 78 | "${KCONFIG_FRAGMENT[@]}" 79 | [[ "$?" ]] || gen_die "Error: merge_config.sh failed!" 80 | fi 81 | 82 | if isTrue "${OLDCONFIG}" 83 | then 84 | print_info 1 ' >> Running oldconfig...' 85 | yes '' 2>/dev/null | compile_generic oldconfig kernel 2>/dev/null 86 | else 87 | print_info 1 "kernel: --oldconfig is disabled; not running 'make oldconfig'." 88 | fi 89 | if isTrue "${CLEAN}" 90 | then 91 | print_info 1 'kernel: >> Cleaning...' 92 | compile_generic clean kernel 93 | else 94 | print_info 1 "kernel: --clean is disabled; not running 'make clean'." 95 | fi 96 | 97 | if isTrue ${MENUCONFIG} 98 | then 99 | print_info 1 'kernel: >> Invoking menuconfig...' 100 | compile_generic menuconfig kernelruntask 101 | [ "$?" ] || gen_die 'Error: menuconfig failed!' 102 | elif isTrue ${NCONFIG} 103 | then 104 | print_info 1 'kernel: >> Invoking nconfig...' 105 | compile_generic nconfig kernelruntask 106 | [ "$?" ] || gen_die 'Error: nconfig failed!' 107 | elif isTrue ${CMD_GCONFIG} 108 | then 109 | print_info 1 'kernel: >> Invoking gconfig...' 110 | compile_generic gconfig kernel 111 | [ "$?" ] || gen_die 'Error: gconfig failed!' 112 | 113 | CMD_XCONFIG=0 114 | fi 115 | 116 | if isTrue ${CMD_XCONFIG} 117 | then 118 | print_info 1 'kernel: >> Invoking xconfig...' 119 | compile_generic xconfig kernel 120 | [ "$?" ] || gen_die 'Error: xconfig failed!' 121 | fi 122 | } 123 | -------------------------------------------------------------------------------- /gen_moddeps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: 27dab4876ebd53c1b0b0612c35763fa91958a031 $ 3 | 4 | modules_kext() 5 | { 6 | KEXT=".ko" 7 | echo ${KEXT} 8 | } 9 | 10 | modules_dep_list() 11 | { 12 | KEXT=$(modules_kext) 13 | if [ -f ${INSTALL_MOD_PATH}/lib/modules/${KV}/modules.dep ] 14 | then 15 | cat ${INSTALL_MOD_PATH}/lib/modules/${KV}/modules.dep | grep ${1}${KEXT}\: | cut -d\: -f2 16 | fi 17 | } 18 | 19 | # Pass module deps list 20 | strip_mod_paths() 21 | { 22 | local x 23 | local ret 24 | local myret 25 | 26 | for x in ${*} 27 | do 28 | ret=`basename ${x} | cut -d. -f1` 29 | myret="${myret} ${ret}" 30 | done 31 | echo "${myret}" 32 | } 33 | 34 | 35 | gen_deps() 36 | { 37 | local modlist 38 | local deps 39 | 40 | for x in ${*} 41 | do 42 | echo ${x} >> ${TEMP}/moddeps 43 | modlist=`modules_dep_list ${x}` 44 | if [ "${modlist}" != "" -a "${modlist}" != " " ] 45 | then 46 | deps=`strip_mod_paths ${modlist}` 47 | else 48 | deps="" 49 | fi 50 | for y in ${deps} 51 | do 52 | echo ${y} >> ${TEMP}/moddeps 53 | done 54 | done 55 | } 56 | 57 | gen_dep_list() 58 | { 59 | if [ "${ALLRAMDISKMODULES}" = "1" ]; then 60 | strip_mod_paths $(find "${INSTALL_MOD_PATH}/lib/modules/${KV}" -name "*$(modules_kext)") | sort 61 | else 62 | local group_modules 63 | rm -f ${TEMP}/moddeps > /dev/null 64 | 65 | for group_modules in ${!MODULES_*}; do 66 | gen_deps ${!group_modules} 67 | done 68 | 69 | # Only list each module once 70 | if [ -f ${TEMP}/moddeps ] 71 | then 72 | cat ${TEMP}/moddeps | sort | uniq 73 | fi 74 | fi 75 | } 76 | -------------------------------------------------------------------------------- /gen_package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: 6e9421c0aff8c241040f98a0b8a9e9638e753969 $ 3 | 4 | gen_minkernpackage() { 5 | print_info 1 'Creating minimal kernel package' 6 | rm -rf "${TEMP}/minkernpackage" > /dev/null 2>&1 7 | mkdir "${TEMP}/minkernpackage" || gen_die 'Could not make a directory for the kernel package!' 8 | if [ "${KERNCACHE}" != "" ] 9 | then 10 | /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} kernel-${ARCH}-${KV} 11 | /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} config-${ARCH}-${KV} 12 | if isTrue "${GENZIMAGE}" 13 | then 14 | /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} kernelz-${ARCH}-${KV} 15 | fi 16 | else 17 | local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY}) 18 | local tmp_kernel_binary2=$(find_kernel_binary ${KERNEL_BINARY_2}) 19 | if [ -z "${tmp_kernel_binary}" ] 20 | then 21 | gen_die "Cannot locate kernel binary" 22 | fi 23 | cd "${KERNEL_OUTPUTDIR}" 24 | cp "${tmp_kernel_binary}" "${TEMP}/minkernpackage/kernel-${KV}" || gen_die 'Could not the copy kernel for the min kernel package!' 25 | cp ".config" "${TEMP}/minkernpackage/config-${ARCH}-${KV}" || gen_die 'Could not the copy kernel config for the min kernel package!' 26 | if isTrue "${GENZIMAGE}" 27 | then 28 | cp "${tmp_kernel_binary2}" "${TEMP}/minkernpackage/kernelz-${KV}" || gen_die "Could not copy the kernelz for the min kernel package" 29 | fi 30 | fi 31 | 32 | if ! isTrue "${INTEGRATED_INITRAMFS}" 33 | then 34 | [ "${BUILD_RAMDISK}" != '0' ] && { cp "${TMPDIR}/initramfs-${KV}" "${TEMP}/minkernpackage/initramfs-${ARCH}-${KV}" || gen_die 'Could not copy the initramfs for the kernel package!'; } 35 | fi 36 | 37 | if [ "${KERNCACHE}" != "" ] 38 | then 39 | /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} System.map-${ARCH}-${KV} 40 | else 41 | cp "${KERNEL_OUTPUTDIR}/System.map" "${TEMP}/minkernpackage/System.map-${ARCH}-${KV}" || gen_die 'Could not copy System.map for the kernel package!'; 42 | fi 43 | 44 | cd "${TEMP}/minkernpackage" 45 | /bin/tar -jcpf ${MINKERNPACKAGE} * || gen_die 'Could not compress the kernel package!' 46 | cd "${TEMP}" && rm -rf "${TEMP}/minkernpackage" > /dev/null 2>&1 47 | } 48 | 49 | gen_modulespackage() { 50 | print_info 1 'Creating modules package' 51 | rm -rf "${TEMP}/modulespackage" > /dev/null 2>&1 52 | mkdir "${TEMP}/modulespackage" || gen_die 'Could not make a directory for the kernel package!' 53 | 54 | if [ -d ${INSTALL_MOD_PATH}/lib/modules/${KV} ] 55 | then 56 | mkdir -p ${TEMP}/modulespackage/lib/modules 57 | cp -r "${INSTALL_MOD_PATH}/lib/modules/${KV}" "${TEMP}/modulespackage/lib/modules" 58 | cd "${TEMP}/modulespackage" 59 | /bin/tar -jcpf ${MODULESPACKAGE} * || gen_die 'Could not compress the modules package!' 60 | else 61 | print_info 1 "Could not create a modules package ${INSTALL_MOD_PATH}/lib/modules/${KV} was not found" 62 | fi 63 | cd "${TEMP}" && rm -rf "${TEMP}/modulespackage" > /dev/null 2>&1 64 | } 65 | gen_kerncache() 66 | { 67 | print_info 1 'Creating kernel cache' 68 | rm -rf "${TEMP}/kerncache" > /dev/null 2>&1 69 | mkdir "${TEMP}/kerncache" || gen_die 'Could not make a directory for the kernel cache!' 70 | 71 | local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY}) 72 | local tmp_kernel_binary2=$(find_kernel_binary ${KERNEL_BINARY_2}) 73 | if [ -z "${tmp_kernel_binary}" ] 74 | then 75 | gen_die "Cannot locate kernel binary" 76 | fi 77 | 78 | cd "${KERNEL_OUTPUTDIR}" 79 | cp "${tmp_kernel_binary}" "${TEMP}/kerncache/kernel-${ARCH}-${KV}" || gen_die 'Could not the copy kernel for the kernel package!' 80 | cp "${KERNEL_OUTPUTDIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}" 81 | 82 | if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then 83 | # Support --kernel-config=/proc/config.gz, mainly 84 | zcat "${KERNEL_CONFIG}" > "${TEMP}/kerncache/config-${ARCH}-${KV}.orig" 85 | else 86 | cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}.orig" 87 | fi 88 | cp "${KERNEL_OUTPUTDIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}" 89 | if isTrue "${GENZIMAGE}" 90 | then 91 | cp "${tmp_kernel_binary2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" || gen_die "Could not copy the kernelz for the kernel package" 92 | fi 93 | 94 | echo "VERSION = ${VER}" > "${TEMP}/kerncache/kerncache.config" 95 | echo "PATCHLEVEL = ${PAT}" >> "${TEMP}/kerncache/kerncache.config" 96 | echo "SUBLEVEL = ${SUB}" >> "${TEMP}/kerncache/kerncache.config" 97 | echo "EXTRAVERSION = ${EXV}" >> "${TEMP}/kerncache/kerncache.config" 98 | echo "CONFIG_LOCALVERSION = ${LOV}" >> "${TEMP}/kerncache/kerncache.config" 99 | 100 | mkdir -p "${TEMP}/kerncache/lib/modules/" 101 | 102 | if [ -d ${INSTALL_MOD_PATH}/lib/modules/${KV} ] 103 | then 104 | cp -r "${INSTALL_MOD_PATH}/lib/modules/${KV}" "${TEMP}/kerncache/lib/modules" 105 | fi 106 | 107 | cd "${TEMP}/kerncache" 108 | /bin/tar -jcpf ${KERNCACHE} * || gen_die 'Could not compress the kernel package!' 109 | cd "${TEMP}" && rm -rf "${TEMP}/kerncache" > /dev/null 2>&1 110 | } 111 | 112 | gen_kerncache_extract_kernel() 113 | { 114 | /bin/tar -f ${KERNCACHE} -C ${TEMP} -xj 115 | copy_image_with_preserve "kernel" \ 116 | "${TEMP}/kernel-${ARCH}-${KV}" \ 117 | "kernel-${KNAME}-${ARCH}-${KV}${KAPPENDNAME}" 118 | 119 | if isTrue "${GENZIMAGE}" 120 | then 121 | copy_image_with_preserve "kernelz" \ 122 | "${TEMP}/kernelz-${ARCH}-${KV}" \ 123 | "kernelz-${KNAME}-${ARCH}-${KV}${KAPPENDNAME}" 124 | fi 125 | 126 | copy_image_with_preserve "System.map" \ 127 | "${TEMP}/System.map-${ARCH}-${KV}" \ 128 | "System.map-${KNAME}-${ARCH}-${KV}${KAPPENDNAME}" 129 | } 130 | 131 | gen_kerncache_extract_modules() 132 | { 133 | if [ -e "${KERNCACHE}" ] 134 | then 135 | print_info 1 'Extracting kerncache kernel modules' 136 | if [ "${INSTALL_MOD_PATH}" != '' ] 137 | then 138 | /bin/tar -xjf ${KERNCACHE} -C ${INSTALL_MOD_PATH} lib 139 | else 140 | /bin/tar -xjf ${KERNCACHE} -C / lib 141 | fi 142 | fi 143 | } 144 | 145 | gen_kerncache_extract_config() 146 | { 147 | if [ -e "${KERNCACHE}" -a "${SAVE_CONFIG}" = '1' ] 148 | then 149 | print_info 1 'Extracting kerncache config to /etc/kernels' 150 | mkdir -p /etc/kernels 151 | /bin/tar -xjf ${KERNCACHE} -C /etc/kernels config-${ARCH}-${KV} 152 | mv /etc/kernels/config-${ARCH}-${KV} /etc/kernels/kernel-config-${ARCH}-${KV} 153 | fi 154 | } 155 | 156 | gen_kerncache_is_valid() 157 | { 158 | KERNCACHE_IS_VALID=0 159 | if [ "${KERNEL_SOURCES}" = '0' ] 160 | then 161 | 162 | BUILD_KERNEL=0 163 | # Can make this more secure .... 164 | 165 | /bin/tar -xj -f ${KERNCACHE} -C ${TEMP} 166 | if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV} ] 167 | then 168 | print_info 1 'Valid kernel cache found; no sources will be used' 169 | KERNCACHE_IS_VALID=1 170 | fi 171 | else 172 | if [ -e "${KERNCACHE}" ] 173 | then 174 | KERNEL_CONFIG="/${KERNEL_OUTPUTDIR}/.config" 175 | if [ "${CMD_KERNEL_CONFIG}" != '' ] 176 | then 177 | KERNEL_CONFIG="${CMD_KERNEL_CONFIG}" 178 | fi 179 | 180 | /bin/tar -xj -f ${KERNCACHE} -C ${TEMP} 181 | if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${KERNEL_CONFIG} ] 182 | then 183 | 184 | if [ -e ${TEMP}/config-${ARCH}-${KV}.orig ] 185 | then 186 | test1=$(grep -v "^#" ${TEMP}/config-${ARCH}-${KV}.orig | md5sum | cut -d " " -f 1) 187 | else 188 | test1=$(grep -v "^#" ${TEMP}/config-${ARCH}-${KV} | md5sum | cut -d " " -f 1) 189 | fi 190 | 191 | if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then 192 | # Support --kernel-config=/proc/config.gz, mainly 193 | local CONFGREP=zgrep 194 | else 195 | local CONFGREP=grep 196 | fi 197 | test2=$("${CONFGREP}" -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1) 198 | 199 | 200 | if [ "${test1}" == "${test2}" ] 201 | then 202 | echo 203 | print_info 1 "No kernel configuration change, skipping kernel build..." 204 | echo 205 | KERNCACHE_IS_VALID=1 206 | fi 207 | fi 208 | fi 209 | fi 210 | export KERNCACHE_IS_VALID 211 | return 1 212 | } 213 | -------------------------------------------------------------------------------- /genkernel.bash: -------------------------------------------------------------------------------- 1 | # genkernel (8) completion 2 | # Copyright 2006 Gentoo Foundation 3 | # Distributed under the terms of the GNU General Public License v2 4 | # Written by Aron Griffis 5 | 6 | _genkernel() 7 | { 8 | declare cur prev genkernel_help actions params 9 | COMPREPLY=() 10 | cur=${COMP_WORDS[COMP_CWORD]} 11 | prev=${COMP_WORDS[COMP_CWORD-1]} 12 | 13 | # extract initial list of params/actions from genkernel --help 14 | genkernel_help=$(command genkernel --help) 15 | actions=( $(<<<"$genkernel_help" sed -n \ 16 | '/^Available Actions:/,/^$/s/^[[:space:]]\+\([^[:space:]]\+\).*/\1/p') ) 17 | params=( $(<<<"$genkernel_help" egrep -oe '--[^[:space:]]{2,}') ) 18 | 19 | # attempt to complete the current parameter based on the list 20 | COMPREPLY=($(compgen -W "${params[*]/=*/=} ${actions[*]}" -- "$cur")) 21 | 22 | # if we don't have a rhs to complete 23 | if [[ ${#COMPREPLY[@]} -gt 1 ]]; then 24 | return 25 | elif [[ ${#COMPREPLY[@]} -eq 0 && $cur != --*=* ]]; then 26 | return 27 | elif [[ ${#COMPREPLY[@]} -eq 1 && $COMPREPLY != --*= ]]; then 28 | # using nospace completion, add an explicit space 29 | COMPREPLY="${COMPREPLY} " 30 | return 31 | fi 32 | 33 | # we have a unique lhs and need to complete the rhs 34 | declare args lhs rhs 35 | if [[ ${#COMPREPLY[@]} -eq 1 ]]; then 36 | lhs=$COMPREPLY 37 | else 38 | lhs=${cur%%=*}= 39 | rhs=${cur#*=} 40 | fi 41 | 42 | # genkernel's help gives clues as to what belongs on the rhs. 43 | # extract the clue for the current parameter 44 | args=" ${params[*]} " 45 | args="${args##* $lhs}" 46 | args="${args%% *}" 47 | 48 | # generate a list of completions for the argument; this replaces args with 49 | # an array of results 50 | args=( $(case $args in 51 | ('<0-5>') compgen -W "$(echo {1..5})" -- "$rhs" ;; 52 | (''|'') compgen -A file -o plusdirs -- "$rhs" ;; 53 | ('') compgen -A directory -S / -- "$rhs" ;; 54 | ('') compgen -G '*.tbz2' -G '*.tar.bz2' -o plusdirs -- "$rhs" ;; 55 | (*) compgen -o bashdefault -- "$rhs" ;; # punt 56 | esac) ) 57 | 58 | # we're using nospace completion to prevent spaces after paths that aren't 59 | # "done" yet. So do some hacking to the args to add spaces after 60 | # non-directories. 61 | declare slash=/ 62 | args=( "${args[@]/%/ }" ) # add space to all 63 | args=( "${args[@]/%$slash /$slash}" ) # remove space from dirs 64 | 65 | # recreate COMPREPLY 66 | if [[ $cur == "$lhs"* ]]; then 67 | COMPREPLY=( "${args[@]}" ) 68 | elif [[ ${#args[@]} -gt 0 ]]; then 69 | COMPREPLY=( "${args[@]/#/$lhs}" ) 70 | fi 71 | } 72 | 73 | complete -o nospace -F _genkernel genkernel 74 | -------------------------------------------------------------------------------- /genkernel.conf: -------------------------------------------------------------------------------- 1 | # Configuration file for genkernel 2 | 3 | # This file is sourced by genkernel at startup and determines which options 4 | # we will be using to compile our kernel. The order of precidence is simple, 5 | # with the internal settings being least important, configuration file 6 | # settings next, and command line options being most important. 7 | 8 | # =========Common Command Line Option Defaults========= 9 | 10 | # Should we install to $BOOTDIR? Default is "no" because genkernel is used in 11 | # catalyst and stage building. 12 | #INSTALL="yes" 13 | 14 | # Run 'make oldconfig' before compiling this kernel? 15 | OLDCONFIG="yes" 16 | 17 | # Run 'make menuconfig' before compiling this kernel? 18 | MENUCONFIG="no" 19 | 20 | # Run 'make nconfig' (ncurses 'menuconfig') before compiling this kernel? 21 | NCONFIG="no" 22 | 23 | # Note, that two previous lines are mutual exclusive (logically), while 24 | # MENUCONFIG has a higher priority if both them is enabled. 25 | 26 | # Run 'make clean' before compilation? 27 | # If set to NO, implies MRPROPER WILL NOT be run 28 | # Also, if clean is NO, it won't copy over any configuration 29 | # file, it will use what's there. 30 | CLEAN="yes" 31 | 32 | # Run 'make mrproper' before configuration/compilation? 33 | MRPROPER="yes" 34 | 35 | # Override the arch detection? 36 | #ARCH_OVERRIDE="x86" 37 | 38 | # Mount BOOTDIR automatically if it isn't mounted? 39 | MOUNTBOOT="yes" 40 | 41 | # Make symlinks in BOOTDIR automatically? 42 | #SYMLINK="no" 43 | 44 | # Merge kernel config fragment 45 | #MERGE_KCONFIG="yes" 46 | # Kernel config fragment(s) to merge 47 | #KCONFIG_FRAGMENT=( "/etc/default/genkernel_kconfig_fragment" ) 48 | 49 | # Save the new configuration in /etc/kernels upon 50 | # successfull compilation 51 | SAVE_CONFIG="yes" 52 | 53 | # Use Color output in Genkernel? 54 | USECOLOR="yes" 55 | 56 | # Clear build cache dir 57 | #CLEAR_CACHE_DIR="yes" 58 | 59 | # Clear all tmp files and caches after genkernel has run 60 | #POSTCLEAR="1" 61 | 62 | # Genkernel uses an independent configuration for MAKEOPTS, and does not source 63 | # /etc/make.conf . You can override the default setting by uncommenting and 64 | # tweaking the following line. Default setting is set up by 65 | # ${GK_SHARE}/${ARCH_OVERRIDE}/config.sh . The recommended value for -j 66 | # argument is: *+1 67 | #MAKEOPTS="-j2" 68 | 69 | # Add in LVM support from static binaries if they exist on the system, or 70 | # compile static LVM binaries if static ones do not exist. 71 | #LVM="no" 72 | 73 | # Add in Luks support. Needs sys-fs/cryptsetup with -dynamic installed. 74 | #LUKS="no" 75 | 76 | # Add in GnuPG support 77 | #GPG="no" 78 | 79 | # Add DMRAID support. 80 | #DMRAID="no" 81 | 82 | # Include (or suppresses the inclusion of) busybox in the initrd or initramfs. 83 | # If included, busybox is rebuilt if the cached copy is out of date. 84 | #BUSYBOX="yes" 85 | 86 | # Use udev instead of mdev as the default device manager for the initramfs. 87 | # If you use systemd and perhaps lvm, you _must_ keep this turned on. 88 | #UDEV="yes" 89 | 90 | # Includes mdadm/mdmon binaries in initramfs. 91 | # Without sys-fs/mdadm[static] installed, this will build a static mdadm. 92 | #MDADM="no" 93 | 94 | # Specify a custom mdadm.conf. 95 | # By default the ramdisk will be built *without* an mdadm.conf and will auto-detect 96 | # arrays during bootup. Usually, this should not be needed. 97 | #MDADM_CONFIG="/etc/mdadm.conf" 98 | 99 | # Add Multipath support. 100 | #MULTIPATH="no" 101 | 102 | # Add iSCSI support. 103 | #ISCSI="no" 104 | 105 | # Add e2fsprogs support. 106 | #E2FSPROGS="no" 107 | 108 | # Install firmware onto root filesystem 109 | # Will conflict with sys-kernel/linux-firmware package 110 | #FIRMWARE_INSTALL="no" 111 | 112 | # Enable copying of firmware into initramfs 113 | #FIRMWARE="no" 114 | # Specify directory to pull from 115 | # FIRMWARE_SRC="/lib/firmware" 116 | # Specify specific firmware files to include. This overrides FIRMWARE_SRC 117 | # FIRMWARE_FILES="" 118 | 119 | # Add new kernel to grub? 120 | #BOOTLOADER="grub" 121 | 122 | # Enable splashutils in early space (initrd). Default is "no". 123 | #SPLASH="yes" 124 | 125 | # Use this splash theme. If commented out - the "default" name theme is used. 126 | # Also, SPLASH="yes" needs to be enabled for this one to one work. 127 | # This supersedes the "SPLASH_THEME" option of /etc/conf.d/splash (in early space). 128 | #SPLASH_THEME="gentoo" 129 | 130 | # Installs, or not, plymouth into the initramfs. If "splash" will be 131 | # passed at boot, plymouth will be activated. 132 | # PLYMOUTH="yes" 133 | 134 | # Embeds the given plymouth theme into the initramfs. 135 | # PLYMOUTH_THEME="text" 136 | 137 | # =========Keymap Settings========= 138 | # 139 | # Force keymap selection at boot 140 | #DOKEYMAPAUTO="yes" 141 | 142 | 143 | # Disables keymap selection support 144 | #KEYMAP="0" 145 | 146 | 147 | # =========Low Level Compile Settings========= 148 | # 149 | # GNU Make to use for kernel. See also the --kernel-make command line option. 150 | #KERNEL_MAKE="make" 151 | 152 | # Compiler to use for the kernel (e.g. distcc). See also the --kernel-cc 153 | # command line option. 154 | #KERNEL_CC="gcc" 155 | 156 | # Assembler to use for the kernel. See also the --kernel-as command line 157 | # option. 158 | #KERNEL_AS="as" 159 | 160 | # Linker to use for the kernel. See also the --kernel-ld command line option. 161 | #KERNEL_LD="ld" 162 | 163 | # GNU Make to use for the utilities. See also the --utils-make command line 164 | # option. 165 | #UTILS_MAKE="make" 166 | 167 | # Compiler to use for the utilities (e.g. distcc). See also the --utils-cc 168 | # command line option. 169 | #UTILS_CC="gcc" 170 | 171 | # Assembler to use for the utilities. See also the --utils-as command line 172 | # option. 173 | #UTILS_AS="as" 174 | 175 | # Linker to use for the utilities. See also the --utils-ld command line 176 | # option. 177 | #UTILS_LD="ld" 178 | 179 | # =========GENKERNEL LOCATION CONFIGURATION============ 180 | # Variables: 181 | # %%ARCH%% - Final determined architecture 182 | # %%CACHE%% - Final determined cache location 183 | 184 | # Set genkernel's temporary work directory. Default is /var/tmp/genkernel 185 | #TMPDIR="/var/tmp/genkernel" 186 | 187 | # Set the boot directory, default is /boot 188 | #BOOTDIR="/boot" 189 | 190 | # Default share directory location 191 | GK_SHARE="${GK_SHARE:-/usr/share/genkernel}" 192 | 193 | # Location of the default cache 194 | CACHE_DIR="/var/cache/genkernel" 195 | # Location of DISTDIR, where our source tarballs are stored 196 | DISTDIR="/var/lib/genkernel/src" 197 | # Log output file 198 | LOGFILE="/var/log/genkernel.log" 199 | # Debug Level 200 | LOGLEVEL=1 201 | 202 | # =========COMPILED UTILS CONFIGURATION============ 203 | # 204 | # Default location of kernel source 205 | DEFAULT_KERNEL_SOURCE="/usr/src/linux" 206 | # Default kernel config (only use to override using 207 | # arch/%%ARCH%%/kernel-config-${VER}.${PAT} !) 208 | #DEFAULT_KERNEL_CONFIG="${GK_SHARE}/arch/%%ARCH%%/kernel-config" 209 | 210 | # Specifies a user created busybox config 211 | #BUSYBOX_CONFIG="/path/to/file" 212 | #BUSYBOX_APPLETS="[ ash sh mount uname echo cut cat" 213 | 214 | # NOTE: Since genkernel 3.4.41 the version of 215 | # busybox, lvm, mdadm, .. have been moved to 216 | # /usr/share/genkernel/defaults/software.sh in order to 217 | # reduce the merging you have to do during etc-update. 218 | # You can still override these settings in here. 219 | 220 | 221 | # =========MISC KERNEL CONFIGURATION============ 222 | # 223 | # Tag the kernel and ramdisk with a name: 224 | # If not defined the option defaults to 225 | # 'genkernel' 226 | #KNAME="genkernel" 227 | 228 | # Append a text to the kernel/initrd's name, 229 | # usefull to add a unique key like the actual date 230 | #KAPPENDNAME="-$(date +%Y%m%d-%H%M%S)" 231 | 232 | 233 | # This option is only valid if kerncache is 234 | # defined. If there is a valid kerncache no checks 235 | # will be made against a kernel source tree 236 | #KERNEL_SOURCES="0" 237 | 238 | 239 | # Build a static (monolithic kernel) 240 | #BUILD_STATIC="1" 241 | 242 | 243 | # Make and install kernelz image (PowerPC) 244 | #GENZIMAGE="1" 245 | 246 | 247 | # File to output a .tar.bz2'd kernel contents 248 | # of /lib/modules/ and the kernel config 249 | # NOTE: This is created before the callbacks 250 | # are run! 251 | #KERNCACHE="/path/to/file" 252 | 253 | 254 | # Prefix to kernel module destination, modules 255 | # will be installed in /lib/modules 256 | # (.conf equivalent of --module-prefix=) 257 | #INSTALL_MOD_PATH="" 258 | 259 | 260 | # =========MISC INITRD CONFIGURATION============ 261 | # 262 | # Copy all kernel modules to the ramdisk 263 | #ALLRAMDISKMODULES="1" 264 | 265 | 266 | # Don't copy any modules to the ramdisk 267 | #RAMDISKMODULES="0" 268 | 269 | 270 | # File to output a .tar.bz2'd kernel and ramdisk: 271 | # No modules outside of the ramdisk will be 272 | # included... 273 | #MINKERNPACKAGE="/path/to/file.bz2" 274 | 275 | 276 | # File to output a .tar.bz2'd modules after the 277 | # callbacks have run 278 | #MODULESPACKAGE="/path/to/file.bz2" 279 | 280 | 281 | # Directory structure to include in the initramfs, 282 | # only available on >=2.6 kernels 283 | #INITRAMFS_OVERLAY="" 284 | 285 | 286 | # Build the generated initramfs into the kernel instead of 287 | # keeping it as a separate file 288 | #INTEGRATED_INITRAMFS="1" 289 | 290 | 291 | # Compress generated initramfs 292 | #COMPRESS_INITRD="yes" 293 | # Types of compression: best, xz, lzma, bzip2, gzip, lzop, lz4, fastest 294 | # "best" selects the best available compression method 295 | # "fastest" selects the fastest available compression method 296 | #COMPRESS_INITRD_TYPE="best" 297 | 298 | 299 | # Create a self-contained env in the initramfs 300 | #NETBOOT="1" 301 | 302 | 303 | # =========MISC BOOT CONFIGURATION============ 304 | # 305 | # Specify a default for real_root= 306 | #REAL_ROOT="/dev/one/two/gentoo" 307 | -------------------------------------------------------------------------------- /initramfs.mounts: -------------------------------------------------------------------------------- 1 | # This specifies which mounts from your fstab should be mounted before 2 | # switching to the real root. If this file is missing, genkernel's code will 3 | # default to just "/usr", which will suffice on most systems with a seperate 4 | # /usr mount. 5 | # 6 | # If you have a complex configuration with a bindmount or symlink at /usr, or 7 | # need some other mountpoints at boot, you should update this file such that 8 | # /usr and anything else needed will be available after the switch into the 9 | # real root. 10 | # 11 | # The lines without comments in this file are used as exact matches against the 12 | # second column of your /etc/fstab and the device, fstype and mount options are 13 | # taken from that line in fstab. If no line matches, the line from this file 14 | # will be ignored. 15 | # 16 | 17 | /usr 18 | 19 | # If you had some need of these: 20 | #/usr/local 21 | #/opt 22 | #/var 23 | #/home 24 | -------------------------------------------------------------------------------- /modules/README: -------------------------------------------------------------------------------- 1 | This directory is used for storing additional modules to extend support in 2 | genkernel. The default modules are also installed here. 3 | -------------------------------------------------------------------------------- /netboot/misc/bin/ashlogin: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | 3 | exec /bin/ash -i 4 | 5 | -------------------------------------------------------------------------------- /netboot/misc/bin/net-setup: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | 3 | MYIP="" 4 | MYGW="" 5 | 6 | 7 | #// Modified Functions copied from Gentoo's /sbin/functions.sh 8 | #//-------------------------------------------------------------------------------- 9 | 10 | # void einfo(char* message) 11 | # show an informative message (with a newline) 12 | einfo() { 13 | echo -e " * ${*}" 14 | return 0 15 | } 16 | 17 | #//-------------------------------------------------------------------------------- 18 | 19 | 20 | 21 | #// Setup networking 22 | #//-------------------------------------------------------------------------------- 23 | 24 | SetupNetwork() { 25 | #// DHCP or Static? 26 | if [ "${1}" = "dhcp" ]; then 27 | #// Do DHCP 28 | udhcpc -i eth0 -q 29 | else 30 | 31 | #// Check second param 32 | if [ -z "${2}" ]; then 33 | echo -e "" 34 | einfo "Please specify a gateway address." 35 | echo -e "" 36 | exit 37 | fi 38 | 39 | #// Get networking params 40 | BROADCAST="$(ipcalc -b ${1} | cut -d\= -f2)" 41 | NETMASK="$(ipcalc -m ${1} | cut -d\= -f2)" 42 | 43 | #// Enable static networking 44 | /sbin/ifconfig eth0 ${1} broadcast ${BROADCAST} netmask ${NETMASK} 45 | /sbin/route add -net default gw ${2} netmask 0.0.0.0 metric 1 46 | fi 47 | 48 | #// Setup the loopback 49 | /sbin/ifconfig lo 127.0.0.1 50 | /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 gw 127.0.0.1 dev lo 51 | 52 | #// Finish 53 | MYIP="${1}" 54 | MYGW="${2}" 55 | } 56 | 57 | #//-------------------------------------------------------------------------------- 58 | 59 | 60 | 61 | #// Main Function 62 | #//-------------------------------------------------------------------------------- 63 | 64 | #// Check first param 65 | if [ -z "${1}" ]; then 66 | echo -e "" 67 | einfo "Please specify \"dhcp\" for setting up networking via dhcp or" 68 | einfo "specify an IP Address and gateway address to configure static" 69 | einfo "networking." 70 | echo -e "" 71 | exit 0 72 | fi 73 | 74 | 75 | #// Setup the Network 76 | SetupNetwork ${1} ${2} ${3} 77 | 78 | 79 | #// Was the network setup? 80 | if [ ! -z "$(ifconfig | grep "eth0")" ]; then 81 | echo -e "" 82 | einfo "Network interface eth0 has been started:" 83 | einfo " IP Address: ${MYIP}" 84 | einfo " Gateway: ${MYGW}" 85 | echo -e "" 86 | einfo "An sshd server is available on port 22. Please set a root" 87 | einfo "password via \"passwd\" before using." 88 | echo -e "" 89 | echo -e "" 90 | fi 91 | 92 | #//-------------------------------------------------------------------------------- 93 | 94 | -------------------------------------------------------------------------------- /netboot/misc/etc/fstab: -------------------------------------------------------------------------------- 1 | # /etc/fstab: static file system information. 2 | # 3 | 4 | #// Main Filesystems 5 | none /tmp tmpfs defaults,rw 0 0 6 | 7 | #// Miscellaneous Filesystems 8 | proc /proc proc defaults 0 0 9 | sysfs /sys sysfs defaults 0 0 10 | tmpfs /dev/shm tmpfs defaults 0 0 11 | -------------------------------------------------------------------------------- /netboot/misc/etc/group: -------------------------------------------------------------------------------- 1 | root:x:0:root 2 | nobody:x:65534: 3 | -------------------------------------------------------------------------------- /netboot/misc/etc/inittab: -------------------------------------------------------------------------------- 1 | # /etc/inittab init(8) configuration for BusyBox 2 | # 3 | # Copyright (C) 1999-2003 by Erik Andersen 4 | 5 | 6 | ::sysinit:/linuxrc 7 | ::askfirst:-/bin/ash 8 | #tty2::askfirst:-/bin/ash 9 | #tty3::askfirst:-/bin/ash 10 | #tty4::askfirst:-/bin/ash 11 | ::restart:/sbin/init 12 | ::ctrlaltdel:/sbin/reboot 13 | ::shutdown:/bin/umount -a -r 14 | ::shutdown:/sbin/swapoff -a 15 | 16 | -------------------------------------------------------------------------------- /netboot/misc/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/root:/bin/ash 2 | nobody:x:65534:65534:nobody:/:/bin/false 3 | -------------------------------------------------------------------------------- /netboot/misc/etc/profile: -------------------------------------------------------------------------------- 1 | export PATH="/usr/bin:/usr/sbin:/bin:/sbin" 2 | -------------------------------------------------------------------------------- /netboot/misc/etc/resolv.conf: -------------------------------------------------------------------------------- 1 | nameserver 204.117.214.10 2 | nameserver 199.2.252.10 3 | nameserver 204.97.212.10 4 | -------------------------------------------------------------------------------- /netboot/misc/etc/shadow: -------------------------------------------------------------------------------- 1 | root:*:10770:0::::: 2 | nobody:*:9797:0::::: 3 | -------------------------------------------------------------------------------- /netboot/misc/etc/shells: -------------------------------------------------------------------------------- 1 | /bin/sh 2 | /bin/ash 3 | -------------------------------------------------------------------------------- /netboot/misc/usr/share/terminfo/p/putty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/netboot/misc/usr/share/terminfo/p/putty -------------------------------------------------------------------------------- /patches/busybox/1.20.2/1.18.1-openvt.diff: -------------------------------------------------------------------------------- 1 | Based on: 2 | 3 | > Allow a slightly wider range of valid vt numbers. Forward-ported from Gentoo 4 | > Busybox 1.1.3. 5 | 6 | > The previous spin of this patch on 1.1.3 had a 'wait(NULL);' right before 7 | > return EXIT_SUCCESS. I don't think it's needed anymore, so I left it out. 8 | 9 | --- a/console-tools/openvt.c 2010-11-22 22:24:58.000000000 +0200 10 | +++ b/console-tools/openvt.c 2010-11-29 15:32:18.000000000 +0200 11 | @@ -124,7 +124,7 @@ int openvt_main(int argc UNUSED_PARAM, c 12 | 13 | if (flags & OPT_c) { 14 | /* Check for illegal vt number: < 1 or > 63 */ 15 | - vtno = xatou_range(str_c, 1, 63); 16 | + vtno = xatou_range(str_c, 0, 63); 17 | } else { 18 | vtno = find_free_vtno(); 19 | } 20 | -------------------------------------------------------------------------------- /patches/busybox/1.20.2/busybox-1.20.1-strict-atime.patch: -------------------------------------------------------------------------------- 1 | Add support for the "strictatime" mount option. 2 | 3 | Upstream-Status: Backport [9ad8979ff15e1b894ee1f4bb6a2535a1a2c20d65] 4 | Signed-off-by: Ross Burton 5 | 6 | Index: busybox-1.20.2/util-linux/mount.c 7 | =================================================================== 8 | --- busybox-1.20.2.orig/util-linux/mount.c 2012-07-02 15:08:25.000000000 +0100 9 | +++ busybox-1.20.2/util-linux/mount.c 2013-03-22 15:37:31.340277463 +0000 10 | @@ -113,6 +113,12 @@ 11 | #ifndef MS_RELATIME 12 | # define MS_RELATIME (1 << 21) 13 | #endif 14 | +#ifndef MS_STRICTATIME 15 | +# define MS_STRICTATIME (1 << 24) 16 | +#endif 17 | + 18 | +/* Any ~MS_FOO value has this bit set: */ 19 | +#define BB_MS_INVERTED_VALUE (1u << 31) 20 | 21 | #include "libbb.h" 22 | #if ENABLE_FEATURE_MOUNT_LABEL 23 | @@ -239,6 +245,7 @@ 24 | /* "nomand" */ ~MS_MANDLOCK, 25 | /* "relatime" */ MS_RELATIME, 26 | /* "norelatime" */ ~MS_RELATIME, 27 | + /* "strictatime" */ MS_STRICTATIME, 28 | /* "loud" */ ~MS_SILENT, 29 | /* "rbind" */ MS_BIND|MS_RECURSIVE, 30 | 31 | @@ -295,6 +302,7 @@ 32 | "nomand\0" 33 | "relatime\0" 34 | "norelatime\0" 35 | + "strictatime\0" 36 | "loud\0" 37 | "rbind\0" 38 | 39 | @@ -466,8 +474,8 @@ 40 | // Find this option in mount_options 41 | for (i = 0; i < ARRAY_SIZE(mount_options); i++) { 42 | if (strcasecmp(option_str, options) == 0) { 43 | - long fl = mount_options[i]; 44 | - if (fl < 0) 45 | + unsigned long fl = mount_options[i]; 46 | + if (fl & BB_MS_INVERTED_VALUE) 47 | flags &= fl; 48 | else 49 | flags |= fl; 50 | -------------------------------------------------------------------------------- /patches/busybox/1.20.2/busybox-1.20.2-glibc-sys-resource.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/424954 2 | 3 | From c5fe9f7b723f949457263ef8e22ab807d5b549ce Mon Sep 17 00:00:00 2001 4 | From: Mike Frysinger 5 | Date: Thu, 5 Jul 2012 23:19:09 -0400 6 | Subject: [PATCH] include sys/resource.h where needed 7 | 8 | We use functions from sys/resource.h in misc applets, but don't include 9 | the header. This breaks building with newer glibc versions, so add the 10 | include where needed. 11 | 12 | Signed-off-by: Mike Frysinger 13 | --- 14 | loginutils/passwd.c | 1 + 15 | miscutils/time.c | 1 + 16 | networking/inetd.c | 1 + 17 | networking/ntpd.c | 1 + 18 | networking/ntpd_simple.c | 1 + 19 | runit/chpst.c | 1 + 20 | shell/shell_common.c | 1 + 21 | 7 files changed, 7 insertions(+) 22 | 23 | diff --git a/loginutils/passwd.c b/loginutils/passwd.c 24 | index b83db00..a7006f0 100644 25 | --- a/loginutils/passwd.c 26 | +++ b/loginutils/passwd.c 27 | @@ -15,6 +15,7 @@ 28 | 29 | #include "libbb.h" 30 | #include 31 | +#include /* setrlimit */ 32 | 33 | static void nuke_str(char *str) 34 | { 35 | diff --git a/miscutils/time.c b/miscutils/time.c 36 | index 945f15f..ffed386 100644 37 | --- a/miscutils/time.c 38 | +++ b/miscutils/time.c 39 | @@ -16,6 +16,7 @@ 40 | //usage: "\n -v Verbose" 41 | 42 | #include "libbb.h" 43 | +#include /* getrusage */ 44 | 45 | /* Information on the resources used by a child process. */ 46 | typedef struct { 47 | diff --git a/networking/inetd.c b/networking/inetd.c 48 | index 1308d74..00baf69 100644 49 | --- a/networking/inetd.c 50 | +++ b/networking/inetd.c 51 | @@ -165,6 +165,7 @@ 52 | //usage: "\n (default: 0 - disabled)" 53 | 54 | #include 55 | +#include /* setrlimit */ 56 | #include 57 | 58 | #include "libbb.h" 59 | diff --git a/networking/ntpd.c b/networking/ntpd.c 60 | index 72e9d0b..5b92db6 100644 61 | --- a/networking/ntpd.c 62 | +++ b/networking/ntpd.c 63 | @@ -46,6 +46,7 @@ 64 | #include "libbb.h" 65 | #include 66 | #include /* For IPTOS_LOWDELAY definition */ 67 | +#include /* setpriority */ 68 | #include 69 | #ifndef IPTOS_LOWDELAY 70 | # define IPTOS_LOWDELAY 0x10 71 | diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c 72 | index 4ad44e4..1b7c66b 100644 73 | --- a/networking/ntpd_simple.c 74 | +++ b/networking/ntpd_simple.c 75 | @@ -7,6 +7,7 @@ 76 | */ 77 | #include "libbb.h" 78 | #include /* For IPTOS_LOWDELAY definition */ 79 | +#include /* setpriority */ 80 | #ifndef IPTOS_LOWDELAY 81 | # define IPTOS_LOWDELAY 0x10 82 | #endif 83 | diff --git a/runit/chpst.c b/runit/chpst.c 84 | index ac296ba..ed72c8b 100644 85 | --- a/runit/chpst.c 86 | +++ b/runit/chpst.c 87 | @@ -91,6 +91,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 88 | //usage: "\n a SIGXCPU after N seconds" 89 | 90 | #include "libbb.h" 91 | +#include /* getrlimit */ 92 | 93 | /* 94 | Five applets here: chpst, envdir, envuidgid, setuidgid, softlimit. 95 | diff --git a/shell/shell_common.c b/shell/shell_common.c 96 | index 51c92d6..780e27e 100644 97 | --- a/shell/shell_common.c 98 | +++ b/shell/shell_common.c 99 | @@ -18,6 +18,7 @@ 100 | */ 101 | #include "libbb.h" 102 | #include "shell_common.h" 103 | +#include /* getrlimit */ 104 | 105 | const char defifsvar[] ALIGN1 = "IFS= \t\n"; 106 | 107 | -- 108 | 1.7.9.7 109 | 110 | -------------------------------------------------------------------------------- /patches/busybox/1.20.2/busybox-1.7.4-signal-hack.patch: -------------------------------------------------------------------------------- 1 | workaround while we get it fixed upstream 2 | 3 | http://bugs.gentoo.org/201114 4 | 5 | --- libbb/u_signal_names.c 6 | +++ libbb/u_signal_names.c 7 | @@ -66,7 +66,7 @@ 8 | #ifdef SIGTERM 9 | [SIGTERM ] = "TERM", 10 | #endif 11 | -#ifdef SIGSTKFLT 12 | +#if defined(SIGSTKFLT) && SIGSTKFLT < 32 13 | [SIGSTKFLT] = "STKFLT", 14 | #endif 15 | #ifdef SIGCHLD 16 | @@ -90,10 +90,10 @ 17 | #ifdef SIGURG 18 | [SIGURG ] = "URG", 19 | #endif 20 | -#ifdef SIGXCPU 21 | +#if defined(SIGXCPU) && SIGXCPU < 32 22 | [SIGXCPU ] = "XCPU", 23 | #endif 24 | -#ifdef SIGXFSZ 25 | +#if defined(SIGXFSZ) && SIGXFSZ < 32 26 | [SIGXFSZ ] = "XFSZ", 27 | #endif 28 | #ifdef SIGVTALRM 29 | -------------------------------------------------------------------------------- /tarballs/busybox-1.20.2.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sabayon/genkernel-next/7b20b78268327b33bc9fe06c8603e8a2300fe090/tarballs/busybox-1.20.2.tar.bz2 --------------------------------------------------------------------------------