summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--patches/busybox-1.20.2/0203-scripts-trylink-honour-SKIP_STRIP-and-don-t-strip-if.patch52
-rw-r--r--patches/busybox-1.20.2/series3
-rw-r--r--rules/busybox.make24
3 files changed, 77 insertions, 2 deletions
diff --git a/patches/busybox-1.20.2/0203-scripts-trylink-honour-SKIP_STRIP-and-don-t-strip-if.patch b/patches/busybox-1.20.2/0203-scripts-trylink-honour-SKIP_STRIP-and-don-t-strip-if.patch
new file mode 100644
index 000000000..ebd9790a2
--- /dev/null
+++ b/patches/busybox-1.20.2/0203-scripts-trylink-honour-SKIP_STRIP-and-don-t-strip-if.patch
@@ -0,0 +1,52 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Mon, 4 Feb 2013 14:39:00 +0100
+Subject: [PATCH] scripts/trylink: honour SKIP_STRIP and don't strip if
+ requested to
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ scripts/trylink | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/trylink b/scripts/trylink
+index a8b0b2e..d9852e8 100755
+--- a/scripts/trylink
++++ b/scripts/trylink
+@@ -241,7 +241,12 @@ if test "$CONFIG_BUILD_LIBBUSYBOX" = y; then
+ cat $EXE.out
+ exit 1
+ }
+- $STRIP -s --remove-section=.note --remove-section=.comment $EXE -o "$sharedlib_dir/libbusybox.so.$BB_VER"
++ if test "$SKIP_STRIP" = "y"; then
++ cp $EXE "$sharedlib_dir/libbusybox.so.$BB_VER"
++ else
++ $STRIP -s --remove-section=.note --remove-section=.comment $EXE -o "$sharedlib_dir/libbusybox.so.$BB_VER"
++ fi
++
+ chmod a+x "$sharedlib_dir/libbusybox.so.$BB_VER"
+ echo "libbusybox: $sharedlib_dir/libbusybox.so.$BB_VER"
+ fi
+@@ -262,7 +267,11 @@ if test "$CONFIG_FEATURE_SHARED_BUSYBOX" = y; then
+ cat $EXE.out
+ exit 1
+ }
+- $STRIP -s --remove-section=.note --remove-section=.comment $EXE -o "$sharedlib_dir/busybox"
++ if test "$SKIP_STRIP" = "y"; then
++ cp $EXE "$sharedlib_dir/busybox"
++ else
++ $STRIP -s --remove-section=.note --remove-section=.comment $EXE -o "$sharedlib_dir/busybox"
++ fi
+ echo "busybox linked against libbusybox: $sharedlib_dir/busybox"
+ fi
+
+@@ -299,7 +308,9 @@ int main(int argc, char **argv)
+ exit 1
+ }
+ rm -- "$sharedlib_dir/applet.c" $EXE.out
+- $STRIP -s --remove-section=.note --remove-section=.comment $EXE
++ if test "$SKIP_STRIP" != "y"; then
++ $STRIP -s --remove-section=.note --remove-section=.comment $EXE
++ fi
+
+ done <applet_lst.tmp
+ fi
diff --git a/patches/busybox-1.20.2/series b/patches/busybox-1.20.2/series
index 5fd514a81..dcf9b4a5c 100644
--- a/patches/busybox-1.20.2/series
+++ b/patches/busybox-1.20.2/series
@@ -10,4 +10,5 @@
0200-reactivate-check-for-tty.patch
0201-Fix-the-format-warning-when-building-applets-usage_p.patch
0202-build-system-only-pass-real-libs-to-SELINUX_LIBS.patch
-# 02e24253ac98ca59e1fffacb31293da0 - git-ptx-patches magic
+0203-scripts-trylink-honour-SKIP_STRIP-and-don-t-strip-if.patch
+# 2544a24a902f6d5ec4e021d62cdce8eb - git-ptx-patches magic
diff --git a/rules/busybox.make b/rules/busybox.make
index 84c23ddb4..ab225ce71 100644
--- a/rules/busybox.make
+++ b/rules/busybox.make
@@ -74,8 +74,15 @@ BUSYBOX_INSTALL_OPT := \
$(STATEDIR)/busybox.install:
@$(call targetinfo)
@$(call world/install, BUSYBOX)
- install -D -m644 $(BUSYBOX_DIR)/busybox.links \
+ @install -D -m644 $(BUSYBOX_DIR)/busybox.links \
$(BUSYBOX_PKGDIR)/etc/busybox.links
+ifdef PTXCONF_BUSYBOX_FEATURE_INDIVIDUAL
+ @install -D -m644 $(BUSYBOX_DIR)/0_lib/libbusybox.so.$(BUSYBOX_VERSION) \
+ $(BUSYBOX_PKGDIR)/lib/libbusybox.so.$(BUSYBOX_VERSION)
+ @mkdir -p $(BUSYBOX_PKGDIR)/usr/lib/busybox
+ @cp -r $(BUSYBOX_DIR)/0_lib/* \
+ $(BUSYBOX_PKGDIR)/usr/lib/busybox
+endif
@$(call touch)
# ----------------------------------------------------------------------------
@@ -91,6 +98,20 @@ $(STATEDIR)/busybox.targetinstall:
@$(call install_fixup, busybox,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
@$(call install_fixup, busybox,DESCRIPTION,missing)
+ifdef PTXCONF_BUSYBOX_FEATURE_INDIVIDUAL
+#
+# individual busybox applets and shared lib
+#
+ @$(call install_lib, busybox, 0, 0, 0644, libbusybox)
+
+ @cat $(BUSYBOX_PKGDIR)/etc/busybox.links | while read link; do \
+ $(call install_copy, busybox, 0, 0, 755, \
+ "$(BUSYBOX_PKGDIR)/usr/lib/busybox/$${link##*/}", "$${link}"); \
+ done
+else
+#
+# traditionally busybox with links
+#
ifdef PTXCONF_BUSYBOX_FEATURE_SUID
@$(call install_copy, busybox, 0, 0, 4755, -, /bin/busybox)
ifdef PTXCONF_BUSYBOX_FEATURE_SUID_CONFIG
@@ -108,6 +129,7 @@ endif
esac; \
$(call install_link, busybox, "$${to}", "$${link}"); \
done
+endif
ifdef PTXCONF_BUSYBOX_FTPD_INETD
@$(call install_alternative, busybox, 0, 0, 0644, /etc/inetd.conf.d/ftpd)