aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2008-07-28 16:18:04 -0700
committerChris Gianelloni <wolf31o2@gentoo.org>2008-07-28 16:18:04 -0700
commitd5b1e6a9852b18010f24c2f47edfff5daa221cf1 (patch)
treefd8e8f42b4b88465e41fab06419fab89373e87a0
parentMoving files from generic to defaults, since they are the defaults used globa... (diff)
downloadgenkernel-d5b1e6a9852b18010f24c2f47edfff5daa221cf1.tar.gz
genkernel-d5b1e6a9852b18010f24c2f47edfff5daa221cf1.tar.bz2
genkernel-d5b1e6a9852b18010f24c2f47edfff5daa221cf1.zip
Removed all references to an initrd and renamed most initr{d,amfs} stuff to simply 'ramdisk' to simplify things for the future.
-rw-r--r--ChangeLog12
-rw-r--r--TODO1
-rw-r--r--arch/alpha/modules_load2
-rw-r--r--arch/ia64/modules_load2
-rw-r--r--arch/mips/modules_load2
-rw-r--r--arch/parisc/modules_load2
-rw-r--r--arch/parisc64/modules_load2
-rw-r--r--arch/ppc/modules_load2
-rw-r--r--arch/ppc64/modules_load2
-rw-r--r--arch/sparc/modules_load2
-rw-r--r--arch/sparc64/modules_load2
-rw-r--r--arch/x86/modules_load2
-rw-r--r--arch/x86_64/modules_load2
-rw-r--r--defaults/initrd.scripts4
-rw-r--r--defaults/linuxrc9
-rw-r--r--defaults/modules_load2
-rw-r--r--gen_bootloader.sh2
-rwxr-xr-xgen_cmdline.sh42
-rw-r--r--gen_determineargs.sh6
-rw-r--r--gen_initramfs.sh2
-rw-r--r--gen_initrd.sh357
-rw-r--r--gen_moddeps.sh2
-rw-r--r--gen_package.sh7
-rwxr-xr-xgenkernel32
-rw-r--r--genkernel.815
25 files changed, 71 insertions, 444 deletions
diff --git a/ChangeLog b/ChangeLog
index 229bea3..9ee8cea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,18 @@
# Distributed under the GPL v2
28 Jul 2008; Chris Gianelloni <wolf31o2@wolf31o2.org> TODO,
+ arch/alpha/modules_load, arch/ia64/modules_load, arch/mips/modules_load,
+ arch/parisc/modules_load, arch/parisc64/modules_load,
+ arch/ppc/modules_load, arch/ppc64/modules_load, arch/sparc/modules_load,
+ arch/sparc64/modules_load, arch/x86/modules_load,
+ arch/x86_64/modules_load, defaults/initrd.scripts, defaults/linuxrc,
+ defaults/modules_load, gen_bootloader.sh, gen_cmdline.sh,
+ gen_determineargs.sh, gen_initramfs.sh, -gen_initrd.sh, gen_moddeps.sh,
+ gen_package.sh, genkernel, genkernel.8:
+ Removed all references to an initrd and renamed most initr{d,amfs} stuff
+ to simply 'ramdisk' to simplify things for the future.
+
+ 28 Jul 2008; Chris Gianelloni <wolf31o2@wolf31o2.org> TODO,
+defaults/initrd.defaults, +defaults/initrd.scripts,
+defaults/keymaps.tar.gz, +defaults/linuxrc, +defaults/modprobe,
+defaults/udhcpc.scripts, gen_initramfs.sh, -generic/initrd.defaults,
diff --git a/TODO b/TODO
index cc34c2e..a8becc1 100644
--- a/TODO
+++ b/TODO
@@ -6,7 +6,6 @@
- Refactor code to be more simple and extendable
- Fix all TODO sections in the code
- Add all options to genkernel.conf
-- Remove initrd support
- Add "include" options to genkernel.conf
- Allow for architecture-specific or module-specific files to override defaults
- Create hooks for various points in the build/install phases for modules
diff --git a/arch/alpha/modules_load b/arch/alpha/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/alpha/modules_load
+++ b/arch/alpha/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/arch/ia64/modules_load b/arch/ia64/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/ia64/modules_load
+++ b/arch/ia64/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/arch/mips/modules_load b/arch/mips/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/mips/modules_load
+++ b/arch/mips/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/arch/parisc/modules_load b/arch/parisc/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/parisc/modules_load
+++ b/arch/parisc/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/arch/parisc64/modules_load b/arch/parisc64/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/parisc64/modules_load
+++ b/arch/parisc64/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/arch/ppc/modules_load b/arch/ppc/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/ppc/modules_load
+++ b/arch/ppc/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/arch/ppc64/modules_load b/arch/ppc64/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/ppc64/modules_load
+++ b/arch/ppc64/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/arch/sparc/modules_load b/arch/sparc/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/sparc/modules_load
+++ b/arch/sparc/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/arch/sparc64/modules_load b/arch/sparc64/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/sparc64/modules_load
+++ b/arch/sparc64/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/arch/x86/modules_load b/arch/x86/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/x86/modules_load
+++ b/arch/x86/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/arch/x86_64/modules_load b/arch/x86_64/modules_load
index 6444ae0..fc8cd72 100644
--- a/arch/x86_64/modules_load
+++ b/arch/x86_64/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 7e42be9..f3646c8 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -470,7 +470,7 @@ load_modules() {
modules_scan $modules
done
else
- good_msg 'Skipping module load; no modules in the initrd!'
+ good_msg 'Skipping module load; no modules in the ramdisk!'
fi
}
@@ -687,7 +687,7 @@ openLUKS() {
local DEV_ERROR=0 KEY_ERROR=0 KEYDEV_ERROR=0
local mntkey="/mnt/key/" cryptsetup_options=''
- [ ! -e /sbin/cryptsetup ] && bad_msg "The initrd does not support LUKS" && exit 1
+ [ ! -e /sbin/cryptsetup ] && bad_msg "The ramdisk does not support LUKS" && exit 1
while [ 1 ]
do
# if crypt_silent=1 and some error occurs, enter shell quietly
diff --git a/defaults/linuxrc b/defaults/linuxrc
index 780b707..784fa66 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -220,7 +220,7 @@ then
# Always eval doload=...
modules_load ${MDOLIST}
else
- good_msg 'Skipping module load; no modules in the initrd!'
+ good_msg 'Skipping module load; no modules in the ramdisk!'
fi
# Delay if needed for USB hardware
@@ -576,7 +576,7 @@ then
then
sleep 10
fi
- mkdir initrd proc tmp sys 2>/dev/null
+ mkdir initramfs proc tmp sys 2>/dev/null
chmod 1777 tmp
#UML=`cat /proc/cpuinfo|grep UML|sed -e 's|model name.*: ||'`
@@ -607,7 +607,6 @@ fi
verbose_kmsg
-# There used to be some initrd/2.4 code here, but it's gone now :
echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}"
if [ ! -e "${CHROOT}/dev/console" ] || [ ! -e "${CHROOT}/dev/null" ]
then
@@ -620,8 +619,8 @@ fi
cd "${CHROOT}"
mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null
echo -ne "${BOLD}.${NORMAL}"
-umount /sys || echo '*: Failed to unmount the initrd /sys!'
-umount /proc || echo '*: Failed to unmount the initrd /proc!'
+umount /sys || echo '*: Failed to unmount the ramdisk /sys!'
+umount /proc || echo '*: Failed to unmount the ramdisk /proc!'
echo -e "${BOLD}.${NORMAL}"
exec switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}"
diff --git a/defaults/modules_load b/defaults/modules_load
index 6444ae0..fc8cd72 100644
--- a/defaults/modules_load
+++ b/defaults/modules_load
@@ -1,4 +1,4 @@
-# Module groups for genkernel initrd/initramfs auto-loading
+# Module groups for genkernel initramfs auto-loading
# RAID
MODULES_ATARAID="ataraid pdcraid hptraid"
diff --git a/gen_bootloader.sh b/gen_bootloader.sh
index 7f772cf..a08135c 100644
--- a/gen_bootloader.sh
+++ b/gen_bootloader.sh
@@ -56,7 +56,7 @@ EOF
echo "# Genkernel generated entry, see GRUB documentation for details" >> ${GRUB_CONF}
echo "title=Gentoo Linux ($KV)" >> ${GRUB_CONF}
echo -e "\troot (${GRUB_BOOT_DISK},${GRUB_BOOT_PARTITION})" >> ${GRUB_CONF}
- if [ "${BUILD_INITRD}" -eq '0' ]
+ if [ "${BUILD_RAMDISK}" -eq '0' ]
then
echo -e "\tkernel /kernel-${KNAME}-${ARCH}-${KV} root=${GRUB_ROOTFS}" >> ${GRUB_CONF}
else
diff --git a/gen_cmdline.sh b/gen_cmdline.sh
index 3084076..354df80 100755
--- a/gen_cmdline.sh
+++ b/gen_cmdline.sh
@@ -9,7 +9,7 @@ longusage() {
echo " all Build all steps"
echo " bzImage Build only the kernel"
echo " kernel Build only the kernel and modules"
- echo " initrd Build only the initrd"
+ echo " ramdisk Build only the ramdisk/initramfs"
echo
echo "Available Options: "
echo " Configuration settings"
@@ -39,8 +39,8 @@ longusage() {
echo " --no-install Do not install the kernel after building"
echo " --symlink Manage symlinks in /boot for installed images"
echo " --no-symlink Do not manage symlinks"
- echo " --no-initrdmodules Don't copy any modules to the initrd"
- echo " --all-initrd-modules Copy all kernel modules to the initrd"
+ echo " --no-ramdisk-modules Don't copy any modules to the ramdisk"
+ echo " --all-ramdisk-modules Copy all kernel modules to the ramdisk"
echo " --callback=<...> Run the specified arguments after the"
echo " kernel and modules have been compiled"
echo " --static Build a static (monolithic kernel)."
@@ -87,21 +87,21 @@ longusage() {
echo " --bootloader=grub Add new kernel to GRUB configuration"
echo " --linuxrc=<file> Specifies a user created linuxrc"
echo " --disklabel Include disk label and uuid support in your"
- echo " initrd"
+ echo " ramdisk"
echo " --luks Include LUKS support"
echo " --> 'emerge cryptsetup-luks' with USE=-dynamic"
- echo " --no-busybox Do not include busybox in the initrd or initramfs."
+ echo " --no-busybox Do not include busybox in the initramfs."
echo " Internals"
echo " --arch-override=<arch> Force to arch instead of autodetect"
echo " --cachedir=<dir> Override the default cache location"
echo " --tempdir=<dir> Location of Genkernel's temporary directory"
echo " --postclear Clear all tmp files and caches after genkernel has run"
echo " Output Settings"
- echo " --kernname=<...> Tag the kernel and initrd with a name:"
+ echo " --kernname=<...> Tag the kernel and ramdisk with a name:"
echo " If not defined the option defaults to"
echo " 'genkernel'"
- echo " --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:"
- echo " No modules outside of the initrd will be"
+ echo " --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and ramdisk:"
+ echo " No modules outside of the ramdisk will be"
echo " included..."
echo " --modulespackage=<tbz2> File to output a .tar.bz2'd modules after the"
echo " callbacks have run"
@@ -370,13 +370,13 @@ parse_cmdline() {
CMD_NOINSTALL=1
print_info 2 "CMD_NOINSTALL: ${CMD_NOINSTALL}"
;;
- --no-initrdmodules)
- CMD_NOINITRDMODULES=1
- print_info 2 "CMD_NOINITRDMODULES: ${CMD_NOINITRDMODULES}"
+ --no-ramdisk-modules)
+ CMD_NOiRAMDISKMODULES=1
+ print_info 2 "CMD_NORAMDISKMODULES: ${CMD_NORAMDISKMODULES}"
;;
- --all-initrd-modules)
- CMD_ALLINITRDMODULES=1
- print_info 2 "CMD_ALLINITRDMODULES: ${CMD_ALLINITRDMODULES}"
+ --all-ramdisk-modules)
+ CMD_ALLRAMDISKMODULES=1
+ print_info 2 "CMD_ALLRAMDISKMODULES: ${CMD_ALLRAMDISKMODULES}"
;;
--callback=*)
CMD_CALLBACK=`parse_opt "$*"`
@@ -504,22 +504,22 @@ parse_cmdline() {
all)
BUILD_KERNEL=1
BUILD_MODULES=1
- BUILD_INITRD=1
+ BUILD_RAMDISK=1
;;
- initrd)
- BUILD_INITRD=1
+ ramdisk)
+ BUILD_RAMDISK=1
;;
kernel)
BUILD_KERNEL=1
BUILD_MODULES=1
- BUILD_INITRD=0
+ BUILD_RAMDISK=0
;;
bzImage)
BUILD_KERNEL=1
BUILD_MODULES=0
- BUILD_INITRD=1
- CMD_NOINITRDMODULES=1
- print_info 2 "CMD_NOINITRDMODULES: ${CMD_NOINITRDMODULES}"
+ BUILD_RAMDISK=1
+ CMD_NORAMDISKMODULES=1
+ print_info 2 "CMD_NORAMDISKMODULES: ${CMD_NORAMDISKMODULES}"
;;
--help)
longusage
diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index f125f61..28f0a34 100644
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -97,8 +97,8 @@ determine_real_args() {
set_config_with_override 2 MINKERNPACKAGE CMD_MINKERNPACKAGE
set_config_with_override 2 MODULESPACKAGE CMD_MODULESPACKAGE
set_config_with_override 2 KERNCACHE CMD_KERNCACHE
- set_config_with_override 1 NOINITRDMODULES CMD_NOINITRDMODULES
- set_config_with_override 1 ALLINITRDMODULES CMD_ALLINITRDMODULES
+ set_config_with_override 1 NORAMDISKMODULES CMD_NORAMDISKMODULES
+ set_config_with_override 1 ALLRAMDISKMODULES CMD_ALLRAMDISKMODULES
set_config_with_override 2 INITRAMFS_OVERLAY CMD_INITRAMFS_OVERLAY
set_config_with_override 1 MOUNTBOOT CMD_MOUNTBOOT
set_config_with_override 1 BUILD_STATIC CMD_STATIC
@@ -201,7 +201,7 @@ determine_real_args() {
mkdir -p `dirname ${KERNCACHE}`
fi
- if ! isTrue "${BUILD_INITRD}"
+ if ! isTrue "${BUILD_RAMDISK}"
then
INTEGRATED_INITRAMFS=0
fi
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 08e913b..ce308b5 100644
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -468,7 +468,7 @@ create_initramfs() {
append_data 'evms' "${EVMS}"
append_data 'mdadm' "${MDADM}"
- if [ "${NOINITRDMODULES}" -eq '0' ]
+ if [ "${NORAMDISKMODULES}" -eq '0' ]
then
append_data 'modules'
else
diff --git a/gen_initrd.sh b/gen_initrd.sh
deleted file mode 100644
index 6b20c8d..0000000
--- a/gen_initrd.sh
+++ /dev/null
@@ -1,357 +0,0 @@
-#!/bin/bash
-
-# create_initrd_loop(size)
-create_initrd_loop() {
- local inodes
- [ "$#" -ne '1' ] && gen_die 'create_initrd_loop(): Not enough arguments!'
- mkdir -p ${TEMP}/initrd-mount ||
- gen_die 'Could not create loopback mount directory!'
- dd if=/dev/zero of=${TMPDIR}/initrd-${KV} bs=1k count=${1} >> "${LOGFILE}" 2>&1 ||
- gen_die "Could not zero initrd-${KV}"
- mke2fs -F -N750 -q "${TMPDIR}/initrd-${KV}" >> "${LOGFILE}" 2>&1 ||
- gen_die "Could not format initrd-${KV}!"
- mount -t ext2 -o loop "${TMPDIR}/initrd-${KV}" "${TEMP}/initrd-mount" >> "${LOGFILE}" 2>&1 ||
- gen_die 'Could not mount the initrd filesystem!'
-}
-
-create_initrd_unmount_loop() {
- cd ${TEMP}
- umount "${TEMP}/initrd-mount" ||
- gen_die 'Could not unmount initrd system!'
-}
-
-move_initrd_to_loop() {
- cd "${TEMP}/initrd-temp"
- mv * "${TEMP}/initrd-mount" >> ${LOGFILE} 2>&1
-}
-
-# check for static linked file with objdump
-is_static() {
- LANG="C" LC_ALL="C" objdump -T $1 2>&1 | grep "not a dynamic object" > /dev/null
- return $?
-}
-
-create_base_initrd_sys() {
- rm -rf "${TEMP}/initrd-temp" > /dev/null
- mkdir -p ${TEMP}/initrd-temp/dev
- mkdir -p ${TEMP}/initrd-temp/bin
- mkdir -p ${TEMP}/initrd-temp/etc
- mkdir -p ${TEMP}/initrd-temp/usr
- mkdir -p ${TEMP}/initrd-temp/proc
- mkdir -p ${TEMP}/initrd-temp/temp
- mkdir -p ${TEMP}/initrd-temp/sys
- mkdir -p ${TEMP}/initrd-temp/.initrd
- mkdir -p ${TEMP}/initrd-temp/var/lock/dmraid
- ln -s bin ${TEMP}/initrd-temp/sbin
- ln -s ../bin ${TEMP}/initrd-temp/usr/bin
- ln -s ../bin ${TEMP}/initrd-temp/usr/sbin
-
- echo "/dev/ram0 / ext2 defaults 0 0" > ${TEMP}/initrd-temp/etc/fstab
- echo "proc /proc proc defaults 0 0" >> ${TEMP}/initrd-temp/etc/fstab
-
- cd ${TEMP}/initrd-temp/dev
- MAKEDEV std
- MAKEDEV console
-
- if [ "${DISKLABEL}" -eq '1' ]; then
- cp "${BLKID_BINCACHE}" "${TEMP}/initrd-temp/bin/blkid.bz2" ||
- gen_die 'Could not copy blkid from bincache!'
- bunzip2 "${TEMP}/initrd-temp/bin/blkid.bz2" ||
- gen_die 'Could not uncompress blkid!'
- chmod +x "${TEMP}/initrd-temp/bin/blkid"
- fi
-
- tar -xjf "${BUSYBOX_BINCACHE}" -C "${TEMP}/initrd-temp/bin" busybox ||
- gen_die 'Could not extract busybox bincache!'
- chmod +x "${TEMP}/initrd-temp/bin/busybox"
-
- # DMRAID
- if [ "${DMRAID}" -eq '1' ]
- then
- print_info 1 'DMRAID: Adding support (compiling binaries)...'
- compile_dmraid
- /bin/tar -jxpf "${DMRAID_BINCACHE}" -C "${TEMP}/initrd-temp" ||
- gen_die "Could not extract dmraid binary cache!";
- fi
-
- # LVM
- if [ "${LVM}" -eq '1' ]
- then
- if [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable';
- then
- print_info 1 'LVM: Adding support (using local static binaries)...'
- cp /sbin/lvm "${TEMP}/initrd-temp/bin/lvm" ||
- gen_die 'Could not copy over lvm!'
- else
- print_info 1 'LVM: Adding support (compiling binaries)...'
- compile_lvm
-
- /bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/initrd-temp" ||
- gen_die "Could not extract lvm binary cache!";
- mv ${TEMP}/initrd-temp/bin/lvm.static ${TEMP}/initrd-temp/bin/lvm ||
- gen_die 'LVM error: Could not move lvm.static to lvm!'
- fi
- for i in vgchange vgscan; do
- ln ${TEMP}/initrd-temp/bin/lvm ${TEMP}/initrd-temp/bin/$i ||
- gen_die "LVM error: Could not link ${i}!"
- done
- mkdir -p ${TEMP}/initrd-temp/etc/lvm
- if [ -x /sbin/lvm ]
- then
-# lvm dumpconfig 2>&1 > /dev/null || gen_die 'Could not copy over lvm.conf!'
-# ret=$?
-# if [ ${ret} != 0 ]
-# then
- cp /etc/lvm/lvm.conf "${TEMP}/initrd-temp/etc/lvm/" ||
- gen_die 'Could not copy over lvm.conf!'
-# else
-# gen_die 'Could not copy over lvm.conf!'
-# fi
- fi
- fi
-
- # EVMS
- if [ "${EVMS}" -eq '1' ]
- then
- if [ -e '/sbin/evms_activate' ]
- then
- print_info 1 'EVMS: Adding support...'
- mkdir -p ${TEMP}/initrd-temp/lib
- mkdir -p ${TEMP}/initrd-temp/sbin
- mkdir -p ${TEMP}/initrd-temp/etc
- mkdir -p ${TEMP}/initrd-temp/bin
- cp -a /lib/ld-* "${TEMP}/initrd-temp/lib" \
- || gen_die 'Could not copy files for EVMS!'
- if [ -n "`ls /lib/libgcc_s*`" ]
- then
- cp -a /lib/libgcc_s* "${TEMP}/initrd-temp/lib" \
- || gen_die 'Could not copy files for EVMS!'
- fi
- cp -a /lib/libc-* /lib/libc.* "${TEMP}/initrd-temp/lib" \
- || gen_die 'Could not copy files for EVMS!'
- cp -a /lib/libdl-* /lib/libdl.* "${TEMP}/initrd-temp/lib" \
- || gen_die 'Could not copy files for EVMS!'
- cp -a /lib/libpthread* "${TEMP}/initrd-temp/lib" \
- || gen_die 'Could not copy files for EVMS!'
- cp -a /lib/libuuid*so* "${TEMP}/initrd-temp/lib" \
- || gen_die 'Could not copy files for EVMS!'
- cp -a /lib/libevms*so* "${TEMP}/initrd-temp/lib" \
- || gen_die 'Could not copy files for EVMS!'
- cp -a /lib/evms "${TEMP}/initrd-temp/lib" \
- || gen_die 'Could not copy files for EVMS!'
- cp -a /lib/evms/* "${TEMP}/initrd-temp/lib/evms" \
- || gen_die 'Could not copy files for EVMS!'
- cp -a /etc/evms.conf "${TEMP}/initrd-temp/etc" \
- || gen_die 'Could not copy files for EVMS!'
- cp /sbin/evms_activate "${TEMP}/initrd-temp/sbin" \
- || gen_die 'Could not copy over evms_activate!'
- # Fix EVMS complaining that it cant find the swap utilities.
- # These are not required in the initrd
- for swap_libs in "${TEMP}/initrd-temp/lib/evms/*/swap*.so"
- do
- rm ${swap_libs}
- done
- fi
- fi
-
- for i in '[' ash basename cat chroot clear cp dirname echo env false find \
- grep gunzip gzip ln ls loadkmap losetup lsmod mdev mkdir mknod more mount \
- mv pivot_root ps awk pwd rm rmdir rmmod sed sh sleep tar test touch true \
- umount uname xargs yes zcat chmod chown cut kill killall; do
- rm -f ${TEMP}/initrd-temp/bin/$i > /dev/null
- ln ${TEMP}/initrd-temp/bin/busybox ${TEMP}/initrd-temp/bin/$i ||
- gen_die "Busybox error: could not link ${i}!"
- done
-
- if isTrue ${LUKS}
- then
- if is_static /bin/cryptsetup
- then
- print_info 1 "Including LUKS support"
- rm -f ${TEMP}/initrd-temp/sbin/cryptsetup
- cp /bin/cryptsetup ${TEMP}/initrd-temp/sbin/cryptsetup
- chmod +x "${TEMP}/initrd-temp/sbin/cryptsetup"
- elif is_static /sbin/cryptsetup
- then
- print_info 1 "Including LUKS support"
- rm -f ${TEMP}/initrd-temp/sbin/cryptsetup
- cp /sbin/cryptsetup ${TEMP}/initrd-temp/sbin/cryptsetup
- chmod +x "${TEMP}/initrd-temp/sbin/cryptsetup"
- else
- print_info 1 "LUKS support requires static cryptsetup at /bin/cryptsetup or /sbin/cryptsetup"
- print_info 1 "Not including LUKS support"
- fi
- fi
-}
-
-print_list() {
- local x
- for x in ${*}
- do
- echo ${x}
- done
-}
-
-create_initrd_modules() {
- local group
- local group_modules
-
- if [ "${PAT}" -gt "4" ]
- then
- MOD_EXT=".ko"
- else
- MOD_EXT=".o"
- fi
-
- print_info 2 "initrd: >> Searching for modules..."
-
- if [ "${INSTALL_MOD_PATH}" != '' ]
- then
- cd ${INSTALL_MOD_PATH}
- else
- cd /
- fi
-
- for i in `gen_dep_list`
- do
- mymod=`find ./lib/modules/${KV} -name "${i}${MOD_EXT}" 2>/dev/null| head -n 1`
- if [ -z "${mymod}" ]
- then
- print_warning 2 "Warning :: ${i}${MOD_EXT} not found; skipping..."
- continue;
- fi
- print_info 2 "initrd: >> Copying ${i}${MOD_EXT}..."
- cp -ax --parents "${mymod}" "${TEMP}/initrd-temp"
- done
-
- cp -ax --parents ./lib/modules/${KV}/modules* ${TEMP}/initrd-temp 2>/dev/null
-
- mkdir -p "${TEMP}/initrd-temp/etc/modules"
- for group_modules in ${!MODULES_*}; do
- group="$(echo $group_modules | cut -d_ -f2 | tr "[:upper:]" "[:lower:]")"
- print_list ${!group_modules} > "${TEMP}/initrd-temp/etc/modules/${group}"
- done
-}
-
-create_initrd_aux() {
- if [ -f "${CMD_LINUXRC}" ]
- then
- cp "${CMD_LINUXRC}" "${TEMP}/initrd-temp/linuxrc"
- print_info 2 " >> Copying user specified linuxrc: ${CMD_LINUXRC}"
- else
- if [ -f "${GK_SHARE}/${ARCH}/linuxrc" ]
- then
- cp "${GK_SHARE}/${ARCH}/linuxrc" "${TEMP}/initrd-temp/linuxrc"
- else
- cp "${GK_SHARE}/generic/linuxrc" "${TEMP}/initrd-temp/linuxrc"
- fi
- fi
-
- # Make sure it's executable
- chmod 0755 "${TEMP}/initrd-temp/linuxrc"
-
- if [ -f "${GK_SHARE}/${ARCH}/initrd.scripts" ]
- then
- cp "${GK_SHARE}/${ARCH}/initrd.scripts" "${TEMP}/initrd-temp/etc/initrd.scripts"
- else
- cp "${GK_SHARE}/generic/initrd.scripts" "${TEMP}/initrd-temp/etc/initrd.scripts"
- fi
-
- if [ -f "${GK_SHARE}/${ARCH}/initrd.defaults" ]
- then
- cp "${GK_SHARE}/${ARCH}/initrd.defaults" "${TEMP}/initrd-temp/etc/initrd.defaults"
- else
- cp "${GK_SHARE}/generic/initrd.defaults" "${TEMP}/initrd-temp/etc/initrd.defaults"
- fi
-
- echo -n 'HWOPTS="$HWOPTS ' >> "${TEMP}/initrd-temp/etc/initrd.defaults"
- for group_modules in ${!MODULES_*}; do
- group="$(echo $group_modules | cut -d_ -f2 | tr "[:upper:]" "[:lower:]")"
- echo -n "${group} " >> "${TEMP}/initrd-temp/etc/initrd.defaults"
- done
- echo '"' >> "${TEMP}/initrd-temp/etc/initrd.defaults"
-
- if [ -f "${GK_SHARE}/${ARCH}/modprobe" ]
- then
- cp "${GK_SHARE}/${ARCH}/modprobe" "${TEMP}/initrd-temp/sbin/modprobe"
- else
- cp "${GK_SHARE}/generic/modprobe" "${TEMP}/initrd-temp/sbin/modprobe"
- fi
- if isTrue $CMD_DOKEYMAPAUTO
- then
- echo 'MY_HWOPTS="${MY_HWOPTS} keymap"' >> ${TEMP}/initrd-temp/etc/initrd.defaults
- fi
- if isTrue $CMD_KEYMAP
- then
- mkdir -p "${TEMP}/initrd-temp/lib/keymaps"
- /bin/tar -C "${TEMP}/initrd-temp/lib/keymaps" -zxf "${GK_SHARE}/generic/keymaps.tar.gz"
- fi
- if isTrue $CMD_SLOWUSB
- then
- echo 'MY_HWOPTS="${MY_HWOPTS} slowusb"' >> ${TEMP}/initrd-temp/etc/initrd.defaults
- fi
-
- cd ${TEMP}/initrd-temp/sbin && ln -s ../linuxrc init
- cd ${OLDPWD}
- chmod +x "${TEMP}/initrd-temp/linuxrc"
- chmod +x "${TEMP}/initrd-temp/etc/initrd.scripts"
- chmod +x "${TEMP}/initrd-temp/etc/initrd.defaults"
- chmod +x "${TEMP}/initrd-temp/sbin/modprobe"
-}
-
-calc_initrd_size() {
- local TEST
- cd ${TEMP}/initrd-temp/
- TEST=`du -sk 2> /dev/null`
- echo $TEST | cut "-d " -f1
-}
-
-create_initrd() {
- local MOD_EXT
-
- print_info 1 "initrd: >> Initializing..."
- create_base_initrd_sys
-
- if [ "${NOINITRDMODULES}" -eq '0' ]
- then
- print_info 1 " >> Copying modules..."
- create_initrd_modules
- else
- print_info 1 "initrd: Not copying modules..."
- fi
-
- print_info 1 " >> Copying auxilary files..."
- create_initrd_aux
-
- INITRD_CALC_SIZE=`calc_initrd_size`
- INITRD_SIZE=`expr ${INITRD_CALC_SIZE} + 250`
- print_info 1 " :: Size is at ${INITRD_SIZE}K"
- print_info 1 " >> Creating loopback filesystem..."
- create_initrd_loop ${INITRD_SIZE}
-
- print_info 1 " >> Moving initrd files to the loopback..."
- move_initrd_to_loop
-
- print_info 1 " >> Cleaning up and compressing the initrd..."
- create_initrd_unmount_loop
-
- if [ "${COMPRESS_INITRD}" ]
- then
- gzip -f -9 ${TMPDIR}/initrd-${KV}
- mv ${TMPDIR}/initrd-${KV}.gz ${TMPDIR}/initrd-${KV}
- fi
-
- if ! isTrue "${CMD_NOINSTALL}"
- then
- copy_image_with_preserve "initrd" \
- "${TMPDIR}/initrd-${KV}" \
- "initrd-${KNAME}-${ARCH}-${KV}"
- fi
-
-# if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
-# then
-# # Pegasos hack for merging the initramfs into the kernel at compile time
-# cp ${TMPDIR}/initrd-${KV} ${KERNEL_DIR}/arch/${ARCH}/boot/images/ramdisk.image.gz &&
-# rm ${TMPDIR}/initrd-${KV}
-# fi
-}
diff --git a/gen_moddeps.sh b/gen_moddeps.sh
index fa550e5..97216d0 100644
--- a/gen_moddeps.sh
+++ b/gen_moddeps.sh
@@ -60,7 +60,7 @@ gen_deps()
gen_dep_list()
{
- if [ "${ALLINITRDMODULES}" = "1" ]; then
+ if [ "${ALLRAMDISKMODULES}" = "1" ]; then
strip_mod_paths $(find "${INSTALL_MOD_PATH}/lib/modules/${KV}" -name "*$(modules_kext)") | sort
else
local group_modules
diff --git a/gen_package.sh b/gen_package.sh
index 207e5b4..7126009 100644
--- a/gen_package.sh
+++ b/gen_package.sh
@@ -24,12 +24,7 @@ gen_minkernpackage() {
if ! isTrue "${INTEGRATED_INITRAMFS}"
then
- if [ "${KERN_24}" != '1' ]
- then
- [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TMPDIR}/initramfs-${KV}" "${TEMP}/minkernpackage/initramfs-${ARCH}-${KV}" || gen_die 'Could not copy the initramfs for the kernel package!'; }
- else
- [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TMPDIR}/initrd-${KV}" "${TEMP}/minkernpackage/initrd-${ARCH}-${KV}" || gen_die 'Could not copy the initrd for the kernel package!'; }
- fi
+ [ "${BUILD_RAMDISK}" -ne 0 ] && { cp "${TMPDIR}/initramfs-${KV}" "${TEMP}/minkernpackage/initramfs-${ARCH}-${KV}" || gen_die 'Could not copy the initramfs for the kernel package!'; }
fi
if [ "${KERNCACHE}" != "" ]
diff --git a/genkernel b/genkernel
index 29db849..bd5d3c6 100755
--- a/genkernel
+++ b/genkernel
@@ -40,7 +40,6 @@ source ${GK_SHARE}/gen_arch.sh || gen_die "Could not read ${GK_SHARE}/gen_arch.s
source ${GK_SHARE}/gen_determineargs.sh || gen_die "Could not read ${GK_SHARE}/gen_determineargs.sh"
source ${GK_SHARE}/gen_compile.sh || gen_die "Could not read ${GK_SHARE}/gen_compile.sh"
source ${GK_SHARE}/gen_configkernel.sh || gen_die "Could not read ${GK_SHARE}/gen_configkernel.sh"
-source ${GK_SHARE}/gen_initrd.sh || gen_die "Could not read ${GK_SHARE}/gen_initrd.sh"
source ${GK_SHARE}/gen_initramfs.sh || gen_die "Could not read ${GK_SHARE}/gen_initramfs.sh"
source ${GK_SHARE}/gen_moddeps.sh || gen_die "Could not read ${GK_SHARE}/gen_moddeps.sh"
source ${GK_SHARE}/gen_package.sh || gen_die "Could not read ${GK_SHARE}/gen_package.sh"
@@ -301,21 +300,14 @@ if [ "${BUILD_INITRD}" -eq '1' ]
then
[ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
- if [ "${KERN_24}" != '1' ]
+ if [ "${BUSYBOX}" -eq '1' ]
then
- if [ "${BUSYBOX}" -eq '1' ]
- then
# Compile Busybox
compile_busybox
- fi
-
- # Compile initramfs
- create_initramfs
- else
- # Create initrd
- compile_busybox
- create_initrd
fi
+
+ # Compile initramfs
+ create_initramfs
else
print_info 1 'initrd: Not building since only the kernel was requested...'
fi
@@ -347,8 +339,7 @@ then
print_info 1 ''
print_info 1 ' Where $ROOT is the device node for your root partition as the'
print_info 1 ' one specified in /etc/fstab'
- elif [ "${KERN_24}" != '1' ]
- then
+ else
print_info 1 ' real_root=/dev/$ROOT'
print_info 1 ''
print_info 1 ' Where $ROOT is the device node for your root partition as the'
@@ -357,18 +348,7 @@ then
print_info 1 "If you require Genkernel's hardware detection features; you MUST"
print_info 1 'tell your bootloader to use the provided INITRAMFS file. Otherwise;'
print_info 1 'substitute the root argument for the real_root argument if you are'
- print_info 1 'not planning to use the initrd...'
- else
- print_info 1 ' root=/dev/ram0 real_root=/dev/$ROOT init=/linuxrc'
- [ "${INITRD_SIZE}" -ge 4096 ] && print_info 1 " ramdisk_size=${INITRD_SIZE}"
- print_info 1 ''
- print_info 1 ' Where $ROOT is the device node for your root partition as the'
- print_info 1 ' one specified in /etc/fstab'
- print_info 1 ''
- print_info 1 "If you require Genkernel's hardware detection features; you MUST"
- print_info 1 'tell your bootloader to use the provided INITRD file. Otherwise;'
- print_info 1 'substitute the root argument for the real_root argument if you are'
- print_info 1 'not planning to use the initrd...'
+ print_info 1 'not planning to use the initramfs...'
fi
fi
diff --git a/genkernel.8 b/genkernel.8
index 86b0f98..12582fc 100644
--- a/genkernel.8
+++ b/genkernel.8
@@ -28,7 +28,7 @@ actions are supported:
.PP
.I \fBall\fR
.RS
-Build all steps - the kernel, modules, and the initrd.
+Build all steps - the kernel, modules, and the ramdisk.
.RE
.I \fBbzImage\fR
.RS
@@ -38,9 +38,9 @@ Build only the kernel.
.RS
Build only the kernel and the modules.
.RE
-.I \fBinitrd\fR
+.I \fBinitramfs\fR
.RS
-Build only the initrd.
+Build only the ramdisk.
.RE
.SH OPTIONS
Genkernel supports the following options which alter its
@@ -98,7 +98,7 @@ after building. The default is --install. If MOUNTBOOT is set in
then
.I /boot
will be automatically mounted if it is
-not already mounted before the initrd and kernel image is copied over.
+not already mounted before the ramdisk and kernel images are copied over.
.TP
\fB\-\-\fR[no\-]\fBsymlink\fR
Manages, or does not manage, symlinks in
@@ -113,16 +113,15 @@ symlink will link to the most recently built kernel image and a
.I kernelz.old\fR)
symlink will link to the second most recently built image, if one exists.
Similar symlinks (both * and *.old) are managed for
-.I initramfs\fR (or
-.I initrd\fR)
+.I initramfs\fR
and
.I System.map\f.
-The corresponding work products (i.e., the actual kernel and inirtamfs images,
+The corresponding work products (i.e., the actual kernel and initamfs images,
and System.map) are also managed accordingly. NOTE: Specifying --symlink
does nothing unless --install is also specified.
.TP
\fB\-\-no\-initrdmodules\fR
-Don't copy any modules to the initrd.
+Don't copy any modules to the ramdisk.
.TP
\fB\-\-oldconfig\fR
Implies \fB\-\-no\-clean\fR, and thus \fB\-\-no\-mrproper\fR, running a