Commit Graph

222 Commits

Author SHA1 Message Date
Andre McCurdy 616766953c busybox.inc: don't set .config CROSS_COMPILER_PREFIX
Setting CROSS_COMPILER_PREFIX via .config is redundant (setting
CROSS_COMPILE via the make command line will always over-ride it).

(From OE-Core rev: db2daff77a9d533dc03ab3aaeffa87e32f834240)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:11 +00:00
Andre McCurdy e1ecccd0d4 busybox: move EXTRA_OEMAKE etc into busybox.inc
EXTRA_OEMAKE options and do_install_ptest() are common to both
busybox recipes, so move into busybox.inc.

(From OE-Core rev: aeeb80be6db8df0548c97b4a40c1561cc724debb)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:11 +00:00
Andre McCurdy 0e633006ff busybox.inc: don't export EXTRA_OEMAKE
EXTRA_OEMAKE is private to OE and shouldn't be exported to
the busybox build.

(From OE-Core rev: 61e1617f9f024ead0b77004c94f2de45c88a4aa8)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:11 +00:00
Andre McCurdy 3735776986 busybox_git: Enable getopt applet
Keep git recipe in sync with 1.23.2:

  http://git.openembedded.org/openembedded-core/commit/?id=10c2c484d5916ad476ad7717c3629f6684f01e6d

(From OE-Core rev: 33868c680587036d1aa3b56e66599a5b972626c4)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:11 +00:00
Khem Raj bffdc651c6 busybox: Schedule mdev after mountall
mdev does automounting of block media, which expects
/run/ to be mounted, so let mounting happen before running mdev service
and mountall is done with at 03 so trigger mdev at 04

This helps in mounting the devices which are plugged on boot

(From OE-Core rev: 7eda8fdd1585ce19e398e64f6bcea1ffafc90b41)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-16 11:39:27 +00:00
Khem Raj 13ce7c2ae1 busybox: Fix mdev block device automounting
The directory ${MDEV_AUTOMOUNT_ROOT}/ which is '/run/media' may not
exist yet when the device is found, so lets use -p switch to mkdir cmd
so it create preceding parent dirs if needed.

Remove some bash specific constructs

(From OE-Core rev: d5279c49c881a9a8991fda67a70cd49756ac3a92)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-16 11:39:27 +00:00
Andre McCurdy fedff4f1af busybox.inc: remove redundant @DATADIR@ replacement
The busybox defconfig doesn't contain a @DATADIR@ marker, so
the attempt to replace it in do_prepare_config is redundant.

(From OE-Core rev: a3b0c401cac043a132e7e2d491b3871ec94c258e)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-12 14:36:27 +01:00
Khem Raj 8227d49edc busybox: Use CC instead of bare LD to be the Linker
This patch was on mailing list, another patch to make sure -r is not
passed directly but via -Wl switch is added.

This was exposed when using clang and gold linker, clang does not have
-r switch to do relocatable objects and problem happens specific to OE
becuase we use LD = CC

now what happens is that busybox assumes that linker will be called
directly, and hence sprinkles linkers options in its kbuild system which
aggregate into LDFLAGS, some of these options are happily ignored by gcc
as well but it passes -r options rightly to linker so it all works,
however when using clang, this falls apart since -r is not known option
for clang so it drops this option and all obects which should be
partially linked becomes ET_EXEC and when they are added to final link
then gold starts to get confused

/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld:
error: applets/built-in.o: unsupported ELF file type 2
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)

(From OE-Core rev: 117282486b68e4da468c21795ea87bfc85625885)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:25 +01:00
Khem Raj a3c48179a9 busybox: Use UTMPX instead of legacy UTMP
This makes busybox honor UTMPX feature if available in a libc

[YOCTO #8243]

(From OE-Core rev: c5de9b2ddb38790866bda5a88b9b7119aac0aa3f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:25 +01:00
Ross Burton 1c914a844b meta: Fix Upstream-Status statements
Fix a variety of problems such as typos, bad punctuations, or incorrect
Upstream-Status values.

(From OE-Core rev: bd220fe6ce8c3a0805f13a14706d3130ea872604)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 23:01:53 +01:00
Khem Raj 697428cbba busybox: Enable getopt applet
getopts is a common applet more so now needed by systemd for working
with sysv scripts

(From OE-Core rev: 10c2c484d5916ad476ad7717c3629f6684f01e6d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:44 +01:00
Joshua Lock cf5704eae7 busybox: fixes for when base_bindir != /bin
* Replace all hard-coded paths with variables
* Run sed over busybox.links.* to replace /bin with ${base_bindir}

(From OE-Core rev: c61463a45441315b0006a28bb9f6069a393a8309)

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06 15:26:19 +01:00
Andre McCurdy 6087a04cb8 busybox: enable support for sha1sum and sha256sum applets
(From OE-Core rev: 4d9a9d748e4cd0d0ffc67907c06bd01ceda2722e)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 22:24:15 +01:00
Andre McCurdy 40d64a5a05 busybox: support mount via label for btrfs and squashfs
Also move the mount via label (and mount via UUID) support into its
own config fragment and disable volume ID support for less common
filesystem formats exFAT and NILFS.

Following this commit, mount via label is supported for btrfs, ext, f2fs,
fat and squashfs.

(From OE-Core rev: b5e91f26b2779178765b62df36421d97caa4cdd7)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 22:24:15 +01:00
Andre McCurdy a2fad2b36b busybox: disable fatattr in defconfig
The fatattr applet (to display or change file attributes on a fat file
system) doesn't seem to be core functionality, so disable by default.

(From OE-Core rev: ab6b5bc7cfa1e6160919f7aea2671ad79af64507)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 22:24:14 +01:00
Andre McCurdy 6618cb4f56 busybox: disable sha3sum in defconfig
The sha1sum, sha256sum and sha512sum applets have not historically
been enabled by default, so don't enable sha3sum either.

(From OE-Core rev: fd095486e24ef2d40bc9b61af66fffb0d6578156)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 22:24:14 +01:00
Andre McCurdy 35f02c930e busybox: refresh defconfig for busybox v1.23.2
The current oe-core busybox defconfig dates back to busybox v1.20.2,
so configure options introduced in busybox v1.21.x, v1.22.x and
v1.23.x take on default values when the oe-core defconfig is run
through 'make oldconfig'.

(From OE-Core rev: f3a95b6e00482de10f4698a3ab8cead336d11e9e)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 22:24:14 +01:00
Andre McCurdy 7ea959511d busybox: re-order defconfig to align with busybox 1.23.2
No functional changes, simply re-order lines in defconfig so that
the existing options don't move elsewhere in the file when run
though busybox 1.23.2 'make oldconfig'.

(From OE-Core rev: ee80d8bfe0a6f4ad8c5de38eac20319760c0fe8f)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 22:24:13 +01:00
Andre McCurdy be79846fde busybox: remove CONFIG_FEATURE_VI_OPTIMIZE_CURSOR from defconfig
CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is obsolete and removed
from busybox v1.21.0 onwards:

  http://git.busybox.net/busybox/commit/?id=04b52892ed5d9d8a4cf5d887c221a8b50c71274e

(From OE-Core rev: 83231083c0c6e1ffdcf6239b85e0058232a92be0)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 22:24:13 +01:00
Ed Bartosh d0408029ba busybox: Enable UUID-related options
Enabled MOUNT_LABEL and VOLUMEID* features for busybox
mount to understand 'UUID=' syntax in fstab.

(From OE-Core rev: f1a4b8e0b3fb065e3b63185f1b98481d4078a851)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:23 +01:00
Junling Zheng d1fc21e5b6 busybox: fix the wrong help text for chown
Only when DESKTOP is enabled, chown has -L, -H and -P options.

Backport a commit from upstream to fix it:
http://git.busybox.net/busybox/commit/?id=d291c2fdd5cb8616605c67ecbfb04274fa094242.

(From OE-Core rev: 6ec65eedb63a82159dde8f2b2825ba7d5e6ae81d)

Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11 23:59:14 +01:00
Junling Zheng 47c4e763fb busybox: fix double free error for ifconfig
This patch backports a commit from upstream to fix a potential double
free error when executing ifconfig circularly:
http://git.busybox.net/busybox/commit/?id=a97777889328157bb7d06ec618bad16712a9c345.

Thanks to Chen Gang for reporting and analyzing this bug.

(From OE-Core rev: 66ec540dad77052bc2c1da3a87f875547600efad)

Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Signed-off-by: Chen Gang <cg.chen@huawei.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11 23:59:14 +01:00
Junling Zheng 7ab1ae677c busybox: sync the patches for git version
Synchronize the patches for busybox_git with busybox_1.23.2.

(From OE-Core rev: 5252ab5910aa8fecaf988f43f882e2c4db30056d)

Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11 23:59:14 +01:00
Andre McCurdy fa391a518a busybox: remove CVE-2014-9645 patch (already upstream in 1.23.x)
The CVE-2014-9645 fix was merged in Busybox prior to the 1.23.0
release [1]. The fix was then reworked in Busybox 1.23.1, in such
a way that the original change was no longer required [2].

Although oe-core's CVE-2014-9645 patch still applies cleanly to
Busybox 1.23.1 and 1.23.2, applying it partially reverts the second
version of the upstream fix.

  [1] http://git.busybox.net/busybox/commit/modutils/modprobe.c?h=1_23_stable&id=4e314faa0aecb66717418e9a47a4451aec59262b
  [2] http://git.busybox.net/busybox/commit/modutils/modprobe.c?h=1_23_stable&id=1ecfe811fe2f70380170ef7d820e8150054e88ca

(From OE-Core rev: a753d3d8884b96baad5ed1a03335a81586420b86)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-19 13:34:42 +01:00
Chen Qi eac96036dd busybox: upgrade to 1.23.2
(From OE-Core rev: 2b7258c19dc8c286d19e9067b62374b754deeca2)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:23 +01:00
Holger Hans Peter Freyther f7c45a4f74 busybox:udhcpc: Remove the routes from the right interface
When using iproute2 to remove the route all default rules
will be removed. Scope the removal by interface like it is
done with ifconfig.

(From OE-Core rev: 2127a57cb1b3d83f9f7640051403e47e485b132c)

Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 17:41:44 +00:00
Holger Hans Peter Freyther 48fa8684dd busybox:udhcpc: Start with a metric of 10 for routes
Linux allows to install multiple default routes with
different metrics. Start with a metric above 0 to
allow other parts of the system to install routes
with a lower metric.

(From OE-Core rev: 566441f58d398d93f948067cf399d00cf3b37eba)

Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 17:41:44 +00:00
Fathi Boudra da1259e0e6 busybox: update to 1.23.1 release
* Bump SRCREV/PV
* Drop PR
* Update SRC_URI md5sum/sha256sum
* Drop 0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch
  - applied upstream and available in 1.23.1 release

(From OE-Core rev: 2c59692c4fa4a0a21dee23b8affc3c8e58ff7a11)

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-19 07:51:39 +00:00
Ash Charles 1b45a5158e busybox: Include 'mesg' utility
The 'dot.profile' supplied by base-files calls 'mesg'.  For simple
images using busybox e.g. core-image-minimal, this utility should be
available to avoid errors on login:

 -sh: mesg: command not found

Provide mesg with busybox.

(From OE-Core rev: 7ec6f8290910c242d6e58110c30b3ffbdff274e4)

Signed-off-by: Ash Charles <ashcharles@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:27 +00:00
Armin Kuster 616696aaa6 busybox: cve-2014-9645
modprobe,rmmod: reject module names with slashes

(From OE-Core rev: 815a7b6fbf3b0cf95f5464bca687d97366d7ed6a)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 14:53:53 +00:00
mike.looijmans@topic.nl 973c565a7e busybox-mdev: Support automatic mounting of block devices
Upon inserting a USB stick or similar device, mdev will run
an automounter script that mounts valid partitions on
/media/<device>. The script first checks /etc/fstab entries
so that mounting on UUID or LABEL or using custom mount options
is still possible. If /etc/fstab does not contain particular
mount options, the script will create (and remove) the mountpoint
automatically.
The script also supports full disk partitions (devices without
partition table).

The following environments can be set in /etc/default/mdev:
MDEV_AUTOMOUNT=n (Disables automounting completely)
MDEV_AUTOMOUNT_ROOT=/media (Change the mount root location)

Automatic mounting for a particular device can be disabled by
creating a file "/dev/<device>.nomount". This is helpful in
scripts that create partitions for example, and want to perform
specific actions which require the device to remain unmounted.

A more complex variation (using LABEL based mounts) on this script
has been in use in OpenPLi for many years now, and I've used this
one on many projects already, so it's about time to push this to
mainline.

(From OE-Core rev: 19073fb991b3e2d2304e55f94e30674adf375197)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-19 18:08:03 +00:00
mike.looijmans@topic.nl 6695f76a10 busybox-mdev: Add hotplug kernel module support to mdev.conf
Add a line to mdev.conf that tells mdev to load kernel modules when
required.

For example, if you built wifi support as an external module, inserting
a wifi stick into a USB port will now automatically load that module
into the kernel and the wlan device will be ready for configuration.
Without this patch, you have to load required modules manually or force
them to load at system startup.

(From OE-Core rev: 11420b0566a6a085c6cb78f3f1495ed9c599e6fd)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-19 18:08:03 +00:00
mike.looijmans@topic.nl f9392a539e busybox/find-touchscreen.sh: Simplify script and recognize USB devices
Simplify the grep expression, use the more common "grep" command instead
of "egrep", avoid forking extra processes, join multiple invokations into
a single combined expression.

Change the touchscreen regex so that it also recognizes various USB
touchscreen controllers and the ad7879 i2c device.

Based on code used in OpenPLi and meta-topic.

(From OE-Core rev: e82353eb9f76b582122fda27c93339eac5553eb2)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-19 18:08:03 +00:00
mike.looijmans@topic.nl f50c622239 busybox-mdev: Install missing find-touchscreen.sh
mdev.conf references the find-touchscreen.sh script, but this file
was not being installed. Add the script to the busybox-mdev package.

(From OE-Core rev: 44f6df0dfac54845ef5c3ab1af5663d1b6c1d64b)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-19 18:08:02 +00:00
Hongxu Jia 5e21592365 Revert "busybox : fix do_compile failed on qemumips when DEBUG_BUILD (ICE)"
Since the gcc has resolved this, so we revert the workaround patch.

This reverts commit f026b7a211.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-05 18:01:06 +00:00
Jason Wessel da6a4f6c2b ncurses, busybox, cml1.bbclass: Fix menuconfig display corruption
Previously there was a change to the ncurses compile to make it more
like the typical way it was compiled on a host system.  This fixed a
whole class of host machines, but masked the real underlying problem
with the display corruption issues and menuconfig.

The corner case that led to the discovery that the wrong curses.h file
was getting used was when there was no curses libraries at all on one
of the development hosts.  What had happened before was that
/usr/include/curses.h on the host system had to match closely enough
to the curses.h in the sysroot and then linking against the sysroot
version of curses.so was ok (meaning no display corruption).  But on
some systems with ncurses.h vs curses.h such as SuSE hosts, there were
still issues.

If we fix the root of the problem and force the mconf and lxdialog to
use the correct headers and libraries from the sysroot there is no
further issues and the menuconfig target works properly.  It also
means we can back out the custom compilation flags to the ncurses
recipe because they are no longer needed.

For the kernel part of the menuconfig / nconfig changes it will be
merged separately and this is all based on:

https://lkml.org/lkml/2013/3/3/103

(From OE-Core rev: 889e02659dd396feba24f0b0ee6b4043c3f3735a)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-09 10:21:23 +00:00
yadi.hu@windriver.com 7e8ca6fb18 BusyBox: Fixing broadcast address is not fed and rightly initialized
When using udhcpc along with ip command(/sbin/ip), broadcast address is not
assigned. Broadcast address is successfully assigned when using udhcpc without
ip command existence.

with ip command:
    $ifconfig eth0|grep Bcast
          inet addr:128.224.162.141  Bcast:0.0.0.0  Mask:255.255.254.0
    $
without ip command:
    $ifconfig eth0|grep Bcast
          inet addr:128.224.162.141  Bcast:128.224.163.255  Mask:255.255.254.0
    $

/etc/udhcp.d/50default[simple.script] is called to set ip address by dhcp
client, In case of ifconfig, it doesn't care of it's existence because it
will automatically calculate broadcast address then assign it if there is
no broadcast option. However in case of ip command, it requires broadcast
address statically.

(From OE-Core rev: 666c6a126cd12d2555361f5b573b6a26437df780)

Signed-off-by: Hu <yadi.hu@windriver.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-04 10:27:10 +00:00
Michael Gloff 6870dff3ec syslog: Change unused variable declaration LOCAL=0 to LOG_LOCAL=1
This fix allows the correct appending of -L to syslogd arguments when both file and remote logging are selected.

(From OE-Core rev: ca68019760de6c5d5401be8eae7e65e7e6ca9021)

Signed-off-by: Michael Gloff <mgloff@emacinc.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:12:43 +01:00
Richard Purdie 28e3f8ca6f fixup
(From OE-Core rev: 20992e8a00c585ab6b0611ca23ccd57e2b86b727)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 23:01:59 +01:00
Hongxu Jia f026b7a211 busybox : fix do_compile failed on qemumips when DEBUG_BUILD (ICE)
Build busybox on mips with -g -O, there is a ice failure:
...
shell/ash.c:8758:1: internal compiler error: in dwarf2out_var_location, at dwarf2out.c:21264
...
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
{standard input}: Assembler messages:
{standard input}: Warning: missing .end at end of assembly
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
...

The following line caused the ice failure on mips:
...
void evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__));
...
So remove evaltreenr which was a alias of evaltree, and use evaltree
to instead.

[YOCTO #6625]

(From OE-Core rev: e9e2884a29e95703c5b1a2fffe5e6febfa77b5cd)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 23:01:59 +01:00
Richard Tollerton 4f597a81f3 busybox: enable `tar -m`
CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y is needed for the commit
"udev-cache: strip timestamps on extract". Enabling this flag increases
the size of busybox by 0 bytes on x86.

(From OE-Core rev: 11a772b3297ef36f3ebc4b67c9477022352d1c55)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 23:01:58 +01:00
Saul Wold 3f0bbf6659 busybox: Add Upstream-Status to patch
(From OE-Core rev: a81d4fd4ac3b2cfb144650a9bdde918d9f7d73a2)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:05 +01:00
Saul Wold a40db96621 busybox: Make busybox connman aware
This change makes busybox aware of both connman and the standard dhcp
client, while there is a caveat about using busybox's ifup/ifdown, this
change will make the 3 possibly dhcp clients behave better when busybox
is used.

Enable the CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP feature to busybox will
search for various external clients and then add connman as an external
client.

[YOCTO #6521]

(From OE-Core rev: 06bdccb5c4df44745863a2290cbb83fd190f66df)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-06 10:23:40 +01:00
Ben Shelton acfe054e32 busybox: mdev: Ensure /dev/initctl exists after tmpfs mount
During boot, there is a brief window during which /dev/initctl is
missing, which breaks initscripts that would need to access it. This
occurs because /etc/init.d/mountall.sh (rcS.d/S02...) attempts to ensure
/dev/initctl is present, but /etc/init.d/mdev (rcS.d/S06...) mounts over
/dev and clobbers the work done by mountall, and then does not wait
synchronously until initctl is ready before continuing.

To close this window, in /etc/init.d/mdev, we check whether /dev/initctl
is present, and if not, we remove it and recreate it.  This is the same
thing that is done by /etc/init.d/mountall.sh, and we have verified that
any writers of /dev/initctl will wait synchronously until sysvinit
notices the change in fd and does the read, so no race exists.

(From OE-Core rev: 53543363a8ab4424c17ed7aec0e8aefc4df86b3d)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 21:59:13 +01:00
Bill Pittman 034790df8f busybox: mdev: Use mdev.seq
/dev/mdev.seq exists to synchronize concurrently running instances of
mdev and to ensure that they execute in the proper order.  Without this
synchronization, it is possible to have inconsistent mount points, to
leak device nodes, or to have a node erroneously removed in rapid
hotplug scenarios.

Enable the use of mdev.seq by creating an empty /dev/mdev.seq at boot.

(From OE-Core rev: 3b256653ae9ab2cf56b21cb82a8bd2a562397b27)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 21:59:13 +01:00
Gratian Crisan 67e1a5244d busybox: mdev: Make /dev/shm world-writable
Otherwise, users cannot use named semaphores or shared memory.

(From OE-Core rev: a8f35be467836d8fa0bc8f8e85eba6f89a13f087)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 21:59:13 +01:00
Hongxu Jia 8673b60f26 busybox: enable CONFIG_FEATURE_AWK_LIBM by default
It was required by tzselect which is provided by eglibc utils.
The eglibc is a fundamental package, so enable math functions
of awk is reasonable.

Here is the error if we not enable that:
...
root@qemuarm:~# tzselect -c +4852+00220
awk: cmd. line:39: Math support is not compiled in
...

[YOCTO #6544]

(From OE-Core rev: 52a3df6a57c22df9da5ce05134395cf0756c63c6)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:01 +01:00
Chen Qi 5d6ffdc475 busybox: handle syslog related files properly
If CONFIG_SYSLOGD is not enabled, then the related service file should
not be installed as it will always fail at system start-up. The error
message is as following.

	[FAILED] Failed to start System Logging Service.

The same logic applies to CONFIG_KLOGD.

So we should first check the configuration before we install these
service files.

[YOCTO #5302]

(From OE-Core rev: b44e291a87539fbb8e6da1a16c56f425a417e7bd)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-14 08:43:55 +01:00
Saul Wold b6ef8dccfe busybox: put udhcpc in background
If the interface is slow to come up udhcpc will continue in the background

[YOCTO #6339]

(From OE-Core rev: 45af0ba08dbc676be41fd29e9877fe820b531f7c)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06 10:27:46 +01:00
Otavio Salvador 4c14b09498 Globally replace 'base_contains' calls with 'bb.utils.contains'
The base_contains is kept as a compatibility method and we ought to
not use it in OE-Core so we can remove it from base metadata in
future.

(From OE-Core rev: d83b16dbf0862be387f84228710cb165c6d2b03b)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25 17:19:19 +01:00
Mike Looijmans e45da211a7 PR bumps to remove PRINC use in meta-openpli
Resolves warnings of this kind in the OpenPLi layer:
 WARNING: Use of PRINC * was detected in the recipe *

(From OE-Core rev: 5ffb38d6ace7faae839c8cac7327b5b1c2daae1a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-24 17:55:14 +01:00
Wenlin Kang 467b19efba busybox: fix a sh link wrong
When both bash and busybox be installed, without ash support
in busybox,if bash is installed before busybox in the final stage,
even if ALTERNATIVE_PRIORITY of bash > ALTERNATIVE_PRIORITY of busybox,
the symlink from /bin/sh to bash can be yet overwritten by busybox.

(From OE-Core rev: 6ef650359cc2a49376eb5ca92bc97b34cdd82862)

Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09 09:53:14 +01:00
Drew Moseley e4ec48a2e0 busybox: Specify '-nostdlib' when linking to a .o file.
Ensure that linking to the built-in.a file uses the 'nostlib'
option.  Submitted to busybox mailing list here:

    http://lists.busybox.net/pipermail/busybox/2014-March/080730.html

This has been accepted into upstream busybox so it will not be needed
for future versions.

(From OE-Core rev: fdfff57304e6641ef5a8db0fb456bfd46bf1e2dd)

Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-05 23:24:01 +01:00
Drew Moseley 32acba5f62 busybox: Use CCLD
Use the CCLD variable to ensure proper tuning parameters.
Notably when building on a x86-64 host with an i686 toolchain
there is an error building built-in.o because it is trying to
link 32-bit and 64-bit object files:

     i686-pc-linux-gnu-ld --sysroot=/work/dmoseley/Mentor/amd-2014.05/build.genericx86-64-external/tmp/sysroots/genericx86-64     -r -o applets/built-in.o applets/ap
     i686-pc-linux-gnu-ld: Relocatable linking with relocations from format elf64-x86-64 (applets/applets.o) to format elf32-i386 (applets/built-in.o) is not support
     make[1]: *** [applets/built-in.o] Error 1

(From OE-Core rev: 088d2f0185da6648305b4719ee9cb0d2f2b37c6f)

Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-05 23:24:01 +01:00
Jonathan Liu 24979a1f7e busybox: disable fsck.minix and mkfs.minix
The MINIX and MINIX 2 filesystems are not really used anymore.

(From OE-Core rev: 4a47c943a76e79af82d47d8fa83c6687e0d915a0)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-23 09:08:54 +00:00
Matthieu Crapet b88321ac78 recipes: convert remaining SUMMARY/DESCRIPTION cosmetic issues (part 2)
Completes previous commit b5292d4115a4555a66b5e35acdc67dd71fb8577f.
Updates SUMMARY[doc] (meta/conf/documentation.conf).

Changes:
- rename DESCRIPTION with length < 80 to (non present tag) SUMMARY
- drop final point character at the end of SUMMARY string
- remove trailing whitespace of SUMMARY line

Note: don't bump PR

(From OE-Core rev: ad17dfd31a2b97b3e610a0ea0889f5ecb2a63b97)

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-20 14:28:13 +00:00
Chen Qi d5909eb578 busybox-syslog: add more comments to systemd configuration file
Add more comments to the systemd configuration file for busybox's
syslogd utility. The purpose is to easy the life of system administrators.

These comments are mostly derived from the comments in syslogd.c in
busybox.

[YOCTO #5722]

(From OE-Core rev: eba4f2bd2a0becc086f107dbd0d3ec5222c5eed2)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-13 11:41:22 +00:00
Chen Qi b1ea345537 busybox: upgrade to stable 1.22.1
Upgrade busybox to the stable release 1.22.1.

During this upgrade, 9 patches are removed. Reasons are detailed below.

The following 6 patches are removed as they have been merged.
    meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch
    meta/recipes-core/busybox/busybox/busybox-list-suid-and-non-suid-app-configs.patch
    meta/recipes-core/busybox/busybox/busybox-sed-fix-sed-clusternewline-testcase.patch
    meta/recipes-core/busybox/busybox/busybox-sulogin-empty-root-password.patch
    meta/recipes-core/busybox/busybox/find-get-rid-of-nested-functions.patch
    meta/recipes-core/busybox/busybox/testsuite-du-du-k-works-fix-false-positive.patch

The following three patches are removed because they are mainly about moving
binaries from /bin to /usr/bin to make the update-alternative work correctly
at rootfs time. We can easily solve this problem by changing recipes. There's
no compelling reason why such patches are needed.
    meta/recipes-core/busybox/busybox/run-parts.in.usr-bin.patch
    meta/recipes-core/busybox/busybox/stat-usr-bin.patch
    meta/recipes-core/busybox/busybox/watch.in.usr-bin.patch

(From OE-Core rev: fa282186d82e8fe3c590d4ea79e464116e5ceea2)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:22:12 +00:00
Ming Liu 7be3064bf5 busybox: lineedit: initialize delptr
In vi mode, the 'p' and 'P' commands caused a segfault when nothing had
been put in the buffer yet because the delptr was not initialized.

(From OE-Core rev: 21ba0297409bfc6e0fb89f45c9bfed8981c7df5b)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-10 15:16:50 +00:00
Chen Qi 2b702032fa busybox: enable SEAMLESS_XZ by default
We have enabled SEAMLESS_GZ and SEAMLESS_BZ2 in defconfig, it's
reasonable for us to enable SEAMLESS_XZ as well. Otherwise, we
couldn't extract tar.xz file while we could extract tar.gz file.
Such situation would be somewhat confusing.

(From OE-Core rev: 6482a43211a3a4858030ae3c59f5726c0ccba261)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-10 15:16:50 +00:00
Muhammad Tauqir Ahmad 8babb8ff17 busybox: get rid of nested functions in find
This allows us to compile busybox using clang. Nested functions is
a gcc extension not supported by clang.

(From OE-Core rev: d2bf599f36ed1a04c661fc0a71e664e219532cbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-16 12:13:58 +00:00
Richard Purdie 6ab56c54f3 classes/recipes: More optimal DISTRO_FEATURES references
Using the contains function results in more optimal sstate checksums
resulting in better cache reuse as we as more consistent code.

(From OE-Core rev: 9c93526756e7cbbff027c88eb972f877bcb1f057)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:24:43 +00:00
Chen Qi 3c182d2208 busybox: add busybox_git.bb recipe
Add busybox_git.bb recipe so that it would be easier to hack with
busybox. Set DEFAULT_PREFERENCE to "-1" in the git recipe so that we
still use the busybox_1.21.1.bb recipe by default.

(From OE-Core rev: d290bbe6d9826fbcfa2e0a7624886284697ed7eb)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-30 22:26:27 +00:00
Jackie Huang 660304f1bd busybox: fix sed auto insert newline testcase
backport the patch from busybox upstream to fix the
auto insert newline issue.

busybox defect:
https://bugs.busybox.net/show_bug.cgi?id=6584

(From OE-Core rev: db00fa405c025c61844df2e9589fe635fc5df0e2)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01 11:09:05 +00:00
Richard Purdie 5e42796675 recipes: Remove PR = r0 from all recipes
Remove all PR = "r0" from all .bb files in oe-core. This was done
with the command sed -e '/^PR.*=.*r0\"/d' recipes*/*/*.bb -i

We've switching to the PR server, PR bumps are no longer needed and
this saves people either accidentally bumping them or forgetting to
remove the lines (r0 is the default anyway).

(From OE-Core rev: 58ae94f1b06d0e6234413dbf9869bde85f154c85)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30 14:52:04 +00:00
Saul Wold 72b5535ff2 busybox: Add depmod (adds 2240 bytes)
This will allow packages that update kernel modules to run correctly

(From OE-Core rev: 72c23255cc88b5e2cd6f783231e6f42bf5190df7)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16 13:31:37 +01:00
Eric Bénard 5454f92e57 busybox: update mdev.conf
busybox 1.21.1 's mdev has changed the way the device's name is
reported so now we get input/event0 instead of event0.
I think this commit is responsible of this new behaviour :
http://git.busybox.net/busybox/commit/util-linux/mdev.c?id=c3cf1e30a3022453311a7e9fe11d94c7a381640e

Update mdev.conf according to this behaviour so that sound
and input devices are correctly populated (and now
/etc/mdev/find-touchscreen.sh is executed).

Tested on an arm board.

(From OE-Core rev: 61b2950ebbc01f5e4fd7aece05bf371100c0c390)

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-26 16:37:56 +01:00
Hongxu Jia 44c65db250 busybox: move su to /bin for lsb command check test
In busybox, util-linux and shadow, su has been moved to /usr/bin/,
but lsb cmdchk needs su in /bin.

Move su to /bin could fix this issue.

[YOCTO#5175]

(From OE-Core rev: daff19fe6f0490dc7036602e8b0ca40a23b55556)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17 19:34:54 +01:00
Chen Qi 101662d357 busybox-syslog: add configuration file /etc/syslog.conf
By default, busybox has CONFIG_FEATURE_SYSLOGD_CFG enabled, but it
doesn't ship a configuration file.

This patch adds a configuration file (/etc/syslog.conf) to the
busybox-syslog package. This configuration file mainly serves as a
placeholder now.

The advantages of this change are:
1. Make the users aware of the fact that the /etc/syslog.conf file
   will actually be parsed by busybox's syslogd utility. And configuring
   that file will change the logging behaviour.
2. In a systemd based system, this file will prevent the same configuration
   file provided by the sysklogd package from messing things up.

[YOCTO #5066]

(From OE-Core rev: b7f6688f0700a1575037362af7a8ca94dccce471)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06 23:03:21 +01:00
Chen Qi abfe9af9e5 busybox: configure system user id to range from 100 to 999
Previously, the range was 0 to 0. This made it impossible to use
busybox's adduser utility to add a system user. The following error
would appear.

      adduser: no uids left

This patch fixes this problem by giving it a reasonable range.

(From OE-Core rev: c4555007d04ccacbc192827b70a97f9a48500a22)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30 16:23:46 +01:00
Paul Eggleton 3095ee5154 busybox: set default log buffer size to 64 at compile time
This provides a more reasonable log buffer size to avoid losing earlier
events, and 64K is not a problem for modern systems. When the buffer is
used on sysvinit-based systems, which it isn't by default, 64K is already
the runtime default size unless /etc/syslog-startup.conf is modified or
deleted, so this only really affects systems using systemd. This
completely removes the need for the busybox bbappend in meta-oe.

(From OE-Core rev: 6d6a3f805b0fad6f904afb52dc12bfb543e3eec5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30 16:23:43 +01:00
Paul Eggleton b18b210c1e busybox: enable shared memory logging for systemd
The default command-line options for launching busybox's syslogd are
"-C" if using sysvinit; but because we use /etc/default/busybox-syslog
when using systemd which the sysvinit initscript doesn't use, and no
/etc/default/busybox-syslog is installed by default in OE-Core, the
default arguments with systemd were no arguments at all with OE-Core
alone. Effectively merge in the bbappend from meta-oe that adds a
default file in order to set the default options to "-C" for systemd as
well.

(From OE-Core rev: a23aa8e7467cf2b7f4e8ff85a3aa841ff6b508e5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26 11:47:19 +01:00
Florin Sarbu 02521a40d3 busybox.inc: Avoid error when SYSLOG is not enabled
Add -f to rm of ${D}${sysconfdir}/syslog-startup.conf.${BPN} so as to
not error out when the busybox config used does not have SYSLOG enabled
and DISTRO_FEATURES does not contain sysvinit.

(From OE-Core rev: 4c5756149754d0b18b14595db335f8f5e14cc0a3)

Signed-off-by: Florin Sarbu <florin.sarbu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22 15:11:13 +01:00
Chen Qi 86d8d89c21 busybox: remove syslog-startup.conf if sysvinit not in DISTRO_FEATURES
sysvinit and systemd have different ideas about configuration files (or
environment files in systemd), so basically we can't use the same one in
both cases.

To avoid confusion, this patch removes syslog-startup.conf if 'sysvinit'
is not in DISTRO_FEATURES.

[YOCTO #4837]
[YOCTO #4860]

(From OE-Core rev: 89f62147a61108b4be40001e1fbe3be33bacf00b)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-12 13:09:52 +01:00
Hongxu Jia 16ce101c3f busybox: move /bin/su to /usr/bin/su to match util-linux and shadow
Both of util-linux and shadow have su binary in /usr/bin, fix busybox
to use the same path so they can be properly tracked by alternatives.

[YOCTO #4926]

(From OE-Core rev: e01735756a76d27b724b9e7829f78e8a335c1f60)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:58 +01:00
Muhammad Shakeel fe378e1d46 busybox: Add syslog-init alternative only if SysV in enabled
If systemd is enabled then syslog is handled through a service file
and related files in /etc/init.d are removed. This removes following
warning:

WARNING: busybox: NOT adding alternative provide /etc/init.d/syslog:
/etc/init.d/syslog.busybox does not exist

(From OE-Core rev: 29c3ecee32d9bfb03099a4f10456fd0270e107fb)

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:56 +01:00
Mark Hatle e9b5ef1c20 busybox: fix ip reference in simple.script
The ip is being installed into /sbin as of the latest busybox.

(From OE-Core rev: 222ae6001db286d66462c6334f7f054ca727b7be)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-18 21:23:42 +01:00
Chen Qi 131e5e7e8f busybox: upgrade to stable 1.21.1
Merged or backported patches are dropped.
The wget_dl_dir_fix.patch was submitted more than 1 year ago, it's
about the -P option behavior, and it's not accepted, so I dropped
this patch too.

(From OE-Core rev: a2f31a6a6accb8eee2084cb39edb8e9af4b4189f)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:44:13 +01:00
Chen Qi cb53421428 busybox: fix the on-target upgrade problem
We now can have a 'one-binary' version of busybox, or 'two-binary'
version of busybox, controlled by the 'BUSYBOX_SPLIT_SUID' variable.
This makes on-target upgrade a problem, as we have to support the
following four upgrading paths.

For convenience, in the following context, A is used to denote a
'two-binary' version of busybox while B is used to denote a 'one-binary'
version of busybox.

A --(upgrade)--> B
B --(upgrade)--> A
A --(upgrade)--> A
B --(upgrade)--> B

This patch makes effort to support the above four situations.

[YOCTO #4802]

(From OE-Core rev: 4e571e97750f3ac6a62cd0d2d10c08be98230630)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:34:21 +01:00
Björn Stenberg 67d95bffa9 busybox: Add ptest
Install busybox test suite and run it as ptest.

(From OE-Core rev: 0d29dc5b5f7742df60fdba90835ef77425963bde)

Signed-off-by: Anders Roxell <anders.roxell@enea.com>
Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:44:58 +01:00
Chen Qi 680ff5552d busybox: add the ability to split the busybox binary
This patch enables us to split the busybox into two binaries, one
containing suid applications, and the other containing nosuid apps.

Add a variable, BUSYBOX_SPLIT_SUID, to control whether to split the
busybox binary into two parts. We default it to "1" to enable the
splitting, but users could still override it to disable the splitting.
After all, busybox has no internal support for this suid apps splitting,
so there might be users out there who want just one busybox binary.

The basic idea here is to build the busybox twice, each with the correct
configuration items. We extract the non-app part of the original .config
file, and merge this part with the suid-app part to form a .config which
contains only suid apps. The same strategy applies to the non-suid apps.

[YOCTO #4207]

(From OE-Core rev: e5a1442819dfb74e86a6f69da008ba6908c8bbc7)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:44:52 +01:00
Chen Qi 72d5bbe59e busybox: enable to list suid and non-suid app configs
This patch, written by Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
adds the ability to busybox to list configuration items of suid apps
and non-suid apps separately.

`make busybox.cfg.suid' generates a file containing config items of the
suid apps.

'make busybox.cfg.nosuid' generates a file containing config items of
the non-suid apps.

This patch helps to separate busybox into two binaries, the suid one and
the non-suid one.

[YOCTO #4207]

(From OE-Core rev: 832d1b5575c76f61623f2e0337554287d056422b)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:44:52 +01:00
Chen Qi 3d230db5c4 busybox: add a config fragment to enable login utilities
Create a config fragment to enable the login/passwd utilities of busybox.

[YOCTO #4207]

(From OE-Core rev: 2a37490d4d55a1a6e4c4d268231a9d8904d38f8b)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:44:51 +01:00
Chen Qi 726483741a busybox: add support for CONFIG_FEATURE_INDIVIDUAL
Previously, if CONFIG_FEATURE_INDIVIDUAL was enabled for busybox,
yocto-based systems could start correctly.

This is because if busybox is built as individual apps, '/bin/busybox'
may not be present, so setting the default ALTERNATIVE_TARGET to
'/bin/busybox' is not appropriate and could lead to errors.

This patch fixes this problem by checking the existence of '/bin/busybox'
before setting the ALTERNATIVE_TARGET to '/bin/busybox'.

After this change, if busybox is built as individual apps, we'll have
links like '/bin/ls -> /bin/ls.busybox', otherwise, we'll have links
like '/bin/ls -> /bin/busybox'.

Note there's a grep expression change in this patch. The old expression
doesn't work well, it has an unwanted underscore, so I changed it to make
it work.

[YOCTO #4570]

(From OE-Core rev: 87efa83191f0b4f4cec3a821b6dfe425c781c077)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:44:51 +01:00
Chen Qi 6984890b2e busybox: remove the postinst part of the recipe
Remove the pkg_postinst_${PN} from this recipe, as it's redundant.
It basically wants to do the same thing as the update-alternatives
does. But it doesn't do it well.

(From OE-Core rev: 5b961afc784747eb8240540e542a789849118596)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:44:51 +01:00
Jonathan Liu 4380876084 busybox: backport sulogin empty root password fix
This allows system maintenance login if the root password is empty.

(From OE-Core rev: 28bb8fe5c144e02c28bff54b5b81c8da33b9f58b)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:46 +01:00
Mike Looijmans 39537e01a5 busybox-mdev: Startup at level S03 instead of S06
The udev hotplug deamon starts at 03, so mdev should start at the same
point.

This fixes the bug that when modutils (runs at 04) initializes devices
that the mdev hotplug will often not pick them up, resulting in missing
device nodes and similar problems.

(From OE-Core rev: 18d3e5eb9102a984d00837f8fec16fda522c511a)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:49 +03:00
Richard Purdie 566628d8cd class/lib: Fix up various file access methods
There are various bits of cruft that have built up around our file accesses. This patch
cleans some of them up, specifically:

 * Remove pointless "from __builtin__ import file"
 * Use open(), not file()
 * Wrap file usage in a with container to ensure files are closed
 * Add missing .close() calls in some cases

(From OE-Core rev: a43e0a8ecd0441131e929daf998c3cd454d9c8f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Ross Burton 09b89187b8 busybox: hard-code the syslog service file
Previously this was using ${PN}-syslog.service, which changes with multilib.

(From OE-Core rev: ee36f997e68f5a995baf361191cef7a46ff51203)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 00:37:58 +01:00
Laurentiu Palcu ef0e1cc32d busybox: fix mount issue
When the mount command is not given the filesystem type to mount, then
it will try all the known filesystems. However, when a filesystem is not
supported by the kernel, the mount function call will return ENODEV.

The following patch, ecd90bc6aa,
introduced a problem because it bailed out on ENODEV too. Instead it should
have only bailed out on ENOMEDIUM.

[YOCTO #4308]

(From OE-Core rev: 82320d2074572477f26887eddc51dc2a1dfea403)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 00:37:57 +01:00
Ting Liu aa1d7fa9ce busybox: Add inetd related files
Add back inetd and inetd.conf files which are needed if
CONFIG_INETD is enabled in the defconfig. Grabbed these
files from oe-classic

This patch is based on the previous patch for denzil:
http://patches.openembedded.org/patch/33235/

(From OE-Core rev: 929c738787b6f513ce235ed5f7753408a570d632)

Signed-off-by: Ting Liu <b28495@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:30 +01:00
Ting Liu fc30d72a73 busybox: detects customized configs when do_install
After using 'bitbake -c menuconfig busybox' to customize defconfig,
do_install fail to detect the changes. Grep configs in ${B}/.config
instead of ${WORKDIR}/defconfig.

(From OE-Core rev: 5c088c2d3b23026752649d077ee44fe3dbe26aa4)

Signed-off-by: Ting Liu <b28495@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:30 +01:00
Saul Wold ecd90bc6aa busybox: fail on no media
The current behaviour of busybox is to try all fstype when automounting
even when no media exists.  The util-linux mount command bails when no
media exists, so change the behaviour of busybox to do the same.

It could also be argued that the KERN_INFO message from btrfs could be
removed, but that would be harder to accomplish.

(From OE-Core rev: e5403f55a1e9b1747535450fd95f499c85211771)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 12:56:52 +01:00
Ross Burton ce10e5f34a busybox: order and group initscript variables logically
(From OE-Core rev: 94acb39385a14d54503db08351a717449e2d4b50)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:04 +00:00
Ross Burton c2aab97e96 busybox: add strictatime support to mount
systemd uses strictatime when mounting tmpfs.  Luckily this is already supported
upstream, so backport the patch from git.

(From OE-Core rev: 7379a5a2035ef670329551783c372d9310ddd983)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:02 +00:00
Radu Moisan 58a6a7c056 busybox: enable systemd integration for syslogd
(From OE-Core rev: cf3618f9a57e46fb78d5be35d473e2dd5290e961)

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:01 +00:00
Ross Burton 03e13d8d6d busybox: enable swapon -p (91 byte increase)
systemd needs "swapon -p", so as the impact is minimal enable it unversally.

(From OE-Core rev: acc5e9b4f43a382e56c0af1fae492cd0aaa80230)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-15 01:53:03 +00:00
Chen Qi b1c887277c hwclock.sh: check for the existence of /etc/default/rcS
/etc/default/rcS might be missing if the init manager is not sysvinit.
So we have to check for the existence of this file before sourcing it.

[YOCTO #3697]

(From OE-Core rev: 416519ec595f59ebeafb95bed2546635cad41559)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-22 06:09:22 -08:00
Chen Qi 56dc1720ca busybox: add config fragments
Add config fragments to busybox.

The implementation makes use of merge_config.sh script in kern-tools-native.
The use case is similar to the yocto kernel's configuration fragments.

We also add kern-tools-native to busybox's DEPENDS variable to ensure
that merge_config.sh is available when required.

[YOCTO #3379]

(From OE-Core rev: bbcd8b344598850ea2c8d3ad375c519713581fde)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:31 +00:00
Kang Kai 8f63fefa56 busybox: update test case du-k-works
busybox test case du-k-work fails on ext3/4 image whose size less than
512M. Add patch testsuite-du-du-k-works-fix-false-positive.patch to fix
it and it has been merged by upstream.

[Yocto 2896]

(From OE-Core rev: ffe4f8a859d5e71e3e33363d61f0470a32c48d66)

(From OE-Core rev: 19eb2971c6e8c4a2847897919ec7a2cd9b1697b1)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:29 +00:00