Commit deb51ad9 authored by Peter Korsgaard's avatar Peter Korsgaard
Browse files

busybox: bump 1.17.x version

parent 9fb9dc0b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ config BR2_BUSYBOX_VERSION
	default "1.14.4"	if BR2_BUSYBOX_VERSION_1_14_X
	default "1.15.3"	if BR2_BUSYBOX_VERSION_1_15_X
	default "1.16.2"	if BR2_BUSYBOX_VERSION_1_16_X
	default "1.17.0"	if BR2_BUSYBOX_VERSION_1_17_X
	default "1.17.1"	if BR2_BUSYBOX_VERSION_1_17_X

config BR2_PACKAGE_BUSYBOX_FULLINSTALL
	bool "Run BusyBox's own full installation"
+0 −30
Original line number Diff line number Diff line
diff -urpN busybox-1.17.0/util-linux/acpid.c busybox-1.17.0-acpid/util-linux/acpid.c
--- busybox-1.17.0/util-linux/acpid.c	2010-06-24 04:40:43.000000000 +0200
+++ busybox-1.17.0-acpid/util-linux/acpid.c	2010-07-12 06:24:00.000000000 +0200
@@ -9,9 +9,25 @@
 #include "libbb.h"
 
 #include <linux/input.h>
+#ifndef EV_SW
+# define EV_SW         0x05
+#endif
+#ifndef EV_KEY
+# define EV_KEY        0x01
+#endif
+#ifndef SW_LID
+# define SW_LID        0x00
+#endif
 #ifndef SW_RFKILL_ALL
-# define SW_RFKILL_ALL 3
+# define SW_RFKILL_ALL 0x03
 #endif
+#ifndef KEY_POWER
+# define KEY_POWER     116     /* SC System Power Down */
+#endif
+#ifndef KEY_SLEEP
+# define KEY_SLEEP     142     /* SC System Sleep */
+#endif
+
 
 /*
  * acpid listens to ACPI events coming either in textual form
+0 −50
Original line number Diff line number Diff line
diff -urpN busybox-1.17.0/libbb/lineedit.c busybox-1.17.0-ask_terminal/libbb/lineedit.c
--- busybox-1.17.0/libbb/lineedit.c	2010-06-24 04:40:43.000000000 +0200
+++ busybox-1.17.0-ask_terminal/libbb/lineedit.c	2010-07-18 22:38:47.000000000 +0200
@@ -151,6 +151,7 @@ struct lineedit_statics {
 	CHAR_T delbuf[DELBUFSIZ];  /* a place to store deleted characters */
 #endif
 #if ENABLE_FEATURE_EDITING_ASK_TERMINAL
+	smallint unknown_width;
 	smallint sent_ESC_br6n;
 #endif
 
@@ -1612,14 +1613,16 @@ static void ask_terminal(void)
 	 * poll([{fd=0, events=POLLIN}], 1, 4294967295) = 1 ([{fd=0, revents=POLLIN}])
 	 * read(0, "\n", 1)      = 1  <-- oh crap, user's input got in first
 	 */
-	struct pollfd pfd;
+	if (S.unknown_width) { /* only if window size is not known */
+		struct pollfd pfd;
 
-	pfd.fd = STDIN_FILENO;
-	pfd.events = POLLIN;
-	if (safe_poll(&pfd, 1, 0) == 0) {
-		S.sent_ESC_br6n = 1;
-		fputs("\033" "[6n", stdout);
-		fflush_all(); /* make terminal see it ASAP! */
+		pfd.fd = STDIN_FILENO;
+		pfd.events = POLLIN;
+		if (safe_poll(&pfd, 1, 0) == 0) {
+			S.sent_ESC_br6n = 1;
+			fputs("\033" "[6n", stdout);
+			fflush_all(); /* make terminal see it ASAP! */
+		}
 	}
 }
 #else
@@ -1765,11 +1768,13 @@ static void cmdedit_setwidth(unsigned w,
 
 static void win_changed(int nsig)
 {
+	int sv_errno = errno;
 	unsigned width;
-	get_terminal_width_height(0, &width, NULL);
+	IF_FEATURE_EDITING_ASK_TERMINAL(S.unknown_width =) get_terminal_width_height(0, &width, NULL);
 	cmdedit_setwidth(width, nsig /* - just a yes/no flag */);
 	if (nsig == SIGWINCH)
 		signal(SIGWINCH, win_changed); /* rearm ourself */
+	errno = sv_errno;
 }
 
 static int lineedit_read_key(char *read_key_buffer)
+0 −101
Original line number Diff line number Diff line
diff -urpN busybox-1.17.0/applets/usage_compressed busybox-1.17.0-build_system/applets/usage_compressed
--- busybox-1.17.0/applets/usage_compressed	2010-07-04 23:33:59.000000000 +0200
+++ busybox-1.17.0-build_system/applets/usage_compressed	2010-07-10 01:31:18.000000000 +0200
@@ -40,8 +40,4 @@ echo '#define PACKED_USAGE \'
 	-e 's/$/ \\/'
 echo ''
 
-if cmp -s "$target.$$" "$target" 2>/dev/null; then
-    rm -- "$target.$$"
-else
-    mv -- "$target.$$" "$target"
-fi
+mv -- "$target.$$" "$target"
diff -urpN busybox-1.17.0/init/bootchartd.c busybox-1.17.0-build_system/init/bootchartd.c
--- busybox-1.17.0/init/bootchartd.c	2010-07-04 15:32:24.000000000 +0200
+++ busybox-1.17.0-build_system/init/bootchartd.c	2010-07-10 01:31:14.000000000 +0200
@@ -18,7 +18,7 @@
 //config:	  and stopped using bootchartd stop.
 //config:
 //config:config FEATURE_BOOTCHARTD_BLOATED_HEADER
-//config:	bool "bootchartd"
+//config:	bool "Compatible, bloated header"
 //config:	default y
 //config:	depends on BOOTCHARTD
 //config:	help
@@ -35,7 +35,7 @@
 //config:	  makes bootchartd applet to dump a subset of it.
 //config:
 //config:config FEATURE_BOOTCHARTD_CONFIG_FILE
-//config:	bool "bootchartd"
+//config:	bool "Support bootchartd.conf"
 //config:	default y
 //config:	depends on BOOTCHARTD
 //config:	help
diff -urpN busybox-1.17.0/scripts/gen_build_files.sh busybox-1.17.0-build_system/scripts/gen_build_files.sh
--- busybox-1.17.0/scripts/gen_build_files.sh	2010-06-26 00:42:29.000000000 +0200
+++ busybox-1.17.0-build_system/scripts/gen_build_files.sh	2010-07-10 01:31:38.000000000 +0200
@@ -4,6 +4,8 @@ test $# -ge 2 || { echo "Syntax: $0 SRCT
 
 # cd to objtree
 cd -- "$2" || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
+# In separate objtree build, include/ might not exist yet
+mkdir include 2>/dev/null
 
 srctree="$1"
 
@@ -46,10 +48,12 @@ if test x"$new" != x"$old"; then
 fi
 
 # (Re)generate */Kbuild and */Config.in
-find -type d | while read -r d; do
+{ cd -- "$srctree" && find -type d; } | while read -r d; do
 	d="${d#./}"
+
 	src="$srctree/$d/Kbuild.src"
 	dst="$d/Kbuild"
+	mkdir -p -- "$d" 2>/dev/null
 	if test -f "$src"; then
 		#echo "  CHK     $dst"
 
@@ -69,6 +73,7 @@ find -type d | while read -r d; do
 
 	src="$srctree/$d/Config.src"
 	dst="$d/Config.in"
+	mkdir -p -- "$d" 2>/dev/null
 	if test -f "$src"; then
 		#echo "  CHK     $dst"
 
diff -urpN busybox-1.17.0/scripts/Makefile.build busybox-1.17.0-build_system/scripts/Makefile.build
--- busybox-1.17.0/scripts/Makefile.build	2010-06-24 04:40:43.000000000 +0200
+++ busybox-1.17.0-build_system/scripts/Makefile.build	2010-07-10 01:31:38.000000000 +0200
@@ -13,8 +13,13 @@ __build:
 include scripts/Kbuild.include
 
 # The filename Kbuild has precedence over Makefile
+# bbox: we also try to include Kbuild file in obj tree first
 kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
-include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
+include $(if $(wildcard $(src)/Kbuild), $(src)/Kbuild, \
+		$(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, \
+			$(kbuild-dir)/Makefile \
+		) \
+	)
 
 include scripts/Makefile.lib
 
diff -urpN busybox-1.17.0/scripts/test_make_O busybox-1.17.0-build_system/scripts/test_make_O
--- busybox-1.17.0/scripts/test_make_O	1970-01-01 01:00:00.000000000 +0100
+++ busybox-1.17.0-build_system/scripts/test_make_O	2010-07-10 01:31:38.000000000 +0200
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+b=`basename $PWD`
+test "${b#busybox}" != "$b" || { echo "Must be run in busybox tree"; exit 1; }
+
+rm -rf ../testdir_make_O.$$
+mkdir ../testdir_make_O.$$
+odir=`cd ../testdir_make_O.$$ && pwd`
+test -d "$odir" || exit 1
+
+make O="$odir" $MAKEOPTS "$@" defconfig busybox 2>&1 | tee test_make_O.log
+0 −139
Original line number Diff line number Diff line
diff -urpN busybox-1.17.0/modutils/depmod.c busybox-1.17.0-depmod/modutils/depmod.c
--- busybox-1.17.0/modutils/depmod.c	2010-06-24 04:40:43.000000000 +0200
+++ busybox-1.17.0-depmod/modutils/depmod.c	2010-07-19 00:28:22.000000000 +0200
@@ -28,16 +28,6 @@ typedef struct module_info {
 	struct module_info *dnext, *dprev;
 } module_info;
 
-enum {
-	ARG_a = (1<<0), /* All modules, ignore mods in argv */
-	ARG_A = (1<<1), /* Only emit .ko that are newer than modules.dep file */
-	ARG_b = (1<<2), /* base directory when modules are in staging area */
-	ARG_e = (1<<3), /* with -F, print unresolved symbols */
-	ARG_F = (1<<4), /* System.map that contains the symbols */
-	ARG_n = (1<<5), /* dry-run, print to stdout only */
-	ARG_r = (1<<6)  /* Compat dummy. Linux Makefile uses it */
-};
-
 static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARAM,
 				  void *data, int depth UNUSED_PARAM)
 {
@@ -58,7 +48,7 @@ static int FAST_FUNC parse_module(const 
 	*first = info;
 
 	info->dnext = info->dprev = info;
-	info->name = xasprintf("/%s", fname);
+	info->name = xstrdup(fname + 2); /* skip "./" */
 	info->modname = xstrdup(filename2modname(fname, modname));
 	for (ptr = image; ptr < image + len - 10; ptr++) {
 		if (strncmp(ptr, "depends=", 8) == 0) {
@@ -134,10 +124,44 @@ static void xfreopen_write(const char *f
 		bb_perror_msg_and_die("can't open '%s'", file);
 }
 
+/* Usage:
+ * [-aAenv] [-C FILE or DIR] [-b BASE] [-F System.map] [VERSION] [MODFILES]...
+ *	-a --all
+ *		Probe all modules. Default if no MODFILES.
+ *	-A --quick
+ *		Check modules.dep's mtime against module files' mtimes.
+ *	-b --basedir BASE
+ *		Use $BASE/lib/modules/VERSION
+ *	-C --config FILE or DIR
+ *		Path to /etc/depmod.conf or /etc/depmod.d/
+ *	-e --errsyms
+ *		When combined with the -F option, this reports any symbols which
+ *		which are not supplied by other modules or kernel.
+ *	-F --filesyms System.map
+ *	-n --dry-run
+ *		Print modules.dep etc to standard output
+ *	-v --verbose
+ *		Print to stdout all the symbols each module depends on
+ *		and the module's file name which provides that symbol.
+ *	-r	No-op
+ *
+ * So far we only support: [-rn] [-b BASE] [VERSION] [MODFILES]...
+ * -aAeF are accepted but ignored. -vC are not accepted.
+ */
+enum {
+	//OPT_a = (1 << 0), /* All modules, ignore mods in argv */
+	//OPT_A = (1 << 1), /* Only emit .ko that are newer than modules.dep file */
+	OPT_b = (1 << 2), /* base directory when modules are in staging area */
+	//OPT_e = (1 << 3), /* with -F, print unresolved symbols */
+	//OPT_F = (1 << 4), /* System.map that contains the symbols */
+	OPT_n = (1 << 5), /* dry-run, print to stdout only */
+	OPT_r = (1 << 6)  /* Compat dummy. Linux Makefile uses it */
+};
+
 int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int depmod_main(int argc UNUSED_PARAM, char **argv)
 {
-	module_info *modules = NULL, *m, *dep;
+	module_info *modules, *m, *dep;
 	const char *moddir_base = "/";
 	char *moddir, *version;
 	struct utsname uts;
@@ -152,36 +176,30 @@ int depmod_main(int argc UNUSED_PARAM, c
 	/* If a version is provided, then that kernel version's module directory
 	 * is used, rather than the current kernel version (as returned by
 	 * "uname -r").  */
-	if (*argv && sscanf(*argv, "%d.%d.%d", &tmp, &tmp, &tmp) == 3) {
+	if (*argv && sscanf(*argv, "%u.%u.%u", &tmp, &tmp, &tmp) == 3) {
 		version = *argv++;
 	} else {
 		uname(&uts);
 		version = uts.release;
 	}
 	moddir = concat_path_file(&CONFIG_DEFAULT_MODULES_DIR[1], version);
+	xchdir(moddir);
+	if (ENABLE_FEATURE_CLEAN_UP)
+		free(moddir);
 
 	/* Scan modules */
+	modules = NULL;
 	if (*argv) {
-		char *modfile;
-		struct stat sb;
 		do {
-			modfile = concat_path_file(moddir, *argv);
-			xstat(modfile, &sb);
-			parse_module(modfile, &sb, &modules, 0);
-			free(modfile);
-		} while (*(++argv));
+			parse_module(*argv, /*sb (unused):*/ NULL, &modules, 0);
+		} while (*++argv);
 	} else {
-		recursive_action(moddir, ACTION_RECURSE,
+		recursive_action(".", ACTION_RECURSE,
 				 parse_module, NULL, &modules, 0);
 	}
 
-	/* Prepare for writing out the dep files */
-	xchdir(moddir);
-	if (ENABLE_FEATURE_CLEAN_UP)
-		free(moddir);
-
 	/* Generate dependency and alias files */
-	if (!(option_mask32 & ARG_n))
+	if (!(option_mask32 & OPT_n))
 		xfreopen_write(CONFIG_DEFAULT_DEPMOD_FILE, stdout);
 	for (m = modules; m != NULL; m = m->next) {
 		printf("%s:", m->name);
@@ -200,7 +218,7 @@ int depmod_main(int argc UNUSED_PARAM, c
 	}
 
 #if ENABLE_FEATURE_MODUTILS_ALIAS
-	if (!(option_mask32 & ARG_n))
+	if (!(option_mask32 & OPT_n))
 		xfreopen_write("modules.alias", stdout);
 	for (m = modules; m != NULL; m = m->next) {
 		const char *fname = bb_basename(m->name);
@@ -218,7 +236,7 @@ int depmod_main(int argc UNUSED_PARAM, c
 	}
 #endif
 #if ENABLE_FEATURE_MODUTILS_SYMBOLS
-	if (!(option_mask32 & ARG_n))
+	if (!(option_mask32 & OPT_n))
 		xfreopen_write("modules.symbols", stdout);
 	for (m = modules; m != NULL; m = m->next) {
 		const char *fname = bb_basename(m->name);
Loading