Landfall

Changeset

231:9e2c034b3a29
18 months ago Paul Boddie raw files shortlog changelog graph Added demonstration configuration files. jz4780-spi-lcd
conf/landfall-examples/mips-ci20-spi-spectrum.cfg (file) conf/landfall-examples/mips-ci20-spi-spectrum.list (file)
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/conf/landfall-examples/mips-ci20-spi-spectrum.cfg	Sun Nov 12 18:08:15 2023 +0100
     1.3 @@ -0,0 +1,62 @@
     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 +    common   = l:new_channel();
    1.18 +  };
    1.19 +
    1.20 +l:start({
    1.21 +  caps = {
    1.22 +      common  = io_buses.common:svr(),
    1.23 +      icu     = L4.Env.icu,
    1.24 +      sigma0  = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0),
    1.25 +    },
    1.26 +  },
    1.27 +  "rom/io rom/hw_devices.io rom/mips-ci20-common.io");
    1.28 +
    1.29 +-- Expose a framebuffer device.
    1.30 +
    1.31 +local fbdrv_fb = l:new_channel();
    1.32 +
    1.33 +l:start({
    1.34 +    caps = {
    1.35 +      vbus    = io_buses.common,
    1.36 +      fb      = fbdrv_fb:svr(),
    1.37 +    },
    1.38 +  },
    1.39 +  "rom/fb-drv");
    1.40 +
    1.41 +-- Multiplex the framebuffer.
    1.42 +
    1.43 +local mag_caps = {
    1.44 +    mag = l:new_channel(),
    1.45 +    svc = l:new_channel(),
    1.46 +  };
    1.47 +
    1.48 +l:start({
    1.49 +    caps = {
    1.50 +      vbus = io_buses.common, -- needed by input driver
    1.51 +      fb   = fbdrv_fb,
    1.52 +      mag  = mag_caps.mag:svr(),
    1.53 +      svc  = mag_caps.svc:svr(),
    1.54 +    },
    1.55 +  },
    1.56 +  "rom/mag");
    1.57 +
    1.58 +-- Show the spectrum example.
    1.59 +
    1.60 +l:start({
    1.61 +    caps = {
    1.62 +      fb = mag_caps.svc:create(L4.Proto.Goos, "g=240x240+0+0", "barheight=10"),
    1.63 +    },
    1.64 +  },
    1.65 +  "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-spi-spectrum.list	Sun Nov 12 18:08:15 2023 +0100
     2.3 @@ -0,0 +1,16 @@
     2.4 +
     2.5 +modaddr 0x1100000
     2.6 +
     2.7 +entry mips-ci20-spi-spectrum-example
     2.8 +bootstrap bootstrap -serial
     2.9 +kernel fiasco -serial_esc
    2.10 +roottask moe rom/mips-ci20-spi-spectrum.cfg
    2.11 +module mips-ci20-spi-spectrum.cfg
    2.12 +module mips-ci20-common.io
    2.13 +module plat-ingenic-jz4780/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 ex_fb_spectrum_cc