From a8849b290972fe895e6dd368b770c5475db87d6d Mon Sep 17 00:00:00 2001 From: Andre Guedes Date: Thu, 7 May 2015 19:20:14 -0300 Subject: [PATCH] x86: Move bootstrap code and linker script to cpu/x86 This is a refactoring patch, no functionality is changed. It moves loader.S and galileo.ld from platform/galileo/ to cpu/x86/ directory since they seem to be more SoC-specific than platform-specific. It also renames galileo.ld to quarkX1000.ld since it can be used by any platform based on Quark X1000 SoC, not only Galileo. Furthermore, this patch also renames loader.S to bootstrap_quarkX1000.S since it is pretty much a bootstrap code to any platform based on Quark X1000 SoC. --- cpu/x86/Makefile.x86_quarkX1000 | 4 +++- platform/galileo/loader.S => cpu/x86/bootstrap_quarkX1000.S | 0 platform/galileo/galileo.ld => cpu/x86/quarkX1000.ld | 0 platform/galileo/Makefile.galileo | 4 +--- 4 files changed, 4 insertions(+), 4 deletions(-) rename platform/galileo/loader.S => cpu/x86/bootstrap_quarkX1000.S (100%) rename platform/galileo/galileo.ld => cpu/x86/quarkX1000.ld (100%) diff --git a/cpu/x86/Makefile.x86_quarkX1000 b/cpu/x86/Makefile.x86_quarkX1000 index b48b4a90f..b7b6966b3 100644 --- a/cpu/x86/Makefile.x86_quarkX1000 +++ b/cpu/x86/Makefile.x86_quarkX1000 @@ -2,4 +2,6 @@ include $(CONTIKI)/cpu/x86/Makefile.x86_common CONTIKI_CPU_DIRS += drivers/legacy_pc init/legacy_pc -CONTIKI_SOURCEFILES += rtc.c pit.c pic.c irq.c +CONTIKI_SOURCEFILES += bootstrap_quarkX1000.S rtc.c pit.c pic.c irq.c + +LINKERSCRIPT = $(CONTIKI)/cpu/x86/quarkX1000.ld diff --git a/platform/galileo/loader.S b/cpu/x86/bootstrap_quarkX1000.S similarity index 100% rename from platform/galileo/loader.S rename to cpu/x86/bootstrap_quarkX1000.S diff --git a/platform/galileo/galileo.ld b/cpu/x86/quarkX1000.ld similarity index 100% rename from platform/galileo/galileo.ld rename to cpu/x86/quarkX1000.ld diff --git a/platform/galileo/Makefile.galileo b/platform/galileo/Makefile.galileo index 9d186f8c5..7dce1a5c8 100644 --- a/platform/galileo/Makefile.galileo +++ b/platform/galileo/Makefile.galileo @@ -3,9 +3,7 @@ LIBGCC_PATH = /usr/lib/gcc/$(shell gcc -dumpmachine)/$(shell gcc -dumpversion) CONTIKI_TARGET_DIRS = . core/sys/ CONTIKI_TARGET_MAIN = ${addprefix $(OBJECTDIR)/,contiki-main.o} -CONTIKI_SOURCEFILES += contiki-main.c newlib-syscalls.c loader.S clock.c rtimer-arch.c - -LINKERSCRIPT = $(CONTIKI)/platform/galileo/galileo.ld +CONTIKI_SOURCEFILES += contiki-main.c newlib-syscalls.c clock.c rtimer-arch.c CONTIKI_CPU=$(CONTIKI)/cpu/x86 include $(CONTIKI)/cpu/x86/Makefile.x86_quarkX1000