Bump buidlroot version to 2018.02.6
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From 2c240f131ae5cc981702b45397be3b311c67a9ee Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Fri, 14 Jul 2017 22:23:46 +0200
|
||||
Subject: [PATCH] Makefile: include per-arch Makefile before Makefile.flags
|
||||
|
||||
Makefile.flags contains:
|
||||
|
||||
ARCH_FPIC ?= -fpic
|
||||
ARCH_FPIE ?= -fpie
|
||||
|
||||
However, arch/$(ARCH)/Makefile gets included *after* Makefile.flags,
|
||||
and therefore doesn't get the chance to provide its own value.
|
||||
|
||||
Fix this by including arch/$(ARCH)/Makefile *before* Makefile.flags.
|
||||
|
||||
[Submitted upstream: http://lists.busybox.net/pipermail/busybox/2017-July/085632.html]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 971e68e..fe85070 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -508,6 +508,8 @@ ifeq ($(dot-config),1)
|
||||
# To avoid any implicit rule to kick in, define an empty command
|
||||
.config .kconfig.d: ;
|
||||
|
||||
+-include $(srctree)/arch/$(ARCH)/Makefile
|
||||
+
|
||||
# Now we can define CFLAGS etc according to .config
|
||||
include $(srctree)/Makefile.flags
|
||||
|
||||
@@ -531,8 +533,6 @@ endif
|
||||
# Defaults busybox but it is usually overridden in the arch makefile
|
||||
all: busybox doc
|
||||
|
||||
--include $(srctree)/arch/$(ARCH)/Makefile
|
||||
-
|
||||
# arch Makefile may override CC so keep this after arch Makefile is included
|
||||
#bbox# NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
|
||||
CHECKFLAGS += $(NOSTDINC_FLAGS)
|
||||
--
|
||||
2.9.4
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
From 43593d65827f4e7f848fc410321b0b2deed986fc Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Fri, 14 Jul 2017 21:54:37 +0200
|
||||
Subject: [PATCH] arch/{sparc,sparc64}/Makefile: define ARCH_FPIC
|
||||
|
||||
Building Busybox on SPARC or SPARC64 with CONFIG_BUILD_LIBBUSYBOX=y
|
||||
currently fails with:
|
||||
|
||||
miscutils/lib.a(i2c_tools.o): In function `i2c_dev_open':
|
||||
i2c_tools.c:(.text.i2c_dev_open+0x14): relocation truncated to fit: R_SPARC_GOT13 against `.LC0'
|
||||
i2c_tools.c:(.text.i2c_dev_open+0x38): relocation truncated to fit: R_SPARC_GOT13 against symbol `bb_errno' defined in COMMON section in libbb/lib.a(ptr_to_globals.o)
|
||||
i2c_tools.c:(.text.i2c_dev_open+0x6c): relocation truncated to fit: R_SPARC_GOT13 against `.LC1'
|
||||
miscutils/lib.a(i2c_tools.o): In function `check_funcs_test_end':
|
||||
i2c_tools.c:(.text.check_funcs_test_end+0x24): relocation truncated to fit: R_SPARC_GOT13 against `.LC2'
|
||||
i2c_tools.c:(.text.check_funcs_test_end+0x2c): relocation truncated to fit: R_SPARC_GOT13 against `.LC3'
|
||||
miscutils/lib.a(i2c_tools.o): In function `check_read_funcs':
|
||||
i2c_tools.c:(.text.check_read_funcs+0x30): relocation truncated to fit: R_SPARC_GOT13 against `.LC10'
|
||||
i2c_tools.c:(.text.check_read_funcs+0x80): relocation truncated to fit: R_SPARC_GOT13 against `.LC4'
|
||||
i2c_tools.c:(.text.check_read_funcs+0x98): relocation truncated to fit: R_SPARC_GOT13 against `.LC5'
|
||||
i2c_tools.c:(.text.check_read_funcs+0xc0): relocation truncated to fit: R_SPARC_GOT13 against `.LC6'
|
||||
i2c_tools.c:(.text.check_read_funcs+0xe0): relocation truncated to fit: R_SPARC_GOT13 against `.LC7'
|
||||
i2c_tools.c:(.text.check_read_funcs+0xf8): additional relocation overflows omitted from the output
|
||||
|
||||
As stated by the gcc documentation, the SPARC architecture has a
|
||||
limited GOT size, which prevents moderately large binaries to be built
|
||||
with -fpic, and -fPIC is necessary. From gcc's documentation:
|
||||
|
||||
'-fpic'
|
||||
Generate position-independent code (PIC) suitable for use in a
|
||||
shared library, if supported for the target machine. Such code
|
||||
accesses all constant addresses through a global offset table
|
||||
(GOT). The dynamic loader resolves the GOT entries when the
|
||||
program starts (the dynamic loader is not part of GCC; it is part
|
||||
of the operating system). If the GOT size for the linked
|
||||
executable exceeds a machine-specific maximum size, you get an
|
||||
error message from the linker indicating that '-fpic' does not
|
||||
work; in that case, recompile with '-fPIC' instead. (These
|
||||
maximums are 8k on the SPARC, 28k on AArch64 and 32k on the m68k
|
||||
and RS/6000. The x86 has no such limit.)
|
||||
|
||||
'-fPIC'
|
||||
If supported for the target machine, emit position-independent
|
||||
code, suitable for dynamic linking and avoiding any limit on the
|
||||
size of the global offset table. This option makes a difference on
|
||||
AArch64, m68k, PowerPC and SPARC.
|
||||
|
||||
With a limit of 8KB on SPARC, we quickly reach this limit, and we hit
|
||||
it when building Busybox on SPARC/SPARC64 with the
|
||||
CONFIG_BUILD_LIBBUSYBOX=y option enabled.
|
||||
|
||||
Therefore, this commit redefines ARCH_FPIC as -fPIC on sparc and
|
||||
sparc64 to solve this issue.
|
||||
|
||||
[Submitted upstream: http://lists.busybox.net/pipermail/busybox/2017-July/085633.html]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
arch/sparc/Makefile | 1 +
|
||||
arch/sparc64/Makefile | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
create mode 100644 arch/sparc/Makefile
|
||||
create mode 100644 arch/sparc64/Makefile
|
||||
|
||||
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
|
||||
new file mode 100644
|
||||
index 0000000..4d6c5fb
|
||||
--- /dev/null
|
||||
+++ b/arch/sparc/Makefile
|
||||
@@ -0,0 +1 @@
|
||||
+ARCH_FPIC = -fPIC
|
||||
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile
|
||||
new file mode 100644
|
||||
index 0000000..4d6c5fb
|
||||
--- /dev/null
|
||||
+++ b/arch/sparc64/Makefile
|
||||
@@ -0,0 +1 @@
|
||||
+ARCH_FPIC = -fPIC
|
||||
--
|
||||
2.9.4
|
||||
|
||||
@@ -2,8 +2,8 @@ config BR2_PACKAGE_BUSYBOX
|
||||
bool "BusyBox"
|
||||
default y
|
||||
help
|
||||
The Swiss Army Knife of embedded Linux. It slices, it dices, it
|
||||
makes Julian Fries.
|
||||
The Swiss Army Knife of embedded Linux. It slices, it dices,
|
||||
it makes Julian Fries.
|
||||
|
||||
http://busybox.net/
|
||||
|
||||
@@ -15,10 +15,12 @@ config BR2_PACKAGE_BUSYBOX_CONFIG
|
||||
string "BusyBox configuration file to use?"
|
||||
default "package/busybox/busybox.config"
|
||||
help
|
||||
Some people may wish to use their own modified BusyBox configuration
|
||||
file, and will specify their config file location with this option.
|
||||
Some people may wish to use their own modified BusyBox
|
||||
configuration file, and will specify their config file
|
||||
location with this option.
|
||||
|
||||
Most people will just use the default BusyBox configuration file.
|
||||
Most people will just use the default BusyBox configuration
|
||||
file.
|
||||
|
||||
config BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES
|
||||
string "Additional BusyBox configuration fragment files"
|
||||
@@ -35,12 +37,12 @@ config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
by busybox.
|
||||
|
||||
config BR2_PACKAGE_BUSYBOX_SELINUX
|
||||
select BR2_PACKAGE_LIBSELINUX
|
||||
bool "Enable SELinux support"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC
|
||||
depends on !BR2_arc
|
||||
bool "Enable SELinux support"
|
||||
select BR2_PACKAGE_LIBSELINUX
|
||||
help
|
||||
Enable SELinux support in BusyBox. Please note that
|
||||
depending on your BusyBox configuration and the SELinux
|
||||
@@ -54,6 +56,22 @@ config BR2_PACKAGE_BUSYBOX_SELINUX
|
||||
crond, then individual binaries have to be enabled for the
|
||||
SELinux type transitions to occur properly.
|
||||
|
||||
config BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES
|
||||
bool "Individual binaries"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on !BR2_bfin # libbusybox.so link issue
|
||||
help
|
||||
By default (i.e with this option disabled), Busybox is
|
||||
installed as a single binary in /bin/busybox and all applets
|
||||
are a symbolic link to /bin/busybox.
|
||||
|
||||
With this option enabled, each applet is a separate binary,
|
||||
which is needed for proper operation with SELinux.
|
||||
|
||||
comment "Busybox individual binaries need a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
depends on !BR2_bfin
|
||||
|
||||
config BR2_PACKAGE_BUSYBOX_WATCHDOG
|
||||
bool "Install the watchdog daemon startup script"
|
||||
help
|
||||
|
||||
@@ -33,7 +33,7 @@ case "$1" in
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ case "$1" in
|
||||
echo /sbin/mdev >/proc/sys/kernel/hotplug
|
||||
/sbin/mdev -s
|
||||
# coldplug modules
|
||||
find /sys/ -name modalias -print0 | xargs -0 sort -u -z | xargs -0 modprobe -abq
|
||||
find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' '\0' | \
|
||||
xargs -0 modprobe -abq
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# From https://busybox.net/downloads/busybox-1.27.2.tar.bz2.sign
|
||||
md5 476186f4bab81781dab2369bfd42734e busybox-1.27.2.tar.bz2
|
||||
sha1 11669e223cc38de646ce26080e91ca29b8d42ad9 busybox-1.27.2.tar.bz2
|
||||
# License files, locally calculated
|
||||
sha256 bbfc9843646d483c334664f651c208b9839626891d8f17604db2146962f43548 LICENSE
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
BUSYBOX_VERSION = 1.27.2
|
||||
BUSYBOX_SITE = http://www.busybox.net/downloads
|
||||
BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2
|
||||
BUSYBOX_LICENSE = GPLv2
|
||||
BUSYBOX_LICENSE = GPL-2.0
|
||||
BUSYBOX_LICENSE_FILES = LICENSE
|
||||
|
||||
define BUSYBOX_HELP_CMDS
|
||||
@@ -52,7 +52,7 @@ BUSYBOX_MAKE_OPTS = \
|
||||
SKIP_STRIP=y
|
||||
|
||||
ifndef BUSYBOX_CONFIG_FILE
|
||||
BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))
|
||||
BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))
|
||||
endif
|
||||
|
||||
BUSYBOX_KCONFIG_FILE = $(BUSYBOX_CONFIG_FILE)
|
||||
@@ -60,9 +60,32 @@ BUSYBOX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG_FRAG
|
||||
BUSYBOX_KCONFIG_EDITORS = menuconfig xconfig gconfig
|
||||
BUSYBOX_KCONFIG_OPTS = $(BUSYBOX_MAKE_OPTS)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES),y)
|
||||
define BUSYBOX_PERMISSIONS
|
||||
# Set permissions on all applets with BB_SUID_REQUIRE and BB_SUID_MAYBE.
|
||||
# 12 Applets are pulled from applets.h using grep command :
|
||||
# grep -r -e "APPLET.*BB_SUID_REQUIRE\|APPLET.*BB_SUID_MAYBE" \
|
||||
# $(@D)/include/applets.h
|
||||
# These applets are added to the device table and the makedev file
|
||||
# ignores the files with type 'F' ( optional files).
|
||||
/usr/bin/wall F 4755 0 0 - - - - -
|
||||
/bin/ping F 4755 0 0 - - - - -
|
||||
/bin/ping6 F 4755 0 0 - - - - -
|
||||
/usr/bin/crontab F 4755 0 0 - - - - -
|
||||
/sbin/findfs F 4755 0 0 - - - - -
|
||||
/bin/login F 4755 0 0 - - - - -
|
||||
/bin/mount F 4755 0 0 - - - - -
|
||||
/usr/bin/passwd F 4755 0 0 - - - - -
|
||||
/bin/su F 4755 0 0 - - - - -
|
||||
/usr/bin/traceroute F 4755 0 0 - - - - -
|
||||
/usr/bin/traceroute6 F 4755 0 0 - - - - -
|
||||
/usr/bin/vlock F 4755 0 0 - - - - -
|
||||
endef
|
||||
else
|
||||
define BUSYBOX_PERMISSIONS
|
||||
/bin/busybox f 4755 0 0 - - - - -
|
||||
endef
|
||||
endif
|
||||
|
||||
# If mdev will be used for device creation enable it and copy S10mdev to /etc/init.d
|
||||
ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y)
|
||||
@@ -158,10 +181,22 @@ define BUSYBOX_INSTALL_UDHCPC_SCRIPT
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_INIT_BUSYBOX),y)
|
||||
|
||||
define BUSYBOX_SET_INIT
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_INIT,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
|
||||
define BUSYBOX_SET_GETTY
|
||||
$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(SYSTEM_GETTY_PORT)::respawn:/sbin/getty -L $(SYSTEM_GETTY_OPTIONS) $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_TERM) #~' \
|
||||
$(TARGET_DIR)/etc/inittab
|
||||
endef
|
||||
BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_SET_GETTY
|
||||
endif # BR2_TARGET_GENERIC_GETTY
|
||||
|
||||
BUSYBOX_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB
|
||||
|
||||
endif # BR2_INIT_BUSYBOX
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BUSYBOX_SELINUX),y)
|
||||
BUSYBOX_DEPENDENCIES += host-pkgconf libselinux libsepol
|
||||
@@ -171,6 +206,17 @@ define BUSYBOX_SET_SELINUX
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES),y)
|
||||
define BUSYBOX_SET_INDIVIDUAL_BINARIES
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BUILD_LIBBUSYBOX,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_INDIVIDUAL,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
|
||||
define BUSYBOX_INSTALL_INDIVIDUAL_BINARIES
|
||||
rm -f $(TARGET_DIR)/bin/busybox
|
||||
endef
|
||||
endif
|
||||
|
||||
define BUSYBOX_INSTALL_LOGGING_SCRIPT
|
||||
if grep -q CONFIG_SYSLOGD=y $(@D)/.config; then \
|
||||
$(INSTALL) -m 0755 -D package/busybox/S01logging \
|
||||
@@ -202,6 +248,10 @@ define BUSYBOX_LINUX_PAM
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_PAM,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
BUSYBOX_DEPENDENCIES += linux-pam
|
||||
else
|
||||
define BUSYBOX_LINUX_PAM
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_PAM,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
endif
|
||||
|
||||
# Telnet support
|
||||
@@ -228,6 +278,7 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
|
||||
$(BUSYBOX_SET_INIT)
|
||||
$(BUSYBOX_SET_WATCHDOG)
|
||||
$(BUSYBOX_SET_SELINUX)
|
||||
$(BUSYBOX_SET_INDIVIDUAL_BINARIES)
|
||||
$(BUSYBOX_MUSL_TWEAKS)
|
||||
endef
|
||||
|
||||
@@ -251,6 +302,7 @@ define BUSYBOX_INSTALL_INIT_SYSV
|
||||
$(BUSYBOX_INSTALL_LOGGING_SCRIPT)
|
||||
$(BUSYBOX_INSTALL_WATCHDOG_SCRIPT)
|
||||
$(BUSYBOX_INSTALL_TELNET_SCRIPT)
|
||||
$(BUSYBOX_INSTALL_INDIVIDUAL_BINARIES)
|
||||
endef
|
||||
|
||||
# Checks to give errors that the user can understand
|
||||
|
||||
@@ -16,9 +16,13 @@
|
||||
# Startup the system
|
||||
::sysinit:/bin/mount -t proc proc /proc
|
||||
::sysinit:/bin/mount -o remount,rw /
|
||||
::sysinit:/bin/mkdir -p /dev/pts
|
||||
::sysinit:/bin/mkdir -p /dev/shm
|
||||
::sysinit:/bin/mkdir -p /dev/pts /dev/shm
|
||||
::sysinit:/bin/mount -a
|
||||
::sysinit:/sbin/swapon -a
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
|
||||
::sysinit:/bin/hostname -F /etc/hostname
|
||||
# now run any rc scripts
|
||||
::sysinit:/etc/init.d/rcS
|
||||
|
||||
Reference in New Issue
Block a user