-
-
Notifications
You must be signed in to change notification settings - Fork 208
Ec build #2062
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
Open
macpijan
wants to merge
4
commits into
linuxboot:master
Choose a base branch
from
Dasharo:ec_build
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Ec build #2062
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7f9a7bf
modules/dasharo-ec: new module
macpijan 03dbe2e
toolchain: add sdcc and xxd
macpijan 32ec30a
Prepare nix based docker image to be bumped to v0.2.9 to include mini…
tlaurion ea9b4d8
modules/dasharo-ec: fix build system and address review feedback
filipleple File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| ifeq "$(CONFIG_DASHARO_EC)" "y" | ||
|
|
||
| modules-y += dasharo-ec | ||
|
|
||
| dasharo-ec_repo := https://github.com/Dasharo/ec | ||
| dasharo-ec_commit_hash := d198b641195e60e13afc17be9464e4f402d1c2fa | ||
|
|
||
| # Map BOARD to the EC board model | ||
| ifeq "$(BOARD)" "novacustom-v540tu" | ||
| DASHARO_EC_BOARD_MODEL := v540tu | ||
| else ifeq "$(BOARD)" "novacustom-v560tu" | ||
| DASHARO_EC_BOARD_MODEL := v560tu | ||
| else | ||
| $(error "$(BOARD): no Dasharo EC board model mapping defined") | ||
| endif | ||
|
|
||
| dasharo-ec_version := $(dasharo-ec_commit_hash) | ||
| dasharo-ec_base_dir := dasharo-ec-$(dasharo-ec_version)-$(BOARD) | ||
| dasharo-ec_dir := dasharo-ec-$(dasharo-ec_version)-$(BOARD) | ||
|
|
||
| # ec.rom is copied to a stable path by the explicit rule below | ||
| dasharo-ec_output := ec.rom | ||
|
|
||
| # No-op configure: submodules are handled by the EC Makefile's canary rule | ||
| # for git repos | ||
| dasharo-ec_configure := | ||
|
|
||
| # Build the EC firmware: only pass make arguments; post-build steps are | ||
| # handled by the explicit rule below. | ||
| dasharo-ec_target := BOARD=novacustom/$(DASHARO_EC_BOARD_MODEL) | ||
|
|
||
| # Copy ec.rom from the dynamic build path to a stable location and pad to | ||
| # 128KB as required by coreboot. Runs after the module make completes. | ||
| $(build)/$(dasharo-ec_dir)/ec.rom: $(build)/$(dasharo-ec_dir)/.build | ||
| sh -c 'cp $(build)/$(dasharo-ec_dir)/build/novacustom/$(DASHARO_EC_BOARD_MODEL)/*/ec.rom $@' | ||
| dd if=/dev/zero of=$@ bs=1 seek=128k count=0 | ||
|
|
||
| # Copy ec.rom into the coreboot source tree before coreboot builds. | ||
| # coreboot_base_dir (coreboot-dasharo) is shared between v540tu and v560tu, so | ||
| # a plain timestamp-based rule is racy: whichever board built last wins the mtime | ||
| # race and the other board silently keeps the wrong binary. Adding FORCE makes the | ||
| # recipe always run so we can do a content check; the actual cp (and the mtime | ||
| # update that triggers downstream rebuilds) only happens when the content differs. | ||
| $(build)/$(coreboot_base_dir)/ec.rom: $(build)/$(dasharo-ec_dir)/ec.rom FORCE | ||
| @if ! cmp -s "$(build)/$(dasharo-ec_dir)/ec.rom" "$@" 2>/dev/null; then \ | ||
| echo "$(DATE) COPY $(DASHARO_EC_BOARD_MODEL) ec.rom -> coreboot"; \ | ||
| cp "$(build)/$(dasharo-ec_dir)/ec.rom" "$@"; \ | ||
| fi | ||
|
|
||
| # Ensure coreboot's configure step depends on ec.rom being present | ||
| $(build)/$(coreboot_dir)/.configured: $(build)/$(coreboot_base_dir)/ec.rom | ||
|
|
||
| endif |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
it's v0.2.9 (commit msg says v0.2.8)
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.
Fixed: 32ec30a