]> xenbits.xensource.com Git - people/julieng/boot-wrapper-aarch64.git/commitdiff
Use the DTC Power(TM) instead of sed to inject the chosen node
authorPawel Moll <pawel.moll@arm.com>
Wed, 21 Nov 2012 16:13:17 +0000 (16:13 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 9 Jan 2013 15:53:20 +0000 (15:53 +0000)
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Makefile

index 5e8b154d02e6995f50f00131585b5bd658e374ea..6e351631c63b381199eae212ceb27e61a2d8e023 100644 (file)
--- 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)