[LEDE-DEV] [PATCH] ar71xx: add Engenius ENH200EXT support

Paul Oranje por at xs4all.nl
Thu Apr 6 05:24:40 PDT 2017


Thanks for the info.
The systematics for the generation of the build config from the makefiles is still quite obscure to me. A wiki lemma that puts some light in this would be welcome; once I do understand I may write one.

See my questions/comments/replies in-line below.

Ciao,
Paul


> Op 6 apr. 2017, om 09:51 heeft Piotr Dymacz <pepe2k at gmail.com> het volgende geschreven:
> 
> Hello Paul,
> 
> On 05.04.2017 23:23, Paul Oranje wrote:
>> Hello,
>> 
>> I’m wondering how to make LEDE build automatically an initramfs image (for use with u-boot tftp recovery boot), when the ENH200EXT is selected as the target device. By setting "CONFIG_TARGET_ROOTFS_INITRAMFS=y" a working image is build that can be tftp-booted alright, but I would prefer that it is build automatically beside the sysupgrade image.
>> 
>> The context would, as requested, be "target/linux/ar71xx/image/generic.mk".
> 
> The "generic" subtarget doesn't have included "ramdisk" feature:
> https://github.com/lede-project/source/blob/master/target/linux/ar71xx/generic/target.mk#L2
> 
> It's the one responsible for selecting the "TARGET_ROOTFS_INITRAMFS":
> https://github.com/lede-project/source/blob/master/scripts/target-metadata.pl#L34
Does that mean that the initramfs can only be triggered by manually setting “CONFIG_TARGET_ROOTFS_INITRAMFS=y” ?
That would mean that the LEDE build-bots would not generate initramfs images and people would need for the initial install to build such images themselves. Likely I’ve not understood well how it works and what follows hints how to do it.

> https://github.com/lede-project/source/blob/master/config/Config-images.in#L11
> 
> On the other hand, "mikrotik" subtarget uses initramfs images as they are required for initial LEDE flash:
> https://github.com/lede-project/source/blob/master/target/linux/ar71xx/mikrotik/target.mk#L2

Adding "FEATURES += ramdisk” to the "Device/enh200ext” definition in "target/linux/ar71xx/image/generic.mk” does not work (tried it).

Since the initramfs is only needed for some ar71xx target profiles, the FEATURES declaration should not be set in “target/linux/ar71xx/generic/target.mk”. If the FEATURE should be set in the context of a target.mk, then a new makefile "target/linux/ar71xx/engenius/target.mk" would be needed, or to what other makefile could/should "FEATURES += ramdisk” then be added ?

> 
> Is the initramfs image required for initial LEDE image flash on your device or is it just useful with recovery mode?
The stock firmware cannot install a LEDE factory image, so the initramfs image is indeed needed for the initial install.

> 
>> From what I have understood so far, the clause would be something like:
>> 
>> 	define Device/enh200ext
>> 	  DEVICE_TITLE := Engenius ENH200EXT
>> 	  DEVICE_PACKAGES := rssileds
>> 	  BOARDNAME := ENH200EXT
>> 	  CONSOLE := ttyS0,115200
> 
> Side note: this is default under ar71xx target, drop this line in your next patch please.
OK, I’ll drop the CONSOLE line.

> 
> Defaults: https://github.com/lede-project/source/blob/master/target/linux/ar71xx/image/Makefile#L99
> 
> --
> Cheers,
> Piotr
> 
>> 	  IMAGE_SIZE := 8192k
>> 	  IMAGES := initramfs.bin sysupgrade.bin
>> 	  MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),6272k(firmware),1536k(failsafe),64k(art)ro
>> 	endef
>> 	TARGET_DEVICES += enh200ext
>> 
>> The sysupgrade image is build, but the initramfs image is not build. I suppose an IMAGE/initramfs declaration must be added, but I do not know what to declare or call.
>> 
>> Some help would be appreciated,
>> 
> 
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev




More information about the Lede-dev mailing list