34 lines
1.0 KiB
Bash
34 lines
1.0 KiB
Bash
#! /bin/sh
|
|
|
|
sourcedir=$1
|
|
builddir=$2
|
|
release=$3
|
|
|
|
# Install all config files. (Some of them might not work in the
|
|
# kernel sources because of architecture specific patches, but
|
|
# we don't care.)
|
|
configs="$($sourcedir/guards --list < $sourcedir/config.conf)"
|
|
for config in $configs; do
|
|
name=$(basename $config)
|
|
path=arch/$(dirname $config)/defconfig.$name
|
|
mkdir -p $(dirname $path)
|
|
cat $builddir/config/$config \
|
|
| $sourcedir/config-subst CONFIG_LOCALVERSION '"'-$name'"' \
|
|
| $sourcedir/config-subst CONFIG_SUSE_KERNEL y \
|
|
> $path
|
|
done
|
|
echo "-$release" > localversion-rpm-release
|
|
|
|
# For all architectures included, if there is a defconfig.default,
|
|
# make that the defconfig as well. If there is no defconfig.default,
|
|
# also remove the defconfig, as it is obviously not a tested, and
|
|
# woldn't work, anyway.
|
|
for config in $configs; do
|
|
arch=${config%/*}
|
|
if [ -e arch/$arch/defconfig.default ]; then
|
|
cat arch/$arch/defconfig.default > arch/$arch/defconfig
|
|
else
|
|
rm -f arch/$arch/defconfig
|
|
fi
|
|
done
|