From 9f7a4ae9264ff984043c8c531ecc5f05cab8e4a2 Mon Sep 17 00:00:00 2001 From: Peter Chubb Date: Mon, 8 Jul 2024 12:42:23 +1000 Subject: [PATCH] Build targets for on-seL4 and not-on-seL4 This allows us to build versions of the website for running on seL4/LionsOS, and for running on a more standard webserver. The version for running on LionsOS adds a link in the footer to a diagram and a description and where to get the source. `make build` builds in _site, `make on_seL4` builds into _site_on_seL4, and includes any material protected by an `if site.on_seL4` guard. Currently that's only in the template. Signed-off-by: Peter Chubb Signed-off-by: Ivan Velickovic Signed-off-by: James Archer --- .gitignore | 1 + .reuse/dep5 | 4 + Info/Website/index.html | 53 +++++++ Info/Website/webserver.svg | 315 +++++++++++++++++++++++++++++++++++++ Makefile | 6 +- README.md | 8 + _config.yml | 1 - _layouts/default.html | 9 +- _on_seL4.yml | 8 + 9 files changed, 400 insertions(+), 5 deletions(-) create mode 100644 Info/Website/index.html create mode 100644 Info/Website/webserver.svg create mode 100644 _on_seL4.yml diff --git a/.gitignore b/.gitignore index cc2b24c6..f18a9970 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.swp _site _preview +_site_on_seL4 .sass-cache .jekyll-cache .jekyll-metadata diff --git a/.reuse/dep5 b/.reuse/dep5 index 2b91b0c8..3adec1c0 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -21,6 +21,10 @@ Files: .ruby-version Copyright: 2024 seL4 Project a Series of LF Projects, LLC. License: BSD-2-Clause +Files: Info/Website/webserver.svg +Copyright: UNSW +License: CC-BY-SA-4.0 + Files: _data/menu.json _includes/breadcrumbs.html _includes/menu.html diff --git a/Info/Website/index.html b/Info/Website/index.html new file mode 100644 index 00000000..12b03aa6 --- /dev/null +++ b/Info/Website/index.html @@ -0,0 +1,53 @@ +--- +# Copyright 2020 seL4 Project a Series of LF Projects, LLC. +# SPDX-License-Identifier: CC-BY-SA-4.0 +title: About this website +--- +

+ About this website +

+
+
+ Webserver architecture
+         diagram +
+
+

+ This website runs on LionsOS, + an operating system for embedded systems. LionsOS is in turn + based on + the Microkit, a + framework that presents a small set of simple abstractions over + seL4, and + the sel4 + Device Driver Framework. +

+

+ Source for the system is + in the LionsOS + repository. +

+

+ The hardware is + an Odroid + C4, a quad-core Cortex A55 running at 1.2GHz with 4G of DDR4 + RAM and a Gigabit ethernet. We are using only one of the cores. +

+

+ For ease of update, the website content is stored on an NFS + server. It is built from content + on github.com and + deployed to the NFS server as updates are accepted into the + tree. +

+

+ The MicroPython code that actually implements the webserver is + based on + the Microdot + framework. It uses asychronous access to network and + filesystems. +

+
+
diff --git a/Info/Website/webserver.svg b/Info/Website/webserver.svg new file mode 100644 index 00000000..5d3b95a3 --- /dev/null +++ b/Info/Website/webserver.svg @@ -0,0 +1,315 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + microPython + + webserver + + diff --git a/Makefile b/Makefile index 3e69d93c..c784dedc 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,8 @@ SHELL := bash MAKEFLAGS += --warn-undefined-variables --no-builtin-rules .DELETE_ON_ERROR: .SUFFIXES: -.PHONY: help build serve debug preview clean doctor checklinks update +.PHONY: help build serve debug preview clean doctor checklinks update \ + on_seL4 help: @echo -e "Usage: make . Available seL4 website targets:\n\ @@ -40,6 +41,9 @@ preview: JEKYLL_ENV := development preview: SERVE_HOST := --config "_config.yml,_preview.yml" $(SERVE_HOST) preview: build +on_seL4: SERVE_HOST := --config "_config.yml,_on_seL4.yml" +on_seL4: build + clean doctor: @bundle exec jekyll $@ @rm -rf _preview/* diff --git a/README.md b/README.md index ed3567e2..c3af482f 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,14 @@ make serve for the production build and `make debug` for the development build. See `make help` for all options. +There are two variants of the website to build. When running on +LionsOS and seL4 we include an additional footer with a link to pages +describing the hardware and software architecture of the LionsOS +webserver. To build this variant, use +```sh +make on_seL4 +``` +and the site will be generated into `_site_on_seL4/`. ## Docker The directory `docker/` provides a docker file and some scripts to host diff --git a/_config.yml b/_config.yml index 6fb5fbdf..98d6d4a5 100644 --- a/_config.yml +++ b/_config.yml @@ -11,7 +11,6 @@ static_url: "https://sel4.systems" baseurl: "" # the subpath of your site, e.g. /blog git_repo: https://github.com/seL4/website github_username: seL4 -on_seL4: false collections: - "news-items" diff --git a/_layouts/default.html b/_layouts/default.html index 8e186ab2..9c3a1d79 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -91,6 +91,12 @@
-{% if site.on_seL4 %} - Served by Apache on Linux on seL4. -{% endif %} diff --git a/_on_seL4.yml b/_on_seL4.yml new file mode 100644 index 00000000..49ef5c71 --- /dev/null +++ b/_on_seL4.yml @@ -0,0 +1,8 @@ +# Copyright 2024 seL4 Project a Series of LF Projects, LLC. +# SPDX-License-Identifier: BSD-2-Clause +## + +url: "https://beta.sel4.systems" +static_url: "https://beta.sel4.systems" +on_seL4: true +destination: _site_on_seL4 \ No newline at end of file