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

Weida/raw #7275

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Weida/raw #7275

wants to merge 1 commit into from

Conversation

hughsie
Copy link
Member

@hughsie hughsie commented May 21, 2024

Type of pull request:

@hughsie hughsie mentioned this pull request May 21, 2024
10 tasks
@hughsie
Copy link
Member Author

hughsie commented May 22, 2024

@randytry @chenhn123 -- I've added a couple of fixups -- can you test to see if I've broken anything?

@chenhn123
Copy link
Collaborator

@hughsie
Copy link
Member Author

hughsie commented May 23, 2024

I see https://github.com/fwupd/fwupd/tree/weida/raw

Yup, lets collaborate on that weida/raw branch.

@chenhn123
Copy link
Collaborator

Hi Maintainer,
I modify for offset issue and update the firmware success.
But I found some message after the parsing and update the firmware
"base stream was 0x1ed24 bytes in size, and tried to create partial stream @0x1e5e4 of 0x758 bytes"
Is there anything wrong with this?

@hughsie
Copy link
Member Author

hughsie commented May 24, 2024

@chenhn123 I suspect we need to fix FIXME: should we create a partial stream based on the payload length? -- can you send me an example firmware so I can do that for you? Either attach here or send to richard_at_hughsie_dot_com -- thanks.

@chenhn123
Copy link
Collaborator

WDT8761A_DUMMY.zip

@randytry
Copy link

the wif has two chunk one chunk FRWR is start at address 0x30000 and length is 0x2000
and the other chunk CNFG is start at address 0x51000 and length is 0x1000

@hughsie
Copy link
Member Author

hughsie commented May 27, 2024

@chenhn123 @randytry -- much appreciated, thanks. This now gives:

[hughsie@hughsie-work-lan build (weida/raw %)]$ ninja && ./src/fwupdtool firmware-parse WDT8761A_DUMMY.wif weida-raw
<firmware gtype="FuWeidaRawFirmware">
  <flags>has-stored-size</flags>
  <data size="0x3068">[GInputStream]</data>
  <firmware>
    <id>frwr</id>
    <addr>0x30000</addr>
    <offset>0x48</offset>
    <data size="0x2000">[GInputStream]</data>
  </firmware>
  <firmware>
    <id>cnfg</id>
    <addr>0x51000</addr>
    <offset>0x2068</offset>
    <data size="0x1000">[GInputStream]</data>
  </firmware>
</firmware>

I've pushed a fixup, does that work?

@chenhn123
Copy link
Collaborator

chenhn123 commented May 28, 2024

I think you got the most of thing in this format,
but we had define something prefix(but not used) byte
so we need to start program form exclude the prefix
If the firmware is updated excepted flash map is :
image
but I got
image

@hughsie
Copy link
Member Author

hughsie commented May 28, 2024

Something like ^^^ perhaps?

@chenhn123
Copy link
Collaborator

Okay, it work well and correct.
but I can't get what is "Something like ^^^ perhaps?" mean ?

@chenhn123 chenhn123 marked this pull request as ready for review June 4, 2024 02:41
@hughsie
Copy link
Member Author

hughsie commented Jul 24, 2024

Okay, it work well and correct.

That's great; can you comment on some of the TODOs and FIXMEs please? I've rebased against master and force-pushed the branch with all the fixups so far.

@chenhn123
Copy link
Collaborator

Could you please give me some sample of TODOs and FIXMEs ?

@hughsie
Copy link
Member Author

hughsie commented Jul 26, 2024

Could you please give me some sample of TODOs and FIXMEs ?

Sure -- all in the .c file, e.g. https://github.com/fwupd/fwupd/blob/weida/raw/plugins/weida-raw/fu-weida-raw-device.c#L538

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

Successfully merging this pull request may close these issues.

None yet

3 participants