Commit b59f9e15 authored by Gustavo Zacarias's avatar Gustavo Zacarias Committed by Peter Korsgaard
Browse files

busybox: add new 1.20.0, remove deprecated, mark 1.18.x deprecated



Add version 1.20.0, remove deprecated 1.16.x & 1.17.x versions and mark
1.18.x as deprecated.

Signed-off-by: default avatarGustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 524a8ab3
Loading
Loading
Loading
Loading
+8 −14
Original line number Diff line number Diff line
@@ -13,24 +13,20 @@ if BR2_PACKAGE_BUSYBOX

choice
	prompt "BusyBox Version"
	default BR2_BUSYBOX_VERSION_1_19_X
	default BR2_BUSYBOX_VERSION_1_20_X
	help
	  Select the version of BusyBox you wish to use.

	config BR2_BUSYBOX_VERSION_1_16_X
		bool "BusyBox 1.16.x"
		depends on BR2_DEPRECATED

	config BR2_BUSYBOX_VERSION_1_17_X
		bool "BusyBox 1.17.x"
		depends on BR2_DEPRECATED

	config BR2_BUSYBOX_VERSION_1_18_X
		bool "BusyBox 1.18.x"
		depends on BR2_DEPRECATED

	config BR2_BUSYBOX_VERSION_1_19_X
		bool "BusyBox 1.19.x"

	config BR2_BUSYBOX_VERSION_1_20_X
		bool "BusyBox 1.20.x"

	config BR2_PACKAGE_BUSYBOX_SNAPSHOT
		bool "daily snapshot"

@@ -38,18 +34,16 @@ endchoice

config BR2_BUSYBOX_VERSION
	string
	default "1.16.2"	if BR2_BUSYBOX_VERSION_1_16_X
	default "1.17.4"	if BR2_BUSYBOX_VERSION_1_17_X
	default "1.18.5"	if BR2_BUSYBOX_VERSION_1_18_X
	default "1.19.4"	if BR2_BUSYBOX_VERSION_1_19_X
	default "1.20.0"	if BR2_BUSYBOX_VERSION_1_20_X

config BR2_PACKAGE_BUSYBOX_CONFIG
	string "BusyBox configuration file to use?"
	default "package/busybox/busybox-1.19.x.config" if BR2_PACKAGE_BUSYBOX_SNAPSHOT
	default "package/busybox/busybox-1.16.x.config" if BR2_BUSYBOX_VERSION_1_16_X
	default "package/busybox/busybox-1.17.x.config" if BR2_BUSYBOX_VERSION_1_17_X
	default "package/busybox/busybox-1.20.x.config" if BR2_PACKAGE_BUSYBOX_SNAPSHOT
	default "package/busybox/busybox-1.18.x.config" if BR2_BUSYBOX_VERSION_1_18_X
	default "package/busybox/busybox-1.19.x.config" if BR2_BUSYBOX_VERSION_1_19_X
	default "package/busybox/busybox-1.20.x.config" if BR2_BUSYBOX_VERSION_1_20_X
	help
	  Some people may wish to use their own modified BusyBox configuration
	  file, and will specify their config file location with this option.
+0 −76
Original line number Diff line number Diff line
From 351ef7188a1a2e2f154bbda6f703c2d3f4af6d79 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Wed, 14 Apr 2010 13:37:25 -0700
Subject: [PATCH] devmem: map two pages only if it is necessary

function                                             old     new   delta
devmem_main                                          463     469      +6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
 miscutils/devmem.c |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/miscutils/devmem.c b/miscutils/devmem.c
index e13dedc..39b5808 100644
--- a/miscutils/devmem.c
+++ b/miscutils/devmem.c
@@ -13,9 +13,9 @@ int devmem_main(int argc UNUSED_PARAM, char **argv)
 	uint64_t read_result;
 	uint64_t writeval = writeval; /* for compiler */
 	off_t target;
-	unsigned page_size = getpagesize();
+	unsigned page_size, mapped_size, offset_in_page;
 	int fd;
-	int width = 8 * sizeof(int);
+	unsigned width = 8 * sizeof(int);
 
 	/* devmem ADDRESS [WIDTH [VALUE]] */
 // TODO: options?
@@ -50,15 +50,22 @@ int devmem_main(int argc UNUSED_PARAM, char **argv)
 		if (argv[3])
 			writeval = bb_strtoull(argv[3], NULL, 0);
 	} else { /* argv[2] == NULL */
-		/* make argv[3] to be a valid thing to use */
+		/* make argv[3] to be a valid thing to fetch */
 		argv--;
 	}
 	if (errno)
-		bb_show_usage(); /* bb_strtouXX failed */
+		bb_show_usage(); /* one of bb_strtouXX failed */
 
 	fd = xopen("/dev/mem", argv[3] ? (O_RDWR | O_SYNC) : (O_RDONLY | O_SYNC));
+	mapped_size = page_size = getpagesize();
+	offset_in_page = (unsigned)target & (page_size - 1);
+	if (offset_in_page + width > page_size) {
+		/* This access spans pages.
+		 * Must map two pages to make it possible: */
+		mapped_size *= 2;
+	}
 	map_base = mmap(NULL,
-			page_size * 2 /* in case value spans page */,
+			mapped_size,
 			argv[3] ? (PROT_READ | PROT_WRITE) : PROT_READ,
 			MAP_SHARED,
 			fd,
@@ -68,7 +75,7 @@ int devmem_main(int argc UNUSED_PARAM, char **argv)
 
 //	printf("Memory mapped at address %p.\n", map_base);
 
-	virt_addr = (char*)map_base + (target & (page_size - 1));
+	virt_addr = (char*)map_base + offset_in_page;
 
 	if (!argv[3]) {
 		switch (width) {
@@ -119,7 +126,7 @@ int devmem_main(int argc UNUSED_PARAM, char **argv)
 	}
 
 	if (ENABLE_FEATURE_CLEAN_UP) {
-		if (munmap(map_base, page_size * 2) == -1)
+		if (munmap(map_base, mapped_size) == -1)
 			bb_perror_msg_and_die("munmap");
 		close(fd);
 	}
-- 
1.7.1
+0 −920

File deleted.

Preview size limit exceeded, changes collapsed.

+17 −0
Original line number Diff line number Diff line
--- busybox-1.20.0/loginutils/getty.c
+++ busybox-1.20.0-getty/loginutils/getty.c
@@ -561,8 +561,14 @@ int getty_main(int argc UNUSED_PARAM, ch
 		 */
 		fd = open("/dev/tty", O_RDWR | O_NONBLOCK);
 		if (fd >= 0) {
+			/* TIOCNOTTY sends SIGHUP to the foreground
+			 * process group - which may include us!
+			 * Make sure to not die on it:
+			 */
+			sighandler_t old = signal(SIGHUP, SIG_IGN);
 			ioctl(fd, TIOCNOTTY);
 			close(fd);
+			signal(SIGHUP, old);
 		}
 	}
 
+22 −0
Original line number Diff line number Diff line
--- busybox-1.20.0/libbb/lineedit.c
+++ busybox-1.20.0-lineedit/libbb/lineedit.c
@@ -1352,8 +1352,7 @@ static void load_history(line_input_t *s
 		/* fill temp_h[], retaining only last MAX_HISTORY lines */
 		memset(temp_h, 0, sizeof(temp_h));
 		idx = 0;
-		if (!ENABLE_FEATURE_EDITING_SAVE_ON_EXIT)
-			st_parm->cnt_history_in_file = 0;
+		st_parm->cnt_history_in_file = 0;
 		while ((line = xmalloc_fgetline(fp)) != NULL) {
 			if (line[0] == '\0') {
 				free(line);
@@ -1361,8 +1360,7 @@ static void load_history(line_input_t *s
 			}
 			free(temp_h[idx]);
 			temp_h[idx] = line;
-			if (!ENABLE_FEATURE_EDITING_SAVE_ON_EXIT)
-				st_parm->cnt_history_in_file++;
+			st_parm->cnt_history_in_file++;
 			idx++;
 			if (idx == st_parm->max_history)
 				idx = 0;
Loading