diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-12-15 08:28:29 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-12-15 08:28:29 +0100 |
commit | 3b3017702b1ef100c6ccf214cf3117bf5a069e4d (patch) | |
tree | 788d6bbb5c53eef3b5b640b582e6349dd9b32aee | |
parent | e106576e5f1e68c7796b172c303cd34df2939af1 (diff) |
BCM28XX uses mkknlimg which need GNU tr, check for it otherwise compile coreutils on host
-rw-r--r-- | package/coreutils/Makefile | 5 | ||||
-rwxr-xr-x | scripts/prereq.sh | 10 | ||||
-rw-r--r-- | target/arm/Makefile | 9 | ||||
-rw-r--r-- | target/config/Config.in.tools | 9 |
4 files changed, 25 insertions, 8 deletions
diff --git a/package/coreutils/Makefile b/package/coreutils/Makefile index 2f31e7921..e47471851 100644 --- a/package/coreutils/Makefile +++ b/package/coreutils/Makefile @@ -15,9 +15,11 @@ PKG_URL:= http://www.gnu.org/software/coreutils/ PKG_SITES:= http://ftp.gnu.org/gnu/coreutils/ PKG_BB:= 1 +include $(ADK_TOPDIR)/mk/host.mk include $(ADK_TOPDIR)/mk/package.mk -$(eval $(call PKG_template,COREUTILS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call HOST_template,COREUTILS,coreutils,$(PKG_VERSION)-${PKG_RELEASE})) +$(eval $(call PKG_template,COREUTILS,coreutils,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) AUTOTOOL_STYLE:= autoreconf CONFIGURE_ARGS+= --disable-rpath @@ -30,4 +32,5 @@ coreutils-install: $(CP) $(WRKINST)/usr/libexec/* \ $(IDIR_COREUTILS)/usr/sbin +include ${ADK_TOPDIR}/mk/host-bottom.mk include ${ADK_TOPDIR}/mk/pkg-bottom.mk diff --git a/scripts/prereq.sh b/scripts/prereq.sh index 744f39ac4..e585c36dc 100755 --- a/scripts/prereq.sh +++ b/scripts/prereq.sh @@ -450,6 +450,13 @@ if ! which qemu-img >/dev/null 2>&1; then host_build_qemu=1 fi +host_build_coreutils=0 +if which tr >/dev/null 2>&1; then + if ! tr --version 2>/dev/null|grep GNU >/dev/null;then + host_build_coreutils=1 + fi +fi + echo "config ADK_HOST_BUILD_TOOLS" > $topdir/target/config/Config.in.prereq printf "\t%s\n" "bool" >> $topdir/target/config/Config.in.prereq printf "\t%s\n" "default y" >> $topdir/target/config/Config.in.prereq @@ -521,6 +528,9 @@ fi if [ $host_build_qemu -eq 1 ]; then printf "\t%s\n" "select ADK_HOST_BUILD_QEMU if ADK_HOST_NEED_QEMU" >> $topdir/target/config/Config.in.prereq fi +if [ $host_build_coreutils -eq 1 ]; then + printf "\t%s\n" "select ADK_HOST_BUILD_COREUTILS if ADK_HOST_NEED_COREUTILS" >> $topdir/target/config/Config.in.prereq +fi # create Host OS symbols case $os in diff --git a/target/arm/Makefile b/target/arm/Makefile index 3bc254ca6..571f3a4a7 100644 --- a/target/arm/Makefile +++ b/target/arm/Makefile @@ -116,15 +116,10 @@ endif kernel-strip: @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL) -ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) - @echo adding DT trailer to kernel $(MAKE_TRACE) - -rm $(BUILD_DIR)/$(TARGET_KERNEL) - $(ADK_TOPDIR)/scripts/mkknlimg --dtok $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL) $(MAKE_TRACE) -endif -ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y) +ifeq ($(ADK_TARGET_BOARD_BCM28XX),y) @echo adding DT trailer to kernel $(MAKE_TRACE) -rm $(BUILD_DIR)/$(TARGET_KERNEL) - $(ADK_TOPDIR)/scripts/mkknlimg --dtok $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL) $(MAKE_TRACE) + PATH='$(HOST_PATH)' $(ADK_TOPDIR)/scripts/mkknlimg --dtok $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL) $(MAKE_TRACE) endif kernel-install: kernel-strip diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index d8bec818d..4c0830634 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -170,6 +170,15 @@ config ADK_HOST_BUILD_QEMU bool default n +config ADK_HOST_NEED_COREUTILS + bool + default y if ADK_TARGET_BOARD_BCM28XX + default n + +config ADK_HOST_BUILD_COREUTILS + bool + default n + # optional, must be used from OpenADK config ADK_HOST_NEED_MTD_UTILS bool |