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

nosimg-enc: add new tool for XikeStor SKS8300 series #40

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

musashino205
Copy link
Contributor

Add a new tool to generate a encoded firmware image for XikeStor SKS8300 series devices.

In this format, only the first 512 bytes (0x200) are encoded with a fixed patten (length: 0x100).

Copy link
Member

@svanheule svanheule left a comment

Choose a reason for hiding this comment

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

Some minor comments

src/nosimg-enc.c Show resolved Hide resolved
src/nosimg-enc.c Outdated Show resolved Hide resolved
src/nosimg-enc.c Outdated Show resolved Hide resolved
src/nosimg-enc.c Outdated Show resolved Hide resolved
src/nosimg-enc.c Outdated Show resolved Hide resolved
@musashino205
Copy link
Contributor Author

UPDATE:

  • sort header files alphabetically
  • update an array for calculation of (en|de)coding
    • rename to key from patterns
    • use const and explicit length
    • change to uint8_t from uint32_t
  • update calculation for (en|de)coding
    • merge calculation to main function

Copy link
Member

@svanheule svanheule left a comment

Choose a reason for hiding this comment

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

Looks fine. The only thing I don't really like at the moment is the rather big buffer on the stack.

src/nosimg-enc.c Outdated Show resolved Hide resolved
src/nosimg-enc.c Outdated Show resolved Hide resolved
Add a new tool to generate a encoded firmware image for XikeStor SKS8300
series devices.

In this format, only the first 512 bytes (0x200) are encoded with a
fixed patten (length: 0x100).

Signed-off-by: INAGAKI Hiroshi <[email protected]>
@musashino205
Copy link
Contributor Author

UPDATE:

  • back the calculation for (en|de)coding to a function
  • reduce the buffer to 4k from 64k

@openwrt-bot openwrt-bot merged commit 12c0b42 into openwrt:master Jan 14, 2025
@svanheule
Copy link
Member

Thanks for the update! Merged to master.

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

Successfully merging this pull request may close these issues.

3 participants