Skip to content

Commit

Permalink
Build targets for on-seL4 and not-on-seL4
Browse files Browse the repository at this point in the history
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 <Peter.Chubb@unsw.edu.au>
Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: James Archer <j.archer@unsw.edu.au>
  • Loading branch information
wom-bat committed Sep 25, 2024
1 parent bc1b983 commit 7c7a6b0
Show file tree
Hide file tree
Showing 9 changed files with 400 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.swp
_site
_preview
_site_on_seL4
.sass-cache
.jekyll-cache
.jekyll-metadata
Expand Down
4 changes: 4 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
53 changes: 53 additions & 0 deletions Info/Website/index.html
Original file line number Diff line number Diff line change
@@ -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
---
<h1>
About this website
</h1>
<div class="row">
<div class="col-sm-6 col-3">
<img style=
"padding:10px; width:inherit; vertical-align: top; float:
left;" src="./webserver.svg" alt="Webserver architecture
diagram" class="img-responsive img-fluid">
</div>
<div class="col-sm-6 col-3">
<p>
This website runs on <a href="https://lionsos.org">LionsOS</a>,
an operating system for embedded systems. LionsOS is in turn
based on
the <a href="https://github.com/seL4/microkit">Microkit</a>, a
framework that presents a small set of simple abstractions over
seL4, and
the <a href="https://trustworthy.systems/projects/drivers">sel4
Device Driver Framework</a>.
</p>
<p>
Source for the system is
in <a href="https://github.com/au-ts/lionsos">the LionsOS</a>
repository.
</p>
<p>
The hardware is
an <a href="https://www.hardkernel.com/shop/odroid-c4/">Odroid
C4</a>, 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.
</p>
<p>
For ease of update, the website content is stored on an NFS
server. It is built from content
on <a href="https://github.com/seL4/website">github.com</a> and
deployed to the NFS server as updates are accepted into the
tree.
</p>
<p>
The MicroPython code that actually implements the webserver is
based on
the <a href="https://github.com/miguelgrinberg/microdot">Microdot</a>
framework. It uses asychronous access to network and
filesystems.
</p>
</div>
</div>
315 changes: 315 additions & 0 deletions Info/Website/webserver.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <target>. Available seL4 website targets:\n\
Expand Down Expand Up @@ -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/*
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 6 additions & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@
<div class="row">
<!-- for screens larger than mobiles -->
<div class="col-xs-6 hidden-xs">
{% if site.on_seL4 %}
<a href="/Info/Website/">About this web server</a>
Served by <a href="https://micropython.org/">MicroPython</a>
on <a href="https://lionsos.org/"> LionsOS</a> on seL4.
<br/>
{% endif %}
Copyright &copy; 2024 seL4 Project a Series of LF Projects, LLC.<br/>
seL4 is a trademark of LF Projects, LLC.<br/>
For trademark usage guidelines, privacy and cookie policies,
Expand All @@ -106,9 +112,6 @@
</div>
</div>
</div>
{% if site.on_seL4 %}
Served by Apache on Linux on seL4.
{% endif %}
</footer> <!-- footer -->
<!-- wrapper -->
<script src={{ "/js/jquery.min.js" | relative_url }}></script>
Expand Down
8 changes: 8 additions & 0 deletions _on_seL4.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7c7a6b0

Please sign in to comment.