aboutsummaryrefslogtreecommitdiff
path: root/kernel/initrd.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix initrd parsing because of a path changeMiquel Sabaté Solà2024-11-221-7/+7
| | | | | | | | | | In commit 573a8c6b490a ("usr: Rename foo/bar to fizz/buzz") the path of the user-space binaries have changed. The `initrd` parsing code makes some decisions based on that naming, and so it needed to be updated as well. Fixes: 573a8c6b490a ("usr: Rename foo/bar to fizz/buzz") Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add basic parsing for underlying ELF executablesMiquel Sabaté Solà2024-11-221-4/+36
| | | | | | | | | | | | | The given initrd is a CPIO archive of multiple ELF executables. We are already able to parse the CPIO archive to detect where each file is located, this commit adds the mapping for each ELF executable to the corresponding task_struct. Note that this is still heavily under construction, since we cannot simply jump into the entry point of an executable as we have not yet setup the proper layout from performing context switches. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Initial parsing of the provided initrd fileMiquel Sabaté Solà2024-11-211-0/+135
We expect a CPIO archive with the 'newc' format for the initrd. Parse this archive from the given initrd address and fetch the address for each ELF executable while also pairing which task correspond to which ELF. This commit leaves to do the actual parsing of the ELF file for each task, while also leaving some string utilities to be refined. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>