diff options
Diffstat (limited to 'meta/recipes-core/busybox/busybox.inc')
-rw-r--r-- | meta/recipes-core/busybox/busybox.inc | 64 |
1 files changed, 38 insertions, 26 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index f5d7c3f9c8..4ebaeb92c9 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc | |||
@@ -7,7 +7,7 @@ DEPENDS += "kern-tools-native virtual/crypt" | |||
7 | 7 | ||
8 | # bzip2 applet in busybox is based on lightly-modified bzip2-1.0.4 source | 8 | # bzip2 applet in busybox is based on lightly-modified bzip2-1.0.4 source |
9 | # the GPL is version 2 only | 9 | # the GPL is version 2 only |
10 | LICENSE = "GPL-2.0-only & bzip2-1.0.4" | 10 | LICENSE = "GPL-2.0-only & bzip2-1.0.6" |
11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=de10de48642ab74318e893a61105afbb \ | 11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=de10de48642ab74318e893a61105afbb \ |
12 | file://archival/libarchive/bz/LICENSE;md5=28e3301eae987e8cfe19988e98383dae" | 12 | file://archival/libarchive/bz/LICENSE;md5=28e3301eae987e8cfe19988e98383dae" |
13 | 13 | ||
@@ -16,6 +16,7 @@ SECTION = "base" | |||
16 | # Whether to split the suid apps into a seperate binary | 16 | # Whether to split the suid apps into a seperate binary |
17 | BUSYBOX_SPLIT_SUID ?= "1" | 17 | BUSYBOX_SPLIT_SUID ?= "1" |
18 | 18 | ||
19 | CFLAGS:append:toolchain-clang = " -DBB_GLOBAL_CONST=''" | ||
19 | export EXTRA_CFLAGS = "${CFLAGS}" | 20 | export EXTRA_CFLAGS = "${CFLAGS}" |
20 | export EXTRA_LDFLAGS = "${LDFLAGS}" | 21 | export EXTRA_LDFLAGS = "${LDFLAGS}" |
21 | 22 | ||
@@ -24,7 +25,14 @@ EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${ | |||
24 | PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" | 25 | PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" |
25 | 26 | ||
26 | FILES:${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" | 27 | FILES:${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" |
27 | FILES:${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_system_unitdir}/syslog.service ${sysconfdir}/default/busybox-syslog" | 28 | FILES:${PN}-syslog = "\ |
29 | ${sysconfdir}/init.d/syslog* \ | ||
30 | ${sysconfdir}/syslog-startup.conf* \ | ||
31 | ${sysconfdir}/syslog.conf* \ | ||
32 | ${systemd_system_unitdir}/syslog.service \ | ||
33 | ${systemd_system_unitdir}/busybox-klogd.service \ | ||
34 | ${sysconfdir}/default/busybox-syslog \ | ||
35 | " | ||
28 | FILES:${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*" | 36 | FILES:${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*" |
29 | FILES:${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" | 37 | FILES:${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" |
30 | FILES:${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" | 38 | FILES:${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" |
@@ -114,7 +122,7 @@ do_prepare_config () { | |||
114 | export KCONFIG_NOTIMESTAMP=1 | 122 | export KCONFIG_NOTIMESTAMP=1 |
115 | 123 | ||
116 | sed -e '/CONFIG_STATIC/d' \ | 124 | sed -e '/CONFIG_STATIC/d' \ |
117 | < ${WORKDIR}/defconfig > ${S}/.config | 125 | < ${UNPACKDIR}/defconfig > ${S}/.config |
118 | echo "# CONFIG_STATIC is not set" >> .config | 126 | echo "# CONFIG_STATIC is not set" >> .config |
119 | for i in 'CROSS' 'DISTRO FEATURES'; do echo "### $i"; done >> \ | 127 | for i in 'CROSS' 'DISTRO FEATURES'; do echo "### $i"; done >> \ |
120 | ${S}/.config | 128 | ${S}/.config |
@@ -215,10 +223,14 @@ do_install () { | |||
215 | sed -i "s:^/usr/bin/:BINDIR/:" busybox.links* | 223 | sed -i "s:^/usr/bin/:BINDIR/:" busybox.links* |
216 | sed -i "s:^/usr/sbin/:SBINDIR/:" busybox.links* | 224 | sed -i "s:^/usr/sbin/:SBINDIR/:" busybox.links* |
217 | 225 | ||
218 | # Move arch/link to BINDIR to match coreutils | 226 | # Move arch/base32/link to BINDIR to match coreutils |
219 | sed -i "s:^BASE_BINDIR/arch:BINDIR/arch:" busybox.links* | 227 | sed -i "s:^BASE_BINDIR/arch:BINDIR/arch:" busybox.links* |
228 | sed -i "s:^BASE_BINDIR/base32:BINDIR/base32:" busybox.links* | ||
220 | sed -i "s:^BASE_BINDIR/link:BINDIR/link:" busybox.links* | 229 | sed -i "s:^BASE_BINDIR/link:BINDIR/link:" busybox.links* |
221 | 230 | ||
231 | # Move start-stop-daemon to SBINDIR to match dpkg | ||
232 | sed -i "s:^BASE_SBINDIR/start-stop-daemon:SBINDIR/start-stop-daemon:" busybox.links* | ||
233 | |||
222 | sed -i "s:^BASE_BINDIR/:${base_bindir}/:" busybox.links* | 234 | sed -i "s:^BASE_BINDIR/:${base_bindir}/:" busybox.links* |
223 | sed -i "s:^BASE_SBINDIR/:${base_sbindir}/:" busybox.links* | 235 | sed -i "s:^BASE_SBINDIR/:${base_sbindir}/:" busybox.links* |
224 | sed -i "s:^BINDIR/:${bindir}/:" busybox.links* | 236 | sed -i "s:^BINDIR/:${bindir}/:" busybox.links* |
@@ -280,67 +292,67 @@ do_install () { | |||
280 | fi | 292 | fi |
281 | 293 | ||
282 | if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then | 294 | if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then |
283 | install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog | 295 | install -m 0755 ${UNPACKDIR}/syslog ${D}${sysconfdir}/init.d/syslog |
284 | install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf | 296 | install -m 644 ${UNPACKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf |
285 | install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf | 297 | install -m 644 ${UNPACKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf |
286 | fi | 298 | fi |
287 | if grep -q "CONFIG_CROND=y" ${B}/.config; then | 299 | if grep -q "CONFIG_CROND=y" ${B}/.config; then |
288 | install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ | 300 | install -m 0755 ${UNPACKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ |
289 | fi | 301 | fi |
290 | if grep -q "CONFIG_HTTPD=y" ${B}/.config; then | 302 | if grep -q "CONFIG_HTTPD=y" ${B}/.config; then |
291 | install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ | 303 | install -m 0755 ${UNPACKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ |
292 | install -d ${D}/srv/www | 304 | install -d ${D}/srv/www |
293 | fi | 305 | fi |
294 | if grep -q "CONFIG_UDHCPD=y" ${B}/.config; then | 306 | if grep -q "CONFIG_UDHCPD=y" ${B}/.config; then |
295 | install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ | 307 | install -m 0755 ${UNPACKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ |
296 | fi | 308 | fi |
297 | if grep -q "CONFIG_HWCLOCK=y" ${B}/.config; then | 309 | if grep -q "CONFIG_HWCLOCK=y" ${B}/.config; then |
298 | install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ | 310 | install -m 0755 ${UNPACKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ |
299 | fi | 311 | fi |
300 | if grep -q "CONFIG_UDHCPC=y" ${B}/.config; then | 312 | if grep -q "CONFIG_UDHCPC=y" ${B}/.config; then |
301 | install -d ${D}${sysconfdir}/udhcpc.d | 313 | install -d ${D}${sysconfdir}/udhcpc.d |
302 | install -d ${D}${datadir}/udhcpc | 314 | install -d ${D}${datadir}/udhcpc |
303 | install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default | 315 | install -m 0755 ${UNPACKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default |
304 | sed -i "s:/SBIN_DIR/:${base_sbindir}/:" ${D}${sysconfdir}/udhcpc.d/50default | 316 | sed -i "s:/SBIN_DIR/:${base_sbindir}/:" ${D}${sysconfdir}/udhcpc.d/50default |
305 | install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script | 317 | install -m 0755 ${UNPACKDIR}/default.script ${D}${datadir}/udhcpc/default.script |
306 | fi | 318 | fi |
307 | if grep -q "CONFIG_INETD=y" ${B}/.config; then | 319 | if grep -q "CONFIG_INETD=y" ${B}/.config; then |
308 | install -m 0755 ${WORKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${BPN} | 320 | install -m 0755 ${UNPACKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${BPN} |
309 | sed -i "s:/usr/sbin/:${sbindir}/:" ${D}${sysconfdir}/init.d/inetd.${BPN} | 321 | sed -i "s:/usr/sbin/:${sbindir}/:" ${D}${sysconfdir}/init.d/inetd.${BPN} |
310 | install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/ | 322 | install -m 0644 ${UNPACKDIR}/inetd.conf ${D}${sysconfdir}/ |
311 | fi | 323 | fi |
312 | if grep -q "CONFIG_MDEV=y" ${B}/.config; then | 324 | if grep -q "CONFIG_MDEV=y" ${B}/.config; then |
313 | install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev | 325 | install -m 0755 ${UNPACKDIR}/mdev ${D}${sysconfdir}/init.d/mdev |
314 | if grep "CONFIG_FEATURE_MDEV_CONF=y" ${B}/.config; then | 326 | if grep "CONFIG_FEATURE_MDEV_CONF=y" ${B}/.config; then |
315 | install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf | 327 | install -m 644 ${UNPACKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf |
316 | install -d ${D}${sysconfdir}/mdev | 328 | install -d ${D}${sysconfdir}/mdev |
317 | install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev | 329 | install -m 0755 ${UNPACKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev |
318 | install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev | 330 | install -m 0755 ${UNPACKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev |
319 | fi | 331 | fi |
320 | fi | 332 | fi |
321 | if grep -q "CONFIG_INIT=y" ${B}/.config && ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','busybox','true','false',d)}; then | 333 | if grep -q "CONFIG_INIT=y" ${B}/.config && ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','busybox','true','false',d)}; then |
322 | install -D -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS | 334 | install -D -m 0755 ${UNPACKDIR}/rcS ${D}${sysconfdir}/init.d/rcS |
323 | install -D -m 0755 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK | 335 | install -D -m 0755 ${UNPACKDIR}/rcK ${D}${sysconfdir}/init.d/rcK |
324 | install -D -m 0755 ${WORKDIR}/rcS.default ${D}${sysconfdir}/default/rcS | 336 | install -D -m 0755 ${UNPACKDIR}/rcS.default ${D}${sysconfdir}/default/rcS |
325 | fi | 337 | fi |
326 | 338 | ||
327 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 339 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
328 | if grep -q "CONFIG_KLOGD=y" ${B}/.config; then | 340 | if grep -q "CONFIG_KLOGD=y" ${B}/.config; then |
329 | install -d ${D}${systemd_system_unitdir} | 341 | install -d ${D}${systemd_system_unitdir} |
330 | sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \ | 342 | sed 's,@base_sbindir@,${base_sbindir},g' < ${UNPACKDIR}/busybox-klogd.service.in \ |
331 | > ${D}${systemd_system_unitdir}/busybox-klogd.service | 343 | > ${D}${systemd_system_unitdir}/busybox-klogd.service |
332 | fi | 344 | fi |
333 | 345 | ||
334 | if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then | 346 | if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then |
335 | install -d ${D}${systemd_system_unitdir} | 347 | install -d ${D}${systemd_system_unitdir} |
336 | sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \ | 348 | sed 's,@base_sbindir@,${base_sbindir},g' < ${UNPACKDIR}/busybox-syslog.service.in \ |
337 | > ${D}${systemd_system_unitdir}/busybox-syslog.service | 349 | > ${D}${systemd_system_unitdir}/busybox-syslog.service |
338 | if [ ! -e ${D}${systemd_system_unitdir}/busybox-klogd.service ] ; then | 350 | if [ ! -e ${D}${systemd_system_unitdir}/busybox-klogd.service ] ; then |
339 | sed -i '/klog/d' ${D}${systemd_system_unitdir}/busybox-syslog.service | 351 | sed -i '/klog/d' ${D}${systemd_system_unitdir}/busybox-syslog.service |
340 | fi | 352 | fi |
341 | if [ -f ${WORKDIR}/busybox-syslog.default ] ; then | 353 | if [ -f ${UNPACKDIR}/busybox-syslog.default ] ; then |
342 | install -d ${D}${sysconfdir}/default | 354 | install -d ${D}${sysconfdir}/default |
343 | install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog | 355 | install -m 0644 ${UNPACKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog |
344 | fi | 356 | fi |
345 | fi | 357 | fi |
346 | fi | 358 | fi |