# pakfire-builder shell kernel.nm
(pakfire-shell)> cd /usr/src/packages/kernel-x.y.z...
-The following commands are available:
+The following commands are available. Appending the <arch> argument allows you
+to edit a specific architecture. Default is x86_64.
#### oldconfig
options manually. All unset or updated options will be prompted for and all
configuration files for all architectures will be updated.
- (pakfire-shell)> scripts/configure oldconfig
+ (pakfire-shell)> scripts/configure oldconfig <arch>
#### olddefconfig
configuration files will be updated afterwards and potentially prompted for options
that diverge for different architectures.
- (pakfire-shell)> scripts/configure menuconfig
-
-Appending the --arch= argument allows you to edit a specific architecture.
-Default is x86_64.
+ (pakfire-shell)> scripts/configure menuconfig <arch>
#### listnewconfig
This will list all unset options.
- (pakfire-shell)> scripts/configure listnewconfig
+ (pakfire-shell)> scripts/configure listnewconfig <arch>
# This function runs an interactive "make oldconfig".
function make_config() {
- local arch="${1}"
- shift
+ local action="${1}"
+ local arch="${2}"
+
+ # Default to x86_64 when no arch is given
+ if [ -z "${arch}" ]; then
+ arch="x86_64"
+ fi
# Detect kernel arch
local kernel_arch="$(get_kernel_arch "${arch}")"
cat ${config_in} > .config
echo "You may now edit the configuration..."
- make ARCH=${kernel_arch} "$@"
+ make ARCH=${kernel_arch} "${action}"
cat .config > ${config_out}
popd
rm -rf ${tmpdir}
}
-ARCH="x86_64"
KERNEL_DIR="$(search_kernel_dir)"
# Parse commandline.
;;
listnewconfig|menuconfig|merge|oldconfig|olddefconfig)
action=${arg}
- ;;
-
- # Parse switches
- --arch=*)
- ARCH="${arg#*=}"
-
- if ! get_platform "${ARCH}" &>/dev/null; then
- echo "Unknown architecture: ${ARCH}" >&2
- exit 2
- fi
+ break
;;
esac
done
exit $?
;;
listnewconfig|menuconfig|oldconfig|olddefconfig)
- make_config "${ARCH}" "${action}"
+ make_config "${action}" "$@"
exit $?
;;
esac