diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-04-03 11:27:38 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-04-03 11:27:38 +0200 |
commit | 97f06c7f9d934a86f84f6608bcf3c6a1a1132eee (patch) | |
tree | b4391721c33a97aefdbd0ecff73dc1e43d50b557 | |
parent | cf494122e89c1f3674079ad3de3604f8d8e94b0b (diff) |
add qemu host dependency
-rw-r--r-- | package/qemu/Makefile | 20 | ||||
-rw-r--r-- | scripts/scan-tools.sh | 6 | ||||
-rw-r--r-- | target/config/Config.in | 1 | ||||
-rw-r--r-- | target/config/Config.in.tools | 8 | ||||
-rw-r--r-- | target/microblaze/Makefile | 2 |
5 files changed, 27 insertions, 10 deletions
diff --git a/package/qemu/Makefile b/package/qemu/Makefile index 6ca93afa3..a43560a74 100644 --- a/package/qemu/Makefile +++ b/package/qemu/Makefile @@ -10,8 +10,9 @@ PKG_MD5SUM:= 9541063d999cf9659ed7fdce71314f31 PKG_DESCR:= cpu and system emulator PKG_SECTION:= misc PKG_DEPENDS:= zlib glib -PKG_BUILDDEP:= gettext-tiny libiconv-tiny glib-host -PKG_BUILDDEP+= qemu-host zlib glib +PKG_BUILDDEP:= gettext-tiny libiconv-tiny +PKG_BUILDDEP+= zlib glib +HOST_BUILDDEP:= glib-host PKG_URL:= http://wwww.qemu.org/ PKG_SITES:= http://wiki.qemu.org/download/ @@ -35,9 +36,10 @@ CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \ --disable-sdl \ --bindir=/usr/bin -HOST_STYLE:= manual CFLAGS_FOR_BUILD+= -DNATIVE +HOST_STYLE:= manual HOST_CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \ + --prefix=${STAGING_HOST_DIR}/usr \ --disable-docs \ --disable-werror \ --disable-system \ @@ -45,17 +47,17 @@ HOST_CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \ host-configure: cd ${WRKBUILD}; rm -f config.{cache,status}; \ - env ${HOST_CONFIGURE_ENV} \ - ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \ - ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE) + env ${HOST_CONFIGURE_ENV} \ + ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \ + ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE) host-build: cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ - ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE) - + ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE) + qemu-hostinstall: cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ - DESTDIR='$(STAGING_HOST_DIR)' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE) + ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE) qemu-install: $(INSTALL_DIR) $(IDIR_QEMU)/usr/share/qemu diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index 16b13d4e3..ee8d8a3ff 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -295,6 +295,11 @@ if ! which lzop >/dev/null 2>&1; then host_build_lzop=1 fi +host_build_qemu=0 +if ! which qemu-img >/dev/null 2>&1; then + echo "No qemu found, will build one when required." + host_build_qemu=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 @@ -314,6 +319,7 @@ if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCAC if [ $host_build_genext2fs -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_GENEXT2FS if ADK_HOST_NEED_GENEXT2FS" >> $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 +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 cd $topdir rm -rf tmp diff --git a/target/config/Config.in b/target/config/Config.in index 1255ceae3..501039ed1 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -771,6 +771,7 @@ config ADK_TARGET_ROOTFS_SQUASHFS bool "Compressed read-only root filesystem (squashfs)" select ADK_KERNEL_SQUASHFS select ADK_HOST_NEED_SQUASHFS + select ADK_HOST_NEED_QEMU if ADK_HARDWARE_QEMU select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU depends on ADK_TARGET_WITH_MTD help diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index 95e4f6d63..f95a4508b 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -97,6 +97,14 @@ config ADK_HOST_BUILD_MKSH boolean default n +config ADK_HOST_NEED_QEMU + boolean + default n + +config ADK_HOST_BUILD_QEMU + boolean + default n + config ADK_HOST_NEED_SYSLINUX boolean default n diff --git a/target/microblaze/Makefile b/target/microblaze/Makefile index 58d02c5be..4a39e1c3b 100644 --- a/target/microblaze/Makefile +++ b/target/microblaze/Makefile @@ -18,7 +18,7 @@ endif ifeq ($(ADK_TARGET_FS),squashfs) imageinstall: $(BUILD_DIR)/root.squashfs - qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE) + env PATH=$(HOST_PATH) qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE) dd conv=notrunc if=$(BUILD_DIR)/root.squashfs of=$(FW_DIR)/$(ROOTFSSQUASHFS) @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) ifneq ($(ADK_HARDWARE_QEMU),) |