That's fair enough. There is definitely a cost to "inheritance" if a change in the base bsp breaks a bunch of boards that were based on it but perhaps not quite as closely as the bsp author had assumed.
One way to prevent breakages is to depend on a locked version and only upgrade the dependency explicitly. Unfortunately, then you are no longer running up-to-date software bits that come from the same repo, and locking just the bsp sounds dangerous due to tight hal/mcu coupling. In short, I don't have a good answer either ;) I'll copy-and-patch for now. On Wed, Jun 8, 2016 at 3:51 PM, will sanfilippo <[email protected]> wrote: > Simon: > > Dont take this as a judgment on what you are proposing (others have > mentioned it as well) but there are pros and cons to both approaches. What > we (and maybe that is the royal “we”; meaning it is just my opinion, lol) > wanted to avoid was tons of “tweaks” to a particular bsp platform. I can > see a case where there are many similar bsps and all these tweaks get messy > and also possibly break working bsps. > > All that said, it does seem wasteful to have a plethora of bsps with very > minor changes and if these tweaks can be contained in a single place it > seems like a good idea. > > I dont have any particular suggestions as of this moment but will give > this some thought and hopefully we can come up with something that will > make all happy. Sorry if this answer is not tremendously satisfying… > > > > > On Jun 8, 2016, at 12:43 PM, Simon Ratner <[email protected]> wrote: > > > > I would like to create a couple of custom bsps for boards which are > > identical to nrf51dk but a few small tweaks (e.g. led pin, flash area > > layout). > > > > From the docs, I gather that copying hw/bsp/nrf51dk and patching bsp.h > and > > os_bsp.c would do the trick, and it seems that's how mynewt itself > handles > > this. However, I'd really prefer not to, so I can keep up with upstream > and > > avoid duplicating fixes in multiple places (like > > > https://github.com/apache/incubator-mynewt-core/commit/c70353c193bf3e91a095cfc5076ac578f8e1bc69 > ). > > > > > > Any suggestions on how to best layer my tweaks on top of an existing bsp? > > Can I abuse the deps system somehow? > > > > Simon. > >
