2.4 kernel updates

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@3 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Brad House 21 years ago
parent 0347fe12ee
commit 5c705decd9

@ -2,9 +2,14 @@ VERY EXPERIMENTAL
seems to work so far on amd64 and x86 seems to work so far on amd64 and x86
I've only tested with 2.6 kernels, it's possible that I've only tested with 2.6 kernels, it's possible that
the module-init-tools we use doesn't work with 2.4 in the module-init-tools we use doesn't work with 2.4 in
which case we need to compile modutils as well and which case we need to compile modutils as well and
provide a static binary for that.... provide a static binary for that....
DEPENDANCIES:
- bootsplash
- gcc/binutils
- bash
INSTALLATION: INSTALLATION:
put genkernel.conf in /etc put genkernel.conf in /etc

@ -20,6 +20,18 @@ compile_generic() {
[ "${RET}" -ne "0" ] && gen_die "compile of failed" [ "${RET}" -ne "0" ] && gen_die "compile of failed"
} }
compile_dep() {
# Only make dep for 2.4 kernels
if [ "${PAT}" -gt "4" ]
then
print_info 1 "kernel: skipping make dep for non 2.4 kernels"
else
print_info 1 "kernel: Making dependancies for linux ${KV}"
cd ${KERNEL_DIR}
compile_generic "dep"
fi
}
compile_modules() { compile_modules() {
print_info 1 "kernel: Starting compile of linux ${KV} modules" print_info 1 "kernel: Starting compile of linux ${KV} modules"
cd ${KERNEL_DIR} cd ${KERNEL_DIR}
@ -61,6 +73,7 @@ compile_busybox() {
fi fi
print_info 1 "Busybox: copying to bincache" print_info 1 "Busybox: copying to bincache"
[ ! -f "${TEMP}/${BUSYBOX_DIR}/busybox" ] && gen_die "busybox executable does not exist after compile, error" [ ! -f "${TEMP}/${BUSYBOX_DIR}/busybox" ] && gen_die "busybox executable does not exist after compile, error"
strip "${TEMP}/${BUSYBOX_DIR}/busybox" || gen_die "could not strip busybox"
bzip2 "${TEMP}/${BUSYBOX_DIR}/busybox" || gen_die "bzip2 compression of busybox failed" bzip2 "${TEMP}/${BUSYBOX_DIR}/busybox" || gen_die "bzip2 compression of busybox failed"
[ ! -f "${TEMP}/${BUSYBOX_DIR}/busybox.bz2" ] && gen_die "could not find compressed busybox binary" [ ! -f "${TEMP}/${BUSYBOX_DIR}/busybox.bz2" ] && gen_die "could not find compressed busybox binary"
mv "${TEMP}/${BUSYBOX_DIR}/busybox.bz2" "${BUSYBOX_BINCACHE}" || gen_die "could not copy busybox binary to arch package directory, does the directory exist?" mv "${TEMP}/${BUSYBOX_DIR}/busybox.bz2" "${BUSYBOX_BINCACHE}" || gen_die "could not copy busybox binary to arch package directory, does the directory exist?"
@ -69,6 +82,30 @@ compile_busybox() {
fi fi
} }
compile_modutils() {
if [ ! -f "${MODUTILS_BINCACHE}" ]
then
[ ! -f "${MODUTILS_SRCTAR}" ] && gen_die "Could not find modutils source tarball: ${MODUTILS_BINCACHE}"
cd ${TEMP}
rm -rf "${MODUTILS_DIR}"
tar -jxpf "${MODUTILS_SRCTAR}"
[ ! -d "${MODUTILS_DIR}" ] && gen_die "Modutils directory ${MODUTILS_DIR} invalid"
cd "${MODUTILS_DIR}"
print_info 1 "modutils: configure"
CC="${CC}" LD="${LD}" AS="${AS}" ./configure --disable-combined --enable-insmod-static >> ${DEBUGFILE} 2>&1 || gen_die "Configure of modutils failed"
print_info 1 "modutils: make all"
compile_generic "all"
print_info 1 "modutils: copying to bincache"
[ ! -f "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" ] && gen_die "insmod.static does not exist after compilation of modutils"
strip "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" || gen_die "could not strip insmod.static"
bzip2 "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" || gen_die "compression of insmod.static failed"
[ ! -f "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static.bz2" ] && gen_die "could not find compressed insmod.static.bz2 binary"
mv "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" "${MODUTILS_BINCACHE}"
else
print_info 1 "modutils: Found bincache at ${MODUTILS_BINCACHE}"
fi
}
compile_module_init_tools() { compile_module_init_tools() {
if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ] if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ]
then then
@ -79,12 +116,13 @@ compile_module_init_tools() {
[ ! -d "${MODULE_INIT_TOOLS_DIR}" ] && gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} invalid" [ ! -d "${MODULE_INIT_TOOLS_DIR}" ] && gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} invalid"
cd "${MODULE_INIT_TOOLS_DIR}" cd "${MODULE_INIT_TOOLS_DIR}"
print_info 1 "module-init-tools: configure" print_info 1 "module-init-tools: configure"
./configure >> ${DEBUGFILE} 2>&1 || gen_die "Configure of module-init-tools failed" CC="${CC}" LD="${LD}" AS="${AS}" ./configure >> ${DEBUGFILE} 2>&1 || gen_die "Configure of module-init-tools failed"
print_info 1 "module-init-tools: make all" print_info 1 "module-init-tools: make all"
compile_generic "all" compile_generic "all"
print_info 1 "module-init-tools: copying to bincache" print_info 1 "module-init-tools: copying to bincache"
[ ! -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" ] && gen_die "insmod.static does not exist after compilation of module-init-tools" [ ! -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" ] && gen_die "insmod.static does not exist after compilation of module-init-tools"
bzip2 "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || gen_die "compression of busybox failed" strip "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || gen_die "could not strip insmod.static"
bzip2 "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" || gen_die "compression of insmod.static failed"
[ ! -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" ] && gen_die "could not find compressed insmod.static.bz2 binary" [ ! -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" ] && gen_die "could not find compressed insmod.static.bz2 binary"
mv "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" "${MODULE_INIT_TOOLS_BINCACHE}" mv "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" "${MODULE_INIT_TOOLS_BINCACHE}"
else else

@ -38,9 +38,15 @@ create_base_initrd_sys() {
cp "${BUSYBOX_BINCACHE}" "${TEMP}/initrd-temp/bin/busybox.bz2" || gen_die "could not copy busybox from bincache" cp "${BUSYBOX_BINCACHE}" "${TEMP}/initrd-temp/bin/busybox.bz2" || gen_die "could not copy busybox from bincache"
bunzip2 "${TEMP}/initrd-temp/bin/busybox.bz2" || gen_die "could not uncompress busybox" bunzip2 "${TEMP}/initrd-temp/bin/busybox.bz2" || gen_die "could not uncompress busybox"
cp "${MODULE_INIT_TOOLS_BINCACHE}" "${TEMP}/initrd-temp/bin/insmod.static.bz2" || gen_die "could not copy insmod.static from bincache" if [ "${PAT}" -gt "4" ]
then
cp "${MODULE_INIT_TOOLS_BINCACHE}" "${TEMP}/initrd-temp/bin/insmod.static.bz2" || gen_die "could not copy insmod.static from bincache"
else
cp "${MODUTILS_BINCACHE}" "${TEMP}/initrd-temp/bin/insmod.static.bz2" || gen_die "could not copy insmod.static from bincache"
fi
bunzip2 "${TEMP}/initrd-temp/bin/insmod.static.bz2" || gen_die "could not uncompress insmod.static" bunzip2 "${TEMP}/initrd-temp/bin/insmod.static.bz2" || gen_die "could not uncompress insmod.static"
for i in '[' ash basename cat chroot clear cp dirname echo env false find \ for i in '[' ash basename cat chroot clear cp dirname echo env false find \
grep gunzip gzip insmod ln ls loadkmap losetup lsmod mkdir mknod modprobe more mount mv \ grep gunzip gzip insmod ln ls loadkmap losetup lsmod mkdir mknod modprobe more mount mv \
pivot_root ps awk pwd rm rmdir rmmod sh sleep tar test touch true umount uname \ pivot_root ps awk pwd rm rmdir rmmod sh sleep tar test touch true umount uname \

@ -65,7 +65,12 @@ BUSYBOX_DIR="busybox-${BUSYBOX_VER}"
MODULE_INIT_TOOLS_VER="0.9.15-pre4" MODULE_INIT_TOOLS_VER="0.9.15-pre4"
MODULE_INIT_TOOLS_SRCTAR="${GK_SHARE}/pkg/module-init-tools-${MODULE_INIT_TOOLS_VER}.tar.bz2" MODULE_INIT_TOOLS_SRCTAR="${GK_SHARE}/pkg/module-init-tools-${MODULE_INIT_TOOLS_VER}.tar.bz2"
MODULE_INIT_TOOLS_DIR="module-init-tools-${MODULE_INIT_TOOLS_VER}" MODULE_INIT_TOOLS_DIR="module-init-tools-${MODULE_INIT_TOOLS_VER}"
MODULE_INIT_TOOLS_BINCACHE="${GK_SHARE}/pkg/%%ARCH%%/insmod-%%ARCH%%-static.bz2" MODULE_INIT_TOOLS_BINCACHE="${GK_SHARE}/pkg/%%ARCH%%/insmod-%%ARCH%%-static-2.6.bz2"
MODUTILS_VER="2.4.26"
MODUTILS_SRCTAR="${GK_SHARE}/pkg/modutils-${MODUTILS_VER}.tar.bz2"
MODUTILS_DIR="modutils-${MODUTILS_VER}"
MODUTILS_BINCACHE="${GK_SHARE}/pkg/%%ARCH%%/insmod-%%ARCH%%-static-2.4.bz2"
DIETLIBC_VER="0.24" DIETLIBC_VER="0.24"
DIETLIBC_SRCTAR="${GK_SHARE}/pkg/dietlibc-${DIETLIBC_VER}.tar.bz2" DIETLIBC_SRCTAR="${GK_SHARE}/pkg/dietlibc-${DIETLIBC_VER}.tar.bz2"

@ -40,6 +40,9 @@ print_info 1 "ARCH: ${ARCH}"
# Configure kernel # Configure kernel
config_kernel config_kernel
# Make deps
compile_dep
# Compile modules # Compile modules
compile_modules compile_modules
@ -55,8 +58,13 @@ fi
# Compile Busybox # Compile Busybox
compile_busybox compile_busybox
# Compile module-init-tools if [ "${PAT}" -gt "4" ]
compile_module_init_tools then
# Compile module-init-tools
compile_module_init_tools
else
compile_modutils
fi
# Create initrd # Create initrd
create_initrd create_initrd

Loading…
Cancel
Save