summaryrefslogtreecommitdiff
path: root/src/cpu/allwinner/a10/Makefile.inc
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2013-12-13 20:44:48 -0600
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-01-08 22:54:08 +0100
commitf64111b4865d611821950b25dc1ea235d8d9ca79 (patch)
treed61eef4c9476ada907f0d91e93c2707aed44df96 /src/cpu/allwinner/a10/Makefile.inc
parent34286b861a9427520f3f3afb8bf64bfa7de37c24 (diff)
downloadcoreboot-f64111b4865d611821950b25dc1ea235d8d9ca79.tar.xz
cpu: Add initial support for Allwinner A10 SoC
Add minimal support needed to get a bootblock capable of initialising a serial console. Change-Id: I50dd85544549baf9c5ea0aa3b4296972136c02a4 Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/4549 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/cpu/allwinner/a10/Makefile.inc')
-rw-r--r--src/cpu/allwinner/a10/Makefile.inc35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/cpu/allwinner/a10/Makefile.inc b/src/cpu/allwinner/a10/Makefile.inc
new file mode 100644
index 0000000000..48f3110605
--- /dev/null
+++ b/src/cpu/allwinner/a10/Makefile.inc
@@ -0,0 +1,35 @@
+bootblock-y += pinmux.c
+bootblock-y += bootblock_media.c
+bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c
+bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart_console.c
+
+romstage-y += uart.c
+romstage-y += uart_console.c
+romstage-y += bootblock_media.c
+
+ramstage-y += uart.c
+ramstage-y += uart_console.c
+ramstage-y += timer.c
+ramstage-y += monotonic_timer.c
+ramstage-y += bootblock_media.c
+
+
+real-target: $(obj)/BOOT0
+
+get_bootblock_size= \
+ $(eval bb_s=$(shell $(CBFSTOOL) $(1) print | grep bootblocksize | \
+ sed 's/[^0-9 ]//g')) \
+ $(shell echo $$(($(word 2, $(strip $(bb_s))))))
+
+# The boot ROM in the SoC will start loading code if a special boot0 header is
+# found (at an offset of 8KiB in either NAND or SD), and the checksum is
+# correct. this header is normally added by the 'mxsunxiboot' tool. The file
+# passed to mksunxiboot should only include the bootblock due to size
+# limitations.
+# FIXME: Figure out how to safely integrate in coreboot.rom. For now, only copy
+# the first 15 KiB of coreboot.rom (This will not collide with stack)
+$(obj)/BOOT0: $(obj)/coreboot.rom
+ @printf " BOOT0 $(subst $(obj)/,,$(^))\n"
+ touch $@
+ dd if=$^ of=$^.tmp bs=1024 count=15
+ -mksunxiboot $^.tmp $@