diff options
-rwxr-xr-x | scripts/checkkconfigsymbols.sh | 4 | ||||
-rw-r--r-- | scripts/coccinelle/misc/boolreturn.cocci | 58 | ||||
-rw-r--r-- | scripts/package/builddeb | 94 | ||||
-rwxr-xr-x | scripts/package/mkspec | 46 |
4 files changed, 178 insertions, 24 deletions
diff --git a/scripts/checkkconfigsymbols.sh b/scripts/checkkconfigsymbols.sh index 2ca49bb31efc..ccb3391882d1 100755 --- a/scripts/checkkconfigsymbols.sh +++ b/scripts/checkkconfigsymbols.sh | |||
@@ -9,7 +9,7 @@ paths="$@" | |||
9 | # Doing this once at the beginning saves a lot of time, on a cache-hot tree. | 9 | # Doing this once at the beginning saves a lot of time, on a cache-hot tree. |
10 | Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`" | 10 | Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`" |
11 | 11 | ||
12 | /bin/echo -e "File list \tundefined symbol used" | 12 | printf "File list \tundefined symbol used\n" |
13 | find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i | 13 | find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i |
14 | do | 14 | do |
15 | # Output the bare Kconfig variable and the filename; the _MODULE part at | 15 | # Output the bare Kconfig variable and the filename; the _MODULE part at |
@@ -54,6 +54,6 @@ while read symb files; do | |||
54 | # beyond the purpose of this script. | 54 | # beyond the purpose of this script. |
55 | symb_bare=`echo $symb | sed -e 's/_MODULE//'` | 55 | symb_bare=`echo $symb | sed -e 's/_MODULE//'` |
56 | if ! grep -q "\<$symb_bare\>" $Kconfigs; then | 56 | if ! grep -q "\<$symb_bare\>" $Kconfigs; then |
57 | /bin/echo -e "$files: \t$symb" | 57 | printf "$files: \t$symb\n" |
58 | fi | 58 | fi |
59 | done|sort | 59 | done|sort |
diff --git a/scripts/coccinelle/misc/boolreturn.cocci b/scripts/coccinelle/misc/boolreturn.cocci new file mode 100644 index 000000000000..a43c7b0c36ef --- /dev/null +++ b/scripts/coccinelle/misc/boolreturn.cocci | |||
@@ -0,0 +1,58 @@ | |||
1 | /// Return statements in functions returning bool should use | ||
2 | /// true/false instead of 1/0. | ||
3 | // | ||
4 | // Confidence: High | ||
5 | // Options: --no-includes --include-headers | ||
6 | |||
7 | virtual patch | ||
8 | virtual report | ||
9 | virtual context | ||
10 | |||
11 | @r1 depends on patch@ | ||
12 | identifier fn; | ||
13 | typedef bool; | ||
14 | symbol false; | ||
15 | symbol true; | ||
16 | @@ | ||
17 | |||
18 | bool fn ( ... ) | ||
19 | { | ||
20 | <... | ||
21 | return | ||
22 | ( | ||
23 | - 0 | ||
24 | + false | ||
25 | | | ||
26 | - 1 | ||
27 | + true | ||
28 | ) | ||
29 | ; | ||
30 | ...> | ||
31 | } | ||
32 | |||
33 | @r2 depends on report || context@ | ||
34 | identifier fn; | ||
35 | position p; | ||
36 | @@ | ||
37 | |||
38 | bool fn ( ... ) | ||
39 | { | ||
40 | <... | ||
41 | return | ||
42 | ( | ||
43 | * 0@p | ||
44 | | | ||
45 | * 1@p | ||
46 | ) | ||
47 | ; | ||
48 | ...> | ||
49 | } | ||
50 | |||
51 | |||
52 | @script:python depends on report@ | ||
53 | p << r2.p; | ||
54 | fn << r2.fn; | ||
55 | @@ | ||
56 | |||
57 | msg = "WARNING: return of 0/1 in function '%s' with return type bool" % fn | ||
58 | coccilib.report.print_report(p[0], msg) | ||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index acb86507828a..90e521fde35f 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb | |||
@@ -41,9 +41,9 @@ create_package() { | |||
41 | parisc*) | 41 | parisc*) |
42 | debarch=hppa ;; | 42 | debarch=hppa ;; |
43 | mips*) | 43 | 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) ;; |
45 | arm*) | 45 | arm*) |
46 | debarch=arm$(grep -q CONFIG_AEABI=y .config && echo el) ;; | 46 | debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el) ;; |
47 | *) | 47 | *) |
48 | echo "" >&2 | 48 | echo "" >&2 |
49 | echo "** ** ** WARNING ** ** **" >&2 | 49 | echo "** ** ** WARNING ** ** **" >&2 |
@@ -78,17 +78,35 @@ tmpdir="$objtree/debian/tmp" | |||
78 | fwdir="$objtree/debian/fwtmp" | 78 | fwdir="$objtree/debian/fwtmp" |
79 | kernel_headers_dir="$objtree/debian/hdrtmp" | 79 | kernel_headers_dir="$objtree/debian/hdrtmp" |
80 | libc_headers_dir="$objtree/debian/headertmp" | 80 | libc_headers_dir="$objtree/debian/headertmp" |
81 | dbg_dir="$objtree/debian/dbgtmp" | ||
81 | packagename=linux-image-$version | 82 | packagename=linux-image-$version |
82 | fwpackagename=linux-firmware-image | 83 | fwpackagename=linux-firmware-image-$version |
83 | kernel_headers_packagename=linux-headers-$version | 84 | kernel_headers_packagename=linux-headers-$version |
84 | libc_headers_packagename=linux-libc-dev | 85 | libc_headers_packagename=linux-libc-dev |
86 | dbg_packagename=$packagename-dbg | ||
85 | 87 | ||
86 | if [ "$ARCH" = "um" ] ; then | 88 | if [ "$ARCH" = "um" ] ; then |
87 | packagename=user-mode-linux-$version | 89 | packagename=user-mode-linux-$version |
88 | fi | 90 | fi |
89 | 91 | ||
92 | # Not all arches have the same installed path in debian | ||
93 | # XXX: have each arch Makefile export a variable of the canonical image install | ||
94 | # path instead | ||
95 | case $ARCH in | ||
96 | um) | ||
97 | installed_image_path="usr/bin/linux-$version" | ||
98 | ;; | ||
99 | parisc|mips|powerpc) | ||
100 | installed_image_path="boot/vmlinux-$version" | ||
101 | ;; | ||
102 | *) | ||
103 | installed_image_path="boot/vmlinuz-$version" | ||
104 | esac | ||
105 | |||
106 | BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)" | ||
107 | |||
90 | # Setup the directory structure | 108 | # Setup the directory structure |
91 | rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" | 109 | rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" |
92 | mkdir -m 755 -p "$tmpdir/DEBIAN" | 110 | mkdir -m 755 -p "$tmpdir/DEBIAN" |
93 | mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" | 111 | mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" |
94 | mkdir -m 755 -p "$fwdir/DEBIAN" | 112 | mkdir -m 755 -p "$fwdir/DEBIAN" |
@@ -101,26 +119,29 @@ mkdir -p "$kernel_headers_dir/lib/modules/$version/" | |||
101 | if [ "$ARCH" = "um" ] ; then | 119 | if [ "$ARCH" = "um" ] ; then |
102 | mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" | 120 | mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" |
103 | fi | 121 | fi |
122 | if [ -n "$BUILD_DEBUG" ] ; then | ||
123 | mkdir -p "$dbg_dir/usr/share/doc/$dbg_packagename" | ||
124 | mkdir -m 755 -p "$dbg_dir/DEBIAN" | ||
125 | fi | ||
104 | 126 | ||
105 | # Build and install the kernel | 127 | # Build and install the kernel |
106 | if [ "$ARCH" = "um" ] ; then | 128 | if [ "$ARCH" = "um" ] ; then |
107 | $MAKE linux | 129 | $MAKE linux |
108 | cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" | 130 | cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" |
109 | cp .config "$tmpdir/usr/share/doc/$packagename/config" | 131 | cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config" |
110 | gzip "$tmpdir/usr/share/doc/$packagename/config" | 132 | gzip "$tmpdir/usr/share/doc/$packagename/config" |
111 | cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version" | ||
112 | else | 133 | else |
113 | cp System.map "$tmpdir/boot/System.map-$version" | 134 | cp System.map "$tmpdir/boot/System.map-$version" |
114 | cp .config "$tmpdir/boot/config-$version" | 135 | cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version" |
115 | # Not all arches include the boot path in KBUILD_IMAGE | 136 | fi |
116 | if [ -e $KBUILD_IMAGE ]; then | 137 | # Not all arches include the boot path in KBUILD_IMAGE |
117 | cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" | 138 | if [ -e $KBUILD_IMAGE ]; then |
118 | else | 139 | cp $KBUILD_IMAGE "$tmpdir/$installed_image_path" |
119 | cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" | 140 | else |
120 | fi | 141 | cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path" |
121 | fi | 142 | fi |
122 | 143 | ||
123 | if grep -q '^CONFIG_MODULES=y' .config ; then | 144 | if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then |
124 | INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_install | 145 | INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_install |
125 | rm -f "$tmpdir/lib/modules/$version/build" | 146 | rm -f "$tmpdir/lib/modules/$version/build" |
126 | rm -f "$tmpdir/lib/modules/$version/source" | 147 | rm -f "$tmpdir/lib/modules/$version/source" |
@@ -128,6 +149,20 @@ if grep -q '^CONFIG_MODULES=y' .config ; then | |||
128 | mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/" | 149 | mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/" |
129 | rmdir "$tmpdir/lib/modules/$version" | 150 | rmdir "$tmpdir/lib/modules/$version" |
130 | fi | 151 | fi |
152 | if [ -n "$BUILD_DEBUG" ] ; then | ||
153 | ( | ||
154 | cd $tmpdir | ||
155 | for module in $(find lib/modules/ -name *.ko); do | ||
156 | mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module) | ||
157 | # only keep debug symbols in the debug file | ||
158 | objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module | ||
159 | # strip original module from debug symbols | ||
160 | objcopy --strip-debug $module | ||
161 | # then add a link to those | ||
162 | objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module | ||
163 | done | ||
164 | ) | ||
165 | fi | ||
131 | fi | 166 | fi |
132 | 167 | ||
133 | if [ "$ARCH" != "um" ]; then | 168 | if [ "$ARCH" != "um" ]; then |
@@ -149,7 +184,7 @@ set -e | |||
149 | # Pass maintainer script parameters to hook scripts | 184 | # Pass maintainer script parameters to hook scripts |
150 | export DEB_MAINT_PARAMS="\$*" | 185 | export DEB_MAINT_PARAMS="\$*" |
151 | 186 | ||
152 | test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d | 187 | test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d |
153 | exit 0 | 188 | exit 0 |
154 | EOF | 189 | EOF |
155 | chmod 755 "$tmpdir/DEBIAN/$script" | 190 | chmod 755 "$tmpdir/DEBIAN/$script" |
@@ -245,11 +280,12 @@ fi | |||
245 | # Build header package | 280 | # Build header package |
246 | (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") | 281 | (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") |
247 | (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") | 282 | (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") | 283 | (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") |
249 | destdir=$kernel_headers_dir/usr/src/linux-headers-$version | 284 | destdir=$kernel_headers_dir/usr/src/linux-headers-$version |
250 | mkdir -p "$destdir" | 285 | mkdir -p "$destdir" |
251 | (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) | 286 | (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) |
252 | (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) | 287 | (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) |
288 | (cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be | ||
253 | ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" | 289 | ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" |
254 | rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" | 290 | rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" |
255 | arch=$(dpkg --print-architecture) | 291 | arch=$(dpkg --print-architecture) |
@@ -299,4 +335,30 @@ fi | |||
299 | 335 | ||
300 | create_package "$packagename" "$tmpdir" | 336 | create_package "$packagename" "$tmpdir" |
301 | 337 | ||
338 | if [ -n "$BUILD_DEBUG" ] ; then | ||
339 | # Build debug package | ||
340 | # Different tools want the image in different locations | ||
341 | # perf | ||
342 | mkdir -p $dbg_dir/usr/lib/debug/lib/modules/$version/ | ||
343 | cp vmlinux $dbg_dir/usr/lib/debug/lib/modules/$version/ | ||
344 | # systemtap | ||
345 | mkdir -p $dbg_dir/usr/lib/debug/boot/ | ||
346 | ln -s ../lib/modules/$version/vmlinux $dbg_dir/usr/lib/debug/boot/vmlinux-$version | ||
347 | # kdump-tools | ||
348 | ln -s lib/modules/$version/vmlinux $dbg_dir/usr/lib/debug/vmlinux-$version | ||
349 | |||
350 | cat <<EOF >> debian/control | ||
351 | |||
352 | Package: $dbg_packagename | ||
353 | Section: debug | ||
354 | Provides: linux-debug, linux-debug-$version | ||
355 | Architecture: any | ||
356 | Description: Linux kernel debugging symbols for $version | ||
357 | This package will come in handy if you need to debug the kernel. It provides | ||
358 | all the necessary debug symbols for the kernel and its modules. | ||
359 | EOF | ||
360 | |||
361 | create_package "$dbg_packagename" "$dbg_dir" | ||
362 | fi | ||
363 | |||
302 | exit 0 | 364 | exit 0 |
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index fdd3fbf4d4a4..13957602f7ca 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec | |||
@@ -1,7 +1,7 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # Output a simple RPM spec file that uses no fancy features requiring | 3 | # Output a simple RPM spec file. |
4 | # RPM v4. This is intended to work with any RPM distro. | 4 | # This version assumes a minimum of RPM 4.0.3. |
5 | # | 5 | # |
6 | # The only gothic bit here is redefining install_post to avoid | 6 | # The only gothic bit here is redefining install_post to avoid |
7 | # stripping the symbols from files in the kernel which we want | 7 | # stripping the symbols from files in the kernel which we want |
@@ -59,6 +59,14 @@ echo "header files define structures and constants that are needed for" | |||
59 | echo "building most standard programs and are also needed for rebuilding the" | 59 | echo "building most standard programs and are also needed for rebuilding the" |
60 | echo "glibc package." | 60 | echo "glibc package." |
61 | echo "" | 61 | echo "" |
62 | echo "%package devel" | ||
63 | echo "Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel" | ||
64 | echo "Group: System Environment/Kernel" | ||
65 | echo "AutoReqProv: no" | ||
66 | echo "%description -n kernel-devel" | ||
67 | echo "This package provides kernel headers and makefiles sufficient to build modules" | ||
68 | echo "against the $__KERNELRELEASE kernel package." | ||
69 | echo "" | ||
62 | 70 | ||
63 | if ! $PREBUILT; then | 71 | if ! $PREBUILT; then |
64 | echo "%prep" | 72 | echo "%prep" |
@@ -77,13 +85,14 @@ echo "%install" | |||
77 | echo 'KBUILD_IMAGE=$(make image_name)' | 85 | echo 'KBUILD_IMAGE=$(make image_name)' |
78 | echo "%ifarch ia64" | 86 | echo "%ifarch ia64" |
79 | echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules' | 87 | echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules' |
80 | echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' | ||
81 | echo "%else" | 88 | echo "%else" |
82 | echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' | 89 | echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' |
83 | echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' | ||
84 | echo "%endif" | 90 | echo "%endif" |
91 | echo 'mkdir -p $RPM_BUILD_ROOT'"/lib/firmware/$KERNELRELEASE" | ||
85 | 92 | ||
86 | echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= modules_install' | 93 | echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= mod-fw= modules_install' |
94 | echo 'INSTALL_FW_PATH=$RPM_BUILD_ROOT'"/lib/firmware/$KERNELRELEASE" | ||
95 | echo 'make INSTALL_FW_PATH=$INSTALL_FW_PATH' firmware_install | ||
87 | echo "%ifarch ia64" | 96 | echo "%ifarch ia64" |
88 | echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" | 97 | echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" |
89 | echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" | 98 | echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" |
@@ -108,18 +117,43 @@ echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2" | |||
108 | echo 'mv vmlinux.orig vmlinux' | 117 | echo 'mv vmlinux.orig vmlinux' |
109 | echo "%endif" | 118 | echo "%endif" |
110 | 119 | ||
120 | echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}" | ||
121 | echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE" | ||
122 | echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\"" | ||
123 | echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)" | ||
124 | echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE" | ||
125 | echo "ln -sf /usr/src/kernels/$KERNELRELEASE build" | ||
126 | echo "ln -sf /usr/src/kernels/$KERNELRELEASE source" | ||
127 | |||
111 | echo "" | 128 | echo "" |
112 | echo "%clean" | 129 | echo "%clean" |
113 | echo 'rm -rf $RPM_BUILD_ROOT' | 130 | echo 'rm -rf $RPM_BUILD_ROOT' |
114 | echo "" | 131 | echo "" |
132 | echo "%post" | ||
133 | echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then" | ||
134 | echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm" | ||
135 | echo "cp /boot/System.map-$KERNELRELEASE /boot/System.map-$KERNELRELEASE-rpm" | ||
136 | echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE" | ||
137 | echo "/sbin/installkernel $KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm" | ||
138 | echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm" | ||
139 | echo "fi" | ||
140 | echo "" | ||
115 | echo "%files" | 141 | echo "%files" |
116 | echo '%defattr (-, root, root)' | 142 | echo '%defattr (-, root, root)' |
117 | echo "%dir /lib/modules" | 143 | echo "%dir /lib/modules" |
118 | echo "/lib/modules/$KERNELRELEASE" | 144 | echo "/lib/modules/$KERNELRELEASE" |
119 | echo "/lib/firmware" | 145 | echo "%exclude /lib/modules/$KERNELRELEASE/build" |
146 | echo "%exclude /lib/modules/$KERNELRELEASE/source" | ||
147 | echo "/lib/firmware/$KERNELRELEASE" | ||
120 | echo "/boot/*" | 148 | echo "/boot/*" |
121 | echo "" | 149 | echo "" |
122 | echo "%files headers" | 150 | echo "%files headers" |
123 | echo '%defattr (-, root, root)' | 151 | echo '%defattr (-, root, root)' |
124 | echo "/usr/include" | 152 | echo "/usr/include" |
125 | echo "" | 153 | echo "" |
154 | echo "%files devel" | ||
155 | echo '%defattr (-, root, root)' | ||
156 | echo "/usr/src/kernels/$KERNELRELEASE" | ||
157 | echo "/lib/modules/$KERNELRELEASE/build" | ||
158 | echo "/lib/modules/$KERNELRELEASE/source" | ||
159 | echo "" | ||