Commit cce4ae63 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linux-sam.bkbits.net/kbuild

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents c293b633 138aa1d2
......@@ -664,15 +664,6 @@ When kbuild executes the following steps are followed (roughly):
#arch/i386/Makefile
LDFLAGS_vmlinux := -e stext
LDFLAGS_BLOB Options for $(LD) when linking the initramfs blob
The image used for initramfs is made during the build process.
LDFLAGS_BLOB is used to specify additional flags to be used when
creating the initramfs_data.o file.
Example:
#arch/i386/Makefile
LDFLAGS_BLOB := --format binary --oformat elf32-i386
OBJCOPYFLAGS objcopy flags
When $(call if_changed,objcopy) is used to translate a .o file,
......
This diff is collapsed.
......@@ -8,7 +8,6 @@
# Copyright (C) 1995-2001 by Russell King
LDFLAGS_vmlinux :=-p --no-undefined -X
LDFLAGS_BLOB :=--format binary
CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
GZFLAGS :=-9
......
......@@ -8,7 +8,6 @@
# Copyright (C) 1995-2001 by Russell King
LDFLAGS_vmlinux :=-p -X
LDFLAGS_BLOB :=--format binary
CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
GZFLAGS :=-9
......@@ -28,7 +27,6 @@ CFLAGS +=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uar
AFLAGS +=-mapcs-26 -mcpu=arm3 -mno-fpu -msoft-float -Wa,-mno-fpu
head-y := arch/arm26/machine/head.o arch/arm26/kernel/init_task.o
LDFLAGS_BLOB += --oformat elf32-littlearm
ifeq ($(CONFIG_XIP_KERNEL),y)
TEXTADDR := 0x03880000
......
......@@ -67,12 +67,12 @@ initrd:
install: $(obj)/Image
$(CONFIG_SHELL) $(obj)/install.sh \
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \
$(KERNELRELEASE) \
$(obj)/Image System.map "$(INSTALL_PATH)"
zinstall: $(obj)/zImage
$(CONFIG_SHELL) $(obj)/install.sh \
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \
$(KERNELRELEASE) \
$(obj)/zImage System.map "$(INSTALL_PATH)"
subdir- := compressed
......@@ -24,8 +24,6 @@ SARCH :=
endif
LD = $(CROSS_COMPILE)ld -mcrislinux
LDFLAGS_BLOB := --format binary --oformat elf32-cris \
-T arch/cris/$(SARCH)/output_arch.ld
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
......
......@@ -131,4 +131,6 @@ endif
@true
CLEAN_FILES += include/asm-$(ARCH)/offsets.h \
arch/$(ARCH)/kernel/asm-offsets.s
arch/$(ARCH)/kernel/asm-offsets.s \
$(TOUT)
/*
* arch/ppc/pp3boot/mkbugboot.c
* arch/ppc/boot/utils/mkbugboot.c
*
* Makes a Motorola PPCBUG ROM bootable image which can be flashed
* into one of the FLASH banks on a Motorola PowerPlus board.
......@@ -21,6 +21,11 @@
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#ifdef __sun__
#include <inttypes.h>
#else
#include <stdint.h>
#endif
#ifdef __i386__
#define cpu_to_be32(x) le32_to_cpu(x)
......@@ -49,11 +54,6 @@ unsigned short le16_to_cpu(unsigned short x)
/* size of read buffer */
#define SIZE 0x1000
/* typedef long int32_t; */
typedef unsigned long uint32_t;
typedef unsigned short uint16_t;
typedef unsigned char uint8_t;
/* PPCBUG ROM boot header */
typedef struct bug_boot_header {
uint8_t magic_word[4]; /* "BOOT" */
......
......@@ -15,7 +15,11 @@
#include <sys/stat.h>
#include <unistd.h>
#include <netinet/in.h>
#ifdef __sun__
#include <inttypes.h>
#else
#include <stdint.h>
#endif
/* This gets tacked on the front of the image. There are also a few
* bytes allocated after the _start label used by the boot rom (see
......
......@@ -9,7 +9,6 @@ ELF_ARCH = $(SUBARCH)
ELF_FORMAT = elf32-$(SUBARCH)
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
LDFLAGS_BLOB := --format binary --oformat elf32-i386
SYS_DIR := $(ARCH_DIR)/include/sysdep-i386
SYS_UTIL_DIR := $(ARCH_DIR)/sys-i386/util
......
......@@ -54,6 +54,16 @@ endmenu
menu "General setup"
config LOCALVERSION
string "Local version - append to kernel release"
help
Append an extra string to the end of your kernel version.
This will show up when you type uname, for example.
The string you set here will be appended after the contents of
any files with a filename matching localversion* in your
object and source tree, in that order. Your total string can
be a maximum of 64 characters.
config SWAP
bool "Support for paging of anonymous memory (swap)"
depends on MMU
......
......@@ -160,9 +160,7 @@ else
cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $<
cmd_modversions = \
if ! $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
mv $(@D)/.tmp_$(@F) $@; \
else \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
$(CPP) -D__GENKSYMS__ $(c_flags) $< \
| $(GENKSYMS) \
> $(@D)/.tmp_$(@F:.o=.ver); \
......@@ -170,6 +168,8 @@ cmd_modversions = \
$(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \
-T $(@D)/.tmp_$(@F:.o=.ver); \
rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \
else \
mv $(@D)/.tmp_$(@F) $@; \
fi;
endif
......
......@@ -9,7 +9,7 @@ include scripts/Makefile.lib
#
__modules := $(sort $(shell head -q -n1 /dev/null $(wildcard $(MODVERDIR)/*.mod)))
__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o)))
.PHONY: $(modules)
......
......@@ -41,7 +41,7 @@ include scripts/Makefile.lib
symverfile := $(objtree)/Module.symvers
# Step 1), find all modules listed in $(MODVERDIR)/
__modules := $(sort $(shell head -q -n1 /dev/null $(wildcard $(MODVERDIR)/*.mod)))
__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o)))
_modpost: $(modules)
......
......@@ -27,7 +27,9 @@
#include <unistd.h>
#include <assert.h>
#include <stdarg.h>
#ifdef __GNU_LIBRARY__
#include <getopt.h>
#endif /* __GNU_LIBRARY__ */
#include "genksyms.h"
......@@ -502,12 +504,21 @@ void genksyms_usage(void)
fputs("Usage:\n"
"genksyms [-dDwqhV] > /path/to/.tmp_obj.ver\n"
"\n"
#ifdef __GNU_LIBRARY__
" -d, --debug Increment the debug level (repeatable)\n"
" -D, --dump Dump expanded symbol defs (for debugging only)\n"
" -w, --warnings Enable warnings\n"
" -q, --quiet Disable warnings (default)\n"
" -h, --help Print this message\n"
" -V, --version Print the release version\n"
#else /* __GNU_LIBRARY__ */
" -d Increment the debug level (repeatable)\n"
" -D Dump expanded symbol defs (for debugging only)\n"
" -w Enable warnings\n"
" -q Disable warnings (default)\n"
" -h Print this message\n"
" -V Print the release version\n"
#endif /* __GNU_LIBRARY__ */
, stderr);
}
......@@ -516,6 +527,7 @@ main(int argc, char **argv)
{
int o;
#ifdef __GNU_LIBRARY__
struct option long_opts[] = {
{"debug", 0, 0, 'd'},
{"warnings", 0, 0, 'w'},
......@@ -528,6 +540,9 @@ main(int argc, char **argv)
while ((o = getopt_long(argc, argv, "dwqVDk:p:",
&long_opts[0], NULL)) != EOF)
#else /* __GNU_LIBRARY__ */
while ((o = getopt(argc, argv, "dwqVDk:p:")) != EOF)
#endif /* __GNU_LIBRARY__ */
switch (o)
{
case 'd':
......
......@@ -275,9 +275,8 @@ void init_main_window(const gchar * glade_file)
/*"style", PANGO_STYLE_OBLIQUE, */
NULL);
sprintf(title, "Linux Kernel v%s.%s.%s%s Configuration",
getenv("VERSION"), getenv("PATCHLEVEL"),
getenv("SUBLEVEL"), getenv("EXTRAVERSION"));
sprintf(title, "Linux Kernel v%s Configuration",
getenv("KERNELRELEASE"));
gtk_window_set_title(GTK_WINDOW(main_wnd), title);
gtk_widget_show(main_wnd);
......
#include <netinet/in.h>
#ifdef __sun__
#include <inttypes.h>
#else
#include <stdint.h>
#endif
#include <ctype.h>
#include <errno.h>
#include <string.h>
......
This diff is collapsed.
......@@ -12,7 +12,7 @@
set -e
# Some variables and settings used throughout the script
version="$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
version=$KERNELRELEASE
tmpdir="$objtree/debian/tmp"
# Setup the directory structure
......
......@@ -21,11 +21,12 @@ if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
PROVIDES=kernel-drm
fi
PROVIDES="$PROVIDES kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-//g"`
echo "Name: 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
# rpm -q will agree
echo "Release: `. $srctree/scripts/mkversion`"
......@@ -35,8 +36,7 @@ echo "Vendor: The Linux Community"
echo "URL: http://www.kernel.org"
if ! $PREBUILT; then
echo -n "Source: kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL"
echo "$EXTRAVERSION.tar.gz" | sed -e "s/-//g"
echo "Source: kernel-$__KERNELRELEASE.tar.gz"
fi
echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root"
......@@ -57,19 +57,19 @@ fi
echo "%build"
if ! $PREBUILT; then
echo "make clean && make"
echo "make clean && make %{_smp_mflags}"
echo ""
fi
echo "%install"
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 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'
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 "%clean"
echo '#echo -rf $RPM_BUILD_ROOT'
......@@ -77,6 +77,6 @@ echo ""
echo "%files"
echo '%defattr (-, root, root)'
echo "%dir /lib/modules"
echo "/lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
echo "/lib/modules/$KERNELRELEASE"
echo "/boot/*"
echo ""
......@@ -37,8 +37,11 @@ tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' | awk \
fsck.jfs -V 2>&1 | grep version | sed 's/,//' | awk \
'NR==1 {print "jfsutils ", $3}'
reiserfsck -V 2>&1 | grep reiserfsprogs | awk \
'NR==1{print "reiserfsprogs ", $NF}'
reiserfsck -V 2>&1 | grep reiserfsck | awk \
'NR==1{print "reiserfsprogs ", $2}'
fsck.reiser4 -V 2>&1 | grep fsck.reiser4 | awk \
'NR==1{print "reiser4progs ", $2}'
xfs_db -V 2>&1 | grep version | awk \
'NR==1{print "xfsprogs ", $3}'
......
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