Merge branch 'yarost12-YF-allow-using-extra-uarches-even-with-copied-config-v2' into develop
This commit is contained in:
commit
abff9518a7
1 changed files with 25 additions and 8 deletions
27
PKGBUILD
27
PKGBUILD
|
@ -66,9 +66,10 @@
|
||||||
# Set to anything but null to activate.
|
# Set to anything but null to activate.
|
||||||
: "${_localmodcfg:=""}"
|
: "${_localmodcfg:=""}"
|
||||||
|
|
||||||
# Optionally select a sub architecture by number or
|
# Optionally select a sub architecture by number or its Kconfig name,
|
||||||
# leave blank, which will require user interaction during the build.
|
# for example MCORE2 or MZEN4.
|
||||||
# Note that the default option is 41.
|
# Leaving it blank will require user interaction during the build.
|
||||||
|
# Note that the default option is empty.
|
||||||
#
|
#
|
||||||
# 1. AMD Opteron/Athlon64/Hammer/K8 (MK8)
|
# 1. AMD Opteron/Athlon64/Hammer/K8 (MK8)
|
||||||
# 2. AMD Opteron/Athlon64/Hammer/K8 with SSE3 (MK8SSE3)
|
# 2. AMD Opteron/Athlon64/Hammer/K8 with SSE3 (MK8SSE3)
|
||||||
|
@ -221,7 +222,7 @@ modify_defconfig() {
|
||||||
|
|
||||||
# Copies the kernel config
|
# Copies the kernel config
|
||||||
copy_defconfig() {
|
copy_defconfig() {
|
||||||
local "_cur_major_ver=$(zcat /proc/config.gz | grep Linux | grep -o '[0-9]*[0-9]\.[0-9]*[0-9]')"
|
local _cur_major_ver="$(uname -r | grep -o '[0-9]*[0-9]\.[0-9]*[0-9]')"
|
||||||
[[ "${_cur_major_ver}" != "${_kernel_major}" ]] &&
|
[[ "${_cur_major_ver}" != "${_kernel_major}" ]] &&
|
||||||
warning "Major version was updated, you should regen the defconfig"
|
warning "Major version was updated, you should regen the defconfig"
|
||||||
|
|
||||||
|
@ -325,14 +326,30 @@ update_defconfig() {
|
||||||
make ${BUILD_FLAGS[*]} olddefconfig
|
make ${BUILD_FLAGS[*]} olddefconfig
|
||||||
diff -u $srcdir/cl-linux/config .config || :
|
diff -u $srcdir/cl-linux/config .config || :
|
||||||
|
|
||||||
# Set subarch automatically
|
# Here we slightly break the config by removing one of the
|
||||||
|
# members of the 'Processor family' selection.
|
||||||
|
# This causes oldconfig to always invoke that selection.
|
||||||
|
sed -i '/CONFIG_GENERIC_CPU/d' .config || :
|
||||||
|
# For a slim chance that someone is building X86_32
|
||||||
|
sed -i '/CONFIG_M686/d' .config || :
|
||||||
|
|
||||||
if [ -n "${_subarch}" ]; then
|
if [ -n "${_subarch}" ]; then
|
||||||
|
# check if subarch is a number
|
||||||
|
if [[ ${_subarch} =~ ^[0-9]+$ ]] && ((_subarch>=1)); then
|
||||||
if [ "${_subarch}" == "41" ]; then
|
if [ "${_subarch}" == "41" ]; then
|
||||||
yes "${_subarch}
|
yes "${_subarch}
|
||||||
${_subarch_microarch}" | make ${BUILD_FLAGS[*]} oldconfig
|
${_subarch_microarch}" | make ${BUILD_FLAGS[*]} oldconfig
|
||||||
else
|
else
|
||||||
yes "${_subarch}" | make ${BUILD_FLAGS[*]} oldconfig
|
yes "${_subarch}" | make ${BUILD_FLAGS[*]} oldconfig
|
||||||
fi
|
fi
|
||||||
|
# check that this option is present in the .config
|
||||||
|
elif [[ $(grep -c "${_subarch}" .config) -eq 1 ]]; then
|
||||||
|
scripts/config -e "${_subarch}"
|
||||||
|
make ${BUILD_FLAGS[*]} olddefconfig
|
||||||
|
else
|
||||||
|
warning "Unrecognized subarch value: ${_subarch}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# Ask for subarch
|
# Ask for subarch
|
||||||
make ${BUILD_FLAGS[*]} oldconfig
|
make ${BUILD_FLAGS[*]} oldconfig
|
||||||
|
|
Loading…
Reference in a new issue