aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-04-29 01:11:23 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2006-04-29 01:11:23 -0400
commit7b7e394185014e0f3bd8989cac937003f20ef9ce (patch)
tree3beda5f979bba0aa9822534e239cf1b45f3be69c /scripts
parentddc5d3414593e4d7ad7fbd33e7f7517fcc234544 (diff)
parent693f7d362055261882659475d2ef022e32edbff1 (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include5
-rw-r--r--scripts/Makefile.lib5
-rwxr-xr-x[-rw-r--r--]scripts/bloat-o-meter0
-rwxr-xr-x[-rw-r--r--]scripts/checkstack.pl0
-rw-r--r--scripts/gen_initramfs_list.sh225
-rw-r--r--scripts/kconfig/conf.c24
-rw-r--r--scripts/kconfig/confdata.c2
-rw-r--r--scripts/kconfig/lxdialog/checklist.c19
-rw-r--r--scripts/kconfig/lxdialog/menubox.c19
-rw-r--r--scripts/mod/modpost.c15
-rwxr-xr-x[-rw-r--r--]scripts/namespace.pl0
-rwxr-xr-x[-rw-r--r--]scripts/show_delta0
-rwxr-xr-xscripts/ver_linux4
13 files changed, 194 insertions, 124 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 59620b1554e0..b0d067be7390 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -87,6 +87,11 @@ cc-ifversion = $(shell if [ $(call cc-version, $(CC)) $(1) $(2) ]; then \
87# $(Q)$(MAKE) $(build)=dir 87# $(Q)$(MAKE) $(build)=dir
88build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj 88build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
89 89
90# Prefix -I with $(srctree) if it is not an absolute path
91addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1)
92# Find all -I options and call addtree
93flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
94
90# If quiet is set, only print short version of command 95# If quiet is set, only print short version of command
91cmd = @$(echo-cmd) $(cmd_$(1)) 96cmd = @$(echo-cmd) $(cmd_$(1))
92 97
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 550798f57da5..2cb4935e85d1 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -99,11 +99,6 @@ __a_flags = $(_a_flags)
99__cpp_flags = $(_cpp_flags) 99__cpp_flags = $(_cpp_flags)
100else 100else
101 101
102# Prefix -I with $(srctree) if it is not an absolute path
103addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1)
104# Find all -I options and call addtree
105flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
106
107# -I$(obj) locates generated .h files 102# -I$(obj) locates generated .h files
108# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files 103# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files
109# and locates generated .h files 104# and locates generated .h files
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index 75f21d843c1d..75f21d843c1d 100644..100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index dadfa20ffec0..dadfa20ffec0 100644..100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
index 6d411169bfa6..56b3bed1108f 100644
--- a/scripts/gen_initramfs_list.sh
+++ b/scripts/gen_initramfs_list.sh
@@ -1,22 +1,55 @@
1#!/bin/bash 1#!/bin/bash
2# Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org> 2# Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org>
3# Released under the terms of the GNU GPL 3# Copyright (c) 2006 Sam Ravnborg <sam@ravnborg.org>
4#
5# Generate a newline separated list of entries from the file/directory
6# supplied as an argument.
7#
8# If a file/directory is not supplied then generate a small dummy file.
9# 4#
10# The output is suitable for gen_init_cpio built from usr/gen_init_cpio.c. 5# Released under the terms of the GNU GPL
11# 6#
7# Generate a cpio packed initramfs. It uses gen_init_cpio to generate
8# the cpio archive, and gzip to pack it.
9# The script may also be used to generate the inputfile used for gen_init_cpio
10# This script assumes that gen_init_cpio is located in usr/ directory
11
12# error out on errors
13set -e
14
15usage() {
16cat << EOF
17Usage:
18$0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...
19 -o <file> Create gzipped initramfs file named <file> using
20 gen_init_cpio and gzip
21 -u <uid> User ID to map to user ID 0 (root).
22 <uid> is only meaningful if <cpio_source>
23 is a directory.
24 -g <gid> Group ID to map to group ID 0 (root).
25 <gid> is only meaningful if <cpio_source>
26 is a directory.
27 <cpio_source> File list or directory for cpio archive.
28 If <cpio_source> is a .cpio file it will be used
29 as direct input to initramfs.
30 -d Output the default cpio list.
31
32All options except -o and -l may be repeated and are interpreted
33sequentially and immediately. -u and -g states are preserved across
34<cpio_source> options so an explicit "-u 0 -g 0" is required
35to reset the root/group mapping.
36EOF
37}
38
39list_default_initramfs() {
40 # echo usr/kinit/kinit
41 :
42}
12 43
13default_initramfs() { 44default_initramfs() {
14 cat <<-EOF 45 cat <<-EOF >> ${output}
15 # This is a very simple, default initramfs 46 # This is a very simple, default initramfs
16 47
17 dir /dev 0755 0 0 48 dir /dev 0755 0 0
18 nod /dev/console 0600 0 0 c 5 1 49 nod /dev/console 0600 0 0 c 5 1
19 dir /root 0700 0 0 50 dir /root 0700 0 0
51 # file /kinit usr/kinit/kinit 0755 0 0
52 # slink /init kinit 0755 0 0
20 EOF 53 EOF
21} 54}
22 55
@@ -42,18 +75,28 @@ filetype() {
42 return 0 75 return 0
43} 76}
44 77
78list_print_mtime() {
79 :
80}
81
45print_mtime() { 82print_mtime() {
46 local argv1="$1"
47 local my_mtime="0" 83 local my_mtime="0"
48 84
49 if [ -e "${argv1}" ]; then 85 if [ -e "$1" ]; then
50 my_mtime=$(find "${argv1}" -printf "%T@\n" | sort -r | head -n 1) 86 my_mtime=$(find "$1" -printf "%T@\n" | sort -r | head -n 1)
51 fi 87 fi
52 88
53 echo "# Last modified: ${my_mtime}" 89 echo "# Last modified: ${my_mtime}" >> ${output}
54 echo 90 echo "" >> ${output}
91}
92
93list_parse() {
94 echo "$1 \\"
55} 95}
56 96
97# for each file print a line in following format
98# <filetype> <name> <path to file> <octal mode> <uid> <gid>
99# for links, devices etc the format differs. See gen_init_cpio for details
57parse() { 100parse() {
58 local location="$1" 101 local location="$1"
59 local name="${location/${srcdir}//}" 102 local name="${location/${srcdir}//}"
@@ -99,80 +142,112 @@ parse() {
99 ;; 142 ;;
100 esac 143 esac
101 144
102 echo "${str}" 145 echo "${str}" >> ${output}
103 146
104 return 0 147 return 0
105} 148}
106 149
107usage() { 150unknown_option() {
108 printf "Usage:\n" 151 printf "ERROR: unknown option \"$arg\"\n" >&2
109 printf "$0 [ [-u <root_uid>] [-g <root_gid>] [-d | <cpio_source>] ] . . .\n" 152 printf "If the filename validly begins with '-', " >&2
110 printf "\n" 153 printf "then it must be prefixed\n" >&2
111 printf -- "-u <root_uid> User ID to map to user ID 0 (root).\n" 154 printf "by './' so that it won't be interpreted as an option." >&2
112 printf " <root_uid> is only meaningful if <cpio_source>\n" 155 printf "\n" >&2
113 printf " is a directory.\n" 156 usage >&2
114 printf -- "-g <root_gid> Group ID to map to group ID 0 (root).\n" 157 exit 1
11