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

Piotr Dymacz pepe2k at gmail.com
Thu Apr 6 00:51:32 PDT 2017


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

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

Is the initramfs image required for initial LEDE image flash on your 
device or is it just useful with recovery mode?

> 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.

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,
>




More information about the Lede-dev mailing list