-
Notifications
You must be signed in to change notification settings - Fork 23
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
Ramdisk #4
Ramdisk #4
Conversation
Hi! Thanks for your PR! I really appreciate this! Just some remarks:
Thanks! |
There are many ways to build such a ramdisk, as it's just a filesystem image. For squashfs, you
For ext3 etc, you'd have to make an empty file of the right size, then run So pretty straight forward to make (but what files to put in it is entirely up to the user, if you want to use it as a root disk, obviously you'd need to use buildroot or something). |
Added some docs on the ramdisk usage, including explaining why this uses pmem over initrd/initramdisk. |
src/soc/riscv_example_soc.c
Outdated
@@ -113,6 +116,11 @@ void rv_soc_init(rv_soc_td *rv_soc, char *fw_file_name, char *dtb_file_name) | |||
|
|||
write_mem_from_file(fw_file_name, soc_ram, sizeof(soc_ram)); | |||
|
|||
if (initrd_file_name != NULL) { | |||
printf("XXXXXXXXXXXXXXXXXXXXXXXXXXX\n"); |
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.
Please remove this print statement or change it to something meaningful.
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.
Oups... again, leftover from experimentation...
@@ -31,9 +31,14 @@ | |||
|
|||
sram: memory@80000000 { | |||
device_type = "memory"; | |||
reg = <0x0 0x80000000 0x0 0x8000000>; | |||
reg = <0x0 0x80000000 0x0 0x40000000>; |
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.
Why the increase of the main memory? Please keep the old setting.
Support an arbitrarily sized ramdisk using PMEM kernel driver.
Why not initrd? Because initrd and initramdisk have size limitations, for larger disks, it gets stuck loading the disk (probably copying and extracting the entire disk at boot). PMEM containing a normal filesystem, such as ext3 or squashfs can store an arbitrary number of files with no performance penalty at boot or when just accessing a small number of them.