diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt index ef50542..d5afd2e 100644 --- a/doc/genkernel.8.txt +++ b/doc/genkernel.8.txt @@ -183,9 +183,6 @@ LOW-LEVEL COMPILATION OPTIONS *--kernel-ld*=:: Linker to use for the kernel compilation. -*--kernel-cross-compile*=:: - CROSS_COMPILE kernel variable. - *--kernel-make*=:: GNU Make to use for the kernel compilation. @@ -209,9 +206,6 @@ LOW-LEVEL COMPILATION OPTIONS *--utils-make*=:: GNU Make to use for utilities. -*--utils-cross-compile*=:: - CROSS_COMPILE utils variable. - *--utils-arch*=:: Force to arch for utils only instead of autodetect. diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 2cb3410..cef291b 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -60,7 +60,6 @@ longusage() { echo " --kernel-cc= Compiler to use for kernel (e.g. distcc)" echo " --kernel-as= Assembler to use for kernel" echo " --kernel-ld= Linker to use for kernel" - echo " --kernel-cross-compile= CROSS_COMPILE kernel variable" echo " --kernel-make= GNU Make to use for kernel" echo " --kernel-target= Override default make target (bzImage)" echo " --kernel-binary= Override default kernel binary path (arch/foo/boot/bar)" @@ -70,7 +69,6 @@ longusage() { echo " --utils-as= Assembler to use for utils" echo " --utils-ld= Linker to use for utils" echo " --utils-make= GNU Make to use for utils" - echo " --utils-cross-compile= CROSS_COMPILE utils variable" echo " --utils-arch= Force to arch for utils only instead of" echo " autodetect." echo " --makeopts= Make options such as -j2, etc..." @@ -213,11 +211,6 @@ parse_cmdline() { KERNEL_BINARY_OVERRIDE=`parse_opt "$*"` print_info 2 "KERNEL_BINARY_OVERRIDE: ${KERNEL_BINARY_OVERRIDE}" ;; - --kernel-cross-compile=*) - CMD_KERNEL_CROSS_COMPILE=`parse_opt "$*"` - CMD_KERNEL_CROSS_COMPILE=$(echo ${CMD_KERNEL_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g') - print_info 2 "CMD_KERNEL_CROSS_COMPILE: ${CMD_KERNEL_CROSS_COMPILE}" - ;; --kernel-outputdir=*) CMD_KERNEL_OUTPUTDIR=`parse_opt "$*"` print_info 2 "CMD_KERNEL_OUTPUTDIR: ${CMD_KERNEL_OUTPUTDIR}" @@ -238,11 +231,6 @@ parse_cmdline() { 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}" diff --git a/gen_compile.sh b/gen_compile.sh index c35e7ba..28ca3ef 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -5,30 +5,25 @@ compile_kernel_args() { local ARGS ARGS='' - if [ "${KERNEL_CROSS_COMPILE}" != '' ] + if [ "${KERNEL_CC}" != '' ] then - ARGS="${ARGS} CROSS_COMPILE=\"${KERNEL_CROSS_COMPILE}\"" - else - if [ "${KERNEL_CC}" != '' ] - then - ARGS="CC=\"${KERNEL_CC}\"" - fi - if [ "${KERNEL_LD}" != '' ] - then - ARGS="${ARGS} LD=\"${KERNEL_LD}\"" - fi - if [ "${KERNEL_AS}" != '' ] - then - ARGS="${ARGS} AS=\"${KERNEL_AS}\"" - fi - if [ -n "${KERNEL_ARCH}" ] - then - ARGS="${ARGS} ARCH=\"${KERNEL_ARCH}\"" - fi - if [ -n "${KERNEL_OUTPUTDIR}" -a "${KERNEL_OUTPUTDIR}" != "${KERNEL_DIR}" ] - then - ARGS="${ARGS} O=\"${KERNEL_OUTPUTDIR}\"" - fi + ARGS="CC=\"${KERNEL_CC}\"" + fi + if [ "${KERNEL_LD}" != '' ] + then + ARGS="${ARGS} LD=\"${KERNEL_LD}\"" + fi + if [ "${KERNEL_AS}" != '' ] + then + ARGS="${ARGS} AS=\"${KERNEL_AS}\"" + fi + if [ -n "${KERNEL_ARCH}" ] + then + ARGS="${ARGS} ARCH=\"${KERNEL_ARCH}\"" + fi + if [ -n "${KERNEL_OUTPUTDIR}" -a "${KERNEL_OUTPUTDIR}" != "${KERNEL_DIR}" ] + then + ARGS="${ARGS} O=\"${KERNEL_OUTPUTDIR}\"" fi echo -n "${ARGS}" } @@ -38,13 +33,6 @@ compile_utils_args() local ARGS ARGS='' - if [ -n "${UTILS_CROSS_COMPILE}" ] - then - UTILS_CC="${UTILS_CROSS_COMPILE}gcc" - UTILS_LD="${UTILS_CROSS_COMPILE}ld" - UTILS_AS="${UTILS_CROSS_COMPILE}as" - fi - if [ "${UTILS_ARCH}" != '' ] then ARGS="ARCH=\"${UTILS_ARCH}\"" @@ -84,10 +72,6 @@ export_utils_args() then export AS="${UTILS_AS}" fi - if [ "${UTILS_CROSS_COMPILE}" != '' ] - then - export CROSS_COMPILE="${UTILS_CROSS_COMPILE}" - fi } unset_utils_args() @@ -108,10 +92,6 @@ unset_utils_args() then unset AS fi - if [ "${UTILS_CROSS_COMPILE}" != '' ] - then - unset CROSS_COMPILE - fi reset_args } @@ -129,10 +109,6 @@ export_kernel_args() then export AS="${KERNEL_AS}" fi - if [ "${KERNEL_CROSS_COMPILE}" != '' ] - then - export CROSS_COMPILE="${KERNEL_CROSS_COMPILE}" - fi } unset_kernel_args() @@ -149,10 +125,6 @@ unset_kernel_args() then unset AS fi - if [ "${KERNEL_CROSS_COMPILE}" != '' ] - then - unset CROSS_COMPILE - fi } save_args() { @@ -172,10 +144,6 @@ save_args() then export ORIG_AS="${AS}" fi - if [ "${CROSS_COMPILE}" != '' ] - then - export ORIG_CROSS_COMPILE="${CROSS_COMPILE}" - fi } reset_args() { @@ -199,11 +167,6 @@ reset_args() export AS="${ORIG_AS}" unset ORIG_AS fi - if [ "${ORIG_CROSS_COMPILE}" != '' ] - then - export CROSS_COMPILE="${ORIG_CROSS_COMPILE}" - unset ORIG_CROSS_COMPILE - fi } apply_patches() { @@ -430,7 +393,7 @@ compile_busybox() { print_info 1 'busybox: >> Copying to cache...' [ -f "${TEMP}/${BUSYBOX_DIR}/busybox" ] || gen_die 'Busybox executable does not exist!' - ${UTILS_CROSS_COMPILE}strip "${TEMP}/${BUSYBOX_DIR}/busybox" || + strip "${TEMP}/${BUSYBOX_DIR}/busybox" || gen_die 'Could not strip busybox binary!' tar -cj -C "${TEMP}/${BUSYBOX_DIR}" -f "${BUSYBOX_BINCACHE}" busybox .config .config.gk_orig || gen_die 'Could not create the busybox bincache!' @@ -462,8 +425,6 @@ compile_fuse() { # print_info 1 'libfuse: >> Copying to cache...' # [ -f "${TEMP}/${FUSE_DIR}/lib/.libs/libfuse.so" ] || # gen_die 'libfuse.so does not exist!' -# ${UTILS_CROSS_COMPILE}strip "${TEMP}/${FUSE_DIR}/lib/.libs/libfuse.so" || -# gen_die 'Could not strip libfuse.so!' # cd "${TEMP}/${FUSE_DIR}/lib/.libs" # tar -cjf "${FUSE_BINCACHE}" libfuse*so* || # gen_die 'Could not create fuse bincache!' @@ -496,7 +457,7 @@ compile_unionfs_fuse() { print_info 1 'unionfs-fuse: >> Copying to cache...' [ -f "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" ] || gen_die 'unionfs binary does not exist!' - ${UTILS_CROSS_COMPILE}strip "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" || + strip "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" || gen_die 'Could not strip unionfs binary!' bzip2 "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" || gen_die 'bzip2 compression of unionfs binary failed!' @@ -546,7 +507,7 @@ compile_iscsi() { print_info 1 'iscsistart: >> Copying to cache...' [ -f "${TEMP}/${ISCSI_DIR}/usr/iscsistart" ] || gen_die 'iscsistart executable does not exist!' - ${UTILS_CROSS_COMPILE}strip "${TEMP}/${ISCSI_DIR}/usr/iscsistart" || + strip "${TEMP}/${ISCSI_DIR}/usr/iscsistart" || gen_die 'Could not strip iscsistart binary!' bzip2 "${TEMP}/${ISCSI_DIR}/usr/iscsistart" || gen_die 'bzip2 compression of iscsistart failed!' @@ -593,7 +554,7 @@ compile_gpg() { print_info 1 'gnupg: >> Copying to cache...' [ -f "${TEMP}/${GPG_DIR}/g10/gpg" ] || gen_die 'gnupg executable does not exist!' - ${UTILS_CROSS_COMPILE}strip "${TEMP}/${GPG_DIR}/g10/gpg" || + strip "${TEMP}/${GPG_DIR}/g10/gpg" || gen_die 'Could not strip gpg binary!' bzip2 -z -c "${TEMP}/${GPG_DIR}/g10/gpg" > "${GPG_BINCACHE}" || gen_die 'Could not copy the gpg binary to the package directory, does the directory exist?' diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 6d006a6..b2b850a 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -87,8 +87,6 @@ determine_real_args() { set_config_with_override STRING UTILS_LD CMD_UTILS_LD "$DEFAULT_UTILS_LD" set_config_with_override STRING UTILS_AS CMD_UTILS_AS "$DEFAULT_UTILS_AS" - set_config_with_override STRING KERNEL_CROSS_COMPILE CMD_KERNEL_CROSS_COMPILE - set_config_with_override STRING UTILS_CROSS_COMPILE CMD_UTILS_CROSS_COMPILE set_config_with_override STRING BOOTDIR CMD_BOOTDIR "/boot" set_config_with_override STRING KERNEL_OUTPUTDIR CMD_KERNEL_OUTPUTDIR "${KERNEL_DIR}" set_config_with_override STRING MODPROBEDIR CMD_MODPROBEDIR "/etc/modprobe.d" diff --git a/genkernel.conf b/genkernel.conf index af73931..81e4cf3 100644 --- a/genkernel.conf +++ b/genkernel.conf @@ -157,16 +157,6 @@ DISKLABEL="yes" # option. #UTILS_LD="ld" - -# Common prefix of cros compile commands -#UTILS_CROSS_COMPILE="x86_64-pc-linux-gnu" - - -# Value of CROSS_COMPILE utils variable -# during kernel compilation -#KERNEL_CROSS_COMPILE="x86_64-pc-linux-gnu" - - # =========GENKERNEL LOCATION CONFIGURATION============ # Variables: # %%ARCH%% - Final determined architecture