Belkin F9J1108v2 factory file creation

I have got this to work here but I have no idea if it's the correct way to do it
I had a quick look at submitting stuff but even that looks daunting
so I'll put what I have here it's only for 18.06 branch until or if the ATH79 version is made
the Belkin F9J1108 "case sticker F9J1108v2 firmware says F9J1108v1" it's the same as the Belkin F9K1115V2
that's if you are prepared to not use the modem that comes in the power supply and just use it as a router only

but it needs a different header in the factory firmware file to be able to flash OpenWRT to it
the changes needed are made to the "\target\linux\ar71xx\image\legacy.mk"
adding a -M "F9J1108v1" when the factory image is made
with out -M "eDiMaX" is used as for the F9K1115V2
below are the changes I made to get this to work for me maybe they will help someone else
the folowing will make the factory file for the F9J1108v2
it will also make the sysupgrade file that is identical to the F9K1115V2 version

file to edit "\target\linux\ar71xx\image\legacy.mk"
From
$(eval $(call SingleProfile,Belkin,64k,F9K1115V2,f9k1115v2,F9K1115V2,ttyS0,115200,$$(f9k1115v2_mtdlayout),BR-6679BAC))
To
$(eval $(call SingleProfile,Belkin,64k,F9K1115V2,f9k1115v2,F9K1115V2,ttyS0,115200,$$(f9k1115v2_mtdlayout),BR-6679BAC,eDiMaX))
$(eval $(call SingleProfile,Belkin,64k,FJK1108V1,fjk1108v1,F9K1115V2,ttyS0,115200,$$(f9k1115v2_mtdlayout),BR-6679BAC,F9J1108v1))

From
edimax_fw_header -m $(5) -v "$(shell echo -n $(VERSION_DIST)$(REVISION) | cut -c -13)"
-n "uImage"
-i $(KDIR_TMP)/vmlinux-$(2).uImage
-o $(KDIR_TMP)/$(2)-uImage;
edimax_fw_header -m $(5) -v "$(shell echo -n

To
edimax_fw_header -m $(5) -M $(6) -v "$(shell echo -n $(VERSION_DIST)$(REVISION) | cut -c -13)"
-n "uImage"
-i $(KDIR_TMP)/vmlinux-$(2).uImage
-o $(KDIR_TMP)/$(2)-uImage;
edimax_fw_header -m $(5) -M $(6) -v "$(shell echo -n

Man, thank you for posting this. It is the only hint about F9J1108 I could find anywhere.
I'm trying to follow the footsteps without much of understanding admittedly, so I wonder why did you put
FJK1108V1 and not F9J1108V1 into:

I'd say it was a mistake that did brake anything so i didn't notice
been so long i can't remember much about it
after you get openwrt on the device you just use the F9K1115V2 update

First attempt failed - router doesn't accept the bin file... The filename doesn't matter does it?
Trying to double check everything, here's the changes I made:

$(eval $(call SingleProfile,Belkin,64k,F9K1115V2,f9k1115v2,F9K1115V2,ttyS0,115200,$$(f9k1115v2_mtdlayout),BR-6679BAC,eDiMaX))
$(eval $(call SingleProfile,Belkin,64k,F9J1108V1,f9j1108v1,F9K1115V2,ttyS0,115200,$$(f9k1115v2_mtdlayout),BR-6679BAC,F9J1108v1))
define Image/Build/Belkin
	$(eval fwsize=$(call mtdpartsize,firmware,$(4)))
	$(eval kernsize=$(call mtdpartsize,kernel,$(4)))
	$(eval rootsize=$(call mtdpartsize,rootfs,$(4)))
	$(call Sysupgrade/RKuImage,$(1),$(2),$(kernsize),$(rootsize))
	if [ -e "$(call sysupname,$(1),$(2))" ]; then \
		edimax_fw_header -m $(5) -M $(6) -v "$(shell echo -n $(VERSION_DIST)$(REVISION) | cut -c -13)" \
			-n "uImage" \
			-i $(KDIR_TMP)/vmlinux-$(2).uImage \
			-o $(KDIR_TMP)/$(2)-uImage; \
		eedimax_fw_header -m $(5) -M $(6) -v "$(shell echo -n $(VERSION_DIST)$(REVISION) | cut -c -13)" \
			-n "rootfs" \
			-i $(KDIR)/root.$(1) \
			-o $(KDIR_TMP)/$(2)-rootfs; \
		( \
			dd if=$(KDIR_TMP)/$(2)-rootfs; \
			dd if=$(KDIR_TMP)/$(2)-uImage; \
		) > "$(call factoryname,$(1),$(2))"; \
	fi
endef

Could adding any extra packages (luci etc.) make router reject the file? (The size is OK)
Will try to clean up the source and rebuild, just in case.

it really only changed the header & it's checksums the header is at the start of the file
you can see this in a hex comparison of both factory files F9K1115V2 & F9J1108v1

Do you know how large exactly is the header that needs to change? Maybe I could just do it by hand?

I compared bit-wise the file I've got with official Belkin firmware, but it was 'inconclusive' - some things matched and some didn't.

did you compare the 2 files generated the openwrt factory image for the F9K1115V2 & the openwrt factory image for the F9J1108v1
the header & chesksum's should be the only difference
one being "eDiMaX" the other "F9J1108v1"

you can do anything by hand but i don't know how to calculate the check sums

Ok, I can see the last file I build starts with 'eDiMaX'. I'm currently rebuilding from scratch.
Just to make sure, after I've made the changes the factory image built for F9K1115V2 should start with 'F9J1108v1'?

ok I'm just looking it's not generating both images like I expected it to
it's probably a mistake I made way back when i did it
if you change the 2nd line to
$(eval $(call SingleProfile,Belkin,64k,F9K1115V2,f9j1108v1,F9K1115V2,ttyS0,115200,$$(f9k1115v2_mtdlayout),BR-6679BAC,F9J1108v1))
it will make the file you want
but only the f9j1108v1 not both

Brilliant! Worked like a charm, the factory file it generated started with "F9J1108V1", and the router accepted it no problem.
Thank you!