summaryrefslogtreecommitdiff
path: root/arch/csky/boot
diff options
context:
space:
mode:
authorGuo Ren <ren_guo@c-sky.com>2018-09-05 09:25:06 +0300
committerGuo Ren <ren_guo@c-sky.com>2018-10-25 18:36:19 +0300
commitc32e64e852f3f5c0fd709f84bc94736840088375 (patch)
tree420e0ad361bb187377d7e038b3058391a169466c /arch/csky/boot
parent84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d (diff)
downloadlinux-c32e64e852f3f5c0fd709f84bc94736840088375.tar.xz
csky: Build infrastructure
This patch adds Makefile, Kconfig for build infrastructure. Signed-off-by: Guo Ren <ren_guo@c-sky.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/csky/boot')
-rw-r--r--arch/csky/boot/Makefile24
-rw-r--r--arch/csky/boot/dts/Makefile13
l---------arch/csky/boot/dts/include/dt-bindings1
3 files changed, 38 insertions, 0 deletions
diff --git a/arch/csky/boot/Makefile b/arch/csky/boot/Makefile
new file mode 100644
index 000000000000..47d3d723784c
--- /dev/null
+++ b/arch/csky/boot/Makefile
@@ -0,0 +1,24 @@
+targets := Image zImage uImage
+targets += $(dtb-y)
+
+$(obj)/Image: vmlinux FORCE
+ $(call if_changed,objcopy)
+ @echo ' Kernel: $@ is ready'
+
+compress-$(CONFIG_KERNEL_GZIP) = gzip
+compress-$(CONFIG_KERNEL_LZO) = lzo
+compress-$(CONFIG_KERNEL_LZMA) = lzma
+compress-$(CONFIG_KERNEL_XZ) = xzkern
+compress-$(CONFIG_KERNEL_LZ4) = lz4
+
+$(obj)/zImage: $(obj)/Image FORCE
+ $(call if_changed,$(compress-y))
+ @echo ' Kernel: $@ is ready'
+
+UIMAGE_ARCH = sandbox
+UIMAGE_COMPRESSION = $(compress-y)
+UIMAGE_LOADADDR = $(shell $(NM) vmlinux | awk '$$NF == "_start" {print $$1}')
+
+$(obj)/uImage: $(obj)/zImage
+ $(call if_changed,uimage)
+ @echo 'Image: $@ is ready'
diff --git a/arch/csky/boot/dts/Makefile b/arch/csky/boot/dts/Makefile
new file mode 100644
index 000000000000..305e81a5e91e
--- /dev/null
+++ b/arch/csky/boot/dts/Makefile
@@ -0,0 +1,13 @@
+dtstree := $(srctree)/$(src)
+
+ifneq '$(CONFIG_CSKY_BUILTIN_DTB)' '""'
+builtindtb-y := $(patsubst "%",%,$(CONFIG_CSKY_BUILTIN_DTB))
+dtb-y += $(builtindtb-y).dtb
+obj-y += $(builtindtb-y).dtb.o
+.SECONDARY: $(obj)/$(builtindtb-y).dtb.S
+else
+dtb-y := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
+endif
+
+always += $(dtb-y)
+clean-files += *.dtb *.dtb.S
diff --git a/arch/csky/boot/dts/include/dt-bindings b/arch/csky/boot/dts/include/dt-bindings
new file mode 120000
index 000000000000..08c00e4972fa
--- /dev/null
+++ b/arch/csky/boot/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../../include/dt-bindings \ No newline at end of file