diff options
Diffstat (limited to 'poky/meta/recipes-core/busybox')
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox/0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch | 114 | ||||
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox/0001-mktemp-add-tmpdir-option.patch | 81 | ||||
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox/fail_on_no_media.patch | 28 | ||||
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox_1.35.0.bb (renamed from poky/meta/recipes-core/busybox/busybox_1.34.1.bb) | 4 |
4 files changed, 19 insertions, 208 deletions
diff --git a/poky/meta/recipes-core/busybox/busybox/0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch b/poky/meta/recipes-core/busybox/busybox/0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch deleted file mode 100644 index 2bf2b91c7e..0000000000 --- a/poky/meta/recipes-core/busybox/busybox/0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch +++ /dev/null @@ -1,114 +0,0 @@ -From a9333eb6a7b8dbda735947cd5bc981ff9352a2c9 Mon Sep 17 00:00:00 2001 -From: Nathan Phillip Brink <ohnobinki@ohnopublishing.net> -Date: Thu, 10 Mar 2011 00:27:08 -0500 -Subject: [PATCH 1/2] Use $(CC) when linking instead of $(LD) and use $(CFLAGS) - and $(EXTRA_CFLAGS) when linking. - -This fixes the issue where LDFLAGS escaped with -Wl are ignored during -compilation. It also simplifies using CFLAGS or EXTRA_CFLAGS (such as --m32 on x86_64 or -flto) which apply to both compilation and linking -situations. - -Signed-off-by: Nathan Phillip Brink <ohnobinki@ohnopublishing.net> ---- -Upstream-Status: Pending - - Makefile | 7 ++++--- - scripts/Makefile.build | 8 ++++---- - scripts/Makefile.lib | 13 +++---------- - 3 files changed, 11 insertions(+), 17 deletions(-) - -Index: busybox-1.23.2/Makefile -=================================================================== ---- busybox-1.23.2.orig/Makefile -+++ busybox-1.23.2/Makefile -@@ -309,7 +309,8 @@ CHECKFLAGS := -D__linux__ -Dlinux -D - MODFLAGS = -DMODULE - CFLAGS_MODULE = $(MODFLAGS) - AFLAGS_MODULE = $(MODFLAGS) --LDFLAGS_MODULE = -r -+LDFLAGS_RELOCATABLE = -r -nostdlib -+LDFLAGS_MODULE = $(LDFLAGS_RELOCATABLE) - CFLAGS_KERNEL = - AFLAGS_KERNEL = - -@@ -331,7 +332,7 @@ KERNELVERSION = $(VERSION).$(PATCHLEVEL) - export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \ - ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ - CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ -- HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS -+ HOSTCXX HOSTCXXFLAGS LDFLAGS_RELOCATABLE LDFLAGS_MODULE CHECK CHECKFLAGS - - export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS - export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE -@@ -610,7 +611,7 @@ quiet_cmd_busybox__ ?= LINK $@ - cmd_busybox__ ?= $(srctree)/scripts/trylink \ - "$@" \ - "$(CC)" \ -- "$(CFLAGS) $(CFLAGS_busybox)" \ -+ "$(CFLAGS) $(CFLAGS_busybox) $(EXTRA_CFLAGS)" \ - "$(LDFLAGS) $(EXTRA_LDFLAGS)" \ - "$(core-y)" \ - "$(libs-y)" \ -Index: busybox-1.23.2/scripts/Makefile.build -=================================================================== ---- busybox-1.23.2.orig/scripts/Makefile.build -+++ busybox-1.23.2/scripts/Makefile.build -@@ -174,7 +174,7 @@ cmd_modversions = \ - | $(GENKSYMS) -a $(ARCH) \ - > $(@D)/.tmp_$(@F:.o=.ver); \ - \ -- $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ -+ $(CC) $(ld_flags_partial) $(LDFLAGS_RELOCATABLE) -o $@ $(@D)/.tmp_$(@F) \ - -T $(@D)/.tmp_$(@F:.o=.ver); \ - rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ - else \ -@@ -257,7 +257,7 @@ quiet_cmd_link_o_target = LD $@ - # If the list of objects to link is empty, just create an empty built-in.o - # -nostdlib is added to make "make LD=gcc ..." work (some people use that) - cmd_link_o_target = $(if $(strip $(obj-y)),\ -- $(LD) -nostdlib $(ld_flags) -r -o $@ $(filter $(obj-y), $^),\ -+ $(CC) $(ld_flags_partial) $(LDFLAGS_RELOCATABLE) -o $@ $(filter $(obj-y), $^),\ - rm -f $@; $(AR) rcs $@) - - $(builtin-target): $(obj-y) FORCE -@@ -292,10 +292,10 @@ $($(subst $(obj)/,,$(@:.o=-objs))) \ - $($(subst $(obj)/,,$(@:.o=-y)))), $^) - - quiet_cmd_link_multi-y = LD $@ --cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) -+cmd_link_multi-y = $(CC) $(ld_flags_partial) $(LDFLAGS_RELOCATABLE) -o $@ $(link_multi_deps) - - quiet_cmd_link_multi-m = LD [M] $@ --cmd_link_multi-m = $(LD) $(ld_flags) $(LDFLAGS_MODULE) -o $@ $(link_multi_deps) -+cmd_link_multi-m = $(CC) $(ld_flags) $(LDFLAGS_MODULE) -o $@ $(link_multi_deps) - - # We would rather have a list of rules like - # foo.o: $(foo-objs) -Index: busybox-1.23.2/scripts/Makefile.lib -=================================================================== ---- busybox-1.23.2.orig/scripts/Makefile.lib -+++ busybox-1.23.2/scripts/Makefile.lib -@@ -121,7 +121,8 @@ cpp_flags = -Wp,-MD,$(depfile) $(NO - # yet ld_flags is fed to ld. - #ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) - # Remove the -Wl, prefix from linker options normally passed through gcc --ld_flags = $(filter-out -Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS)) -+ld_flags = $(filter-out -Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)) -+ld_flags_partial = $($(filter-out -shared%, $(filter-out -pie%,$(ld_flags)))) - - - # Finds the multi-part object the current object will be linked into -@@ -151,10 +152,8 @@ $(obj)/%:: $(src)/%_shipped - # Linking - # --------------------------------------------------------------------------- - --# TODO: LDFLAGS usually is supposed to contain gcc's flags, not ld's. --# but here we feed them to ld! --quiet_cmd_ld = LD $@ --cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \ -+quiet_cmd_ld = CC $@ -+cmd_ld = $(CC) $(ld_flags) $(LDFLAGS_$(@F)) \ - $(filter-out FORCE,$^) -o $@ - - # Objcopy diff --git a/poky/meta/recipes-core/busybox/busybox/0001-mktemp-add-tmpdir-option.patch b/poky/meta/recipes-core/busybox/busybox/0001-mktemp-add-tmpdir-option.patch deleted file mode 100644 index 4a1960dff2..0000000000 --- a/poky/meta/recipes-core/busybox/busybox/0001-mktemp-add-tmpdir-option.patch +++ /dev/null @@ -1,81 +0,0 @@ -From ceb378209f953ea745ed93a8645567196380ce3c Mon Sep 17 00:00:00 2001 -From: Andrej Valek <andrej.valek@siemens.com> -Date: Thu, 24 Jun 2021 19:13:22 +0200 -Subject: [PATCH] mktemp: add tmpdir option - -Make mktemp more compatible with coreutils. -- add "--tmpdir" option -- add long variants for "d,q,u" options - -Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2021-June/088932.html] - -Signed-off-by: Andrej Valek <andrej.valek@siemens.com> -Signed-off-by: Peter Marko <peter.marko@siemens.com> ---- - coreutils/mktemp.c | 26 ++++++++++++++++++-------- - 1 file changed, 18 insertions(+), 8 deletions(-) - -diff --git a/coreutils/mktemp.c b/coreutils/mktemp.c -index 5393320a5..05c6d98c6 100644 ---- a/coreutils/mktemp.c -+++ b/coreutils/mktemp.c -@@ -39,16 +39,17 @@ - //kbuild:lib-$(CONFIG_MKTEMP) += mktemp.o - - //usage:#define mktemp_trivial_usage --//usage: "[-dt] [-p DIR] [TEMPLATE]" -+//usage: "[-dt] [-p DIR, --tmpdir[=DIR]] [TEMPLATE]" - //usage:#define mktemp_full_usage "\n\n" - //usage: "Create a temporary file with name based on TEMPLATE and print its name.\n" - //usage: "TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).\n" - //usage: "Without TEMPLATE, -t tmp.XXXXXX is assumed.\n" --//usage: "\n -d Make directory, not file" --//usage: "\n -q Fail silently on errors" --//usage: "\n -t Prepend base directory name to TEMPLATE" --//usage: "\n -p DIR Use DIR as a base directory (implies -t)" --//usage: "\n -u Do not create anything; print a name" -+//usage: "\n -d Make directory, not file" -+//usage: "\n -q Fail silently on errors" -+//usage: "\n -t Prepend base directory name to TEMPLATE" -+//usage: "\n -p DIR, --tmpdir[=DIR] Use DIR as a base directory (implies -t)" -+//usage: "\n For --tmpdir is a optional one." -+//usage: "\n -u Do not create anything; print a name" - //usage: "\n" - //usage: "\nBase directory is: -p DIR, else $TMPDIR, else /tmp" - //usage: -@@ -72,13 +73,22 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv) - OPT_t = 1 << 2, - OPT_p = 1 << 3, - OPT_u = 1 << 4, -+ OPT_td = 1 << 5, - }; - - path = getenv("TMPDIR"); - if (!path || path[0] == '\0') - path = "/tmp"; - -- opts = getopt32(argv, "^" "dqtp:u" "\0" "?1"/*1 arg max*/, &path); -+ opts = getopt32long(argv, "^" -+ "dqtp:u\0" -+ "?1" /* 1 arg max */, -+ "directory\0" No_argument "d" -+ "quiet\0" No_argument "q" -+ "dry-run\0" No_argument "u" -+ "tmpdir\0" Optional_argument "\xff" -+ , &path, &path -+ ); - - chp = argv[optind]; - if (!chp) { -@@ -95,7 +105,7 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv) - goto error; - } - #endif -- if (opts & (OPT_t|OPT_p)) -+ if (opts & (OPT_t|OPT_p|OPT_td)) - chp = concat_path_file(path, chp); - - if (opts & OPT_u) { --- -2.11.0 - diff --git a/poky/meta/recipes-core/busybox/busybox/fail_on_no_media.patch b/poky/meta/recipes-core/busybox/busybox/fail_on_no_media.patch index 820acc2684..38db52538e 100644 --- a/poky/meta/recipes-core/busybox/busybox/fail_on_no_media.patch +++ b/poky/meta/recipes-core/busybox/busybox/fail_on_no_media.patch @@ -1,3 +1,8 @@ +From a35e79002d36cca3c272ba5625aec86d6b7a38a8 Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Tue, 9 Apr 2013 23:25:54 -0700 +Subject: [PATCH] busybox: fail on no media + Upstream-Status: Denied [https://www.mail-archive.com/busybox@busybox.net/msg22354.html] @@ -10,16 +15,18 @@ removed, but that would be harder to accomplish. Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + util-linux/mount.c | 8 ++++++++ + 1 file changed, 8 insertions(+) -Index: busybox-1.20.2/util-linux/mount.c -=================================================================== ---- busybox-1.20.2.orig/util-linux/mount.c -+++ busybox-1.20.2/util-linux/mount.c -@@ -598,7 +598,13 @@ static int mount_it_now(struct mntent *m - break; +diff --git a/util-linux/mount.c b/util-linux/mount.c +index 4e65b6b..9d7a566 100644 +--- a/util-linux/mount.c ++++ b/util-linux/mount.c +@@ -746,6 +746,14 @@ static int mount_it_now(struct mntent *mp, unsigned long vfsflags, char *filtero errno = errno_save; } -- + + /* + * Break if there is no media, no point retrying for all + * fs types since there is no media available @@ -27,6 +34,7 @@ Index: busybox-1.20.2/util-linux/mount.c + if (rc == -1 && errno == ENOMEDIUM) { + bb_perror_msg_and_die("mounting %s on %s failed", mp->mnt_fsname, mp->mnt_dir); + } - if (!rc || (vfsflags & MS_RDONLY) || (errno != EACCES && errno != EROFS)) - break; - if (!(vfsflags & MS_SILENT)) ++ + // Should we retry read-only mount? + if (vfsflags & MS_RDONLY) + break; // no, already was tried diff --git a/poky/meta/recipes-core/busybox/busybox_1.34.1.bb b/poky/meta/recipes-core/busybox/busybox_1.35.0.bb index 6aed0f0476..7ce1717046 100644 --- a/poky/meta/recipes-core/busybox/busybox_1.34.1.bb +++ b/poky/meta/recipes-core/busybox/busybox_1.35.0.bb @@ -26,7 +26,6 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://login-utilities.cfg \ file://recognize_connmand.patch \ file://busybox-cross-menuconfig.patch \ - file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \ file://mount-via-label.cfg \ file://sha1sum.cfg \ file://sha256sum.cfg \ @@ -47,8 +46,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://0001-testsuite-use-www.example.org-for-wget-test-cases.patch \ file://0001-du-l-works-fix-to-use-145-instead-of-144.patch \ file://0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch \ - file://0001-mktemp-add-tmpdir-option.patch \ " SRC_URI:append:libc-musl = " file://musl.cfg " -SRC_URI[tarball.sha256sum] = "415fbd89e5344c96acf449d94a6f956dbed62e18e835fc83e064db33a34bd549" +SRC_URI[tarball.sha256sum] = "faeeb244c35a348a334f4a59e44626ee870fb07b6884d68c10ae8bc19f83a694" |