changeset 1805:bbe71b3a271d draft

Upgrade toybox and musl versions.
author Rob Landley <rob@landley.net>
date Wed, 04 Nov 2015 00:14:29 -0600
parents 8b464e266623
children d7921aa5ea60
files download.sh sources/baseconfig-busybox sources/patches/toybox-grep.patch sources/patches/toybox-oneit.patch sources/targets/sh2eb
diffstat 5 files changed, 18 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/download.sh	Mon Nov 02 01:15:36 2015 -0600
+++ b/download.sh	Wed Nov 04 00:14:29 2015 -0600
@@ -25,8 +25,8 @@
 SHA1=4d8d67d6754409bd10015d67d1ce7a04c0b001ba \
 maybe_fork "download || dienow"
 
-URL=http://www.musl-libc.org/releases/musl-1.1.11.tar.gz \
-SHA1=28eb54aeb3d2929c1ca415bb7853127e09bdf246 \
+URL=http://www.musl-libc.org/releases/musl-1.1.12.tar.gz \
+SHA1=e098ce88e7dd4398c178240b4c380771c5b4fe6b \
 maybe_fork "download || dienow"
 
 URL=ftp://kernel.org/pub/linux/kernel/v4.x/linux-4.1.tar.gz \
@@ -66,8 +66,8 @@
 # BusyBox.  Adding a native toolchain requires binutils and gcc (above) plus
 # make and bash.
 
-URL=http://landley.net/toybox/downloads/toybox-0.6.0.tar.gz \
-SHA1=08fb1c23f520c25a15f262a8a95ea5b676a98d54 \
+URL=http://landley.net/toybox/downloads/toybox-0.6.1.tar.gz \
+SHA1=7bdf7253d5a5dbf7073e8f5ca0999a7928a63dae \
 maybe_fork "download || dienow"
 
 URL=http://www.busybox.net/downloads/busybox-1.24.1.tar.bz2 \
--- a/sources/baseconfig-busybox	Mon Nov 02 01:15:36 2015 -0600
+++ b/sources/baseconfig-busybox	Wed Nov 04 00:14:29 2015 -0600
@@ -7,10 +7,6 @@
 
 # low hanging fruit:
 
-CONFIG_PS=y
-CONFIG_FEATURE_PS_TIME=y
-CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
-
 CONFIG_BUNZIP2=y
 CONFIG_BZIP2=y
 CONFIG_GUNZIP=y
@@ -62,7 +58,7 @@
 CONFIG_HUSH_RANDOM_SUPPORT=y
 CONFIG_HUSH_EXPORT_N=y
 CONFIG_HUSH_MODE_X=y
-CONFIG_FEATURE_SH_IS_NONE=y
+CONFIG_FEATURE_SH_IS_HUSH=y
 CONFIG_FEATURE_BASH_IS_NONE=y
 
 CONFIG_SH_MATH_SUPPORT=y
@@ -250,3 +246,7 @@
 CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
 
 CONFIG_SED=y
+
+CONFIG_PS=y
+CONFIG_FEATURE_PS_TIME=y
+CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
--- a/sources/patches/toybox-grep.patch	Mon Nov 02 01:15:36 2015 -0600
+++ b/sources/patches/toybox-grep.patch	Wed Nov 04 00:14:29 2015 -0600
@@ -2,23 +2,24 @@
 happen in glibc, musl, or bionic, so it's not worth adding a workaround
 upstream.
 
-diff -r dbee4e656aa6 toys/posix/grep.c
---- a/toys/posix/grep.c	Thu Mar 26 13:25:20 2015 -0500
-+++ b/toys/posix/grep.c	Fri Mar 27 20:10:08 2015 -0500
-@@ -62,16 +62,21 @@
- 
+diff --git a/toys/posix/grep.c b/toys/posix/grep.c
+index d44a92d..b9c2def 100644
+--- a/toys/posix/grep.c
++++ b/toys/posix/grep.c
+@@ -63,7 +63,8 @@ GLOBALS(
+ // Show matches in one file
  static void do_grep(int fd, char *name)
  {
 -  FILE *file = fdopen(fd, "r");
 +  struct stat *st = (void *)(toybuf+sizeof(regex_t));
 +  FILE *file = 0;
    long offset = 0;
-   int lcount = 0, mcount = 0, which = toys.optflags & FLAG_w ? 2 : 0;
+   int lcount = 0, mcount = 0;
    char indelim = '\n' * !(toys.optflags&FLAG_z),
-        outdelim = '\n' * !(toys.optflags&FLAG_Z);
+@@ -71,8 +72,13 @@ static void do_grep(int fd, char *name)
  
    if (!fd) name = "(standard input)";
--
+ 
 +  if (!fstat(fd, st)) {
 +    // grep * hits directories, skip but don't treat them as errors.
 +    if (S_ISDIR(st->st_mode)) errno = 0;
@@ -30,13 +31,3 @@
      return;
    }
  
-@@ -88,8 +93,7 @@
- 
-     start = line;
- 
--    for (;;)
--    {
-+    for (;;) {
-       int rc = 0, skip = 0;
- 
-       if (toys.optflags & FLAG_F) {
--- a/sources/patches/toybox-oneit.patch	Mon Nov 02 01:15:36 2015 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-commit 9592214cc5670605544a083d67ff916c9a802b13
-Author: Rob Landley <rob@landley.net>
-Date:   Sat Sep 5 14:14:09 2015 -0500
-
-    Large thinko, -3 was always enabled in optflags. (Oops.)
-
-diff --git a/toys/other/oneit.c b/toys/other/oneit.c
-index 8e4b713..a3fe024 100644
---- a/toys/other/oneit.c
-+++ b/toys/other/oneit.c
-@@ -61,7 +61,7 @@ void oneit_main(void)
- {
-   int i, pid, pipes[] = {SIGUSR1, SIGUSR2, SIGTERM, SIGINT};
- 
--  if (FLAG_3) {
-+  if (toys.optflags & FLAG_3) {
-     // Ensure next available filehandle is #3
-     while (open("/", 0) < 3);
-     close(3);
-@@ -83,7 +83,7 @@ void oneit_main(void)
-       // We ignore the return value of write (what would we do with it?)
-       // but save it in a variable we never read to make fortify shut up.
-       // (Real problem is if pid2 never reads, write() fills pipe and blocks.)
--      while (pid != wait(&i)) if (FLAG_3) i = write(4, &pid, 4);
-+      while (pid != wait(&i)) if (toys.optflags & FLAG_3) i = write(4, &pid, 4);
-       if (toys.optflags & FLAG_n) continue;
- 
-       oneit_signaled((toys.optflags & FLAG_p) ? SIGUSR2 : SIGTERM);
--- a/sources/targets/sh2eb	Mon Nov 02 01:15:36 2015 -0600
+++ b/sources/targets/sh2eb	Wed Nov 04 00:14:29 2015 -0600
@@ -19,7 +19,6 @@
 UCLIBC_CONFIG="
 TARGET_sh=y
 CONFIG_SH2=y
-# UCLIBC_HAS_MMU is not set
 LINUXTHREADS_OLD=y
 "