summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2018-02-12 19:01:13 +0000
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2018-02-12 19:45:42 +0000
commitb8991af6b9e0939b19767fc848cecfef7db50964 (patch)
tree085222d142598f1173f9796b74db71bae8f0a103
parent76c0b499fabbd435940376162010a4de344733c2 (diff)
hppa: add basic qemu support
-rw-r--r--mk/image.mk2
-rw-r--r--target/config/Config.in.rootfs1
-rw-r--r--target/hppa/Makefile59
-rw-r--r--target/hppa/kernel/qemu-hppa3
-rw-r--r--target/hppa/systems/qemu-hppa8
-rw-r--r--target/linux/config/Config.in.serial2
6 files changed, 75 insertions, 0 deletions
diff --git a/mk/image.mk b/mk/image.mk
index b69cd80d2..461c98125 100644
--- a/mk/image.mk
+++ b/mk/image.mk
@@ -173,6 +173,8 @@ ${STAGING_TARGET_DIR}/${INITRAMFS}_list: ${TARGET_DIR}/.adk
echo "nod /dev/ram 0655 0 0 b 1 1"; \
echo "nod /dev/ttyS0 0660 0 0 c 4 64"; \
echo "nod /dev/ttyS1 0660 0 0 c 4 65"; \
+ echo "nod /dev/ttyB0 0660 0 0 c 11 0"; \
+ echo "nod /dev/ttyB1 0660 0 0 c 11 1"; \
echo "nod /dev/ttyAMA0 0660 0 0 c 204 64"; \
echo "nod /dev/ttyAMA1 0660 0 0 c 204 65"; \
echo "nod /dev/ttySC0 0660 0 0 c 204 8"; \
diff --git a/target/config/Config.in.rootfs b/target/config/Config.in.rootfs
index 36d252570..d6ff719cd 100644
--- a/target/config/Config.in.rootfs
+++ b/target/config/Config.in.rootfs
@@ -18,6 +18,7 @@ config ADK_TARGET_ROOTFS_INITRAMFSPIGGYBACK
ADK_TARGET_ARCH_ARC || \
ADK_TARGET_ARCH_ARM || \
ADK_TARGET_ARCH_H8300 || \
+ ADK_TARGET_ARCH_HPPA || \
ADK_TARGET_ARCH_M68K || \
ADK_TARGET_ARCH_MICROBLAZE || \
ADK_TARGET_ARCH_MIPS || \
diff --git a/target/hppa/Makefile b/target/hppa/Makefile
index 03afae8f0..aba746bee 100644
--- a/target/hppa/Makefile
+++ b/target/hppa/Makefile
@@ -5,3 +5,62 @@ include $(ADK_TOPDIR)/rules.mk
include $(ADK_TOPDIR)/mk/kernel-build.mk
include $(ADK_TOPDIR)/mk/image.mk
+KERNEL:=$(LINUX_DIR)/$(ADK_TARGET_KERNEL)
+QEMU:=qemu-system-hppa
+QEMU_ARGS:=-nographic
+
+# target helper text
+ifeq ($(ADK_TARGET_FS),archive)
+targethelp:
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
+ifeq ($(ADK_TARGET_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo '$(QEMU) $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
+endif
+ifeq ($(ADK_TARGET_FS),initramfsarchive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfspiggyback)
+targethelp:
+ @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+ifeq ($(ADK_TARGET_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo '$(QEMU) $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+endif
+endif
+ifeq ($(ADK_TARGET_FS),nfsroot)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
+
+kernel-strip:
+ @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),archive)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfsarchive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfspiggyback)
+imageinstall: createinitramfs targethelp
+endif
+ifeq ($(ADK_TARGET_FS),nfsroot)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
diff --git a/target/hppa/kernel/qemu-hppa b/target/hppa/kernel/qemu-hppa
new file mode 100644
index 000000000..0b5910ff9
--- /dev/null
+++ b/target/hppa/kernel/qemu-hppa
@@ -0,0 +1,3 @@
+CONFIG_PARISC=y
+CONFIG_PA7100LC=y
+CONFIG_PDC_CONSOLE=y
diff --git a/target/hppa/systems/qemu-hppa b/target/hppa/systems/qemu-hppa
new file mode 100644
index 000000000..4c3a2ff97
--- /dev/null
+++ b/target/hppa/systems/qemu-hppa
@@ -0,0 +1,8 @@
+config ADK_TARGET_SYSTEM_QEMU_HPPA
+ bool "Qemu Emulator"
+ select ADK_TARGET_QEMU
+ select ADK_TARGET_CPU_PARISC
+ select ADK_TARGET_KERNEL_WITH_COMPRESSION
+ help
+ Qemu Emulator for HPPA architecture.
+
diff --git a/target/linux/config/Config.in.serial b/target/linux/config/Config.in.serial
index f4326eb52..3a87e0468 100644
--- a/target/linux/config/Config.in.serial
+++ b/target/linux/config/Config.in.serial
@@ -118,6 +118,7 @@ config ADK_KERNEL_SERIAL_8250
|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK610 \
|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK807 \
|| ADK_TARGET_SYSTEM_QEMU_CSKY_CK810 \
+ || ADK_TARGET_SYSTEM_QEMU_HPPA \
|| ADK_TARGET_SYSTEM_QEMU_NIOS2 \
|| ADK_TARGET_SYSTEM_QEMU_OR1K \
|| ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO \
@@ -149,6 +150,7 @@ config ADK_KERNEL_SERIAL_8250
default y if ADK_TARGET_SYSTEM_QEMU_CSKY_CK610
default y if ADK_TARGET_SYSTEM_QEMU_CSKY_CK807
default y if ADK_TARGET_SYSTEM_QEMU_CSKY_CK810
+ default y if ADK_TARGET_SYSTEM_QEMU_HPPA
default y if ADK_TARGET_SYSTEM_QEMU_NIOS2
default y if ADK_TARGET_SYSTEM_QEMU_OR1K
default y if ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO