Skip to content
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

Integrate DCU support #79

Open
wessel-novacustom opened this issue Oct 31, 2024 · 6 comments
Open

Integrate DCU support #79

wessel-novacustom opened this issue Oct 31, 2024 · 6 comments
Assignees

Comments

@wessel-novacustom
Copy link

The problem you're addressing (if any)

Currently, it is not possible to modify firmware binaries.

Describe the solution you'd like

Being able to modify firmware binaries with the DCU tool from the RTE programmer directly, for example injecting a serial number.

Where is the value to a user, and who might that user be?

  1. We can optimise the automatisation of our production process.
  2. The correct firmware binary can be applied with an own script that determines the binary from the serial number.
  3. We could check the warranty status of a customer's laptop more easily.
@macpijan
Copy link
Member

macpijan commented Nov 5, 2024

@artur-rs Let's take a look on how to integrate the dcu script from: https://github.com/Dasharo/dcu into RTE OS.

We already have a recipe for it, as it is included in meta-dts: https://github.com/Dasharo/meta-dts/blob/main/meta-dts-distro/recipes-dasharo/dasharo-configuration-utility/dasharo-configuration-utility_git.bb

We should consider moving dcu recipe, and perhaps some dependencies as well, to another layer(s) that can be reused across both DTS and RTE projects.

My first suggestion would be to create:

  • meta-coreboot - that should contain coreboot-specific tools, which can be used by other projects. This layer should be added to OE layers index, so others can find it. It should be promoted somewhere in coreboot documentation as well if we find a correct place for it.
  • meta-dasharo - add dasharo-specific tools, such as dcu. Do we have any more that would fit in here?

Other suggestions are welcome.

This task should start with a proper execution plan.

@macpijan
Copy link
Member

macpijan commented Nov 7, 2024

We have created the following layers:

We have created a spreadsheet to help us to drive the layers' decomposition: https://pad.3mdeb.com/sheet/#/2/sheet/view/roMqhd-jY+4-dM-98AAujCwEXfj-sVQ6FCoWDy8UM+8/

Execution steps:

@artur-rs artur-rs assigned Al-an-21 and unassigned artur-rs Nov 8, 2024
@Al-an-21
Copy link

Al-an-21 commented Nov 8, 2024

@macpijan

aostrowski in ~/meta-dasharo on pre-commit-setup λ git push origin pre-commit-setup

ERROR: Permission to Dasharo/meta-dasharo.git denied to Al-an-21.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

It seems i do not have the access rights to both meta-dasharo and meta-coreboot

@Al-an-21
Copy link

@macpijan I ran pre-commit run --all-files to check if everything passed, and it flagged several issues, like spelling errors and indentation warnings. Do I need to fix all of these manually, or is there a more efficient way to handle these corrections?

@Al-an-21
Copy link

Al-an-21 commented Nov 14, 2024

@macpijan I ran pre-commit run --all-files to check if everything passed, and it flagged several issues, like spelling errors and indentation warnings. Do I need to fix all of these manually, or is there a more efficient way to handle these corrections?

aostrowski in ~/meta-dasharo on move-recipes ● ● ● λ pre-commit run --all-files
check for added large files..............................................Passed
check for merge conflicts................................................Passed
check for broken symlinks............................(no files to check)Skipped
detect private key.......................................................Passed
fix end of files.........................................................Passed
trim trailing whitespace.................................................Passed
mixed line ending........................................................Passed
codespell................................................................Failed
- hook id: codespell
- exit code: 65

dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:19: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:20: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:21: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:22: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:23: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:24: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:25: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:26: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:27: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:28: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:29: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:30: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:31: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:32: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:33: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:34: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:35: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:36: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:37: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:38: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:39: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb.bak:40: crate ==> create
fwupd/fwupd_2.0.1.bb.bak:30: hsi ==> his
fwupd/fwupd_2.0.1.bb.bak:65: hsi ==> his
txe-secure-boot/files/a5df001.diff:6: ths ==> the, this
txe-secure-boot/files/a5df001.diff:16: understant ==> understand, understate
fwupd/fwupd_2.0.1.bb:30: hsi ==> his
fwupd/fwupd_2.0.1.bb:65: hsi ==> his
dasharo-ectool/dasharo-ectool_0.3.8.bb:19: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:20: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:21: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:22: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:23: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:24: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:25: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:26: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:27: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:28: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:29: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:30: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:31: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:32: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:33: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:34: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:35: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:36: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:37: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:38: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:39: crate ==> create
dasharo-ectool/dasharo-ectool_0.3.8.bb:40: crate ==> create

yamllint.............................................(no files to check)Skipped
Name spellchecker........................................................Passed
Advanced oelint..........................................................Failed
- hook id: oelint-adv
- exit code: 1
- files were modified by this hook

/home/aostrowski/meta-dasharo/dasharo-configuration-utility/dasharo-configuration-utility_git.bb:10:warning:oelint.vars.multilineident:On a multiline assignment, line indent is desirable. 2 set, 4 desirable [branch:true]
/home/aostrowski/meta-dasharo/dasharo-configuration-utility/dasharo-configuration-utility_git.bb:21:warning:oelint.vars.multilineident:On a multiline assignment, line indent is desirable. 2 set, 4 desirable [branch:true]
/home/aostrowski/meta-dasharo/dasharo-ectool/dasharo-ectool_0.3.8.bb:9:warning:oelint.vars.multilineident:On a multiline assignment, line indent is desirable. 2 set, 4 desirable [branch:true]
/home/aostrowski/meta-dasharo/dasharo-ectool/dasharo-ectool_0.3.8.bb:40:warning:oelint.vars.multilineident:On a multiline assignment, line indent is desirable. 2 set, 4 desirable [branch:true]
/home/aostrowski/meta-dasharo/txe-secure-boot/smmstoretool_git.bb:6:warning:oelint.vars.multilineident:On a multiline assignment, line indent is desirable. 2 set, 4 desirable [branch:true]
/home/aostrowski/meta-dasharo/txe-secure-boot/smmstoretool_git.bb:11:warning:oelint.vars.multilineident:On a multiline assignment, line indent is desirable. 2 set, 4 desirable [branch:true]
/home/aostrowski/meta-dasharo/txe-secure-boot/smmstoretool_git.bb:30:warning:oelint.vars.multilineident:On a multiline assignment, line indent is desirable. 2 set, 4 desirable [branch:true]
/home/aostrowski/meta-dasharo/txe-secure-boot/txesbmantool_git.bb:6:warning:oelint.vars.multilineident:On a multiline assignment, line indent is desirable. 2 set, 4 desirable [branch:true]
/home/aostrowski/meta-dasharo/txe-secure-boot/txesbmantool_git.bb:12:warning:oelint.vars.multilineident:On a multiline assignment, line indent is desirable. 2 set, 4 desirable [branch:true]
/home/aostrowski/meta-dasharo/txe-secure-boot/txesbmantool_git.bb:41:warning:oelint.vars.multilineident:On a multiline assignment, line indent is desirable. 2 set, 4 desirable [branch:true]

@macpijan
Copy link
Member

macpijan commented Nov 14, 2024

Many of them should be autofixed already after you run this command.

Others should be quick to fix via editor global replace feature, or sed command.

In general, one can also call codespell command locally in interactive mode, to fix some of the typos (e.g.: codespell -w -i 3 .).

The fwupd is likely false-positive nad must be excluded, e.g. via codespellx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants