From 19afcc16965829619751f456fda136e61006ffd9 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 22 Mar 2014 12:26:42 +0100 Subject: add dts/dtb for spartan emulation, so that mtdroot can work --- target/microblaze/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/microblaze/Makefile') diff --git a/target/microblaze/Makefile b/target/microblaze/Makefile index 5ab2345e7..f05884442 100644 --- a/target/microblaze/Makefile +++ b/target/microblaze/Makefile @@ -15,7 +15,7 @@ DTB:=-dtb target/microblaze/ml605.dtb endif ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800),y) MODEL:=petalogix-s3adsp1800 -DTB:= +DTB:=-dtb target/microblaze/s3adsp1800.dtb endif ifeq ($(ADK_TARGET_FS),squashfs) -- cgit v1.2.3 From 8c81154871112b65b79834ccfa8ff43d28bb8203 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 23 Mar 2014 11:04:23 +0100 Subject: fix squashfs root for qemu-microblaze --- mk/rootfs.mk | 4 ++-- target/linux/config/Config.in.flash | 2 ++ target/microblaze/Makefile | 14 ++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'target/microblaze/Makefile') diff --git a/mk/rootfs.mk b/mk/rootfs.mk index 43cfaa821..3956306e9 100644 --- a/mk/rootfs.mk +++ b/mk/rootfs.mk @@ -50,10 +50,10 @@ $(eval $(call rootfs_template,archive,ARCHIVE,$(ROOTFS))) $(eval $(call rootfs_template,initramfsarchive,INITRAMFSARCHIVE)) $(eval $(call rootfs_template,initramfs,INITRAMFS)) $(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK)) -$(eval $(call rootfs_template,squashfs,SQUASHFS,$(ROOTFS))) +$(eval $(call rootfs_template,squashfs,SQUASHFS,$(MTDDEV) rootfstype=squashfs)) $(eval $(call rootfs_template,yaffs,YAFFS,$(MTDDEV) panic=3)) $(eval $(call rootfs_template,jffs2,JFFS2,$(MTDDEV) rootfstype=jffs2)) -$(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp init=/init)) +$(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp)) $(eval $(call rootfs_template,encrypted,ENCRYPTED)) $(eval $(call rootfs_template,iso,ISO)) diff --git a/target/linux/config/Config.in.flash b/target/linux/config/Config.in.flash index 03976a6d7..dda8ad4c9 100644 --- a/target/linux/config/Config.in.flash +++ b/target/linux/config/Config.in.flash @@ -99,6 +99,8 @@ config ADK_KERNEL_MTD_M25P80 select ADK_KERNEL_MTD_PHYSMAP select ADK_KERNEL_MTD_PHYSMAP_OF select ADK_KERNEL_MTD_OF_PARTS + select ADK_KERNEL_SPI + select ADK_KERNEL_SPI_MASTER boolean default n diff --git a/target/microblaze/Makefile b/target/microblaze/Makefile index f05884442..58d02c5be 100644 --- a/target/microblaze/Makefile +++ b/target/microblaze/Makefile @@ -10,12 +10,10 @@ include $(TOPDIR)/mk/image.mk KERNEL:=$(LINUX_DIR)/arch/microblaze/boot/$(ADK_TARGET_KERNEL) ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605),y) -MODEL:=petalogix-ml605 -DTB:=-dtb target/microblaze/ml605.dtb +QEMU_ARGS+=-M petalogix-ml605 -dtb target/microblaze/ml605.dtb endif ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800),y) -MODEL:=petalogix-s3adsp1800 -DTB:=-dtb target/microblaze/s3adsp1800.dtb +QEMU_ARGS+=-M petalogix-s3adsp1800 endif ifeq ($(ADK_TARGET_FS),squashfs) @@ -25,7 +23,7 @@ imageinstall: $(BUILD_DIR)/root.squashfs @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) ifneq ($(ADK_HARDWARE_QEMU),) @echo "Start qemu with following options:" - @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSSQUASHFS) $(DTB)' + @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSSQUASHFS)' endif endif ifeq ($(ADK_TARGET_FS),jffs2) @@ -33,7 +31,7 @@ imageinstall: $(FW_DIR)/$(ROOTFSJFFS2) @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) ifneq ($(ADK_HARDWARE_QEMU),) @echo "Start qemu with following options:" - @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSJFFS2) $(DTB)' + @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSJFFS2)' endif endif ifeq ($(ADK_TARGET_FS),initramfs) @@ -43,7 +41,7 @@ imageinstall: $(FW_DIR)/$(INITRAMFS) @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}' ifneq ($(ADK_HARDWARE_QEMU),) @echo "Start qemu with following command line:" - @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS} $(DTB)' + @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}' endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) @@ -52,7 +50,7 @@ imageinstall: createinitramfs @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}' ifneq ($(ADK_HARDWARE_QEMU),) @echo "Start qemu with following command line:" - @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) $(DTB)' + @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL)' endif endif ifeq ($(ADK_TARGET_FS),archive) -- cgit v1.2.3 From 97f06c7f9d934a86f84f6608bcf3c6a1a1132eee Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 3 Apr 2014 11:27:38 +0200 Subject: add qemu host dependency --- package/qemu/Makefile | 20 +++++++++++--------- scripts/scan-tools.sh | 6 ++++++ target/config/Config.in | 1 + target/config/Config.in.tools | 8 ++++++++ target/microblaze/Makefile | 2 +- 5 files changed, 27 insertions(+), 10 deletions(-) (limited to 'target/microblaze/Makefile') 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),) -- cgit v1.2.3