From: Stephan Hoffmann <sho@relinux.de>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 4/5] Microblaze: build kernel with device tree
Date: Sun, 11 Mar 2012 17:50:17 +0100 [thread overview]
Message-ID: <4F5CD7C9.40505@relinux.de> (raw)
Device Tree and SimpleImage will be handled in buildroot in the
future. Until then, this patch is needed.
Signed-off-by: Stephan Hoffmann <sho@relinux.de>
---
linux/Config.in | 8 ++++++++
linux/linux.mk | 16 ++++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/linux/Config.in b/linux/Config.in
index 26032fd..7d9f4fb 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -120,6 +120,14 @@ config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE
help
Path to the kernel configuration file
+config BR2_LINUX_KERNEL_DTS_FILE
+ string "Device Tree dts file location"
+ depends on BR2_microblaze
+ help
+ Path from where the dts file has to be copied
+ The final "custom target" name depends on the
+ dts file name:
+ <name>.dts --> simpleImage.<name>
#
# Binary format
#
diff --git a/linux/linux.mk b/linux/linux.mk
index ae236d4..ade867a 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -117,6 +117,18 @@ endef
LINUX_POST_PATCH_HOOKS += LINUX_APPLY_PATCHES
+ifeq ($(KERNEL_ARCH),microblaze)
+# on microblaze, we always want mkimage
+LINUX_DEPENDENCIES+=host-uboot-tools
+
+define LINUX_COPY_DTS
+ if test -f "$(BR2_LINUX_KERNEL_DTS_FILE)" ; then \
+ cp $(BR2_LINUX_KERNEL_DTS_FILE) $(@D)/arch/microblaze/boot/dts ; \
+ else \
+ echo "Cannot copy dts file!" ; \
+ fi
+endef
+endif
ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
KERNEL_SOURCE_CONFIG = $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig
@@ -131,6 +143,8 @@ define LINUX_CONFIGURE_CMDS
$(if $(BR2_ARM_EABI),
$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config),
$(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(@D)/.config))
+ $(if $(BR2_microblaze),
+ $(call LINUX_COPY_DTS))
# As the kernel gets compiled before root filesystems are
# built, we create a fake cpio file. It'll be
# replaced later by the real cpio archive, and the kernel will be
@@ -215,6 +229,8 @@ $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LI
$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME)
# Copy the kernel image to its final destination
cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
+ # If there is a .ub file copy it to the final destination
+ test -f $(LINUX_IMAGE_PATH).ub && cp $(LINUX_IMAGE_PATH).ub $(BINARIES_DIR)
$(Q)touch $@
# The initramfs building code must make sure this target gets called
--
1.7.0.4
--
reLinux - Stephan Hoffmann
Am Schmidtgrund 124 50765 K?ln
Tel. +49.221.95595-19 Fax: -64
www.reLinux.de sho at reLinux.de
next reply other threads:[~2012-03-11 16:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-11 16:50 Stephan Hoffmann [this message]
2012-03-12 22:10 ` [Buildroot] [PATCH 4/5] Microblaze: build kernel with device tree Thomas Petazzoni
2012-03-13 23:25 ` Arnout Vandecappelle
2012-03-14 16:41 ` Alvaro Gamez
2012-03-15 18:57 ` Stephan Hoffmann
2012-03-15 19:21 ` Alvaro Gamez
2012-03-16 13:39 ` Alvaro Gamez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F5CD7C9.40505@relinux.de \
--to=sho@relinux.de \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox