diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-02-27 19:45:17 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-02-27 19:45:17 +0100 |
commit | 809d9eb235b6f8440416157a75a18bdecc1e61ed (patch) | |
tree | 474cb7cb045a562c48ec19b1c0a8210c33394a27 | |
parent | 49a2312ba19ddcd7fecc1ac8177cd1ae1346c4cc (diff) |
add support for sh and musl
-rw-r--r-- | package/musl/Makefile | 3 | ||||
-rw-r--r-- | target/config/Config.in | 1 | ||||
-rw-r--r-- | target/sh/Makefile | 6 | ||||
-rw-r--r-- | target/sh/sys-available/qemu-sh4 | 1 | ||||
-rw-r--r-- | target/sh/sys-available/qemu-sh4eb | 1 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/musl-sh.patch | 2 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/musl-sparc.patch | 6 | ||||
-rw-r--r-- | toolchain/musl/Makefile | 3 |
8 files changed, 16 insertions, 7 deletions
diff --git a/package/musl/Makefile b/package/musl/Makefile index ad7ec664f..1de20d37e 100644 --- a/package/musl/Makefile +++ b/package/musl/Makefile @@ -49,6 +49,9 @@ endif ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) MARCH:= armhf endif +ifeq ($(CPU_ARCH),sh4) +MARCH:= sh +endif # do nothing, musl is already build in toolchain directory do-install: diff --git a/target/config/Config.in b/target/config/Config.in index 68e2eefb0..69afde7f0 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -695,6 +695,7 @@ config ADK_TARGET_LIB_MUSL ADK_LINUX_MICROBLAZE || \ ADK_LINUX_MIPS || \ ADK_LINUX_PPC || \ + ADK_LINUX_SH || \ ADK_LINUX_X86 || \ ADK_LINUX_X86_64 help diff --git a/target/sh/Makefile b/target/sh/Makefile index b7160a509..98c5fb3ce 100644 --- a/target/sh/Makefile +++ b/target/sh/Makefile @@ -26,7 +26,7 @@ imageinstall: $(FW_DIR)/$(INITRAMFS) @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}' @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}' -ifeq ($(ADK_TARGET_SYSTEM_QEMU_SH),y) +ifeq ($(ADK_HARDWARE_QEMU),y) @echo "Start qemu with following command line:" @echo 'qemu-system-${CPU_ARCH} -M r2d -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}' endif @@ -35,8 +35,8 @@ ifeq ($(ADK_TARGET_FS),initramfs-piggyback) imageinstall: createinitramfs @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL} @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}' -ifeq ($(ADK_TARGET_SYSTEM_QEMU_SH),y) +ifeq ($(ADK_HARDWARE_QEMU),y) @echo "Start qemu with following command line:" - @echo 'qemu-system-{CPU_ARCH} -M r2d -kernel $(FW_DIR)/$(TARGET_KERNEL)' + @echo 'qemu-system-${CPU_ARCH} -M r2d -kernel $(FW_DIR)/$(TARGET_KERNEL)' endif endif diff --git a/target/sh/sys-available/qemu-sh4 b/target/sh/sys-available/qemu-sh4 index 54f13fb65..a872b20dc 100644 --- a/target/sh/sys-available/qemu-sh4 +++ b/target/sh/sys-available/qemu-sh4 @@ -8,6 +8,7 @@ config ADK_TARGET_SYSTEM_QEMU_SH4 select ADK_TARGET_WITH_VGA select ADK_TARGET_WITH_INPUT select ADK_TARGET_WITH_USB + select ADK_TARGET_KERNEL_ZIMAGE help Support for Qemu Emulator (superh). diff --git a/target/sh/sys-available/qemu-sh4eb b/target/sh/sys-available/qemu-sh4eb index 70365d7d4..aeffc92b6 100644 --- a/target/sh/sys-available/qemu-sh4eb +++ b/target/sh/sys-available/qemu-sh4eb @@ -9,6 +9,7 @@ config ADK_TARGET_SYSTEM_QEMU_SH4EB select ADK_TARGET_WITH_VGA select ADK_TARGET_WITH_INPUT select ADK_TARGET_WITH_USB + select ADK_TARGET_KERNEL_ZIMAGE help Support for Qemu Emulator (superh). diff --git a/toolchain/gcc/patches/4.7.3/musl-sh.patch b/toolchain/gcc/patches/4.7.3/musl-sh.patch index 7738f266e..fbf06082a 100644 --- a/toolchain/gcc/patches/4.7.3/musl-sh.patch +++ b/toolchain/gcc/patches/4.7.3/musl-sh.patch @@ -5,7 +5,7 @@ diff -Nur gcc-4.7.3.orig/gcc/config/sh/linux.h gcc-4.7.3/gcc/config/sh/linux.h #define TARGET_ASM_FILE_END file_end_indicate_exec_stack #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.so.1" #undef SUBTARGET_LINK_EMUL_SUFFIX #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" diff --git a/toolchain/gcc/patches/4.7.3/musl-sparc.patch b/toolchain/gcc/patches/4.7.3/musl-sparc.patch index 228b8522d..7c9214f07 100644 --- a/toolchain/gcc/patches/4.7.3/musl-sparc.patch +++ b/toolchain/gcc/patches/4.7.3/musl-sparc.patch @@ -5,8 +5,8 @@ diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux64.h gcc-4.7.3/gcc/config/sparc/l #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.1" ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.so.1" + #ifdef SPARC_BI_ARCH @@ -18,7 +18,7 @@ diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux.h gcc-4.7.3/gcc/config/sparc/lin done. */ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sparc.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sparc.so.1" #undef LINK_SPEC #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ diff --git a/toolchain/musl/Makefile b/toolchain/musl/Makefile index 44ee75775..7382b84da 100644 --- a/toolchain/musl/Makefile +++ b/toolchain/musl/Makefile @@ -18,6 +18,9 @@ endif ifeq ($(CPU_ARCH),microblazeel) REAL_GNU_TARGET_NAME:= $(subst microblazeel,microblaze,$(REAL_GNU_TARGET_NAME)) endif +ifeq ($(CPU_ARCH),sh4) +REAL_GNU_TARGET_NAME:= $(subst sh4,sh,$(REAL_GNU_TARGET_NAME)) +endif $(WRKBUILD)/.headers: (cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \ |