Commit ef88b7db authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild

parents f65e7769 aaebf433
......@@ -342,7 +342,7 @@ if_block:
menu: T_MENU prompt T_EOL
{
menu_add_entry(NULL);
menu_add_prop(P_MENU, $2, NULL, NULL);
menu_add_prompt(P_MENU, $2, NULL);
printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
};
......@@ -392,7 +392,7 @@ source_stmt: source
comment: T_COMMENT prompt T_EOL
{
menu_add_entry(NULL);
menu_add_prop(P_COMMENT, $2, NULL, NULL);
menu_add_prompt(P_COMMENT, $2, NULL);
printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
};
......@@ -443,7 +443,7 @@ prompt_stmt_opt:
/* empty */
| prompt if_expr
{
menu_add_prop(P_PROMPT, $1, NULL, $2);
menu_add_prompt(P_PROMPT, $1, $2);
};
prompt: T_WORD
......@@ -487,7 +487,7 @@ void conf_parse(const char *name)
sym_init();
menu_init();
modules_sym = sym_lookup("MODULES", 0);
rootmenu.prompt = menu_add_prop(P_MENU, "Linux Kernel Configuration", NULL, NULL);
rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
//zconfdebug = 1;
zconfparse();
......
......@@ -1665,11 +1665,17 @@ sub xml_escape($) {
}
sub process_file($) {
my ($file) = "$ENV{'SRCTREE'}@_";
my $file;
my $identifier;
my $func;
my $initial_section_counter = $section_counter;
if (defined($ENV{'SRCTREE'})) {
$file = "$ENV{'SRCTREE'}" . "/" . "@_";
}
else {
$file = "@_";
}
if (defined($source_map{$file})) {
$file = $source_map{$file};
}
......
......@@ -163,7 +163,7 @@ int dialog_menu (const char *title, const char *prompt, int height, int width,
int dialog_checklist (const char *title, const char *prompt, int height,
int width, int list_height, int item_no,
const char * const * items, int flag);
extern unsigned char dialog_input_result[];
extern char dialog_input_result[];
int dialog_inputbox (const char *title, const char *prompt, int height,
int width, const char *init);
......
......@@ -21,7 +21,7 @@
#include "dialog.h"
unsigned char dialog_input_result[MAX_LEN + 1];
char dialog_input_result[MAX_LEN + 1];
/*
* Print the termination buttons
......@@ -48,7 +48,7 @@ dialog_inputbox (const char *title, const char *prompt, int height, int width,
{
int i, x, y, box_y, box_x, box_width;
int input_x = 0, scroll = 0, key = 0, button = -1;
unsigned char *instr = dialog_input_result;
char *instr = dialog_input_result;
WINDOW *dialog;
/* center dialog box on screen */
......
TARGET=$1
ARCH=$2
SMP=$3
CC=$4
PREEMPT=$4
CC=$5
# If compile.h exists already and we don't own autoconf.h
# (i.e. we're not the same user who did make *config), don't
......@@ -26,8 +27,10 @@ fi
UTS_VERSION="#$VERSION"
if [ -n "$SMP" ] ; then UTS_VERSION="$UTS_VERSION SMP"; fi
UTS_VERSION="$UTS_VERSION `LC_ALL=C LANG=C date`"
CONFIG_FLAGS=""
if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS `LC_ALL=C LANG=C date`"
# Truncate to maximum length
......@@ -37,7 +40,8 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/"
# Generate a temporary compile.h
( echo /\* This file is auto generated, version $VERSION \*/
if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi
echo \#define UTS_MACHINE \"$ARCH\"
echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
......
......@@ -252,9 +252,9 @@ static int parse_comment(const char *file, unsigned long len)
}
/* FIXME: Handle .s files differently (eg. # starts comments) --RR */
static int parse_file(const signed char *fname, struct md4_ctx *md)
static int parse_file(const char *fname, struct md4_ctx *md)
{
signed char *file;
char *file;
unsigned long i, len;
file = grab_file(fname, &len);
......@@ -332,7 +332,7 @@ static int parse_source_files(const char *objfile, struct md4_ctx *md)
Sum all files in the same dir or subdirs.
*/
while ((line = get_next_line(&pos, file, flen)) != NULL) {
signed char* p = line;
char* p = line;
if (strncmp(line, "deps_", sizeof("deps_")-1) == 0) {
check_files = 1;
continue;
......@@ -458,7 +458,7 @@ out:
close(fd);
}
static int strip_rcs_crap(signed char *version)
static int strip_rcs_crap(char *version)
{
unsigned int len, full_len;
......
......@@ -59,7 +59,7 @@ $(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile
$(CONFIG_SHELL) $(MKSPEC) prebuilt > $@
binrpm-pkg: $(objtree)/binkernel.spec
$(MAKE)
$(MAKE) KBUILD_SRC=
set -e; \
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
set -e; \
......@@ -74,16 +74,30 @@ clean-files += $(objtree)/binkernel.spec
#
.PHONY: deb-pkg
deb-pkg:
$(MAKE)
$(MAKE) KBUILD_SRC=
$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
clean-dirs += $(objtree)/debian/
# tarball targets
# ---------------------------------------------------------------------------
.PHONY: tar%pkg
tar%pkg:
$(MAKE)
$(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@
clean-dirs += $(objtree)/tar-install/
# Help text displayed when executing 'make help'
# ---------------------------------------------------------------------------
help:
@echo ' rpm-pkg - Build the kernel as an RPM package'
@echo ' binrpm-pkg - Build an rpm package containing the compiled kernel & modules'
@echo ' deb-pkg - Build the kernel as an deb package'
@echo ' rpm-pkg - Build the kernel as an RPM package'
@echo ' binrpm-pkg - Build an rpm package containing the compiled kernel'
@echo ' and modules'
@echo ' deb-pkg - Build the kernel as an deb package'
@echo ' tar-pkg - Build the kernel as an uncompressed tarball'
@echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
@echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'
......@@ -14,18 +14,38 @@ set -e
# Some variables and settings used throughout the script
version=$KERNELRELEASE
tmpdir="$objtree/debian/tmp"
packagename=linux-$version
if [ "$ARCH" == "um" ] ; then
packagename=user-mode-linux-$version
fi
# Setup the directory structure
rm -rf "$tmpdir"
mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
if [ "$ARCH" == "um" ] ; then
mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
fi
# Build and install the kernel
cp System.map "$tmpdir/boot/System.map-$version"
cp .config "$tmpdir/boot/config-$version"
cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
if [ "$ARCH" == "um" ] ; then
$MAKE linux
cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
cp .config "$tmpdir/usr/share/doc/$packagename/config"
gzip "$tmpdir/usr/share/doc/$packagename/config"
cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version"
else
cp System.map "$tmpdir/boot/System.map-$version"
cp .config "$tmpdir/boot/config-$version"
cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
fi
if grep -q '^CONFIG_MODULES=y' .config ; then
INSTALL_MOD_PATH="$tmpdir" make modules_install
INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install
if [ "$ARCH" == "um" ] ; then
mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/"
rmdir "$tmpdir/lib/modules/$version"
fi
fi
# Install the maintainer scripts
......@@ -53,6 +73,8 @@ linux ($version) unstable; urgency=low
EOF
# Generate a control file
if [ "$ARCH" == "um" ]; then
cat <<EOF > debian/control
Source: linux
Section: base
......@@ -60,12 +82,34 @@ Priority: optional
Maintainer: $name
Standards-Version: 3.6.1
Package: linux-$version
Package: $packagename
Architecture: any
Description: User Mode Linux kernel, version $version
User-mode Linux is a port of the Linux kernel to its own system call
interface. It provides a kind of virtual machine, which runs Linux
as a user process under another Linux kernel. This is useful for
kernel development, sandboxes, jails, experimentation, and
many other things.
.
This package contains the Linux kernel, modules and corresponding other
files version $version
EOF
else
cat <<EOF > debian/control
Source: linux
Section: base
Priority: optional
Maintainer: $name
Standards-Version: 3.6.1
Package: $packagename
Architecture: any
Description: Linux kernel, version $version
This package contains the Linux kernel, modules and corresponding other
files version $version.
files version $version
EOF
fi
# Fix some ownership and permissions
chown -R root:root "$tmpdir"
......
#!/bin/sh
#
# buildtar 0.0.3
#
# (C) 2004-2005 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
#
# This script is used to compile a tarball from the currently
# prepared kernel. Based upon the builddeb script from
# Wichert Akkerman <wichert@wiggy.net>.
#
set -e
#
# Some variables and settings used throughout the script
#
version="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}${EXTRANAME}"
tmpdir="${objtree}/tar-install"
tarball="${objtree}/linux-${version}.tar"
#
# Figure out how to compress, if requested at all
#
case "${1}" in
tar-pkg)
compress="cat"
file_ext=""
;;
targz-pkg)
compress="gzip -c9"
file_ext=".gz"
;;
tarbz2-pkg)
compress="bzip2 -c9"
file_ext=".bz2"
;;
*)
echo "Unknown tarball target \"${1}\" requested, please add it to ${0}." >&2
exit 1
;;
esac
#
# Clean-up and re-create the temporary directory
#
rm -rf -- "${tmpdir}"
mkdir -p -- "${tmpdir}/boot"
#
# Try to install modules
#
if ! make INSTALL_MOD_PATH="${tmpdir}" modules_install; then
echo "" >&2
echo "Ignoring error at module_install time, since that could be" >&2
echo "a result of missing local modutils/module-init-tools," >&2
echo "or you just didn't compile in module support at all..." >&2
echo "" >&2
fi
#
# Install basic kernel files
#
cp -v -- System.map "${tmpdir}/boot/System.map-${version}"
cp -v -- .config "${tmpdir}/boot/config-${version}"
cp -v -- vmlinux "${tmpdir}/boot/vmlinux-${version}"
#
# Install arch-specific kernel image(s)
#
case "${ARCH}" in
i386)
[ -f arch/i386/boot/bzImage ] && cp -v -- arch/i386/boot/bzImage "${tmpdir}/boot/vmlinuz-${version}"
;;
alpha)
[ -f arch/alpha/boot/vmlinux.gz ] && cp -v -- arch/alpha/boot/vmlinux.gz "${tmpdir}/boot/vmlinuz-${version}"
;;
vax)
[ -f vmlinux.SYS ] && cp -v -- vmlinux.SYS "${tmpdir}/boot/vmlinux-${version}.SYS"
[ -f vmlinux.dsk ] && cp -v -- vmlinux.dsk "${tmpdir}/boot/vmlinux-${version}.dsk"
;;
*)
[ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${version}"
echo "" >&2
echo '** ** ** WARNING ** ** **' >&2
echo "" >&2
echo "Your architecture did not define any architecture-dependant files" >&2
echo "to be placed into the tarball. Please add those to ${0} ..." >&2
echo "" >&2
sleep 5
;;
esac
#
# Create the tarball
#
(
cd "${tmpdir}"
tar cf - . | ${compress} > "${tarball}${file_ext}"
)
echo "Tarball successfully created in ${tarball}${file_ext}"
exit 0
......@@ -62,10 +62,19 @@ echo ""
fi
echo "%install"
echo "%ifarch ia64"
echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'
echo "%else"
echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'
echo "%endif"
echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'
echo "%ifarch ia64"
echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"
echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/"
echo "%else"
echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
echo "%endif"
echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
......
......@@ -96,6 +96,7 @@ foreach $object (keys(%object)) {
$from !~ /\.debug_ranges$/ &&
$from !~ /\.debug_line$/ &&
$from !~ /\.debug_frame$/ &&
$from !~ /\.debug_loc$/ &&
$from !~ /\.exitcall\.exit$/ &&
$from !~ /\.eh_frame$/ &&
$from !~ /\.stab$/)) {
......
......@@ -98,6 +98,7 @@ foreach $object (sort(keys(%object))) {
$from !~ /\.pdr$/ &&
$from !~ /\__param$/ &&
$from !~ /\.altinstructions/ &&
$from !~ /\.eh_frame/ &&
$from !~ /\.debug_/)) {
printf("Error: %s %s refers to %s\n", $object, $from, $line);
}
......
#!/usr/bin/perl
# Copyright 2004 - Ryan Anderson <ryan@michonline.com> GPL v2
use strict;
use warnings;
use Digest::MD5;
require 5.006;
if (@ARGV != 1) {
print <<EOT;
Usage: setlocalversion <srctree>
EOT
exit(1);
}
my ($srctree) = @ARGV;
chdir($srctree);
my @LOCALVERSIONS = ();
# We are going to use the following commands to try and determine if this
# repository is at a Version boundary (i.e, 2.6.10 vs 2.6.10 + some patches) We
# currently assume that all meaningful version boundaries are marked by a tag.
# We don't care what the tag is, just that something exists.
# Git/Cogito store the top-of-tree "commit" in .git/HEAD
# A list of known tags sits in .git/refs/tags/
#
# The simple trick here is to just compare the two of these, and if we get a
# match, return nothing, otherwise, return a subset of the SHA-1 hash in
# .git/HEAD
sub do_git_checks {
open(H,"<.git/HEAD") or return;
my $head = <H>;
chomp $head;
close(H);
opendir(D,".git/refs/tags") or return;
foreach my $tagfile (grep !/^\.{1,2}$/, readdir(D)) {
open(F,"<.git/refs/tags/" . $tagfile) or return;
my $tag = <F>;
chomp $tag;
close(F);
return if ($tag eq $head);
}
closedir(D);
push @LOCALVERSIONS, "g" . substr($head,0,8);
}
if ( -d ".git") {
do_git_checks();
}
printf "-%s\n", join("-",@LOCALVERSIONS) if (scalar @LOCALVERSIONS > 0);
#
# Configuration for initramfs
#
config INITRAMFS_SOURCE
string "Initramfs source file(s)"
default ""
help
This can be either a single cpio archive with a .cpio suffix or a
space-separated list of directories and files for building the
initramfs image. A cpio archive should contain a filesystem archive
to be used as an initramfs image. Directories should contain a
filesystem layout to be included in the initramfs image. Files
should contain entries according to the format described by the
"usr/gen_init_cpio" program in the kernel tree.
When multiple directories and files are specified then the
initramfs image will be the aggregate of all of them.
See <file:Documentation/early-userspace/README for more details.
If you are not sure, leave it blank.
config INITRAMFS_ROOT_UID
int "User ID to map to 0 (user root)"
depends on INITRAMFS_SOURCE!=""
default "0"
help
This setting is only meaningful if the INITRAMFS_SOURCE is
contains a directory. Setting this user ID (UID) to something
other than "0" will cause all files owned by that UID to be
owned by user root in the initial ramdisk image.
If you are not sure, leave it set to "0".
config INITRAMFS_ROOT_GID
int "Group ID to map to 0 (group root)"
depends on INITRAMFS_SOURCE!=""
default "0"
help
This setting is only meaningful if the INITRAMFS_SOURCE is
contains a directory. Setting this group ID (GID) to something
other than "0" will cause all files owned by that GID to be
owned by group root in the initial ramdisk image.
If you are not sure, leave it set to "0".
......@@ -27,7 +27,7 @@ quotefixed_initramfs_source := $(shell echo $(CONFIG_INITRAMFS_SOURCE))
filechk_initramfs_list = $(CONFIG_SHELL) \
$(srctree)/scripts/gen_initramfs_list.sh $(gen_initramfs_args) $(quotefixed_initramfs_source)
$(obj)/initramfs_list: FORCE
$(obj)/initramfs_list: $(obj)/Makefile FORCE
$(call filechk,initramfs_list)
quiet_cmd_cpio = CPIO $@
......
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