-
-
Notifications
You must be signed in to change notification settings - Fork 46
update the porting guide #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: notgivenby <[email protected]>
https://notgivenby.github.io/heads-wiki/Porting/ |
First read! Awesome! Have a lot of nitpicks, and will do thorough review hopefully today. You took notes of everything it seems, at least I do not see anything missing! Thank you so much! I really appreciated your analogies at the end at https://notgivenby.github.io/heads-wiki/Porting/#contribute-to-maintance btw. |
Development/Porting.md
Outdated
--- | ||
you need a coreboot configuration. Ideally, this config should have already been tested and confirmed to work on the board. Alternatively, you can create one using coreboot's `make menuconfig`. | ||
To ensure everything functions as expected, you may first build the ROM with SeaBIOS and test it. Please follow the upstream documentation, as this will save you time. | ||
Next, the configuration needs to be adapted for Heads, specifying LinuxBoot as the payload and defining the path for required blobs. You can inspect existing configurations for boards in the master branch and select one with a similar architecture (if available). The configuration file should be placed at: `heads/config/coreboot-new_board.config` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, that won't work, but should. Didn't tested: would build linuxboot payload with u-root, I'm not aware this was ever tested here. Hence why my previous comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think bzImage is a requirement for the payload here:
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="@BOARD_BUILD_DIR@/bzImage"
CONFIG_LINUX_INITRD="@BOARD_BUILD_DIR@/initrd.cpio.xz"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First review! Thanks @notgivenby !
Thanks @notgivenby it looks already pretty good. I will later give you some feedback. @tlaurion I wonder if some of the content of this guide should actually go into a dedicated wiki page with an overview over the project/repository and some of the fundamental design concepts. This may not be exclusively relevant to porting boards but to anyone who wants to contribute code and the relevant sections could still be referenced from the porting guide. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @notgivenby. Great porting guide!
I suggested a lot of changes. Sorry for that. However, those changes are just suggestions. Decide if they improve the guide. I don't mind if you don't include (all of) them.
Development/Porting.md
Outdated
|
||
CircleCI: | ||
--- | ||
modify `.circleci/config.yml` to add support for `new_board`. Initially, configure it to depend directly on musl-cross-make. At this stage, do not reuse caches—this simplifies debugging and ensures a clean build process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modify `.circleci/config.yml` to add support for `new_board`. Initially, configure it to depend directly on musl-cross-make. At this stage, do not reuse caches—this simplifies debugging and ensures a clean build process. | |
Modify `.circleci/config.yml` to add support for `new_board`. Initially, configure it to depend directly on musl-cross-make. At this stage, do not reuse caches—this simplifies debugging and ensures a clean build process. |
…cated information Signed-off-by: notgivenby <[email protected]>
Signed-off-by: notgivenby <[email protected]>
Now is time to take a macro view of the guide (not looking for nitpicks)
I guess this is linked to https://osresearch.net/Makefile/#build-configuration |
@gaspar-ilom : https://osresearch.net/Makefile/#build-configuration ? Maybe misplaced. |
@tlaurion thank you for the nice catch! I overlooked that. As we started the t480 port we followed manual changes of the coreboot.config. But after @gaspar-ilom PR, and the comment I thought it is a good idea to automate it. Should we still mention that manual changes are possible?
But at the current version we start with coreboot config...I am a bit confused. The order should be: board.config > coreboot.config > linux.config etc.? Is the new figures style okay? Edit: perhaps rearranging the order of the files on the scheme is also needed. Should we follow the structure of the heads tree? .circleci > blobs > boards etc. Or better the logic of the port starting with board.config > coreboot .config> etc. |
@tlaurion @notgivenby Maybe summarizing how I approached the T480 port helps. I did it in January on my own when there was no issue or PR for the board yet and thought I would open those when I had a working prototype. Of course, I did not find enough time to move things quickly and in the meanwhile someone would open an issue and parallel approaches started happening here.
I am not saying everybody should approach it like that, but that is how I did it and it has worked ok for me. Maybe it helps to re-read the guide from that perspective. Especially wrt the order of things in the guide. The hardest part for me was actually fixing build issues both with circleci and locally as it often seemed to be completely unrelated to my changes (e.g. because of artifacts from previous builds) or I just would not have enough background in order to quickly get to the root cause of some issue. Never got stuck completely, though. Otherwise, I would have asked for help earlier. |
Signed-off-by: notgivenby <[email protected]>
Thank you for the review @gaspar-ilom . It is a joint work based on the t480 port. Since you contributed a lot, I included almost all comments. I also changed the structure of the guide and the files scheme according to the logic @tlaurion . I hope I did not miss anything. Please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @notgivenby . I have a few nitpicks. The only real change I would suggest is moving the binary blobs section above the board config section. In my opinion it is just work that is more of a prerequisite before you can start with the actual. That said, if you and @tlaurion prefer it the way it is, I am fine with that.
One other change, that I would suggest, but that may be out of scope for this PR: We should reference the porting guide now from https://github.com/linuxboot/heads-wiki/blob/master/Development/make-details.md as it explains so much of the organization of the repository that it might be worth reading it for new contributors not just when they port a new board. One sentence and a link should be fine I think.
@notgivenby used the testing notes of this PR under linuxboot/heads#1658 (comment) Please review things I corrected there
@notgivenby Thanks! |
…t the file scheme logic Signed-off-by: notgivenby <[email protected]>
LGTM! let's iterate more in mall changes. Will also help for omnigol feedback and next ports. |
That was a lot of fun and new knowledge! Thank you @tlaurion and @gaspar-ilom for help! |
updates the porting guide based on recent t480 port