diff options
-rw-r--r-- | mk/image.mk | 10 | ||||
-rw-r--r-- | mk/vars.mk | 1 | ||||
-rw-r--r-- | package/cpio/Makefile | 3 | ||||
-rwxr-xr-x | scripts/prereq.sh | 12 | ||||
-rw-r--r-- | target/config/Config.in.tools | 8 |
5 files changed, 24 insertions, 10 deletions
diff --git a/mk/image.mk b/mk/image.mk index 6d0d70a35..aa91e65d3 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -139,17 +139,15 @@ kernel-package: kernel-strip $(END_TRACE) ${FW_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR}/.adk kernel-package - cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | \ - sed "s#\(.*\)#:0:0::::::\1#" | sort | \ - ${STAGING_HOST_DIR}/usr/bin/cpio -o -Hustar -P | $(XZ) -c >$@ + cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \ + $(CPIO) -o -Hustar --owner=0:0 | $(XZ) -c >$@ ifeq ($(ADK_TARGET_QEMU),y) @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) endif ${FW_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR}/.adk - cd ${TARGET_DIR}; find . | grep -v ./boot/ | sed -n '/^\.\//s///p' | \ - sed "s#\(.*\)#:0:0::::::\1#" | sort | \ - ${STAGING_HOST_DIR}/usr/bin/cpio -o -Hustar -P | $(XZ) -c >$@ + cd ${TARGET_DIR}; find . | grep -v ./boot/ | sed -n '/^\.\//s///p' | sort | \ + $(CPIO) -o -Hustar --owner=0:0 | $(XZ) -c >$@ ${STAGING_TARGET_DIR}/${INITRAMFS}_list: ${TARGET_DIR}/.adk env PATH='${HOST_PATH}' $(BASH) ${LINUX_DIR}/scripts/gen_initramfs_list.sh -u squash -g squash \ diff --git a/mk/vars.mk b/mk/vars.mk index b05fd6ad3..3054d48b8 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -306,6 +306,7 @@ endif SED:= PATH='${HOST_PATH}' sed -i -e XZ:= PATH='${HOST_PATH}' xz +CPIO:= PATH='${HOST_PATH}' cpio LINUX_DIR:= $(BUILD_DIR)/linux KERNEL_MODULE_FLAGS:= ARCH=${ADK_TARGET_ARCH} \ PREFIX=/usr \ diff --git a/package/cpio/Makefile b/package/cpio/Makefile index 54f371698..c1764b566 100644 --- a/package/cpio/Makefile +++ b/package/cpio/Makefile @@ -15,12 +15,15 @@ PKG_BB:= 1 DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz +include ${ADK_TOPDIR}/mk/host.mk include ${ADK_TOPDIR}/mk/package.mk +$(eval $(call HOST_template,CPIO,cpio,${PKG_VERSION}-${PKG_RELEASE})) $(eval $(call PKG_template,CPIO,cpio,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) cpio-install: ${INSTALL_DIR} ${IDIR_CPIO}/usr/bin ${CP} ${WRKINST}/usr/bin/cpio ${IDIR_CPIO}/usr/bin +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 fa2d52161..57652ed5f 100755 --- a/scripts/prereq.sh +++ b/scripts/prereq.sh @@ -575,6 +575,15 @@ else host_build_sed=1 fi +printf " ---> checking if cpio is installed.. " +host_build_cpio=0 +if ! which cpio >/dev/null 2>&1; then + printf "not found\n" + host_build_cpio=1 +else + printf "found\n" +fi + printf " ---> checking if xz is installed.. " host_build_xz=0 if ! which xz >/dev/null 2>&1; then @@ -668,6 +677,9 @@ fi if [ $host_build_tar -eq 1 ]; then printf "\t%s\n" "select ADK_HOST_BUILD_TAR" >> $topdir/target/config/Config.in.prereq fi +if [ $host_build_cpio -eq 1 ]; then + printf "\t%s\n" "select ADK_HOST_BUILD_CPIO" >> $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 diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index 4d4fb73e5..66b717cda 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -1,8 +1,4 @@ # always required from OpenADK -config ADK_HOST_BUILD_HEIRLOOM_CPIO - bool - default y - config ADK_HOST_BUILD_ADK_HELPER bool default y @@ -74,6 +70,10 @@ config ADK_HOST_BUILD_CMAKE default y if ADK_BUILD_COMPILER_LLVM default n +config ADK_HOST_BUILD_CPIO + bool + default n + config ADK_HOST_BUILD_FILE bool default n |