File tree 5 files changed +19
-14
lines changed
5 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,8 @@ if [ ! -r "$INITFILE" ]; then
102
102
fi
103
103
104
104
MERGE_LIST=$*
105
- SED_CONFIG_EXP=" s/^\(# \)\{0,1\}\(${CONFIG_PREFIX} [a-zA-Z0-9_]*\)[= ].*/\2/p"
105
+ SED_CONFIG_EXP1=" s/^\(${CONFIG_PREFIX} [a-zA-Z0-9_]*\)=.*/\1/p"
106
+ SED_CONFIG_EXP2=" s/^# \(${CONFIG_PREFIX} [a-zA-Z0-9_]*\) is not set$/\1/p"
106
107
107
108
TMP_FILE=$( mktemp ./.tmp.config.XXXXXXXXXX)
108
109
@@ -116,7 +117,7 @@ for MERGE_FILE in $MERGE_LIST ; do
116
117
echo " The merge file '$MERGE_FILE ' does not exist. Exit." >&2
117
118
exit 1
118
119
fi
119
- CFG_LIST=$( sed -n " $SED_CONFIG_EXP " $MERGE_FILE )
120
+ CFG_LIST=$( sed -n -e " $SED_CONFIG_EXP1 " -e " $SED_CONFIG_EXP2 " $MERGE_FILE )
120
121
121
122
for CFG in $CFG_LIST ; do
122
123
grep -q -w $CFG $TMP_FILE || continue
@@ -159,7 +160,7 @@ make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
159
160
160
161
161
162
# Check all specified config values took (might have missed-dependency issues)
162
- for CFG in $( sed -n " $SED_CONFIG_EXP " $TMP_FILE ) ; do
163
+ for CFG in $( sed -n -e " $SED_CONFIG_EXP1 " -e " $SED_CONFIG_EXP2 " $TMP_FILE ) ; do
163
164
164
165
REQUESTED_VAL=$( grep -w -e " $CFG " $TMP_FILE )
165
166
ACTUAL_VAL=$( grep -w -e " $CFG " " $KCONFIG_CONFIG " )
Original file line number Diff line number Diff line change 81
81
cp System.map " $tmpdir /boot/System.map-$version "
82
82
cp $KCONFIG_CONFIG " $tmpdir /boot/config-$version "
83
83
fi
84
- cp " $( $MAKE -s image_name) " " $tmpdir /$installed_image_path "
84
+ cp " $( $MAKE -s -f $srctree /Makefile image_name) " " $tmpdir /$installed_image_path "
85
85
86
- if grep -q " ^CONFIG_OF =y" $KCONFIG_CONFIG ; then
86
+ if grep -q " ^CONFIG_OF_EARLY_FLATTREE =y" $KCONFIG_CONFIG ; then
87
87
# Only some architectures with OF support have this target
88
- if grep -q dtbs_install " ${srctree} /arch/$SRCARCH /Makefile " ; then
88
+ if [ -d " ${srctree} /arch/$SRCARCH /boot/dts " ] ; then
89
89
$MAKE KBUILD_SRC= INSTALL_DTBS_PATH=" $tmpdir /usr/lib/$packagename " dtbs_install
90
90
fi
91
91
fi
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ set_debarch() {
88
88
version=$KERNELRELEASE
89
89
if [ -n " $KDEB_PKGVERSION " ]; then
90
90
packageversion=$KDEB_PKGVERSION
91
+ revision=${packageversion##* -}
91
92
else
92
93
revision=$( cat .version 2> /dev/null|| echo 1)
93
94
packageversion=$version -$revision
@@ -205,10 +206,12 @@ cat <<EOF > debian/rules
205
206
#!$( command -v $MAKE ) -f
206
207
207
208
build:
208
- \$ (MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC=
209
+ \$ (MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
210
+ KBUILD_BUILD_VERSION=${revision} KBUILD_SRC=
209
211
210
212
binary-arch:
211
- \$ (MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= intdeb-pkg
213
+ \$ (MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
214
+ KBUILD_BUILD_VERSION=${revision} KBUILD_SRC= intdeb-pkg
212
215
213
216
clean:
214
217
rm -rf debian/*tmp debian/files
Original file line number Diff line number Diff line change 12
12
# how we were called determines which rpms we build and how we build them
13
13
if [ " $1 " = prebuilt ]; then
14
14
S=DEL
15
+ MAKE=" $MAKE -f $srctree /Makefile"
15
16
else
16
17
S=
17
18
fi
@@ -78,19 +79,19 @@ $S %prep
78
79
$S %setup -q
79
80
$S
80
81
$S %build
81
- $S make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
82
+ $S $MAKE %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
82
83
$S
83
84
%install
84
85
mkdir -p %{buildroot}/boot
85
86
%ifarch ia64
86
87
mkdir -p %{buildroot}/boot/efi
87
- cp \$ (make image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE
88
+ cp \$ ($MAKE image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE
88
89
ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/
89
90
%else
90
- cp \$ (make image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE
91
+ cp \$ ($MAKE image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE
91
92
%endif
92
- $M make %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} KBUILD_SRC= modules_install
93
- make %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr KBUILD_SRC= headers_install
93
+ $M $MAKE %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} modules_install
94
+ $MAKE %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
94
95
cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE
95
96
cp .config %{buildroot}/boot/config-$KERNELRELEASE
96
97
bzip2 -9 --keep vmlinux
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ scm_version()
74
74
fi
75
75
76
76
# Check for uncommitted changes
77
- if git status -uno --porcelain | grep -qv ' ^.. scripts/package' ; then
77
+ if git diff-index --name-only HEAD | grep -qv " ^ scripts/package" ; then
78
78
printf ' %s' -dirty
79
79
fi
80
80
You can’t perform that action at this time.
0 commit comments