From 8aed1fcd443b550c15a21ddbf1b1d3899803120a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 15:55:20 +0200 Subject: rework hosttools building, add tools into package stuff --- target/config/Config.in | 5 +++-- target/config/Config.in.tools | 32 ++++++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 8 deletions(-) (limited to 'target/config') diff --git a/target/config/Config.in b/target/config/Config.in index 794cc934f..2b9afa98e 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -786,7 +786,7 @@ config ADK_TARGET_ROOTFS_SQUASHFS config ADK_TARGET_ROOTFS_JFFS2 bool "Compressed read-write root filesystem (jffs2)" select ADK_KERNEL_JFFS2_FS - select ADK_HOST_NEED_JFFS2 + select ADK_HOST_NEED_MTD_UTILS select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU depends on ADK_TARGET_WITH_MTD help @@ -867,8 +867,9 @@ config ADK_TARGET_ROOTFS_ISO select ADK_KERNEL_JOLIET select ADK_KERNEL_SCSI select ADK_KERNEL_BLK_DEV_SR - select ADK_HOST_NEED_MKISOFS + select ADK_HOST_NEED_CDRTOOLS select ADK_HOST_NEED_SYSLINUX + select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU depends on ADK_HOST_LINUX depends on ADK_LINUX_X86 help diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index b232a3674..8ef6ee2d7 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -1,4 +1,24 @@ -config ADK_HOST_NEED_MKISOFS +config ADK_HOST_NEED_HEIRLOOM_CPIO + boolean + default y + +config ADK_HOST_NEED_BC + boolean + default y + +config ADK_HOST_NEED_MKCRYPT + boolean + default y + +config ADK_HOST_NEED_FILE + boolean + default y + +config ADK_HOST_NEED_BZIP2 + boolean + default n + +config ADK_HOST_NEED_CDRTOOLS boolean default n @@ -10,7 +30,7 @@ config ADK_HOST_NEED_SQUASHFS boolean default n -config ADK_HOST_NEED_JFFS2 +config ADK_HOST_NEED_MTD_UTILS boolean default n @@ -26,10 +46,6 @@ config ADK_HOST_NEED_LZMA boolean default n -config ADK_HOST_NEED_BZIP2 - boolean - default n - config ADK_HOST_NEED_XZ boolean default n @@ -42,6 +58,10 @@ config ADK_HOST_NEED_MKIMAGE boolean default n +config ADK_HOST_NEED_MKSH + boolean + default n + config ADK_HOST_NEED_PCRE boolean default y if ADK_HOST_DARWIN -- cgit v1.2.3 From 113a0add9081f04a0dc1f11ae47eb11fbe6b5512 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 17:08:52 +0200 Subject: remove performance killer on bootup --- package/base-files/Makefile | 3 +-- package/base-files/src/etc/mdev.conf | 1 - package/base-files/src/lib/mdev/init | 27 --------------------------- target/config/Config.in.runtime | 2 +- 4 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 package/base-files/src/lib/mdev/init (limited to 'target/config') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index e01edb042..e37fd26a1 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 80 +PKG_RELEASE:= 81 PKG_SECTION:= base PKG_DESCR:= basic files and scripts PKG_BUILDDEP:= pkgconf-host file-host @@ -55,7 +55,6 @@ endif mkdir -p $(IDIR_BASE_FILES)/{dev,boot,root,sys,proc,tmp,mnt} mkdir -p $(IDIR_BASE_FILES)/etc/network/{if-pre-up.d,if-up.d,if-down.d,if-post-down.d} mkdir -p $(IDIR_BASE_FILES)/usr/{lib,bin} - chmod 755 $(IDIR_BASE_FILES)/lib/mdev/init chmod 600 $(IDIR_BASE_FILES)/etc/shadow chmod 600 $(IDIR_BASE_FILES)/etc/network/interfaces (cd $(IDIR_BASE_FILES)/etc; ln -sf ../tmp/resolv.conf .) diff --git a/package/base-files/src/etc/mdev.conf b/package/base-files/src/etc/mdev.conf index fc63d80d9..0a24ef04b 100644 --- a/package/base-files/src/etc/mdev.conf +++ b/package/base-files/src/etc/mdev.conf @@ -15,4 +15,3 @@ snd/controlC0 root:audio 660 snd/pcmC0D0c root:audio 660 snd/pcmC0D0p root:audio 660 msr0 root:root 660 @(mkdir -p /dev/cpu/0 && ln -sf /dev/msr0 /dev/cpu/0/msr) -.* 0:0 644 @/lib/mdev/init diff --git a/package/base-files/src/lib/mdev/init b/package/base-files/src/lib/mdev/init deleted file mode 100644 index a478abecd..000000000 --- a/package/base-files/src/lib/mdev/init +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -if [ "$SUBSYSTEM" == "pcmcia_socket" ];then - logger "Setting up PCMCIA socket resource database" - if [ "$ACTION" == "add" ];then - /usr/sbin/pcmcia-socket-startup - fi -fi -if [ "$SUBSYSTEM" == "usb" ];then - if [ "$ACTION" == "add" ];then - if [ "$DEVTYPE" == "usb_device" ];then - if [ "$PRODUCT" == "12d1/1003/0" ];then - if [ ! -f /tmp/.huawei ];then - logger "USB device added with: $PRODUCT" - usbmods=$(lsmod|grep ^usbserial|awk '{ print $4 }'|sed -e 's/,/ /g') - for i in $usbmods;do rmmod $i;done - rmmod usbserial - lsmod >> /tmp/debug - test -x /sbin/huawei && /sbin/huawei >> /tmp/debug - insmod /lib/modules/$(uname -r)/usbserial.ko product=0x1003 vendor=0x12d1 - for i in $usbmods;do insmod /lib/modules/$(uname -r)/$i.ko; done - - touch /tmp/.huawei - fi - fi - fi - fi -fi diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime index a6f504a49..776a1a6f9 100644 --- a/target/config/Config.in.runtime +++ b/target/config/Config.in.runtime @@ -38,8 +38,8 @@ config ADK_RUNTIME_TIMEZONE choice prompt "Start getty or shell after bootup" -default ADK_RUNTIME_GETTY default ADK_RUNTIME_SHELL if ADK_PKG_TEST +default ADK_RUNTIME_GETTY config ADK_RUNTIME_GETTY boolean "start a getty after bootup" -- cgit v1.2.3 From 3b513e5acf1524d3974e90fdab332c2b794a622f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 18:12:41 +0200 Subject: build host tools on demand, when not available on the host --- .gitignore | 1 + mk/buildhlp.mk | 4 ++-- mk/vars.mk | 12 ++++++------ scripts/scan-tools.sh | 32 ++++++++++++++++++++++++++++++++ target/config/Config.in.tools | 10 ++++++---- 5 files changed, 47 insertions(+), 12 deletions(-) (limited to 'target/config') diff --git a/.gitignore b/.gitignore index b28f3e045..7fb0daba9 100644 --- a/.gitignore +++ b/.gitignore @@ -55,4 +55,5 @@ /target/config/Config.in.system /target/config/Config.in.native /target/config/Config.in.arch +/target/config/Config.in.prereq /target/m68k/aranym.cfg diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk index 5ce3ca4a0..5b76fe5e1 100644 --- a/mk/buildhlp.mk +++ b/mk/buildhlp.mk @@ -46,7 +46,7 @@ endif ifeq ($(EXTRACT_OVERRIDE),1) ${MAKE} do-extract else - ${EXTRACT_CMD} + PATH='${HOST_PATH}' ${EXTRACT_CMD} endif @${MAKE} post-extract $(MAKE_TRACE) touch $@ @@ -62,7 +62,7 @@ endif ifeq ($(EXTRACT_OVERRIDE),1) ${MAKE} do-extract else - ${EXTRACT_CMD} + PATH='${HOST_PATH}' ${EXTRACT_CMD} endif @${MAKE} post-extract $(MAKE_TRACE) touch $@ diff --git a/mk/vars.mk b/mk/vars.mk index 042f519d7..3cf0a9344 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -211,21 +211,21 @@ EXTRACT_CMD= mkdir -p ${WRKDIR}; \ cd ${WRKDIR} && \ for file in ${FULLDISTFILES}; do case $$file in \ *.cpio) \ - cat $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -i -d ;; \ + cat $$file | cpio -i -d ;; \ *.tar) \ tar -xf $$file ;; \ *.cpio.Z | *.cpio.gz | *.cgz | *.mcz) \ - gzip -dc $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -i -d ;; \ + gzip -dc $$file | cpio -i -d ;; \ *.tar.xz | *.txz) \ - $(STAGING_HOST_DIR)/usr/bin/xz -dc $$file | tar -xf - ;; \ + xz -dc $$file | tar -xf - ;; \ *.tar.Z | *.tar.gz | *.taz | *.tgz) \ gzip -dc $$file | tar -xf - ;; \ *.cpio.bz2 | *.cbz) \ - $(STAGING_HOST_DIR)/usr/bin/bzip2 -dc $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -i -d ;; \ + bzip2 -dc $$file | cpio -i -d ;; \ *.tar.bz2 | *.tbz | *.tbz2) \ - $(STAGING_HOST_DIR)/usr/bin/bzip2 -dc $$file | tar -xf - ;; \ + bzip2 -dc $$file | tar -xf - ;; \ *.zip) \ - cat $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -ivd -H zip ;; \ + cat $$file | cpio -ivd -H zip ;; \ *.arm) \ cp $$file ${WRKDIR} ;; \ *) \ diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index c16aff609..8be02f690 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -208,6 +208,38 @@ if ! which g++ >/dev/null 2>&1; then out=1 fi +host_need_file=0 +if ! which file >/dev/null 2>&1; then + echo "No file found, will build one." + host_need_file=1 +fi + +host_need_bc=0 +if ! which bc >/dev/null 2>&1; then + echo "No bc found, will build one." + host_need_bc=1 +fi + +host_need_bzip2=0 +if ! which bzip2 >/dev/null 2>&1; then + echo "No bzip2 found, will build one." + host_need_bzip2=1 +fi + +host_need_xz=0 +if ! which xz >/dev/null 2>&1; then + echo "No xz found, will build one." + host_need_xz=1 +fi + +echo "config ADK_HOST_NEED_TOOLS" > $topdir/target/config/Config.in.prereq +printf "\t%s\n" "boolean" >> $topdir/target/config/Config.in.prereq +printf "\t%s\n" "default y" >> $topdir/target/config/Config.in.prereq +if [ $host_need_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_XZ" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_need_bc -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_BC" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_need_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_FILE" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_need_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_BZIP2" >> $topdir/target/config/Config.in.prereq ;fi + cd $topdir rm -rf tmp diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index 8ef6ee2d7..c4c0ae23e 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -2,17 +2,17 @@ config ADK_HOST_NEED_HEIRLOOM_CPIO boolean default y -config ADK_HOST_NEED_BC +config ADK_HOST_NEED_MKCRYPT boolean default y -config ADK_HOST_NEED_MKCRYPT +config ADK_HOST_NEED_BC boolean - default y + default n config ADK_HOST_NEED_FILE boolean - default y + default n config ADK_HOST_NEED_BZIP2 boolean @@ -66,3 +66,5 @@ config ADK_HOST_NEED_PCRE boolean default y if ADK_HOST_DARWIN default n + +source "target/config/Config.in.prereq" -- cgit v1.2.3 From 9c8476bd6abc1994ca54b195c92f826de707cc5f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 19:00:41 +0200 Subject: build hosttools only when not available or required --- adk/tools/depmaker.c | 2 +- scripts/scan-tools.sh | 81 ++++++++++++++++++++++++++++++++++--------- target/config/Config.in.tools | 76 ++++++++++++++++++++++++++++++++-------- 3 files changed, 127 insertions(+), 32 deletions(-) (limited to 'target/config') diff --git a/adk/tools/depmaker.c b/adk/tools/depmaker.c index 23d2d2898..9682fb969 100644 --- a/adk/tools/depmaker.c +++ b/adk/tools/depmaker.c @@ -174,7 +174,7 @@ int main() { !(strncmp(pkgdirp->d_name, "glibc", 5) == 0)) { /* print result to stdout */ printf("package-$(ADK_COMPILE_%s) += %s\n", pkgvar, pkgdirp->d_name); - printf("hostpackage-$(ADK_HOST_NEED_%s) += %s\n", pkgvar, pkgdirp->d_name); + printf("hostpackage-$(ADK_HOST_BUILD_%s) += %s\n", pkgvar, pkgdirp->d_name); } if ((pkgdeps = malloc(MAXLINE)) != NULL) diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index 8be02f690..f5d101d6e 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -208,37 +208,84 @@ if ! which g++ >/dev/null 2>&1; then out=1 fi -host_need_file=0 -if ! which file >/dev/null 2>&1; then - echo "No file found, will build one." - host_need_file=1 -fi - -host_need_bc=0 +# always required, but can be provided by host +host_build_bc=0 if ! which bc >/dev/null 2>&1; then echo "No bc found, will build one." - host_need_bc=1 + host_build_bc=1 +fi + +host_build_bison=0 +if ! which bison >/dev/null 2>&1; then + echo "No bison found, will build one." + host_build_bison=1 fi -host_need_bzip2=0 +host_build_bzip2=0 if ! which bzip2 >/dev/null 2>&1; then echo "No bzip2 found, will build one." - host_need_bzip2=1 + host_build_bzip2=1 fi -host_need_xz=0 +host_build_file=0 +if ! which file >/dev/null 2>&1; then + echo "No file found, will build one." + host_build_file=1 +fi + +host_build_flex=0 +if ! which flex >/dev/null 2>&1; then + echo "No flex found, will build one." + host_build_m4=1 +fi + +host_build_m4=0 +if ! which m4 >/dev/null 2>&1; then + echo "No m4 found, will build one." + host_build_m4=1 +fi + +host_build_xz=0 if ! which xz >/dev/null 2>&1; then echo "No xz found, will build one." - host_need_xz=1 + host_build_xz=1 +fi + +# optional +host_build_ccache=0 +if ! which ccache >/dev/null 2>&1; then + echo "No ccache found, will build one when required." + host_build_ccache=1 fi -echo "config ADK_HOST_NEED_TOOLS" > $topdir/target/config/Config.in.prereq +host_build_lzma=0 +if ! which lzma >/dev/null 2>&1; then + echo "No lzma found, will build one when required." + host_build_lzma=1 +fi + +host_build_lzop=0 +if ! which lzop >/dev/null 2>&1; then + echo "No lzop found, will build one when required." + host_build_lzop=1 +fi + + +echo "config ADK_HOST_BUILD_TOOLS" > $topdir/target/config/Config.in.prereq printf "\t%s\n" "boolean" >> $topdir/target/config/Config.in.prereq printf "\t%s\n" "default y" >> $topdir/target/config/Config.in.prereq -if [ $host_need_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_XZ" >> $topdir/target/config/Config.in.prereq ;fi -if [ $host_need_bc -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_BC" >> $topdir/target/config/Config.in.prereq ;fi -if [ $host_need_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_FILE" >> $topdir/target/config/Config.in.prereq ;fi -if [ $host_need_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_BZIP2" >> $topdir/target/config/Config.in.prereq ;fi +# always required +if [ $host_build_bc -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BC" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_bison -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BISON" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BZIP2" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FILE" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_flex -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_m4 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi +# optional +if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_lzma -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZMA if ADK_HOST_NEED_LZMA" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_lzop -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZOP if ADK_HOST_NEED_LZOP" >> $topdir/target/config/Config.in.prereq ;fi cd $topdir rm -rf tmp diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index c4c0ae23e..0e7816fca 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -1,36 +1,59 @@ -config ADK_HOST_NEED_HEIRLOOM_CPIO +# always required from OpenADK +config ADK_HOST_BUILD_HEIRLOOM_CPIO boolean default y -config ADK_HOST_NEED_MKCRYPT +config ADK_HOST_BUILD_MKCRYPT boolean default y -config ADK_HOST_NEED_BC +# always required, but can be provided by host +config ADK_HOST_BUILD_BASH boolean default n -config ADK_HOST_NEED_FILE +config ADK_HOST_BUILD_BC boolean default n -config ADK_HOST_NEED_BZIP2 +config ADK_HOST_BUILD_BISON boolean default n -config ADK_HOST_NEED_CDRTOOLS +config ADK_HOST_BUILD_BZIP2 boolean default n -config ADK_HOST_NEED_SYSLINUX +config ADK_HOST_BUILD_FILE + boolean + default n + +config ADK_HOST_BUILD_FLEX boolean default n -config ADK_HOST_NEED_SQUASHFS +config ADK_HOST_BUILD_M4 boolean default n -config ADK_HOST_NEED_MTD_UTILS +config ADK_HOST_BUILD_XZ + boolean + default n + +# optional, but can be provided by host +config ADK_HOST_NEED_CCACHE + boolean + default n + +config ADK_HOST_BUILD_CCACHE + boolean + default n + +config ADK_HOST_NEED_CDRTOOLS + boolean + default n + +config ADK_HOST_BUILD_CDRTOOLS boolean default n @@ -38,7 +61,7 @@ config ADK_HOST_NEED_GENEXT2FS boolean default n -config ADK_HOST_NEED_LZOP +config ADK_HOST_BUILD_GENEXT2FS boolean default n @@ -46,15 +69,15 @@ config ADK_HOST_NEED_LZMA boolean default n -config ADK_HOST_NEED_XZ +config ADK_HOST_BUILD_LZMA boolean default n -config ADK_HOST_NEED_CCACHE +config ADK_HOST_NEED_LZOP boolean default n -config ADK_HOST_NEED_MKIMAGE +config ADK_HOST_BUILD_LZOP boolean default n @@ -62,7 +85,32 @@ config ADK_HOST_NEED_MKSH boolean default n -config ADK_HOST_NEED_PCRE +config ADK_HOST_BUILD_MKSH + boolean + default n + +config ADK_HOST_NEED_SYSLINUX + boolean + default n + +config ADK_HOST_BUILD_SYSLINUX + boolean + default n + +# optional, must be used from OpenADK +config ADK_HOST_BUILD_MTD_UTILS + boolean + default n + +config ADK_HOST_BUILD_SQUASHFS + boolean + default n + +config ADK_HOST_BUILD_MKIMAGE + boolean + default n + +config ADK_HOST_BUILD_PCRE boolean default y if ADK_HOST_DARWIN default n -- cgit v1.2.3 From 2615fde640b4420ab281006b996360ae7efb2e82 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 19:31:39 +0200 Subject: add pkgconf, always needed --- scripts/scan-tools.sh | 7 +++++++ target/config/Config.in.tools | 4 ++++ 2 files changed, 11 insertions(+) (limited to 'target/config') diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index f5d101d6e..119a7a6bd 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -245,6 +245,12 @@ if ! which m4 >/dev/null 2>&1; then host_build_m4=1 fi +host_build_pkgconf=0 +if ! which pkgconf >/dev/null 2>&1; then + echo "No pkgconf found, will build one." + host_build_pkgconf=1 +fi + host_build_xz=0 if ! which xz >/dev/null 2>&1; then echo "No xz found, will build one." @@ -281,6 +287,7 @@ if [ $host_build_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BZIP2 if [ $host_build_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FILE" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_flex -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_m4 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_pkgconf -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PKGCONF" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi # optional if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index 0e7816fca..6f2cdab88 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -36,6 +36,10 @@ config ADK_HOST_BUILD_M4 boolean default n +config ADK_HOST_BUILD_PKGCONF + boolean + default n + config ADK_HOST_BUILD_XZ boolean default n -- cgit v1.2.3 From 712a7998a6e64638154c2cc3b3262b0881ca0138 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 19:49:07 +0200 Subject: add findutils do host machinery --- README | 1 - package/findutils/Makefile | 6 +++++- scripts/scan-tools.sh | 22 ++++++++++++++++------ target/config/Config.in.tools | 4 ++++ 4 files changed, 25 insertions(+), 8 deletions(-) (limited to 'target/config') diff --git a/README b/README index 11c21e5a3..81ebd7798 100644 --- a/README +++ b/README @@ -11,7 +11,6 @@ Before you can start you need to install some tools: - GNU make - GNU awk - GNU sed -- findutils (find, xargs) - tar - patch - gzip diff --git a/package/findutils/Makefile b/package/findutils/Makefile index d89ca77ea..57fdf77b3 100644 --- a/package/findutils/Makefile +++ b/package/findutils/Makefile @@ -7,7 +7,7 @@ PKG_NAME:= findutils PKG_VERSION:= 4.4.2 PKG_RELEASE:= 4 PKG_MD5SUM:= 351cc4adb07d54877fa15f75fb77d39f -PKG_DESCR:= GNU utilities for finding files +PKG_DESCR:= utilities for finding files PKG_SECTION:= utils PKG_DEPENDS:= libpthread PKG_BUILDDEP:= autotool @@ -18,12 +18,15 @@ PKG_SUBPKGS:= FIND XARGS LOCATE PKGSD_LOCATE:= locate utility PKGSD_XARGS:= xargs utility +include $(TOPDIR)/mk/host.mk include $(TOPDIR)/mk/package.mk +$(eval $(call HOST_template,FINDUTILS,findutils,$(PKG_VERSION)-${PKG_RELEASE})) $(eval $(call PKG_template,FIND,find,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,XARGS,xargs,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_XARGS},${PKG_SECTION})) $(eval $(call PKG_template,LOCATE,locate,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LOCATE},${PKG_SECTION})) +HOST_STYLE:= auto AUTOTOOL_STYLE:= autoreconf CONFIGURE_ENV+= gl_cv_func_wcwidth_works=yes \ ac_cv_func_working_mktime=yes @@ -44,4 +47,5 @@ locate-install: $(INSTALL_BIN) $(WRKINST)/usr/libexec/{bigram,code,frcode} \ $(IDIR_LOCATE)/usr/libexec +include ${TOPDIR}/mk/host-bottom.mk include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index 119a7a6bd..c9b8029d5 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -196,12 +196,6 @@ if ! which perl >/dev/null 2>&1; then out=1 fi -if ! which xargs >/dev/null 2>&1; then - echo "You need xargs to continue." - echo - out=1 -fi - if ! which g++ >/dev/null 2>&1; then echo "You need g++ (GNU C++ compiler) to continue." echo @@ -251,6 +245,21 @@ if ! which pkgconf >/dev/null 2>&1; then host_build_pkgconf=1 fi +host_build_findutils=0 +if ! which gxargs >/dev/null 2>&1; then + if ! which xargs >/dev/null 2>&1; then + echo "No xargs found, will build one." + host_build_findutils=1 + fi +fi + +if ! which gfind >/dev/null 2>&1; then + if ! which find >/dev/null 2>&1; then + echo "No find found, will build one." + host_build_findutils=1 + fi +fi + host_build_xz=0 if ! which xz >/dev/null 2>&1; then echo "No xz found, will build one." @@ -288,6 +297,7 @@ if [ $host_build_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FILE" if [ $host_build_flex -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_m4 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_pkgconf -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PKGCONF" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_findutils -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FINDUTILS" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi # optional if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index 6f2cdab88..92bbae9d6 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -28,6 +28,10 @@ config ADK_HOST_BUILD_FILE boolean default n +config ADK_HOST_BUILD_FINDUTILS + boolean + default n + config ADK_HOST_BUILD_FLEX boolean default n -- cgit v1.2.3