aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-07-25 12:12:06 +0000
committerJonas Gorski <jogo@openwrt.org>2015-07-25 12:12:06 +0000
commitda0d6d98752df45b165478acb44d87b4f1e6b5ac (patch)
tree7c5e0fd21987f6675417b5490174e8bf34a7d9f3 /target
parent6b24e1f5a07caccbd090af0feaf5da2a82e3bc86 (diff)
downloadmaster-187ad058-da0d6d98752df45b165478acb44d87b4f1e6b5ac.tar.gz
master-187ad058-da0d6d98752df45b165478acb44d87b4f1e6b5ac.tar.bz2
master-187ad058-da0d6d98752df45b165478acb44d87b4f1e6b5ac.zip
brcm63xx: use new tool for generating redboot images
Simplify image/Makefile by using the new perl script for RedBoot. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46489 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/brcm63xx/image/Makefile20
-rw-r--r--target/linux/brcm63xx/image/redbootscript.template15
2 files changed, 5 insertions, 30 deletions
diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile
index 98d145276c..b9f2c22875 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -100,21 +100,11 @@ define Image/Build/RedBootDTB
dd if=$(KDIR)/root.squashfs of="$(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs" bs=64k conv=sync
echo -ne \\xDE\\xAD\\xC0\\xDE >> "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs"
# Generate the scripted image
- $(CP) ./redbootscript.template $(BIN_DIR)/redbootscript
- let \
- kernellen="$$$$(stat -c%s $(BIN_DIR)/$(IMG_PREFIX)-$(2)-vmlinux.gz)" \
- rootfsdatalen="$$$$(stat -c %s $(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs)" \
- rootfsaddr="0xBE430000 + kernellen" \
- rootfslen="0xBEBF0000 - rootfsaddr" \
- offset2="0x1000 + kernellen"; \
- $(SED) "s,%loadaddr,$(strip $(LOADADDR)),g" \
- -e "s,%kernellen,$$$$(printf '%#x' $$$$kernellen),g" \
- -e "s,%offset2,$$$$(printf '%#x' $$$$offset2),g" \
- -e "s,%rootfsdatalen,$$$$(printf '%#x' $$$$rootfsdatalen),g" \
- -e "s,%rootfsaddr,$$$$(printf '%#x' $$$$rootfsaddr),g" \
- -e "s,%rootfslen,$$$$(printf '%#x' $$$$rootfslen),g" \
- "$(BIN_DIR)/redbootscript"
-
+ $(TOPDIR)/scripts/redboot-script.pl \
+ -k $(BIN_DIR)/$(IMG_PREFIX)-$(2)-vmlinux.gz \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs \
+ -a $(strip $(LOADADDR)) -f 0xbe430000 -l 0x7c0000 \
+ -s 0x1000 -t 20 -o $(BIN_DIR)/redbootscript
dd if="$(BIN_DIR)/redbootscript" of="$(BIN_DIR)/redbootscript.padded" bs=4096 conv=sync
cat \
"$(BIN_DIR)/redbootscript.padded" \
diff --git a/target/linux/brcm63xx/image/redbootscript.template b/target/linux/brcm63xx/image/redbootscript.template
deleted file mode 100644
index a007c849cf..0000000000
--- a/target/linux/brcm63xx/image/redbootscript.template
+++ /dev/null
@@ -1,15 +0,0 @@
-fis init -f
-
-fconfig boot_script true
-fconfig boot_script_data
-fis load -b %loadaddr -d kernel
-exec -c "noinitrd" %loadaddr
-
-
-fconfig boot_script_timeout 20
-
-fis create -o 0x1000 -f 0xBE430000 -l %kernellen kernel
-
-fis create -o %offset2 -s %rootfsdatalen -f %rootfsaddr -l %rootfslen rootfs
-
-reset