No subject

Raylynn Knight rayknight at me.com
Wed Sep 2 21:30:27 EDT 2020


> On Aug 25, 2020, at 6:24 AM, Alberto Bursi <bobafetthotmail at gmail.com> wrote:
> 
> 
> On 23/08/20 05:06, Raylynn Knight via openwrt-devel wrote:
>> 1.  Should I add each device individually?  Even if some of the devices are very closely related.
> 
> yes, add one device for each commit because it's easier to review, although you should use common dts files for features that are the same, like I did for zyxel NSA310/NSA325
> 
> 
>> 2.  Like many of the already supported kirkwood devices updating to a more current version of u-boot would make supporting openwrt simpler.   I see that some of the existing devices have patches under package/boot/uboot-kirkwood/patches in the tree.  I can’t seem to locate any documentation indicating the procedures for adding u-boot support in that location.  The Makefile a directory above the patches indicates PKG_VERSION 2020.04.  Does this mean I should create my patches against u-boot version 2020.04?   If adding devices already supported by mainstream u-boot do I just add to that Makefile?   If adding devices currently unsupported by upstream u-boot is it required to submit a patch upstream as well?
> 
> the u-boot is handled like a package, if it is not already available upstream you need to add a patch for each device you want to support, and you must always add an entry in the makefile.
> 
> If some devices are supported by upstream uboot you will probably still want to add a small patch to change default boot envs so it can boot OpenWrt, like you see other patches do in that folder.
> 
> The uboot version is 2020.04
> 
Thanks for your response Alberto.  I’ve been busy the last couple of weeks as I was on call with my employer, but now that my rotation is over I have time to get back to this.  I’ve started with support for my first device which I chose because I though it would be the simplest for my first contribution.  I have the ZyXel NSA320 which is already supported in the Linux kernel and u-boot patches are available from bodi at the https://forum.doozan.com where a lot of kirkwood device support exists.   

At this point I’m struggling with workflow based on how OpenWrt uses patches for u-boot and kernel changes.   Do I take the u-boot 2020.04 tag, apply the existing OpenWrt u-boot patches, make my additions and then create patch files from the result which would be added to the package/boot/uboot-kirkwood/patches/ directory of my branch of the OpenWrt trunk?  If this is the correct workflow for u-boot changes do I then take a similar path using the 5.4 linux kernel for kernel patches?


> Upstreaming the change to uboot is welcome, but it does not seem mandatory, at least none enforced that on me when I added uboot patches for NSA310/325 and PogoPlugV4
> 
>> 3.  Is there an existing supported device that would be a good model for me to follow when adding additional devices?
>> 
> If you want to provide an uboot and place the kernel in the UBI partition, you can look at my commits where I added Zyxel NSA310b, NSA325 and PogoPlug V4.

Since I chose the ZyXel NSA320 as my first device I think it best to follow your example for consistency on the ZyXel NAS devices.  My follow up support will likely be for the 3 different Netgear NAS devices I have.

> If you want to use stock uboot and place the kernel in the place where stock firmware has the kernel, you can look at commit that added support for "cisco on100".
> 
> -Alberto
> 
Ray




More information about the openwrt-devel mailing list