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.
Stefan Jumarea [Fri, 8 Sep 2023 12:37:04 +0000 (15:37 +0300)]
click.cc: Probe the network devices at init time
In the early init step, probe the network device if it was not already
probed or configured.
Whithout this step, the `uk_netdev_configure` call will fail, since it
expects the device state to be `UK_NETDEV_UNCONFIGURED`, not
`UK_NETDEV_UNPROBED`.
Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Razvan Deaconescu <razvand@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #7
Stefan Jumarea [Fri, 8 Sep 2023 12:33:04 +0000 (15:33 +0300)]
click.cc: Update sched-related functions
Update the sched-related functions to match the changes to the Unikraft
core. Update the thread creation functions and change the `thread_wait`
function to a loop that waits for the thread to end.
Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Razvan Deaconescu <razvand@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #7
Stefan Jumarea [Fri, 8 Sep 2023 12:30:16 +0000 (15:30 +0300)]
click.cc: Update initrd structure members
Update initrd structures to match the updates to the Unikraft core.
Use `pbase` instead of `base`, and pass a `struct ukplat_memregion desc **`
to the `find_initrd` function.
Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Razvan Deaconescu <razvand@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #7
Eduard Vintilă [Sat, 15 Jul 2023 12:19:11 +0000 (15:19 +0300)]
Makefile.uk: Fix build-time infinite loop
This commit removes the dependency on the $(UK_CONFIG_OUT) file, which
is not necessary for `lib-click` to build and actually
causes an infinite loop in the build process.
Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #6
Simon Kuenzer [Tue, 13 Jul 2021 19:22:18 +0000 (21:22 +0200)]
Correct license headers introduced by NEC Laboratories Europe GmbH
This commit removes the additional clause
"THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY"
from BSD license headers that got introduced by mistake
with the following commits: 0769e78 - Initial public release: basic unikraft files (Florian Schmidt) f43b694 - Initial public release: FromDevice and ToDevice (Florian Schmidt) 86682a0 - Initial public release: click.cc (Florian Schmidt)
On the one hand, this additional clause is redundant because
the BSD license already states that it must remain and the
copyright notice must be kept.
On the other hand, the clause freezes the file header
and prohibits future contributors from extending the
copyright notice for their contributions. This additional
clause is not part of the official BSD 3-clause.
The original author(s) or an authorized representative from
the author's affiliation consents to the change with a
`Reviewed-by` tag to this commit.
Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu> Approved-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #3
Florian Schmidt [Wed, 5 Jun 2019 12:43:32 +0000 (14:43 +0200)]
config: Add userlevel module option
Add a menuconfig option to build Click with userlevel elements. Be aware
that this currently doesn't build because of missing header files.
Hence, this option is disabled by default.
Signed-off-by: Florian Schmidt <florian.schmidt@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
Florian Schmidt [Wed, 5 Jun 2019 12:43:31 +0000 (14:43 +0200)]
Provide MAC preamble
We create a config script snippet that defines a "MAC0", "MAC1", etc.
variable for each network device. This is prepended to the user-provided
config, so that users can use those variables to access the MAC
addresses of network devices.
Signed-off-by: Florian Schmidt <florian.schmidt@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
Florian Schmidt [Wed, 5 Jun 2019 12:43:30 +0000 (14:43 +0200)]
support for loading click configs
The expected way is to provide a (plain-text) config file as initrd. If
no initrd is provided, click will fall back to a static, compiled-in
config that replies to pings.
Signed-off-by: Florian Schmidt <florian.schmidt@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
Florian Schmidt [Wed, 5 Jun 2019 12:43:24 +0000 (14:43 +0200)]
Initial public release: click.cc: ifdef out xen-specific code.
In the ClickOS port, this code mostly deals with providing a console for
interacting with Click. This initial release doesn't have such support,
but this could be revisited at a later point.
Signed-off-by: Florian Schmidt <florian.schmidt@neclab.eu> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>