Alexander Jung [Tue, 11 Jul 2023 21:25:56 +0000 (21:25 +0000)]
Introduce `Library.uk`
This new file represents the first step towards proper versioning support of
external microlibrary in Unikraft. The file itself acts as mechanism for
holding metadata-only values about the microlibrary. This metadata is designed
to be compatible with GNU Make whilst simultaneously being human-readable and
readable by programs that are not GNU Make (e.g. tools such as KraftKit).
An important feature of this file is the inclusion of microlibrary versions.
In a later step, once relevant integrations have been made to Unikrat's core
build system and to relevant tools such as KraftKit, the user will be able to
see and select from different versions of the microlibrary.
In this initial commit, the relevant metadata is absorbed from both Makefile.uk,
Config.uk, but also includes new information such as SPDX License identifier.
Makefile.uk: Use mk_sub_libbuild_dir to create directory hierarchies
Unikraft core build system currently enforces the use of
`mk_sub_libbuild_dir` function instead of `mk_sub_build_dir` for
creating directory hierarchies, i.e. creating more than the first-level
subdirectory.
Update `Makefile.uk` accordingly: replace the call to `mk_sub_build_dir`
with a call to `mk_sub_libbuild_dir`.
Signed-off-by: Razvan Deaconescu <razvand@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #9
Stefan Jumarea [Mon, 17 Jul 2023 07:28:48 +0000 (10:28 +0300)]
patches: Remove outdated patch
The patch was:
* Replacing the lua `main` symbol with `lua_main`.
* Removing checking that the given argument was a script, instead
checking if there is an initrd filesystem present and trying to
execute it.
The `main` symbol is already replaced in the preprocessing stage by
adding `-Dmain=lua_main` in the `Makefile.uk` flags, so renaming it is
not needed.
Trying to execute the initrd without properly extracting it will
obviously fail, since `lua` will not be able to read the script properly.
This will result in an `malformed number near '0707010..'` error.
The check for initrd is not needed at all, since the fs driver is
transparent for the application, and the script can be accessed as an
usual file, regardless of the fs driver (initrd, 9pfs, etc.).
Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #8
Felipe Huici [Wed, 12 Feb 2020 18:51:00 +0000 (19:51 +0100)]
Fix broken behaviour when given append parameter.
This patch makes it so that Lua now goes straight into interactive
mode when not given initrd as a parameter; previosuly it was assuming
that the --append parameter was a file name to be read and executed,
which was broken.
Signed-off-by: Felipe Huici <felipe.huici@neclab.eu> Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Felipe Huici [Wed, 16 Oct 2019 09:44:54 +0000 (11:44 +0200)]
Add optional main()
We add a menu option to provide a main() function, and set it to on by
default so that in the standard case a user can choose a platform,
compile and run.
Signed-off-by: Felipe Huici <felipe.huici@neclab.eu> Reviewed-by: Roxana Nicolescu <nicolescu.roxana1996@gmail.com>