From 82ff055edcef52314f57eba6b87b54961722c4c4 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Fri, 18 Jun 2021 18:15:19 -0700 Subject: Sync up settings across kernel PKGBUILDs --- PKGBUILD | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'PKGBUILD') diff --git a/PKGBUILD b/PKGBUILD index 3f6ea60..c05624d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -12,6 +12,9 @@ # Arch version does not disable IME/PSP/TEE/SEV # Arch version uses git +# set _custom to 0 when using mkchrootpkg +_custom=0 + pkgbase=linux _supver=5 _majver=12 @@ -76,6 +79,7 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP prepare() { cd $_srcname + # # kernel.org hasn't signed patches since 4.17.10 # add upstream patch # if [ "$_minver" != "0" ]; then # echo "Applying upstream patch" @@ -117,15 +121,27 @@ prepare() { echo "Setting config..." # we are in src/linux-x.yy.zz, looking for a config next to the pkgbuild -# if [ -f ${SRCDEST}/config.previous ]; then -# cp ${SRCDEST}/config.previous .config +# if [ "$_custom" == "1" ]; then +# if [ -f ${SRCDEST}/config.previous ]; then +# cp ${SRCDEST}/config.previous .config +# fi # else cp ../config .config # fi + echo "Cleaning up old and broken config settings..." make olddefconfig -# make menuconfig +# if [ "$_custom" == "1" ]; then +# if [ -f $HOME/.config/modprobed.db ]; then +# echo "Running make localmodconfig" +# make LSMOD=$HOME/.config/modprobed.db localmodconfig +# fi +# fi + + if [ "$_custom" == "1" ]; then + make menuconfig + fi # Remove sublevel when no sublevel exists if [ "$_minver" == "0" ]; then @@ -144,8 +160,10 @@ prepare() { cat ../version.temp | tr -d "\n" > version # back up the config -# echo "Backing up config..." -# cp .config ${SRCDEST}/config.previous +# if [ "$_custom" == "1" ]; then +# echo "Backing up config..." +# cp .config ${SRCDEST}/config.previous +# fi echo "Prepared $pkgbase version $(