# Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 10 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> alpha/busy-config,
+ gen_initrd.sh, generic/initrd.scripts, generic/linuxrc, ia64/busy-config,
+ mips/busy-config, parisc/busy-config, parisc64/busy-config,
+ ppc/busy-config, ppc64/busy-config, sparc/busy-config,
+ sparc64/busy-config, um/busy-config, x86/busy-config, x86_64/busy-config:
+ Enable CONFIG_HEXDUMP globally for busybox
+ Add getdvhoff replacement function from vapier
+ Remove copying of getdvhoff from system
+
10 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> gen_cmdline.sh,
gen_determineargs.sh, gen_initramfs.sh, genkernel.conf:
Add support for --firmware-files option to make robbat2 happy
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
echo "/dev/ram0 / ext2 defaults 0 0" > ${TEMP}/initrd-temp/etc/fstab
echo "proc /proc proc defaults 0 0" >> ${TEMP}/initrd-temp/etc/fstab
- # SGI LiveCDs need the following binary (no better place for it than here)
- # getdvhoff is a DEPEND of genkernel, so it *should* exist
- if [ ${BUILD_INITRAMFS} -eq '1' ]
- then
- [ -e /usr/lib/getdvhoff/getdvhoff ] \
- && cp /usr/lib/getdvhoff/getdvhoff ${TEMP}/initrd-temp/bin \
- || gen_die "sys-boot/getdvhoff not merged!"
- fi
-
cd ${TEMP}/initrd-temp/dev
MAKEDEV std
MAKEDEV console
[ "${LOOP}" == "/zisofs" ] && LOOPTYPE="${LOOP#/}"
[ -z "${LOOPTYPE}" ] && LOOPTYPE="noloop"
}
+
+getdvhoff() {
+ echo $(( $(hexdump -n 4 -s $((316 + 12 * $2)) -e '"%i"' $1) * 512))
+}
# the LiveCD rootfs
good_msg 'Locating the SGI LiveCD Root Partition'
echo ' ' | \
- losetup -o $(/bin/getdvhoff "${NEW_ROOT}${REAL_ROOT}" 0) \
+ losetup -o $(getdvhoff "${NEW_ROOT}${REAL_ROOT}" 0) \
"${NEW_ROOT}${CDROOT_DEV}" \
"${NEW_ROOT}${REAL_ROOT}"
test_success 'losetup /dev/sr0 /dev/loop0'
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_FSCK_MINIX is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_GETOPT is not set
-# CONFIG_HEXDUMP is not set
+CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set