Commit f7e7e745 authored by Brian Gerst's avatar Brian Gerst Committed by Tom Rini

kbuild: use KERNELRELEASE

This patch changes several places where the kernel version string is put
together from it's components with $KERNELRELEASE.

From: Brian Gerst <bgerst@quark.didntduck.org>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 969c4560
...@@ -67,12 +67,12 @@ initrd: ...@@ -67,12 +67,12 @@ initrd:
install: $(obj)/Image install: $(obj)/Image
$(CONFIG_SHELL) $(obj)/install.sh \ $(CONFIG_SHELL) $(obj)/install.sh \
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \ $(KERNELRELEASE) \
$(obj)/Image System.map "$(INSTALL_PATH)" $(obj)/Image System.map "$(INSTALL_PATH)"
zinstall: $(obj)/zImage zinstall: $(obj)/zImage
$(CONFIG_SHELL) $(obj)/install.sh \ $(CONFIG_SHELL) $(obj)/install.sh \
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \ $(KERNELRELEASE) \
$(obj)/zImage System.map "$(INSTALL_PATH)" $(obj)/zImage System.map "$(INSTALL_PATH)"
subdir- := compressed subdir- := compressed
...@@ -275,9 +275,8 @@ void init_main_window(const gchar * glade_file) ...@@ -275,9 +275,8 @@ void init_main_window(const gchar * glade_file)
/*"style", PANGO_STYLE_OBLIQUE, */ /*"style", PANGO_STYLE_OBLIQUE, */
NULL); NULL);
sprintf(title, "Linux Kernel v%s.%s.%s%s Configuration", sprintf(title, "Linux Kernel v%s Configuration",
getenv("VERSION"), getenv("PATCHLEVEL"), getenv("KERNELRELEASE"));
getenv("SUBLEVEL"), getenv("EXTRAVERSION"));
gtk_window_set_title(GTK_WINDOW(main_wnd), title); gtk_window_set_title(GTK_WINDOW(main_wnd), title);
gtk_widget_show(main_wnd); gtk_widget_show(main_wnd);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
set -e set -e
# Some variables and settings used throughout the script # Some variables and settings used throughout the script
version="$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" version=$KERNELRELEASE
tmpdir="$objtree/debian/tmp" tmpdir="$objtree/debian/tmp"
# Setup the directory structure # Setup the directory structure
......
...@@ -21,11 +21,12 @@ if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then ...@@ -21,11 +21,12 @@ if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
PROVIDES=kernel-drm PROVIDES=kernel-drm
fi fi
PROVIDES="$PROVIDES kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-//g"`
echo "Name: kernel" echo "Name: kernel"
echo "Summary: The Linux Kernel" echo "Summary: The Linux Kernel"
echo "Version: "$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION | sed -e "s/-//g" echo "Version: $__KERNELRELEASE"
# we need to determine the NEXT version number so that uname and # we need to determine the NEXT version number so that uname and
# rpm -q will agree # rpm -q will agree
echo "Release: `. $srctree/scripts/mkversion`" echo "Release: `. $srctree/scripts/mkversion`"
...@@ -35,8 +36,7 @@ echo "Vendor: The Linux Community" ...@@ -35,8 +36,7 @@ echo "Vendor: The Linux Community"
echo "URL: http://www.kernel.org" echo "URL: http://www.kernel.org"
if ! $PREBUILT; then if ! $PREBUILT; then
echo -n "Source: kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL" echo "Source: kernel-$__KERNELRELEASE.tar.gz"
echo "$EXTRAVERSION.tar.gz" | sed -e "s/-//g"
fi fi
echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root" echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root"
...@@ -65,11 +65,11 @@ echo "%install" ...@@ -65,11 +65,11 @@ echo "%install"
echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules' echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'
echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install' echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install'
echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"
echo "" echo ""
echo "%clean" echo "%clean"
echo '#echo -rf $RPM_BUILD_ROOT' echo '#echo -rf $RPM_BUILD_ROOT'
...@@ -77,6 +77,6 @@ echo "" ...@@ -77,6 +77,6 @@ echo ""
echo "%files" echo "%files"
echo '%defattr (-, root, root)' echo '%defattr (-, root, root)'
echo "%dir /lib/modules" echo "%dir /lib/modules"
echo "/lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" echo "/lib/modules/$KERNELRELEASE"
echo "/boot/*" echo "/boot/*"
echo "" echo ""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment