-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Frédéric.

Thanks for trying it out.
The Fonera2 uses "kernel" as partition name too, so I had a chance to
test it.

Attached is a newer version of platform.sh that does some more sanity
checking on the mtd partitions and a simple patch for the OpenWrt
buildroot (8.09 branch) to easily generate the required images.

The naming could be better and the stuff is in no way meant to interfere
with the real solution worked on by Felix, it's just a nice hack to have
sysupgrade now.

Regards,
JoW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpBL7IACgkQdputYINPTPOORwCcCK+a92K6ZHz01bjDkM5nRyEF
kmQAoIv5BQLYlrQyjy6rWQ5X0SCBGdr5
=0nn6
-----END PGP SIGNATURE-----

Attachment: platform.sh
Description: Bourne shell script

Index: target/linux/atheros/image/Makefile
===================================================================
--- target/linux/atheros/image/Makefile	(revision 16280)
+++ target/linux/atheros/image/Makefile	(working copy)
@@ -41,6 +41,17 @@
 		-r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
 		-o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin
 
+  ifeq ($(BOARD),atheros)
+	-sh $(TOPDIR)/scripts/atheros-combined-image.sh \
+		"$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma" "vmlinux.bin.l7" \
+		"$(BIN_DIR)/openwrt-$(BOARD)-root.$(1)" "rootfs" \
+		"$(BIN_DIR)/openwrt-fonera-combined.img"
+
+	-sh $(TOPDIR)/scripts/atheros-combined-image.sh \
+		"$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma" "kernel" \
+		"$(BIN_DIR)/openwrt-$(BOARD)-root.$(1)" "rootfs" \
+		"$(BIN_DIR)/openwrt-ubiquity-combined.img"
+  endif
 endef
 
 $(eval $(call BuildImage))
Index: scripts/atheros-combined-image.sh
===================================================================
--- scripts/atheros-combined-image.sh	(revision 0)
+++ scripts/atheros-combined-image.sh	(revision 0)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -f "$1" -a -n "$2" -a -f "$3" -a -n "$4" ] || {
+	echo "Usage: $0 /path/to/kernel.image kernel_name /path/to/rootfs.image rootfs_name [output-file]"
+	exit 1
+}
+
+( printf "FF%08x%-16s%08x%-16s%65486s" \
+	$(stat -c "%s" "$1") ${2:-vmlinux.bin.l7} \
+	$(stat -c "%s" "$3") ${4:-rootfs} "";
+	cat "$1" "$3"
+) > ${5:-openwrt-atheros-combined.img}
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
  • ... Daniel Dickinson <crazycsh...@gmail.com> (by way of Daniel Dickinson
    • ... Daniel Dickinson
      • ... RHS Linux User
      • ... Malte S. Stretz
        • ... Jo-Philipp Wich
          • ... Malte S. Stretz
            • ... Felix Fietkau
              • ... Daniel Dickinson
            • ... Jo-Philipp Wich
              • ... Frédéric Moulins
                • ... Jo-Philipp Wich
                • ... Frédéric Moulins
        • ... Peter Korsgaard
          • ... Malte S. Stretz

Reply via email to