提交 c6906a2c 编写于 作者: L Linus Torvalds

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

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: fix typos (s/bin_shipped/bin.o_shipped/) in Documentation
  kbuild: add a symlink to the source for separate objdirs
  kconfig: add script to manipulate .config files on the command line
  kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope
  bootchart: improve output based on Dave Jones' feedback
  fix modules_install via NFS
  qnx: include <linux/types.h> for definitions of __[us]{8,16,32,64} types
......@@ -124,3 +124,10 @@ KBUILD_EXTRA_SYMBOLS
--------------------------------------------------
For modules use symbols from another modules.
See more details in modules.txt.
ALLSOURCE_ARCHS
--------------------------------------------------
For tags/TAGS/cscope targets, you can specify more than one archs
to be included in the databases, separated by blankspace. e.g.
$ make ALLSOURCE_ARCHS="x86 mips arm" tags
......@@ -253,7 +253,7 @@ following files:
# Module specific targets
genbin:
echo "X" > 8123_bin_shipped
echo "X" > 8123_bin.o_shipped
In example 2, we are down to two fairly simple files and for simple
......@@ -279,7 +279,7 @@ following files:
# Module specific targets
genbin:
echo "X" > 8123_bin_shipped
echo "X" > 8123_bin.o_shipped
endif
......
......@@ -965,6 +965,7 @@ ifneq ($(KBUILD_SRC),)
mkdir -p include2; \
ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \
fi
ln -fsn $(srctree) source
endif
# prepare2 creates a makefile if using a separate output directory
......
......@@ -3,4 +3,3 @@
*.bin
*.csp
*.dsp
ihex2fw
......@@ -99,10 +99,10 @@ quiet_cmd_ihex = IHEX $@
cmd_ihex = $(OBJCOPY) -Iihex -Obinary $< $@
quiet_cmd_ihex2fw = IHEX2FW $@
cmd_ihex2fw = $(objtree)/$(obj)/ihex2fw $< $@
cmd_ihex2fw = $(objtree)/scripts/ihex2fw $< $@
quiet_cmd_h16tofw = H16TOFW $@
cmd_h16tofw = $(objtree)/$(obj)/ihex2fw -w $< $@
cmd_h16tofw = $(objtree)/scripts/ihex2fw -w $< $@
quiet_cmd_fwbin = MK_FW $@
cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)"; \
......@@ -165,11 +165,11 @@ $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %)
# is actually meaningful, because the firmware has to be loaded in a certain
# order rather than as a single binary blob. Thus, we convert them into our
# more compact binary representation of ihex records (<linux/ihex.h>)
$(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
$(obj)/%.fw: $(obj)/%.HEX | $(objtree)/$(obj)/$$(dir %)
$(call cmd,ihex2fw)
# .H16 is our own modified form of Intel HEX, with 16-bit length for records.
$(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
$(obj)/%.fw: $(obj)/%.H16 | $(objtree)/$(obj)/$$(dir %)
$(call cmd,h16tofw)
$(firmware-dirs):
......@@ -186,5 +186,3 @@ targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
# Without this, built-in.o won't be created when it's empty, and the
# final vmlinux link will fail.
obj-n := dummy
hostprogs-y := ihex2fw
......@@ -2,14 +2,12 @@
* Name : qnx4_fs.h
* Author : Richard Frowijn
* Function : qnx4 global filesystem definitions
* Version : 1.0.2
* Last modified : 2000-01-31
*
* History : 23-03-1998 created
*/
#ifndef _LINUX_QNX4_FS_H
#define _LINUX_QNX4_FS_H
#include <linux/types.h>
#include <linux/qnxtypes.h>
#include <linux/magic.h>
......
......@@ -2,9 +2,6 @@
* Name : qnxtypes.h
* Author : Richard Frowijn
* Function : standard qnx types
* Version : 1.0.2
* Last modified : 2000-01-06
*
* History : 22-03-1998 created
*
*/
......@@ -12,6 +9,8 @@
#ifndef _QNX4TYPES_H
#define _QNX4TYPES_H
#include <linux/types.h>
typedef __le16 qnx4_nxtnt_t;
typedef __u8 qnx4_ftype_t;
......
#
# Generated files
#
ihex2fw
conmakehash
kallsyms
pnmtologo
......
......@@ -2,11 +2,12 @@
# scripts contains sources for various helper programs used throughout
# the kernel for the build process.
# ---------------------------------------------------------------------------
# ihex2fw: Parser/loader for IHEX formatted data
# kallsyms: Find all symbols in vmlinux
# pnmttologo: Convert pnm files to logo files
# conmakehash: Create chartable
# conmakehash: Create arrays for initializing the kernel console tables
hostprogs-y := ihex2fw
hostprogs-$(CONFIG_KALLSYMS) += kallsyms
hostprogs-$(CONFIG_LOGO) += pnmtologo
hostprogs-$(CONFIG_VT) += conmakehash
......
......@@ -88,7 +88,7 @@ END
}
print "<?xml version=\"1.0\" standalone=\"no\"?> \n";
print "<svg width=\"1000\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n";
print "<svg width=\"2000\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n";
my @styles;
......@@ -105,8 +105,9 @@ $styles[9] = "fill:rgb(255,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0
$styles[10] = "fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
$styles[11] = "fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
my $mult = 950.0 / ($maxtime - $firsttime);
my $threshold = ($maxtime - $firsttime) / 60.0;
my $mult = 1950.0 / ($maxtime - $firsttime);
my $threshold2 = ($maxtime - $firsttime) / 120.0;
my $threshold = $threshold2/10;
my $stylecounter = 0;
my %rows;
my $rowscount = 1;
......@@ -116,7 +117,7 @@ foreach my $key (@initcalls) {
my $duration = $end{$key} - $start{$key};
if ($duration >= $threshold) {
my ($s, $s2, $e, $w, $y, $y2, $style);
my ($s, $s2, $s3, $e, $w, $y, $y2, $style);
my $pid = $pids{$key};
if (!defined($rows{$pid})) {
......@@ -125,6 +126,7 @@ foreach my $key (@initcalls) {
}
$s = ($start{$key} - $firsttime) * $mult;
$s2 = $s + 6;
$s3 = $s + 1;
$e = ($end{$key} - $firsttime) * $mult;
$w = $e - $s;
......@@ -138,7 +140,11 @@ foreach my $key (@initcalls) {
};
print "<rect x=\"$s\" width=\"$w\" y=\"$y\" height=\"145\" style=\"$style\"/>\n";
print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n";
if ($duration >= $threshold2) {
print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n";
} else {
print "<text transform=\"translate($s3,$y2) rotate(90)\" font-size=\"3pt\">$key</text>\n";
}
}
}
......
#!/bin/bash
# Manipulate options in a .config file from the command line
usage() {
cat >&2 <<EOL
Manipulate options in a .config file from the command line.
Usage:
config options command ...
commands:
--enable|-e option Enable option
--disable|-d option Disable option
--module|-m option Turn option into a module
--state|-s option Print state of option (n,y,m,undef)
--enable-after|-E beforeopt option
Enable option directly after other option
--disable-after|-D beforeopt option
Disable option directly after other option
--module-after|-M beforeopt option
Turn option into module directly after other option
commands can be repeated multiple times
options:
--file .config file to change (default .config)
config doesn't check the validity of the .config file. This is done at next
make time.
The options need to be already in the file before they can be changed,
but sometimes you can cheat with the --*-after options.
EOL
exit 1
}
checkarg() {
ARG="$1"
if [ "$ARG" = "" ] ; then
usage
fi
case "$ARG" in
CONFIG_*)
ARG="${ARG/CONFIG_/}"
;;
esac
ARG="`echo $ARG | tr a-z A-Z`"
}
replace() {
sed -i -e "$@" $FN
}
if [ "$1" = "--file" ]; then
FN="$2"
if [ "$FN" = "" ] ; then
usage
fi
shift
shift
else
FN=.config
fi
while [ "$1" != "" ] ; do
CMD="$1"
shift
case "$CMD" in
--enable|-e)
checkarg "$1"
replace "s/# CONFIG_$ARG is not set/CONFIG_$ARG=y/"
shift
;;
--disable|-d)
checkarg "$1"
replace "s/CONFIG_$ARG=[my]/# CONFIG_$ARG is not set/"
shift
;;
--module|-m)
checkarg "$1"
replace "s/CONFIG_$ARG=y/CONFIG_$ARG=m/" \
-e "s/# CONFIG_$ARG is not set/CONFIG_$ARG=m/"
shift
;;
--state|-s)
checkarg "$1"
if grep -q "# CONFIG_$ARG is not set" $FN ; then
echo n
else
V="$(grep "^CONFIG_$ARG=" $FN)"
if [ $? != 0 ] ; then
echo undef
else
V="${V/CONFIG_$ARG=/}"
V="${V/\"/}"
echo "$V"
fi
fi
shift
;;
--enable-after|-E)
checkarg "$1"
A=$ARG
checkarg "$2"
B=$ARG
replace "/CONFIG_$A=[my]/aCONFIG_$B=y" \
-e "/# CONFIG_$ARG is not set/a/CONFIG_$ARG=y" \
-e "s/# CONFIG_$ARG is not set/CONFIG_$ARG=y/"
shift
shift
;;
--disable-after|-D)
checkarg "$1"
A=$ARG
checkarg "$2"
B=$ARG
replace "/CONFIG_$A=[my]/a# CONFIG_$B is not set" \
-e "/# CONFIG_$ARG is not set/a/# CONFIG_$ARG is not set" \
-e "s/CONFIG_$ARG=[my]/# CONFIG_$ARG is not set/"
shift
shift
;;
--module-after|-M)
checkarg "$1"
A=$ARG
checkarg "$2"
B=$ARG
replace "/CONFIG_$A=[my]/aCONFIG_$B=m" \
-e "/# CONFIG_$ARG is not set/a/CONFIG_$ARG=m" \
-e "s/CONFIG_$ARG=y/CONFIG_$ARG=m/" \
-e "s/# CONFIG_$ARG is not set/CONFIG_$ARG=m/"
shift
shift
;;
# undocumented because it ignores --file (fixme)
--refresh)
yes "" | make oldconfig
;;
*)
usage
;;
esac
done
......@@ -24,6 +24,11 @@ else
tree=${srctree}/
fi
# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
if [ "${ALLSOURCE_ARCHS}" = "" ]; then
ALLSOURCE_ARCHS=${SRCARCH}
fi
# find sources in arch/$ARCH
find_arch_sources()
{
......@@ -54,26 +59,29 @@ find_other_sources()
find_sources()
{
find_arch_sources $1 "$2"
find_include_sources "$2"
find_other_sources "$2"
}
all_sources()
{
find_sources $SRCARCH '*.[chS]'
for arch in $ALLSOURCE_ARCHS
do
find_sources $arch '*.[chS]'
done
if [ ! -z "$archinclude" ]; then
find_arch_include_sources $archinclude '*.[chS]'
fi
find_include_sources '*.[chS]'
find_other_sources '*.[chS]'
}
all_kconfigs()
{
find_sources $SRCARCH 'Kconfig*'
find_sources $ALLSOURCE_ARCHS 'Kconfig*'
}
all_defconfigs()
{
find_sources $SRCARCH "defconfig"
find_sources $ALLSOURCE_ARCHS "defconfig"
}
docscope()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册