aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/echo.c2
-rwxr-xr-xscripts/mkconfigs43
-rwxr-xr-xscripts/showasm2
3 files changed, 36 insertions, 11 deletions
diff --git a/scripts/echo.c b/scripts/echo.c
index 3c45e339c..cb207ae05 100644
--- a/scripts/echo.c
+++ b/scripts/echo.c
@@ -6,7 +6,7 @@
6 * Copyright (c) 1991, 1993 6 * Copyright (c) 1991, 1993
7 * The Regents of the University of California. All rights reserved. 7 * The Regents of the University of California. All rights reserved.
8 * 8 *
9 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 * 10 *
11 * Original copyright notice is retained at the end of this file. 11 * Original copyright notice is retained at the end of this file.
12 */ 12 */
diff --git a/scripts/mkconfigs b/scripts/mkconfigs
index ef6ae8aaf..47ac53330 100755
--- a/scripts/mkconfigs
+++ b/scripts/mkconfigs
@@ -26,26 +26,51 @@
26# - Retain lines that begin with "# CONFIG_" 26# - Retain lines that begin with "# CONFIG_"
27# - lines that use double-quotes must \\-escape-quote them 27# - lines that use double-quotes must \\-escape-quote them
28 28
29config="$1" 29config=.config
30if [ $# -lt 1 ]
31then
32 config=.config
33fi
34 30
31{
35echo "\ 32echo "\
36#ifndef _BBCONFIGOPTS_H 33#ifndef _BBCONFIGOPTS_H
37#define _BBCONFIGOPTS_H 34#define _BBCONFIGOPTS_H
38/* 35/*
39 * busybox configuration settings. 36 * busybox configuration settings.
40 * 37 *
41 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 38 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
42 * 39 *
43 * This file is generated automatically by scripts/mkconfigs. 40 * This file is generated automatically by scripts/mkconfigs.
44 * Do not edit. 41 * Do not edit.
45 */ 42 */
46static const char bbconfig_config[] =" 43static const char bbconfig_config[] ALIGN1 ="
47 44
48sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}' 45grep '^#\? \?CONFIG_' "$config" \
46| sed -e 's/\"/\\\"/g' -e 's/^/"/' -e 's/$/\\n"/'
49 47
50echo ";" 48echo ";"
51echo "#endif /* _BBCONFIGOPTS_H */" 49echo "#endif"
50} >"$1"
51
52{
53echo "\
54#ifndef _BBCONFIGOPTS_BZ2_H
55#define _BBCONFIGOPTS_BZ2_H
56/*
57 * busybox configuration settings.
58 *
59 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
60 *
61 * This file is generated automatically by scripts/mkconfigs.
62 * Do not edit.
63 */
64static const char bbconfig_config_bz2[] ALIGN1 = {"
65
66grep '^#\? \?CONFIG_' "$config" \
67| bzip2 -1 | dd bs=2 skip=1 2>/dev/null \
68| od -v -t x1 \
69| sed -e 's/^[^ ]*//' \
70 -e 's/ //g' \
71 -e '/^$/d' \
72 -e 's/\(..\)/0x\1,/g'
73
74echo "};"
75echo "#endif"
76} >"$2"
diff --git a/scripts/showasm b/scripts/showasm
index dc2cd705d..b61ab98d0 100755
--- a/scripts/showasm
+++ b/scripts/showasm
@@ -1,7 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# Copyright 2006 Rob Landley <rob@landley.net> 3# Copyright 2006 Rob Landley <rob@landley.net>
4# Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 4# Licensed under GPLv2 or later, see file LICENSE in this source tree.
5 5
6# Dumb little utility function to print out the assembly dump of a single 6# Dumb little utility function to print out the assembly dump of a single
7# function, or list the functions so dumpable in an executable. You'd think 7# function, or list the functions so dumpable in an executable. You'd think