fi
fi
+ if [ "${CMD_UTILS_ARCH}" != '' ]
+ then
+ UTILS_ARCH=${CMD_UTILS_ARCH}
+ else
+ if [ "${UTILS_ARCH}" != '' ]
+ then
+ UTILS_ARCH=${UTILS_ARCH}
+ fi
+ fi
+
ARCH_CONFIG="${GK_SHARE}/${ARCH}/config.sh"
[ -f "${ARCH_CONFIG}" ] || gen_die "${ARCH} not yet supported by genkernel. Please add the arch-specific config file, ${ARCH_CONFIG}"
}
echo " --utils-as=<assembler> Assembler to use for utils"
echo " --utils-ld=<linker> Linker to use for utils"
echo " --utils-make=<makeprog> GNU Make to use for utils"
+ echo " --utils-cross-compile=<cross var> CROSS_COMPILE utils variable"
+ echo " --utils-arch=<arch> Force to arch for utils only instead of autodetect."
echo " --makeopts=<makeopts> Make options such as -j2, etc..."
echo " --mountboot Mount /boot automatically"
echo " --no-mountboot Don't mount /boot automatically"
CMD_UTILS_MAKE=`parse_opt "$*"`
print_info 2 "CMD_UTILS_MAKE: $CMD_UTILS_MAKE"
;;
+ --utils-cross-compile=*)
+ CMD_UTILS_CROSS_COMPILE=`parse_opt "$*"`
+ CMD_UTILS_CROSS_COMPILE=$(echo ${CMD_UTILS_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')
+ print_info 2 "CMD_UTILS_CROSS_COMPILE: $CMD_UTILS_CROSS_COMPILE"
+ ;;
+ --utils-arch=*)
+ CMD_UTILS_ARCH=`parse_opt "$*"`
+ print_info 2 "CMD_UTILS_ARCH: $CMD_ARCHOVERRIDE"
+ ;;
--makeopts=*)
CMD_MAKEOPTS=`parse_opt "$*"`
print_info 2 "CMD_MAKEOPTS: $CMD_MAKEOPTS"
local ARGS
ARGS=''
+ if [ "${UTILS_ARCH}" != '' ]
+ then
+ ARGS="ARCH=\"${UTILS_ARCH}\""
+ fi
if [ "${UTILS_CC}" != '' ]
then
ARGS="CC=\"${UTILS_CC}\""
export_utils_args()
{
+ if [ "${UTILS_ARCH}" != '' ]
+ then
+ export ARCH="${UTILS_ARCH}"
+ fi
if [ "${UTILS_CC}" != '' ]
then
export CC="${UTILS_CC}"
unset_utils_args()
{
+ if [ "${UTILS_ARCH}" != '' ]
+ then
+ unset ARCH
+ fi
if [ "${UTILS_CC}" != '' ]
then
unset CC
print_info 1 'klibc: >> Compiling...'
ln -snf "${KERNEL_DIR}" linux || gen_die "Could not link to ${KERNEL_DIR}"
sed -i Makefile -e "s|prefix = /usr|prefix = ${TEMP}/klibc-build|g"
+ if [ "${UTILS_ARCH}" != '' ]
+ then
+ sed -i Makefile -e "s|export ARCH.*|export ARCH := ${UTILS_ARCH}|g"
+ fi
if [ "${ARCH}" = 'um' ]
then
compile_generic "ARCH=um" utils
elif [ "${ARCH}" = 'x86' ]
then
compile_generic "ARCH=i386" utils
- elif [ "${KERNEL_CROSS_COMPILE}" != '' ]
+ elif [ "${UTILS_CROSS_COMPILE}" != '' ]
then
- compile_generic "CROSS=${KERNEL_CROSS_COMPILE}" utils
+ compile_generic "CROSS=${UTILS_CROSS_COMPILE}" utils
else
compile_generic "" utils
fi
UTILS_AS="${CMD_UTILS_AS}"
fi
+ if [ "${CMD_UTILS_CROSS_COMPILE}" != '' ]
+ then
+ UTILS_CROSS_COMPILE="${CMD_UTILS_CROSS_COMPILE}"
+ fi
+
CACHE_DIR=`arch_replace "${CACHE_DIR}"`
CACHE_CPIO_DIR="${CACHE_DIR}/cpio"
BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"`
# Genkernel v3
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
-GK_V='3.3.11_pre3'
+GK_V='3.3.11_pre4'
TMPDIR='/var/tmp/genkernel'
TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified.