Skip to content

Conversation

@Deedone
Copy link

@Deedone Deedone commented Feb 15, 2024

Add support for using initrd provided by the bootloader. Supports both compressed and uncompressed filesystem images.

Copy link
Collaborator

@xakep-amatop xakep-amatop Feb 16, 2024

Choose a reason for hiding this comment

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

Why can't you put ramdisk_buf here with explicit casting for suppressing warnings and reduce the diff?

@xakep-amatop
Copy link
Collaborator

Review finished, generally ok.
I have a few cosmetic suggestions and some questions

Add support for using initrd provided by the bootloader as the RAM Disk.
Location of the initrd is specified by the DISK_RAM_START Kconfig option.
Currently only uncompressed filesystem images are supported.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Add lz4frame and xxhash to the build system. This is required to
support the decompression of LZ4 files made with LZ4 cli tool.
Base lz4 library only supports decompression of raw LZ4 blocks without
taking into account the frame metadata.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
@Deedone Deedone force-pushed the initrd branch 2 times, most recently from 1ce52b6 to 4820117 Compare February 22, 2024 13:41
Copy link
Collaborator

@firscity firscity left a comment

Choose a reason for hiding this comment

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

LGTM with one comment

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we include it unconditionally to this file? Also should it be #include "" instead of #include <>?

Copy link
Author

Choose a reason for hiding this comment

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

Regarding " vs < it was included with " in a sample for some reason so I assumed that it is required, changed to <

Add support for decompressing the initrd before using it as the RAM Disk.
For now, only LZ4 compression is supported.
It is advised to use smaller block sizes for the compressed initrd to
reduce the size of heap memory required for decompression.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
@xakep-amatop
Copy link
Collaborator

Are we going to merge this PR?

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