diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-02-16 12:42:44 -0600 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-02-16 12:43:53 -0600 |
commit | 3b75784a5cf83b34ba7b4ecfe2b80908cedb2982 (patch) | |
tree | 77b309c463aa8530e4a9b052f595ce8df1df5835 /target | |
parent | 5f7287e1a5de3f9dc043089e4209b7b6f291caee (diff) |
prepare for Sun Voyager.
Bootloader needs a.out formatted kernel.
Unfortunately I get "Illegal instruction" after loading
a.out kernel via TFTP. Old gentoo 2.6 kernel boots fine.
Diffstat (limited to 'target')
-rw-r--r-- | target/config/Config.in.kernel | 5 | ||||
-rw-r--r-- | target/config/Config.in.tools | 4 | ||||
-rw-r--r-- | target/linux/config/Config.in.graphics | 13 | ||||
-rw-r--r-- | target/linux/patches/3.19/sparc-aout.patch | 24 | ||||
-rw-r--r-- | target/linux/patches/3.4.103/sparc-aout.patch | 24 | ||||
-rw-r--r-- | target/sparc/Makefile | 13 | ||||
-rw-r--r-- | target/sparc/kernel/sun-voyager | 9 | ||||
-rw-r--r-- | target/sparc/systems/sun-voyager | 11 |
8 files changed, 103 insertions, 0 deletions
diff --git a/target/config/Config.in.kernel b/target/config/Config.in.kernel index a7cb63f77..993fd0a77 100644 --- a/target/config/Config.in.kernel +++ b/target/config/Config.in.kernel @@ -19,6 +19,9 @@ config ADK_TARGET_KERNEL_UIMAGE config ADK_TARGET_KERNEL_BZIMAGE bool +config ADK_TARGET_KERNEL_VMLINUX_AOUT + bool + config ADK_TARGET_KERNEL string default "uImage" if ADK_TARGET_KERNEL_UIMAGE @@ -27,6 +30,7 @@ config ADK_TARGET_KERNEL default "linux.bin" if ADK_TARGET_KERNEL_LINUXBIN default "vmlinuz" if ADK_TARGET_KERNEL_VMLINUZ default "bzImage" if ADK_TARGET_KERNEL_BZIMAGE + default "vmlinux.aout" if ADK_TARGET_KERNEL_VMLINUX_AOUT default "vmlinux" config ADK_TARGET_KERNEL_MINICONFIG @@ -70,4 +74,5 @@ config ADK_TARGET_KERNEL_MINICONFIG default "pcengines-apu" if ADK_TARGET_SYSTEM_PCENGINES_APU default "atmel-ngw100" if ADK_TARGET_SYSTEM_ATMEL_NGW100 default "apple-macmini" if ADK_TARGET_SYSTEM_APPLE_MACMINI + default "sun-voyager" if ADK_TARGET_SYSTEM_SUN_VOYAGER diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index 04d8ff949..f7cf5938c 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -7,6 +7,10 @@ config ADK_HOST_BUILD_ADK_HELPER boolean default y +config ADK_HOST_BUILD_ELFTOAOUT + boolean + default y if ADK_TARGET_ARCH_SPARC + config ADK_HOST_BUILD_AUTOCONF boolean default y diff --git a/target/linux/config/Config.in.graphics b/target/linux/config/Config.in.graphics index 68d3039e6..dbd6185d0 100644 --- a/target/linux/config/Config.in.graphics +++ b/target/linux/config/Config.in.graphics @@ -31,6 +31,9 @@ config ADK_KERNEL_FB select ADK_KERNEL_VT_CONSOLE boolean +config ADK_KERNEL_FB_SBUS + bool + config ADK_KERNEL_DUMMY_CONSOLE boolean @@ -325,5 +328,15 @@ config ADK_KERNEL_DRM_CIRRUS_QEMU depends on ADK_TARGET_SYSTEM_QEMU_X86 || ADK_TARGET_SYSTEM_QEMU_X86_64 help DRM/KMS support for Qemu cirrus VGA emulation. + +config ADK_KERNEL_FB_CGSIX + bool "Support for CGSIX framebuffer" + select ADK_KERNEL_FB + select ADK_KERNEL_FB_SBUS + default y if ADK_TARGET_SYSTEM_SUN_VOYAGER + default n + depends on ADK_TARGET_SYSTEM_SUN_VOYAGER + help + Framebuffer support for Sun Voyager. endmenu diff --git a/target/linux/patches/3.19/sparc-aout.patch b/target/linux/patches/3.19/sparc-aout.patch new file mode 100644 index 000000000..3360d6a6e --- /dev/null +++ b/target/linux/patches/3.19/sparc-aout.patch @@ -0,0 +1,24 @@ +diff -Nur linux-3.19.orig/arch/sparc/boot/Makefile linux-3.19/arch/sparc/boot/Makefile +--- linux-3.19.orig/arch/sparc/boot/Makefile 2015-02-08 20:54:22.000000000 -0600 ++++ linux-3.19/arch/sparc/boot/Makefile 2015-02-15 22:58:57.918666227 -0600 +@@ -25,9 +25,6 @@ + $(call if_changed,gzip) + @echo ' kernel: $@ is ready' + +-$(obj)/vmlinux.aout: vmlinux FORCE +- $(call if_changed,elftoaout) +- @echo ' kernel: $@ is ready' + else + + $(obj)/zImage: $(obj)/image +@@ -62,6 +59,10 @@ + + endif + ++$(obj)/vmlinux.aout: $(obj)/image FORCE ++ $(call if_changed,elftoaout) ++ @echo ' kernel: $@ is ready' ++ + $(obj)/image: vmlinux FORCE + $(call if_changed,strip) + @echo ' kernel: $@ is ready' diff --git a/target/linux/patches/3.4.103/sparc-aout.patch b/target/linux/patches/3.4.103/sparc-aout.patch new file mode 100644 index 000000000..5cd74c2e7 --- /dev/null +++ b/target/linux/patches/3.4.103/sparc-aout.patch @@ -0,0 +1,24 @@ +diff -Nur linux-3.4.103.orig/arch/sparc/boot/Makefile linux-3.4.103/arch/sparc/boot/Makefile +--- linux-3.4.103.orig/arch/sparc/boot/Makefile 2014-08-13 20:07:43.000000000 -0500 ++++ linux-3.4.103/arch/sparc/boot/Makefile 2015-02-16 00:26:16.934618259 -0600 +@@ -74,9 +74,6 @@ + $(call if_changed,gzip) + @echo ' kernel: $@ is ready' + +-$(obj)/vmlinux.aout: vmlinux FORCE +- $(call if_changed,elftoaout) +- @echo ' kernel: $@ is ready' + else + + # The following lines make a readable image for U-Boot. +@@ -107,6 +104,10 @@ + + endif + ++$(obj)/vmlinux.aout: $(obj)/image FORCE ++ $(call if_changed,elftoaout) ++ @echo ' kernel: $@ is ready' ++ + $(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback System.map $(ROOT_IMG) FORCE + $(call if_changed,elftoaout) + $(call if_changed,piggy) diff --git a/target/sparc/Makefile b/target/sparc/Makefile index ac94569db..f203596cf 100644 --- a/target/sparc/Makefile +++ b/target/sparc/Makefile @@ -7,7 +7,12 @@ include $(ADK_TOPDIR)/mk/modules.mk include $(ADK_TOPDIR)/mk/kernel-build.mk include $(ADK_TOPDIR)/mk/image.mk +ifeq ($(ADK_TARGET_KERNEL_ZIMAGE),y) KERNEL:=$(LINUX_DIR)/arch/sparc/boot/zImage +endif +ifeq ($(ADK_TARGET_KERNEL_VMLINUX_AOUT),y) +KERNEL:=$(LINUX_DIR)/arch/sparc/boot/vmlinux.aout +endif QEMU_ARGS:=-M SS-10 QEMU_ARGS+=${ADK_QEMU_ARGS} @@ -49,6 +54,11 @@ ifeq ($(ADK_TARGET_QEMU),y) @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${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 nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}' +endif # image creation and kernel install kernel-strip: @@ -70,3 +80,6 @@ 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/sparc/kernel/sun-voyager b/target/sparc/kernel/sun-voyager new file mode 100644 index 000000000..ffa9bb9f8 --- /dev/null +++ b/target/sparc/kernel/sun-voyager @@ -0,0 +1,9 @@ +CONFIG_SPARC=y +CONFIG_SPARC32=y +CONFIG_SBUS=y +CONFIG_SBUSCHAR=y +CONFIG_PCIC_PCI=y +CONFIG_SERIAL_CONSOLE=y +CONFIG_SERIAL_SUNCORE=y +CONFIG_SERIAL_SUNZILOG=y +CONFIG_SERIAL_SUNZILOG_CONSOLE=y diff --git a/target/sparc/systems/sun-voyager b/target/sparc/systems/sun-voyager new file mode 100644 index 000000000..931a46354 --- /dev/null +++ b/target/sparc/systems/sun-voyager @@ -0,0 +1,11 @@ +config ADK_TARGET_SYSTEM_SUN_VOYAGER + bool "Sun Voyager" + select ADK_sparc + select ADK_sun_voyager + select ADK_CPU_SPARC_V8 + select ADK_TARGET_WITH_VGA + select ADK_TARGET_WITH_SERIAL + select ADK_TARGET_KERNEL_VMLINUX_AOUT + help + Support for Sun Voyager. + |