# HG changeset patch # User Rob Landley # Date 1313410000 18000 # Node ID 14739f3ae2a5a89bf6498f4c5df039945d8468f6 # Parent e67a999e0351833755fb56a5b9992c2e569b5b44 Busybox 1.19.0 and two patches to make it work. diff -r e67a999e0351 -r 14739f3ae2a5 download.sh --- a/download.sh Sun Aug 07 04:18:21 2011 -0500 +++ b/download.sh Mon Aug 15 07:06:40 2011 -0500 @@ -56,8 +56,8 @@ # BusyBox. Adding a native toolchain requires binutils and gcc (above) plus # make and bash. -URL=http://www.busybox.net/downloads/busybox-1.18.4.tar.bz2 \ -SHA1=d285855e5770b0fb7caf477dd41ce0863657b975 \ +URL=http://www.busybox.net/downloads/busybox-1.19.0.tar.bz2 \ +SHA1=70569f23751640d9ac7fc2aa49b29e6cd274be6d \ #UNSTABLE=http://busybox.net/downloads/busybox-snapshot.tar.bz2 \ maybe_fork "download || dienow" diff -r e67a999e0351 -r 14739f3ae2a5 sources/patches/busybox-fixpatch.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/patches/busybox-fixpatch.patch Mon Aug 15 07:06:40 2011 -0500 @@ -0,0 +1,36 @@ +I broke patch's ability to create files in November, and nobody noticed in +the ensuing 11 months. Sigh. + +diff --git a/editors/patch.c b/editors/patch.c +index 9c6d967..dd142ec 100644 +--- a/editors/patch.c ++++ b/editors/patch.c +@@ -67,8 +67,7 @@ struct double_list { + + // Free all the elements of a linked list + // Call freeit() on each element before freeing it. +-static +-void dlist_free(struct double_list *list, void (*freeit)(void *data)) ++static void dlist_free(struct double_list *list, void (*freeit)(void *data)) + { + while (list) { + void *pop = list; +@@ -80,8 +79,7 @@ void dlist_free(struct double_list *list, void (*freeit)(void *data)) + } + + // Add an entry before "list" element in (circular) doubly linked list +-static +-struct double_list *dlist_add(struct double_list **list, char *data) ++static struct double_list *dlist_add(struct double_list **list, char *data) + { + struct double_list *llist; + struct double_list *line = xmalloc(sizeof(*line)); +@@ -229,7 +227,7 @@ static int apply_one_hunk(void) + else matcheof = 0; + if (PATCH_DEBUG) fdprintf(2, "HUNK:%s\n", plist->data); + } +- matcheof = matcheof < TT.context; ++ matcheof = !TT.context || matcheof < TT.context; + + if (PATCH_DEBUG) fdprintf(2,"MATCHEOF=%c\n", matcheof ? 'Y' : 'N'); + diff -r e67a999e0351 -r 14739f3ae2a5 sources/patches/busybox-sysinfo.patch --- a/sources/patches/busybox-sysinfo.patch Sun Aug 07 04:18:21 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -# Block copying crap out of header files in the name of "portability" is -# never a good idea. It breaks stuff. In this case, it won't build under -# Linux 3.0. - - ---- busybox/include/libbb.h 2011-03-12 19:45:40.000000000 -0600 -+++ busybox.new/include/libbb.h 2011-07-23 18:24:06.563634320 -0500 -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -100,25 +101,6 @@ - #if !defined __FreeBSD__ - char *dirname(char *path); - #endif --/* Include our own copy of struct sysinfo to avoid binary compatibility -- * problems with Linux 2.4, which changed things. Grumble, grumble. */ --struct sysinfo { -- long uptime; /* Seconds since boot */ -- unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ -- unsigned long totalram; /* Total usable main memory size */ -- unsigned long freeram; /* Available memory size */ -- unsigned long sharedram; /* Amount of shared memory */ -- unsigned long bufferram; /* Memory used by buffers */ -- unsigned long totalswap; /* Total swap space size */ -- unsigned long freeswap; /* swap space still available */ -- unsigned short procs; /* Number of current processes */ -- unsigned short pad; /* Padding needed for m68k */ -- unsigned long totalhigh; /* Total high memory size */ -- unsigned long freehigh; /* Available high memory size */ -- unsigned int mem_unit; /* Memory unit size in bytes */ -- char _f[20 - 2 * sizeof(long) - sizeof(int)]; /* Padding: libc5 uses this.. */ --}; --int sysinfo(struct sysinfo* info); - #ifndef PATH_MAX - # define PATH_MAX 256 - #endif -diff -ru busybox/networking/Config.src busybox.new/networking/Config.src ---- busybox/networking/Config.src 2011-03-12 19:45:40.000000000 -0600 -+++ busybox.new/networking/Config.src 2011-07-23 19:12:14.379897634 -0500 -@@ -740,7 +740,7 @@ - - config TCPSVD - bool "tcpsvd" -- default y -+ default n - help - tcpsvd listens on a TCP port and runs a program for each new - connection. -diff -ru busybox/networking/Config.src busybox.new/networking/Config.src ---- busybox/networking/Config.src 2011-07-23 19:30:19.800800291 -0500 -+++ busybox.new/networking/Config.src 2011-07-23 19:39:50.129877165 -0500 -@@ -972,7 +972,7 @@ - - config UDPSVD - bool "udpsvd" -- default y -+ default n - help - udpsvd listens on an UDP port and runs a program for each new - connection. diff -r e67a999e0351 -r 14739f3ae2a5 sources/patches/linux-fixubi.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/patches/linux-fixubi.patch Mon Aug 15 07:06:40 2011 -0500 @@ -0,0 +1,90 @@ +Revert commit 3627924acf70a9a for details see +http://lkml.indiana.edu/hypermail/linux/kernel/1108.1/02863.html + +diff --git a/drivers/mtd/ubi/ubi-media.h b/drivers/mtd/ubi/ubi-media.h +index 6fb8ec2..503ea9b 100644 +--- a/drivers/mtd/ubi/ubi-media.h ++++ b/drivers/mtd/ubi/ubi-media.h +@@ -164,7 +164,7 @@ struct ubi_ec_hdr { + __be32 image_seq; + __u8 padding2[32]; + __be32 hdr_crc; +-} __packed; ++} __attribute__ ((packed)); + + /** + * struct ubi_vid_hdr - on-flash UBI volume identifier header. +@@ -292,7 +292,7 @@ struct ubi_vid_hdr { + __be64 sqnum; + __u8 padding3[12]; + __be32 hdr_crc; +-} __packed; ++} __attribute__ ((packed)); + + /* Internal UBI volumes count */ + #define UBI_INT_VOL_COUNT 1 +@@ -373,6 +373,6 @@ struct ubi_vtbl_record { + __u8 flags; + __u8 padding[23]; + __be32 crc; +-} __packed; ++} __attribute__ ((packed)); + + #endif /* !__UBI_MEDIA_H__ */ +diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h +index a390342..e70bd34 100644 +--- a/include/mtd/ubi-user.h ++++ b/include/mtd/ubi-user.h +@@ -310,7 +310,7 @@ struct ubi_mkvol_req { + __s16 name_len; + __s8 padding2[4]; + char name[UBI_MAX_VOLUME_NAME + 1]; +-} __packed; ++} __attribute__ ((packed)); + + /** + * struct ubi_rsvol_req - a data structure used in volume re-size requests. +@@ -326,7 +326,7 @@ struct ubi_mkvol_req { + struct ubi_rsvol_req { + __s64 bytes; + __s32 vol_id; +-} __packed; ++} __attribute__ ((packed)); + + /** + * struct ubi_rnvol_req - volumes re-name request. +@@ -368,7 +368,7 @@ struct ubi_rnvol_req { + __s8 padding2[2]; + char name[UBI_MAX_VOLUME_NAME + 1]; + } ents[UBI_MAX_RNVOL]; +-} __packed; ++} __attribute__ ((packed)); + + /** + * struct ubi_leb_change_req - a data structure used in atomic LEB change +@@ -383,7 +383,7 @@ struct ubi_leb_change_req { + __s32 bytes; + __s8 dtype; + __s8 padding[7]; +-} __packed; ++} __attribute__ ((packed)); + + /** + * struct ubi_map_req - a data structure used in map LEB requests. +@@ -395,7 +395,7 @@ struct ubi_map_req { + __s32 lnum; + __s8 dtype; + __s8 padding[3]; +-} __packed; ++} __attribute__ ((packed)); + + + /** +@@ -409,6 +409,6 @@ struct ubi_set_vol_prop_req { + __u8 property; + __u8 padding[7]; + __u64 value; +-} __packed; ++} __attribute__ ((packed)); + + #endif /* __UBI_USER_H__ */