1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR
)/rules.mk
9 PKG_HASH
:= b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314
10 PKG_DESCR
:= core utilities for embedded systems
11 PKG_SECTION
:= base
/apps
12 PKG_URL
:= http
://www.busybox.net
/
13 PKG_SITES
:= https
://www.busybox.net
/downloads
/
15 DISTFILES
:= ${PKG_NAME}-${PKG_VERSION}.
tar.bz2
17 include $(ADK_TOPDIR
)/mk
/package.mk
19 $(eval
$(call PKG_template
,BUSYBOX
,busybox
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
22 TARGET_CFLAGS
:= $(filter-out -flto
,$(TARGET_CFLAGS
))
26 INSTALL_STYLE
:= manual
29 ARCH
="${ADK_TARGET_ARCH}" \
30 IPKG_ARCH
="${ADK_TARGET_CPU_ARCH}" \
31 HOSTCC
="${CC_FOR_BUILD}" \
32 HOSTCFLAGS
="$(CFLAGS_FOR_BUILD)" \
33 CROSS_COMPILE
="$(TARGET_CROSS)" \
37 # get all symbols from top level config
38 grep
"^BUSYBOX_\|# BUSYBOX" $(ADK_TOPDIR
)/.config|grep
-v BUSYBOX_DISABLE|sed
-e
's/BUSYBOX_/CONFIG_/' > \
40 # convert all disabled symbols
41 for i in
$$(grep ^BUSYBOX_DISABLE
$(ADK_TOPDIR
)/.config
);do \
42 sym
=$${i
#BUSYBOX_DISABLE_}; \
43 symbol
=$$(echo
$$sym|sed
-e
"s#=y##"); \
46 printf
"# CONFIG_GREP is not set\n" >> ${WRKBUILD}/.config
; \
47 printf
"# CONFIG_EGREP is not set\n" >> ${WRKBUILD}/.config
; \
48 printf
"# CONFIG_FGREP is not set\n" >> ${WRKBUILD}/.config
; \
51 printf
"# CONFIG_MODINFO is not set\n" >> ${WRKBUILD}/.config
; \
52 printf
"# CONFIG_MODPROBE_SMALL is not set\n" >> ${WRKBUILD}/.config
; \
53 printf
"# CONFIG_INSMOD is not set\n" >> ${WRKBUILD}/.config
; \
54 printf
"# CONFIG_RMMOD is not set\n" >> ${WRKBUILD}/.config
; \
55 printf
"# CONFIG_LSMOD is not set\n" >> ${WRKBUILD}/.config
; \
56 printf
"# CONFIG_MODPROBE is not set\n" >> ${WRKBUILD}/.config
; \
57 printf
"# CONFIG_DEPMOD is not set\n" >> ${WRKBUILD}/.config
; \
60 printf
"# CONFIG_$${symbol} is not set\n" >> ${WRKBUILD}/.config
; \
64 $(SED
) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
67 PATH
='$(HOST_PATH)' $(MAKE
) ${BB_MAKE_FLAGS} -C
${WRKBUILD} busybox
70 PATH
='$(HOST_PATH)' $(MAKE
) ${BB_MAKE_FLAGS} -C
${WRKBUILD} install $(MAKE_TRACE
)
71 $(CP
) $(WRKINST
)/* $(IDIR_BUSYBOX
)/
72 ifeq ($(BUSYBOX_IFUP
),y
)
73 $(INSTALL_DIR
) $(IDIR_BUSYBOX
)/etc
/init.d
74 ifeq ($(ADK_RUNTIME_WAIT_FOR_ETHERNET
),y
)
75 $(INSTALL_BIN
) .
/files
/network.wait
$(IDIR_BUSYBOX
)/etc
/init.d
/network
77 $(INSTALL_BIN
) .
/files
/network
$(IDIR_BUSYBOX
)/etc
/init.d
/network
81 ${INSTALL_BIN} $(WRKBUILD
)/busybox_unstripped \
82 $(IDIR_BUSYBOX
)/bin
/busybox
84 ifneq ($(strip ${ADK_PACKAGE_CFGFS}),)
85 cd
${IDIR_BUSYBOX}/sbin
&& rm -f halt poweroff reboot
88 include ${ADK_TOPDIR}/mk
/pkg-bottom.mk