Hi, we do something very similar on some lantiq boards.
On 16/02/2016 21:25, Joseph C. Lehner wrote: > This patch adds support for building factory and sysupgrade images > for the Netgear EX2700 that don't require modification of u-boot > environment variables. > could you please briefly describe what,why,how you are doing and ... > Signed-off-by: Joseph C. Lehner <[email protected]> > > --- > > diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile > index 8bdd76a..68580ad 100644 > --- a/target/linux/ramips/image/Makefile > +++ b/target/linux/ramips/image/Makefile > @@ -912,8 +912,65 @@ endif > # MT7620A Profiles > # [...] > + # Manually create the header of a 0 byte uImage. We can't use > + # mkimage because it wont let us use an empty source file. > + $(eval fakeroot=$(KDIR)/fakeroot-$(2).uImage) > + > + # ih_magic: > + echo -ne '\x27\x05\x19\x56' > $(fakeroot) > + # ih_hcrc: > + echo -ne '\x22\x6e\x07\xc1' >> $(fakeroot) > + # ih_time: > + echo -ne '\x00\x00\x00\x00' >> $(fakeroot) > + # ih_size: > + echo -ne '\x00\x00\x00\x00' >> $(fakeroot) > + # ih_load: > + echo -ne '\x00\x00\x00\x00' >> $(fakeroot) > + # ih_ep: > + echo -ne '\x00\x00\x00\x00' >> $(fakeroot) > + # ih_dcrc: > + echo -ne '\x00\x00\x00\x00' >> $(fakeroot) > + # ih_os, ih_arch, ih_type, ih_comp: > + echo -ne '\x05\x05\x07\x00' >> $(fakeroot) > + # ih_name: > + echo -n 'OpenWrt fakeroot' >> $(fakeroot) > + # padding: > + echo -ne '\x00\x00\x00\x00' >> $(fakeroot) > + echo -ne '\x00\x00\x00\x00' >> $(fakeroot) > + echo -ne '\x00\x00\x00\x00' >> $(fakeroot) > + echo -ne '\x00\x00\x00\x00' >> $(fakeroot) > + this is all static data. simply throw a file with the content into target/linux/ramips/image/ex2700-fake-uImage instead of creating the file everytime. John _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
