Skip to content

Conversation

@kartben
Copy link
Contributor

@kartben kartben commented Apr 24, 2025

Use folders named "bflb" as it's the official vendor prefix.

Fixes BL604E not properly being listed under Bouffalo vnedor in board catalog (https://docs.zephyrproject.org/latest/boards/index.html#name=BL604E)

Also add .. zephyr:board-supported-runners:: to the BL604E doc to automatically document supported runners.

@kartben kartben added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Apr 24, 2025
@kartben kartben changed the title boards: bflb: use proper folder name boards: dts: soc: bflb: misc fixes Apr 24, 2025
@kartben kartben removed the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Apr 24, 2025
Folders should be named after the vendor prefix

Signed-off-by: Benjamin Cabé <[email protected]>
@nandojve
Copy link
Member

Nak on this.

You should not depends on vendor list defined for devicetree bindings to proper display the boards information. The information of the vendor can be extracted from the already defined field.

@kartben
Copy link
Contributor Author

kartben commented Apr 24, 2025

Nak on this.

You should not depends on vendor list defined for devicetree bindings to proper display the boards information. The information of the vendor can be extracted from the already defined field.

Sure, I can fix this (it turns out that many boards actually have wrong vendor in the board.yml, so it was simply easier to rely on folder name as this one is always right).

This doesn't change the fact that "bouffalolab" would be the only vendor in-tree not using the vendor prefix for its folder names which I am sure you will admit is probably not ideal?

@kartben
Copy link
Contributor Author

kartben commented Apr 24, 2025

You should not depends on vendor list defined for devicetree bindings to proper display the boards information.

See #89024.
But folder names should be fixed nevertheless.

VynDragon
VynDragon previously approved these changes Apr 24, 2025
Copy link
Contributor

@VynDragon VynDragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

@nandojve
Copy link
Member

This doesn't change the fact that "bouffalolab" would be the only vendor in-tree not using the vendor prefix for its folder names which I am sure you will admit is probably not ideal?

IMHO this should not be an excuse to change the folder name. Right now the tool seems to relying on the folder name which I believe it is not be the best way. On my perspective, the new hardware model introduced freedom to allow us to have different folder structures, define metadata (both SoC and Board) and expand. The metadata binds the folder structure defined by the vendor and that should be the ideal source of information. This way we can have freedom on the folder structure names to make it easy to ready and organize the content.

So, if we enforce people to use the metadata and fill any the missing fields the tools can collect the correct information in the right way from the right place. We can share the code that collect the info and use that as standard instead "force" naming and avoid multiple source of truth.

@kartben
Copy link
Contributor Author

kartben commented Apr 24, 2025

This doesn't change the fact that "bouffalolab" would be the only vendor in-tree not using the vendor prefix for its folder names which I am sure you will admit is probably not ideal?

IMHO this should not be an excuse to change the folder name. Right now the tool seems to relying on the folder name which I believe it is not be the best way. On my perspective, the new hardware model introduced freedom to allow us to have different folder structures, define metadata (both SoC and Board) and expand. The metadata binds the folder structure defined by the vendor and that should be the ideal source of information. This way we can have freedom on the folder structure names to make it easy to ready and organize the content.

So, if we enforce people to use the metadata and fill any the missing fields the tools can collect the correct information in the right way from the right place. We can share the code that collect the info and use that as standard instead "force" naming and avoid multiple source of truth.

Yeah, but it's just the way boards and socs must be organized, sorry.

If you really want, I can drop the change to dts/riscv/bouffalolab since that one is not actually a requirement as far as I can tell.

This way we can have freedom on the folder structure names to make it easy to ready and organize the content.

BTW this is exactly the point - there are some areas where complete freedom is not desirable, and there is an expectation from folks that they will find boards and socs in a "predictable" location in the main Zephyr tree.

@kartben kartben requested a review from nordicjm April 24, 2025 14:26
@nandojve
Copy link
Member

Yeah, but it's just the way boards and socs [must be organized].

I see, thank you for pointing out.
Go ahead and keep same folders for dts.

Note: Not sure if it is necessary change this line too

- name: bouffalolab_bflb

@kartben
Copy link
Contributor Author

kartben commented Apr 24, 2025

Yeah, but it's just the way boards and socs [must be organized].

I see, thank you for pointing out. Go ahead and keep same folders for dts.

Note: Not sure if it is necessary change this line too

- name: bouffalolab_bflb

Yeah good point.
Maybe @nordicjm can comment here but my recommendation would be to actually just remove the family name altogether. AFAIK it's not mandatory to have a family (check e.g. all socs with "<no family>" in the board catalog), and in this case would be better than making up a name for something that doesn't really correspond to anything in the vendor catalog (as opposed to, say, Atmel SAM0 family)

@nordicjm
Copy link
Contributor

Yeah, but it's just the way boards and socs [must be organized].

I see, thank you for pointing out. Go ahead and keep same folders for dts.
Note: Not sure if it is necessary change this line too

- name: bouffalolab_bflb

Yeah good point. Maybe @nordicjm can comment here but my recommendation would be to actually just remove the family name altogether. AFAIK it's not mandatory to have a family (check e.g. all socs with "" in the board catalog), and in this case would be better than making up a name for something that doesn't really correspond to anything in the vendor catalog (as opposed to, say, Atmel SAM0 family)

Family name is completely optional, it can go, or be renamed

@VynDragon
Copy link
Contributor

Ah so if it can go i'd like to take this opportunity to recommend making it either go back (? maybe not, different code trees) to SOC_FAMILY_BFLB instead of SOC_FAMILY_BOUFFALOLAB_BFLB, or consider that BL60x is the family (bl602 family in bflb terms) and the socs are really bl602 and bl604, matched to footprints. I am not sure what the best way would be though.

@kartben
Copy link
Contributor Author

kartben commented Apr 25, 2025

@nandojve do you want me to add the dropping of the family name to this PR?

EDIT: posted at the same time as @VynDragon, woops. I'm fine with SOC_FAMILY_BFLB, but having no family and just working at the "series" level would be fine too IMO (e.g CMakeLists.txt for the hal would test for SOC_SERIES_BL60X instead of SOC_FAMILY_BOUFFALOLAB_BFLB, etc.). Will let @nandojve make the call :)

@VynDragon
Copy link
Contributor

@nandojve do you want me to add the dropping of the family name to this PR?

EDIT: posted at the same time as @VynDragon, woops. I'm fine with SOC_FAMILY_BFLB, but having no family and just working at the "series" level would be fine too IMO (e.g CMakeLists.txt for the hal would test for SOC_SERIES_BL60X instead of SOC_FAMILY_BOUFFALOLAB_BFLB, etc.). Will let @nandojve make the call :)

All the rest of the code is based on SOC_SERIES_BLxxx checks anyway

@nandojve
Copy link
Member

Hi @kartben,

Thank you for asking. I would like to have the SOC_FAMILY_BFLB.

kartben added 3 commits April 25, 2025 17:39
For simplicity/consistency with many other soc families, rename the
bouffalolab_bflb soc family to the simpler bflb.

Signed-off-by: Benjamin Cabé <[email protected]>
Board documentation page already has a link to the board's folder in
GitHub so hardcoding a link to the board's defconfig is redundant.

Signed-off-by: Benjamin Cabé <[email protected]>
Add .. zephyr:board-supported-runners:: directive to document the
supported runners for the BL604E IOT DVK board.

Signed-off-by: Benjamin Cabé <[email protected]>
@kartben kartben merged commit 93f432a into zephyrproject-rtos:main Apr 28, 2025
25 checks passed
@kartben kartben deleted the bflb_boards branch April 28, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Process area: RISCV RISCV Architecture (32-bit & 64-bit) platform: Bouffalo Lab

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants