On 2016-11-27 06:28, J Mo wrote: > its-maker.sh creates an .its file, given a series of arguments, which is > then used to create a FIT image with mkimage. > > Required to support the tew827dru, but intended to support the creation > of nearly any .its file. > > Documentation thread on the OpenWRT forum: > https://forum.openwrt.org/viewtopic.php?pid=337783 > > Signed-off-by: Jesse Molina <jm...@jmomo.net> I just took a look at this script and its output from calling it the way you do for your device. I think this script is way too complex for its rather simple output. Since the command line of the script is only marginally more concise than the output it generates, I think you should drop this script entirely.
Here's how I think this could work instead (untested pseudocode) define Device/TEW827DRU/its /dts-v1/; / { description = "LEDE FIT image for $(DEVICE_NAME)"; #address-cells = <1>; images { script@0 { data = /incbin/("tew827dru-flash.scr"); description = "u-boot-HTTP firmware update script"; type = "script"; compression = "none"; arch = "$(ARCH)"; hash@0 { algo = "crc32"; }; }; ubi-image@1 { data = /incbin/("%ROOTFS_IMAGE%"); description = "UBI rootfs image"; type = "firmware"; compression = "none"; arch = "$(ARCH)"; hash@0 { algo = "crc32"; }; }; bootconfig@2 { data = /incbin/("tew827dru-bootconfig.bin"); description = "BOOTCONFIG: boot from APPSBL and rootfs"; type = "firmware"; compression = "none"; arch = "$(ARCH)"; hash@0 { algo = "crc32"; }; }; }; }; endef $(eval $(call shexport,Device/TEW827DRU/its)) define Build/mkfit-TEW827DRU $(SH_FUNC) var2file "$(call shvar,Device/TEW827DRU/its)" $@.its $(SED) 's,%ROOTFS_IMAGE%,$@,' $@.its PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.fit rm -f $@.its mv $@.fit $@ endef A few more notes about this: When in context of an image makefile, don't specify the absolute path using $(TOPDIR)/...., instead assume that the image/ directory of your target is the current directory. - Felix _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev