aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/dts/EX2700.dts
diff options
context:
space:
mode:
authorINAGAKI Hiroshi <musashino.open@gmail.com>2018-11-28 12:28:35 +0900
committerMathias Kresin <dev@kresin.me>2018-11-29 13:15:44 +0100
commitd70ec3008d4cd0540a9f6c88fb7e786107f1679a (patch)
tree3bf0fb9b25cd1aa7bee6b6f5878f6cd7d8e50a31 /target/linux/ramips/dts/EX2700.dts
parent1977be8bd0753406ef5e76bede162827a9514610 (diff)
downloadupstream-d70ec3008d4cd0540a9f6c88fb7e786107f1679a.tar.gz
upstream-d70ec3008d4cd0540a9f6c88fb7e786107f1679a.tar.bz2
upstream-d70ec3008d4cd0540a9f6c88fb7e786107f1679a.zip
ramips: specify "firmware" partition format
Specify firmware partition format by compatible string. formats in ramips: - denx,uimage - tplink,firmware - seama It's unlikely but the firmware splitting might not work any longer for the following boards, due to a custom header: - EX2700: two uImage headers - BR-6478AC-V2: edimax-header - 3G-6200N: edimax-header - 3G-6200NL: edimax-header - BR-6475ND: edimax-header - TEW-638APB-V2: umedia-header - RT-N56U: mkrtn56uimg But it rather looks like the uImage splitter is fine with the extra header. The following dts are not touched, due to lack of a compatible string in the matching firmware splitter submodule: - CONFIG_MTD_SPLIT_JIMAGE_FW DWR-116-A1.dts DWR-118-A2.dts DWR-512-B.dts DWR-921-C1.dts LR-25G001.dts - CONFIG_MTD_SPLIT_TRX_FW WCR-1166DS.dts WSR-1166.dts - CONFIG_MTD_SPLIT_MINOR_FW RBM11G.dts RBM33G.dts - CONFIG_MTD_SPLIT_LZMA_FW AR670W.dts - CONFIG_MTD_SPLIT_WRGG_FW DAP-1522-A1.dts Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Diffstat (limited to 'target/linux/ramips/dts/EX2700.dts')
-rw-r--r--target/linux/ramips/dts/EX2700.dts1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/linux/ramips/dts/EX2700.dts b/target/linux/ramips/dts/EX2700.dts
index 658543e0fb..66a46d7037 100644
--- a/target/linux/ramips/dts/EX2700.dts
+++ b/target/linux/ramips/dts/EX2700.dts
@@ -122,6 +122,7 @@
};
partition@40000 {
+ compatible = "denx,uimage";
label = "firmware";
reg = <0x40000 0x3b0000>;
};
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <libgen.h>
#include <stdarg.h>
#include <getopt.h>
#include <string.h>
#include <errno.h>

#include <netinet/in.h>	// htonl

// Usage: mkdapimg [-p] [-m <model>] -s <sig> -i <input> -o <output>
//
// e.g.: mkdapimg -s RT3052-AP-DAP1350-3 -i sysupgarde.bin -o factory.bin
//
// If the model string <model> is not given, we will assume that
// the leading characters upto the first "-" is the model.
//
// The "-p" (patch) option is used to patch the exisiting image with the
// specified model and signature.
// The "-x" (fix) option will recalculate the payload size and checksum
// during the patch mode operation.

// The img_hdr_struct was taken from the D-Link SDK:
// DAP-1350_A1_FW1.11NA_GPL/GPL_Source_Code/Uboot/DAP-1350/httpd/header.h

#define MAX_MODEL_NAME_LEN	20
#define MAX_SIG_LEN		30
#define MAX_REGION_LEN		4
#define MAX_VERSION_LEN		12

struct img_hdr_struct {
	uint32_t checksum;
	char model[MAX_MODEL_NAME_LEN];
	char sig[MAX_SIG_LEN];
	uint8_t	partition;       
	uint8_t hdr_len;
	uint8_t rsv1;