You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Sterling Hughes <st...@apache.org> on 2016/09/15 22:50:25 UTC

Directory re-org conversation

Hey,

I wanted to get this kicked off, so we can make the changes fairly 
quickly after the sterly_refactor merge next week (while still giving 
enough time for discussion.)

Please take this as a _rough_ first cut proposal.  I want people to 
bikeshed this discussion, mainly because I only want to do this re-org 
once in the foreseeable future :-)

Proposed changes (on top of the sterly_refactor and develop branch.)

- IP and Wi-Fi support is moved from libs (e.g. libs/inet_def_service, 
libs/wifi_mgmt) and placed in the net/ directory.

- Any IP stack is moved into net/ip

- net/nimble/drivers is moved to drivers/nimble.  These drivers are 
modified to conform to our driver framework.

- libs/tinycrypt and libs/mbedtls are placed in crypto/mbedtls, 
crypto/tinycrypt

- libs/bleuart is placed in net/nimble/host/profiles

- libs/bootutil, libs/boot_serial are both placed in boot/ along with 
apps/boot

- elua is completed removed from mynewt-core.  mynewt-core should 
provide the core engine for any scripting language (JS, Lua, Python), 
but not bundle one by default.

- drivers is moved to hw/drivers, libs/cmsis-core is moved to 
hw/arch/arm/cmsis-core

- fcb is moved from sys/fcb to fs/fcb

- libs/console and libs/shell are moved to sys/console and sys/shell

- examples/ TLD is created, and libs/flash_test, libs/crash_test, 
apps/blecent, apps/bleprph, apps/bletest, apps/bletiny, apps/bleuart, 
apps/blinky, apps/slinky are all moved to examples.

- libs/os is moved to TLD \u201cos\u201d (or core/os? kern/os?)

- libs/testreport and libs/testutil are moved to a TLD \u201ctest/\u201c

- libs/util is broken up into crypto/hash (base64, crc), time/datetime 
(datetime.c), and TPQ is deleted (where do we put cbmem?  sys/defs? I 
think we should probably migrate queue.h from OS there too.)

- libs/imgmgr moved to mgmt/, libs/newtmgr moved to frameworks/newtmgr

- coap broken out of libs/iotivity and placed into net/.

- libs/iotivity broken into frameworks/oic.

- sys/mn_socket is moved to net/

- sys/reboot: should this be moved to boot or somewhere else, or just 
remain in sys/

Best,

Sterling

Re: Directory re-org conversation

Posted by Sterling Hughes <st...@apache.org>.
+10


On 21 Sep 2016, at 13:43, marko kiiskila wrote:

> We have 2 blinky apps. We should toast the one in 
> incubator-mynewt-core,
> and keep the incubator-mynewt-blinky.
>
>> On Sep 16, 2016, at 10:17 AM, Christopher Collins 
>> <cc...@apache.org> wrote:
>>
>> On Fri, Sep 16, 2016 at 10:04:37AM -0700, Aditi wrote:
>>> Would libs/bleuart is placed in net/nimble/host/profiles or
>>> net/nimble/host/services? I am still not clear on services vs.
>>> profiles in our directory structure.
>>
>> I think it should go in net/nimble/host/services.
>>
>> net/nimble/host/profiles is just for profiles.  A profile provides a
>> collection of services and additional system configuration.
>>
>> Chris
>

Re: Directory re-org conversation

Posted by marko kiiskila <ma...@runtime.io>.
We have 2 blinky apps. We should toast the one in incubator-mynewt-core,
and keep the incubator-mynewt-blinky.

> On Sep 16, 2016, at 10:17 AM, Christopher Collins <cc...@apache.org> wrote:
> 
> On Fri, Sep 16, 2016 at 10:04:37AM -0700, Aditi wrote:
>> Would libs/bleuart is placed in net/nimble/host/profiles or
>> net/nimble/host/services? I am still not clear on services vs.
>> profiles in our directory structure. 
> 
> I think it should go in net/nimble/host/services.
> 
> net/nimble/host/profiles is just for profiles.  A profile provides a
> collection of services and additional system configuration.
> 
> Chris


Re: Directory re-org conversation

Posted by Christopher Collins <cc...@apache.org>.
On Fri, Sep 16, 2016 at 10:04:37AM -0700, Aditi wrote:
> Would libs/bleuart is placed in net/nimble/host/profiles or
> net/nimble/host/services? I am still not clear on services vs.
> profiles in our directory structure. 

I think it should go in net/nimble/host/services.

net/nimble/host/profiles is just for profiles.  A profile provides a
collection of services and additional system configuration.

Chris

Re: Directory re-org conversation

Posted by Aditi <ad...@runtime.io>.
Would libs/bleuart is placed in net/nimble/host/profiles or net/nimble/host/services? I am still not clear on services vs. profiles in our directory structure. 

Thanks,
Aditi

> On Sep 15, 2016, at 8:16 PM, will sanfilippo <wi...@runtime.io> wrote:
> 
> I was not referring to hw drivers in general; just the BLE stack. I just dont really know what suspend/resume would mean to the BLE stack. Well, I am referring mainly to the controller… I guess it could mean things to the host. I am not strongly against it; I just think if we move it there then things like create, open, close, suspend, resume should make sense to do to the driver. If suspend and resume dont do anything but the rest do, that is fine as well. Just musing :-)
> 
> 
>> On Sep 15, 2016, at 6:44 PM, Sterling Hughes <st...@apache.org> wrote:
>> 
>> I was suggesting it be moved to hw/drivers/nimble.
>> 
>> It’s similar to how other OSes do it, they tend to have the hw drivers in the drivers directory, even for the networking stack components.  I don’t feel strongly about it, but thought, why shouldn’t we keep to convention.
>> 
>> I definitely think the HW drivers should use our device framework, unless there is a compelling reason not to.  It will allow there to be a central registry of drivers, and if the BT stack needs to be suspended/resumed, that’s a logical place to hook it in?
>> 
>> Sterling
>> 
>>> On 15 Sep 2016, at 18:39, will sanfilippo wrote:
>>> 
>>> Just a nit; I need to digest this a bit more but will net/nimble/drivers be moved to drivers/nimble or hw/drivers/nimble?
>>> 
>>> I am also not sure why you would move what is in there into the drivers directory and make it conform to the standard drivers as I am not sure what that would mean for the BLE stack but we could do it if folks thought it a good idea.
>>> 
>>>> On Sep 15, 2016, at 3:50 PM, Sterling Hughes <st...@apache.org> wrote:
>>>> 
>>>> Hey,
>>>> 
>>>> I wanted to get this kicked off, so we can make the changes fairly quickly after the sterly_refactor merge next week (while still giving enough time for discussion.)
>>>> 
>>>> Please take this as a _rough_ first cut proposal.  I want people to bikeshed this discussion, mainly because I only want to do this re-org once in the foreseeable future :-)
>>>> 
>>>> Proposed changes (on top of the sterly_refactor and develop branch.)
>>>> 
>>>> - IP and Wi-Fi support is moved from libs (e.g. libs/inet_def_service, libs/wifi_mgmt) and placed in the net/ directory.
>>>> 
>>>> - Any IP stack is moved into net/ip
>>>> 
>>>> - net/nimble/drivers is moved to drivers/nimble.  These drivers are modified to conform to our driver framework.
>>>> 
>>>> - libs/tinycrypt and libs/mbedtls are placed in crypto/mbedtls, crypto/tinycrypt
>>>> 
>>>> - libs/bleuart is placed in net/nimble/host/profiles
>>>> 
>>>> - libs/bootutil, libs/boot_serial are both placed in boot/ along with apps/boot
>>>> 
>>>> - elua is completed removed from mynewt-core.  mynewt-core should provide the core engine for any scripting language (JS, Lua, Python), but not bundle one by default.
>>>> 
>>>> - drivers is moved to hw/drivers, libs/cmsis-core is moved to hw/arch/arm/cmsis-core
>>>> 
>>>> - fcb is moved from sys/fcb to fs/fcb
>>>> 
>>>> - libs/console and libs/shell are moved to sys/console and sys/shell
>>>> 
>>>> - examples/ TLD is created, and libs/flash_test, libs/crash_test, apps/blecent, apps/bleprph, apps/bletest, apps/bletiny, apps/bleuart, apps/blinky, apps/slinky are all moved to examples.
>>>> 
>>>> - libs/os is moved to TLD “os” (or core/os? kern/os?)
>>>> 
>>>> - libs/testreport and libs/testutil are moved to a TLD “test/“
>>>> 
>>>> - libs/util is broken up into crypto/hash (base64, crc), time/datetime (datetime.c), and TPQ is deleted (where do we put cbmem?  sys/defs? I think we should probably migrate queue.h from OS there too.)
>>>> 
>>>> - libs/imgmgr moved to mgmt/, libs/newtmgr moved to frameworks/newtmgr
>>>> 
>>>> - coap broken out of libs/iotivity and placed into net/.
>>>> 
>>>> - libs/iotivity broken into frameworks/oic.
>>>> 
>>>> - sys/mn_socket is moved to net/
>>>> 
>>>> - sys/reboot: should this be moved to boot or somewhere else, or just remain in sys/
>>>> 
>>>> Best,
>>>> 
>>>> Sterling
> 

Re: Directory re-org conversation

Posted by will sanfilippo <wi...@runtime.io>.
I was not referring to hw drivers in general; just the BLE stack. I just dont really know what suspend/resume would mean to the BLE stack. Well, I am referring mainly to the controller… I guess it could mean things to the host. I am not strongly against it; I just think if we move it there then things like create, open, close, suspend, resume should make sense to do to the driver. If suspend and resume dont do anything but the rest do, that is fine as well. Just musing :-)


> On Sep 15, 2016, at 6:44 PM, Sterling Hughes <st...@apache.org> wrote:
> 
> I was suggesting it be moved to hw/drivers/nimble.
> 
> It’s similar to how other OSes do it, they tend to have the hw drivers in the drivers directory, even for the networking stack components.  I don’t feel strongly about it, but thought, why shouldn’t we keep to convention.
> 
> I definitely think the HW drivers should use our device framework, unless there is a compelling reason not to.  It will allow there to be a central registry of drivers, and if the BT stack needs to be suspended/resumed, that’s a logical place to hook it in?
> 
> Sterling
> 
> On 15 Sep 2016, at 18:39, will sanfilippo wrote:
> 
>> Just a nit; I need to digest this a bit more but will net/nimble/drivers be moved to drivers/nimble or hw/drivers/nimble?
>> 
>> I am also not sure why you would move what is in there into the drivers directory and make it conform to the standard drivers as I am not sure what that would mean for the BLE stack but we could do it if folks thought it a good idea.
>> 
>>> On Sep 15, 2016, at 3:50 PM, Sterling Hughes <st...@apache.org> wrote:
>>> 
>>> Hey,
>>> 
>>> I wanted to get this kicked off, so we can make the changes fairly quickly after the sterly_refactor merge next week (while still giving enough time for discussion.)
>>> 
>>> Please take this as a _rough_ first cut proposal.  I want people to bikeshed this discussion, mainly because I only want to do this re-org once in the foreseeable future :-)
>>> 
>>> Proposed changes (on top of the sterly_refactor and develop branch.)
>>> 
>>> - IP and Wi-Fi support is moved from libs (e.g. libs/inet_def_service, libs/wifi_mgmt) and placed in the net/ directory.
>>> 
>>> - Any IP stack is moved into net/ip
>>> 
>>> - net/nimble/drivers is moved to drivers/nimble.  These drivers are modified to conform to our driver framework.
>>> 
>>> - libs/tinycrypt and libs/mbedtls are placed in crypto/mbedtls, crypto/tinycrypt
>>> 
>>> - libs/bleuart is placed in net/nimble/host/profiles
>>> 
>>> - libs/bootutil, libs/boot_serial are both placed in boot/ along with apps/boot
>>> 
>>> - elua is completed removed from mynewt-core.  mynewt-core should provide the core engine for any scripting language (JS, Lua, Python), but not bundle one by default.
>>> 
>>> - drivers is moved to hw/drivers, libs/cmsis-core is moved to hw/arch/arm/cmsis-core
>>> 
>>> - fcb is moved from sys/fcb to fs/fcb
>>> 
>>> - libs/console and libs/shell are moved to sys/console and sys/shell
>>> 
>>> - examples/ TLD is created, and libs/flash_test, libs/crash_test, apps/blecent, apps/bleprph, apps/bletest, apps/bletiny, apps/bleuart, apps/blinky, apps/slinky are all moved to examples.
>>> 
>>> - libs/os is moved to TLD “os” (or core/os? kern/os?)
>>> 
>>> - libs/testreport and libs/testutil are moved to a TLD “test/“
>>> 
>>> - libs/util is broken up into crypto/hash (base64, crc), time/datetime (datetime.c), and TPQ is deleted (where do we put cbmem?  sys/defs? I think we should probably migrate queue.h from OS there too.)
>>> 
>>> - libs/imgmgr moved to mgmt/, libs/newtmgr moved to frameworks/newtmgr
>>> 
>>> - coap broken out of libs/iotivity and placed into net/.
>>> 
>>> - libs/iotivity broken into frameworks/oic.
>>> 
>>> - sys/mn_socket is moved to net/
>>> 
>>> - sys/reboot: should this be moved to boot or somewhere else, or just remain in sys/
>>> 
>>> Best,
>>> 
>>> Sterling
>> 


Re: Directory re-org conversation

Posted by Sterling Hughes <st...@apache.org>.
I was suggesting it be moved to hw/drivers/nimble.

It\u2019s similar to how other OSes do it, they tend to have the hw drivers 
in the drivers directory, even for the networking stack components.  I 
don\u2019t feel strongly about it, but thought, why shouldn\u2019t we keep to 
convention.

I definitely think the HW drivers should use our device framework, 
unless there is a compelling reason not to.  It will allow there to be a 
central registry of drivers, and if the BT stack needs to be 
suspended/resumed, that\u2019s a logical place to hook it in?

Sterling

On 15 Sep 2016, at 18:39, will sanfilippo wrote:

> Just a nit; I need to digest this a bit more but will 
> net/nimble/drivers be moved to drivers/nimble or hw/drivers/nimble?
>
> I am also not sure why you would move what is in there into the 
> drivers directory and make it conform to the standard drivers as I am 
> not sure what that would mean for the BLE stack but we could do it if 
> folks thought it a good idea.
>
>> On Sep 15, 2016, at 3:50 PM, Sterling Hughes <st...@apache.org> 
>> wrote:
>>
>> Hey,
>>
>> I wanted to get this kicked off, so we can make the changes fairly 
>> quickly after the sterly_refactor merge next week (while still giving 
>> enough time for discussion.)
>>
>> Please take this as a _rough_ first cut proposal.  I want people to 
>> bikeshed this discussion, mainly because I only want to do this 
>> re-org once in the foreseeable future :-)
>>
>> Proposed changes (on top of the sterly_refactor and develop branch.)
>>
>> - IP and Wi-Fi support is moved from libs (e.g. 
>> libs/inet_def_service, libs/wifi_mgmt) and placed in the net/ 
>> directory.
>>
>> - Any IP stack is moved into net/ip
>>
>> - net/nimble/drivers is moved to drivers/nimble.  These drivers are 
>> modified to conform to our driver framework.
>>
>> - libs/tinycrypt and libs/mbedtls are placed in crypto/mbedtls, 
>> crypto/tinycrypt
>>
>> - libs/bleuart is placed in net/nimble/host/profiles
>>
>> - libs/bootutil, libs/boot_serial are both placed in boot/ along with 
>> apps/boot
>>
>> - elua is completed removed from mynewt-core.  mynewt-core should 
>> provide the core engine for any scripting language (JS, Lua, Python), 
>> but not bundle one by default.
>>
>> - drivers is moved to hw/drivers, libs/cmsis-core is moved to 
>> hw/arch/arm/cmsis-core
>>
>> - fcb is moved from sys/fcb to fs/fcb
>>
>> - libs/console and libs/shell are moved to sys/console and sys/shell
>>
>> - examples/ TLD is created, and libs/flash_test, libs/crash_test, 
>> apps/blecent, apps/bleprph, apps/bletest, apps/bletiny, apps/bleuart, 
>> apps/blinky, apps/slinky are all moved to examples.
>>
>> - libs/os is moved to TLD \u201cos\u201d (or core/os? kern/os?)
>>
>> - libs/testreport and libs/testutil are moved to a TLD \u201ctest/\u201c
>>
>> - libs/util is broken up into crypto/hash (base64, crc), 
>> time/datetime (datetime.c), and TPQ is deleted (where do we put 
>> cbmem?  sys/defs? I think we should probably migrate queue.h from OS 
>> there too.)
>>
>> - libs/imgmgr moved to mgmt/, libs/newtmgr moved to 
>> frameworks/newtmgr
>>
>> - coap broken out of libs/iotivity and placed into net/.
>>
>> - libs/iotivity broken into frameworks/oic.
>>
>> - sys/mn_socket is moved to net/
>>
>> - sys/reboot: should this be moved to boot or somewhere else, or just 
>> remain in sys/
>>
>> Best,
>>
>> Sterling
>

Re: Directory re-org conversation

Posted by will sanfilippo <wi...@runtime.io>.
Just a nit; I need to digest this a bit more but will net/nimble/drivers be moved to drivers/nimble or hw/drivers/nimble?

I am also not sure why you would move what is in there into the drivers directory and make it conform to the standard drivers as I am not sure what that would mean for the BLE stack but we could do it if folks thought it a good idea.

> On Sep 15, 2016, at 3:50 PM, Sterling Hughes <st...@apache.org> wrote:
> 
> Hey,
> 
> I wanted to get this kicked off, so we can make the changes fairly quickly after the sterly_refactor merge next week (while still giving enough time for discussion.)
> 
> Please take this as a _rough_ first cut proposal.  I want people to bikeshed this discussion, mainly because I only want to do this re-org once in the foreseeable future :-)
> 
> Proposed changes (on top of the sterly_refactor and develop branch.)
> 
> - IP and Wi-Fi support is moved from libs (e.g. libs/inet_def_service, libs/wifi_mgmt) and placed in the net/ directory.
> 
> - Any IP stack is moved into net/ip
> 
> - net/nimble/drivers is moved to drivers/nimble.  These drivers are modified to conform to our driver framework.
> 
> - libs/tinycrypt and libs/mbedtls are placed in crypto/mbedtls, crypto/tinycrypt
> 
> - libs/bleuart is placed in net/nimble/host/profiles
> 
> - libs/bootutil, libs/boot_serial are both placed in boot/ along with apps/boot
> 
> - elua is completed removed from mynewt-core.  mynewt-core should provide the core engine for any scripting language (JS, Lua, Python), but not bundle one by default.
> 
> - drivers is moved to hw/drivers, libs/cmsis-core is moved to hw/arch/arm/cmsis-core
> 
> - fcb is moved from sys/fcb to fs/fcb
> 
> - libs/console and libs/shell are moved to sys/console and sys/shell
> 
> - examples/ TLD is created, and libs/flash_test, libs/crash_test, apps/blecent, apps/bleprph, apps/bletest, apps/bletiny, apps/bleuart, apps/blinky, apps/slinky are all moved to examples.
> 
> - libs/os is moved to TLD “os” (or core/os? kern/os?)
> 
> - libs/testreport and libs/testutil are moved to a TLD “test/“
> 
> - libs/util is broken up into crypto/hash (base64, crc), time/datetime (datetime.c), and TPQ is deleted (where do we put cbmem?  sys/defs? I think we should probably migrate queue.h from OS there too.)
> 
> - libs/imgmgr moved to mgmt/, libs/newtmgr moved to frameworks/newtmgr
> 
> - coap broken out of libs/iotivity and placed into net/.
> 
> - libs/iotivity broken into frameworks/oic.
> 
> - sys/mn_socket is moved to net/
> 
> - sys/reboot: should this be moved to boot or somewhere else, or just remain in sys/
> 
> Best,
> 
> Sterling


Re: Directory re-org conversation

Posted by Christopher Collins <cc...@apache.org>.
On Thu, Sep 15, 2016 at 03:50:25PM -0700, Sterling Hughes wrote:
> Hey,
> 
> I wanted to get this kicked off, so we can make the changes fairly 
> quickly after the sterly_refactor merge next week (while still giving 
> enough time for discussion.)
[...]

Sounds good to me.  That would be a definite improvement.  There is only
thing I wasn't too sure about:

> - fcb is moved from sys/fcb to fs/fcb

I understand how a flash circular buffer can be considered a type of
file system, but I wonder if the resemblance is strong enough to put it
in a directory called "fs".  Currently, the fs directory contains two
packages:

    * fs/fs
    * fs/nffs

fs is the generic file system API; nffs is one implementation of that
API.  Putting these two packages in a directory called "fs" makes
sense.  The fcb package doesn't implement the fs API, so it seems a bit
of a stretch to call it one.

I realize we don't want thousands of base directories, so we can't be
too granular in the directory organization.  Maybe it would be better to
rename the fs base directory to something else (store?).  Then all three
packages could go in there without raising eyebrows.

Thanks,
Chris