Skip to content

Commit d209176

Browse files
anissemichal42
authored andcommitted
deb-pkg: use KCONFIG_CONFIG instead of .config file directly
Signed-off-by: Anisse Astier <anisse@astier.eu> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz>
1 parent 2174d29 commit d209176

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎scripts/package/builddeb‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ create_package() {
4141
parisc*)
4242
debarch=hppa ;;
4343
mips*)
44-
debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y .config && echo el) ;;
44+
debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el) ;;
4545
arm*)
46-
debarch=arm$(grep -q CONFIG_AEABI=y .config && echo el) ;;
46+
debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el) ;;
4747
*)
4848
echo "" >&2
4949
echo "** ** ** WARNING ** ** **" >&2
@@ -106,12 +106,12 @@ fi
106106
if [ "$ARCH" = "um" ] ; then
107107
$MAKE linux
108108
cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
109-
cp .config "$tmpdir/usr/share/doc/$packagename/config"
109+
cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config"
110110
gzip "$tmpdir/usr/share/doc/$packagename/config"
111111
cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version"
112112
else
113113
cp System.map "$tmpdir/boot/System.map-$version"
114-
cp .config "$tmpdir/boot/config-$version"
114+
cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version"
115115
# Not all arches include the boot path in KBUILD_IMAGE
116116
if [ -e $KBUILD_IMAGE ]; then
117117
cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
@@ -120,7 +120,7 @@ else
120120
fi
121121
fi
122122

123-
if grep -q '^CONFIG_MODULES=y' .config ; then
123+
if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
124124
INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_install
125125
rm -f "$tmpdir/lib/modules/$version/build"
126126
rm -f "$tmpdir/lib/modules/$version/source"
@@ -245,11 +245,12 @@ fi
245245
# Build header package
246246
(cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles")
247247
(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles")
248-
(cd $objtree; find arch/$SRCARCH/include .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles")
248+
(cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles")
249249
destdir=$kernel_headers_dir/usr/src/linux-headers-$version
250250
mkdir -p "$destdir"
251251
(cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -)
252252
(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
253+
(cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be
253254
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
254255
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
255256
arch=$(dpkg --print-architecture)

0 commit comments

Comments
 (0)