aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Moll <pawel.moll@arm.com>2012-11-21 16:13:17 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2013-01-09 15:53:20 +0000
commitdfa7df4e2af3c9920eb0e6cfe3e60b85264bb9d4 (patch)
treea14025faf1fdf6a0aea2068898e70d3113fb193f
parent26b62f586020fd998c6efd43db657eaafeec14da (diff)
downloadboot-wrapper-aarch64-dfa7df4e2af3c9920eb0e6cfe3e60b85264bb9d4.tar.gz
Use the DTC Power(TM) instead of sed to inject the chosen node
Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r--Makefile7
1 files changed, 3 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 5e8b154..6e35163 100644
--- a/Makefile
+++ b/Makefile
@@ -37,14 +37,14 @@ FDT_OFFSET := 0x08000000
ifneq (,$(findstring USE_INITRD,$(CPPFLAGS)))
BOOTARGS := "console=ttyAMA0 $(BOOTARGS_EXTRA)"
CHOSEN_NODE := chosen { \
- bootargs = $(BOOTARGS); \
+ bootargs = \"$(BOOTARGS)\"; \
linux,initrd-start = <$(FILESYSTEM_START)>; \
linux,initrd-end = <$(FILESYSTEM_END)>; \
};
else
BOOTARGS := "console=ttyAMA0 root=/dev/nfs nfsroot=10.1.69.68:/work/debootstrap/aarch64,tcp rw ip=dhcp $(BOOTARGS_EXTRA)"
CHOSEN_NODE := chosen { \
- bootargs = $(BOOTARGS); \
+ bootargs = \"$(BOOTARGS)\"; \
};
endif
@@ -72,8 +72,7 @@ ifeq ($(DTC),)
endif
fdt.dtb: $(FDT_DEPS) Makefile
- @sed -e 's%/\* chosen \*/%$(CHOSEN_NODE)%' -e 's%$(strip $(FDT_INCL_REGEX))%\1$(dir $(FDT_SRC))\2\3%' $< | \
- $(DTC) -O dtb -o $@ -
+ ( echo "/include/ \"$(FDT_SRC)\"" ; echo "/ { $(CHOSEN_NODE) };" ) | $(DTC) -O dtb -o $@ -
# The filesystem archive might not exist if INITRD is not being used
.PHONY: all clean $(FILESYSTEM)