1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/conf/landfall-examples/mips-ci20-spectrum.cfg Wed Jun 17 00:02:14 2020 +0200
1.3 @@ -0,0 +1,97 @@
1.4 +-- vim: ft=lua ts=2 et sw=2
1.5 +
1.6 +-- Start Mag to multiplex the framebuffer showing only a single program.
1.7 +-- This example shows an animation showing off a spectrum of colours.
1.8 +-- The target platform is the MIPS Creator CI20.
1.9 +
1.10 +local L4 = require("L4");
1.11 +
1.12 +local l = L4.default_loader;
1.13 +
1.14 +-- Define general access to peripherals.
1.15 +
1.16 +local io_buses = {
1.17 + cpm = l:new_channel();
1.18 + gpio = l:new_channel();
1.19 + hdmi = l:new_channel();
1.20 + lcd = l:new_channel();
1.21 + };
1.22 +
1.23 +l:start({
1.24 + caps = {
1.25 + cpm = io_buses.cpm:svr(),
1.26 + gpio = io_buses.gpio:svr(),
1.27 + hdmi = io_buses.hdmi:svr(),
1.28 + lcd = io_buses.lcd:svr(),
1.29 +
1.30 + icu = L4.Env.icu,
1.31 + sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0),
1.32 + },
1.33 + },
1.34 + "rom/io rom/hw_devices.io rom/mips-ci20-common.io");
1.35 +
1.36 +-- Expose the CPM peripheral.
1.37 +
1.38 +local cpm = l:new_channel();
1.39 +
1.40 +l:start({
1.41 + caps = {
1.42 + vbus = io_buses.cpm,
1.43 + cpm = cpm:svr(),
1.44 + },
1.45 + },
1.46 + "rom/dev_cpm_jz4780");
1.47 +
1.48 +-- Expose a display device for the CI20.
1.49 +
1.50 +local display = l:new_channel(); -- exposes display device
1.51 +
1.52 +l:start({
1.53 + caps = {
1.54 + cpm = cpm,
1.55 + display = display:svr(),
1.56 + icu = L4.Env.icu,
1.57 + vbus = io_buses.hdmi, -- for HDMI resource access
1.58 + },
1.59 + },
1.60 + "rom/dev_display_ci20_hdmi");
1.61 +
1.62 +-- Expose a framebuffer device.
1.63 +
1.64 +local fbdrv_fb = l:new_channel();
1.65 +
1.66 +l:start({
1.67 + caps = {
1.68 + vbus = io_buses.lcd,
1.69 + fb = fbdrv_fb:svr(),
1.70 + cpm = cpm,
1.71 + display = display, -- needed by LCD driver
1.72 + },
1.73 + },
1.74 + "rom/fb-drv");
1.75 +
1.76 +-- Multiplex the framebuffer.
1.77 +
1.78 +local mag_caps = {
1.79 + mag = l:new_channel(),
1.80 + svc = l:new_channel(),
1.81 + };
1.82 +
1.83 +l:start({
1.84 + caps = {
1.85 + vbus = io_buses.gpio, -- needed by input driver
1.86 + fb = fbdrv_fb,
1.87 + mag = mag_caps.mag:svr(),
1.88 + svc = mag_caps.svc:svr(),
1.89 + },
1.90 + },
1.91 + "rom/mag");
1.92 +
1.93 +-- Show the spectrum example.
1.94 +
1.95 +l:start({
1.96 + caps = {
1.97 + fb = mag_caps.svc:create(L4.Proto.Goos, "g=1280x1014+0+0", "barheight=10"),
1.98 + },
1.99 + },
1.100 + "rom/ex_fb_spectrum_cc");
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/conf/landfall-examples/mips-ci20-spectrum.list Wed Jun 17 00:02:14 2020 +0200
2.3 @@ -0,0 +1,20 @@
2.4 +
2.5 +modaddr 0x1100000
2.6 +
2.7 +entry mips-ci20-spectrum-example
2.8 +bootstrap bootstrap -serial
2.9 +kernel fiasco -serial_esc
2.10 +roottask moe rom/mips-ci20-spectrum.cfg
2.11 +module mips-ci20-spectrum.cfg
2.12 +module mips-ci20-common.io
2.13 +module plat-mips-ci20/hw_devices.io
2.14 +module l4re
2.15 +module io
2.16 +module ned
2.17 +module fb-drv
2.18 +module mag
2.19 +module dev_display_ci20_hdmi
2.20 +module dev_cpm_jz4780
2.21 +module ex_fb_spectrum_cc
2.22 +module libpanel_ci20.so
2.23 +module mips-jz4740-panel.txt