1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/conf/landfall-examples/mips-letux400-fbterminal.cfg Sun May 20 16:54:53 2018 +0200
1.3 @@ -0,0 +1,142 @@
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 a framebuffer terminal showing the hello example's output.
1.8 +-- The target platform is the Letux 400 notebook computer.
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 + lcd = l:new_channel();
1.20 + pwm = l:new_channel(); -- exposes GPIO, PWM
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 + lcd = io_buses.lcd:svr(),
1.28 + pwm = io_buses.pwm: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-letux400-common.io");
1.35 +
1.36 +-- Expose a PWM peripheral as a device.
1.37 +
1.38 +local pwm = l:new_channel();
1.39 +
1.40 +l:startv({
1.41 + caps = {
1.42 + vbus = io_buses.pwm,
1.43 + pwm = pwm:svr(),
1.44 + },
1.45 + },
1.46 + "rom/dev_pwm_jz4730", "0", "250", "299", "47"); -- specifying peripheral number, parameters
1.47 +
1.48 +-- Expose a PWM backlight device.
1.49 +
1.50 +local backlight = l:new_channel(); -- exposes backlight device
1.51 +
1.52 +l:startv({
1.53 + caps = {
1.54 + pwm = pwm,
1.55 + backlight = backlight:svr(),
1.56 + },
1.57 + },
1.58 + "rom/dev_backlight_pwm", "0", "300"); -- specifying limits
1.59 +
1.60 +-- Expose a display device for the Letux.
1.61 +
1.62 +local display = l:new_channel(); -- exposes display device
1.63 +
1.64 +l:start({
1.65 + caps = {
1.66 + backlight = backlight,
1.67 + display = display:svr(),
1.68 + vbus = io_buses.gpio,
1.69 + },
1.70 + },
1.71 + "rom/dev_display_letux400");
1.72 +
1.73 +-- Expose a panel definition for the Letux.
1.74 +
1.75 +local panel = l:new_channel(); -- exposes panel
1.76 +
1.77 +l:start({
1.78 + caps = {
1.79 + panel = panel:svr(),
1.80 + },
1.81 + },
1.82 + "rom/dev_panel_letux400");
1.83 +
1.84 +-- Expose the CPM peripheral.
1.85 +
1.86 +local cpm = l:new_channel();
1.87 +
1.88 +l:start({
1.89 + caps = {
1.90 + vbus = io_buses.cpm,
1.91 + cpm = cpm:svr(),
1.92 + },
1.93 + },
1.94 + "rom/dev_cpm_jz4730");
1.95 +
1.96 +-- Expose a framebuffer device.
1.97 +
1.98 +local fbdrv_fb = l:new_channel();
1.99 +
1.100 +l:start({
1.101 + caps = {
1.102 + vbus = io_buses.lcd,
1.103 + fb = fbdrv_fb:svr(),
1.104 + cpm = cpm,
1.105 + display = display, -- needed by LCD driver
1.106 + panel = panel,
1.107 + },
1.108 + },
1.109 + "rom/fb-drv");
1.110 +
1.111 +-- Multiplex the framebuffer.
1.112 +
1.113 +local mag_caps = {
1.114 + mag = l:new_channel(),
1.115 + svc = l:new_channel(),
1.116 + };
1.117 +
1.118 +l:start({
1.119 + caps = {
1.120 + vbus = io_buses.gpio, -- needed by input driver
1.121 + fb = fbdrv_fb,
1.122 + mag = mag_caps.mag:svr(),
1.123 + svc = mag_caps.svc:svr(),
1.124 + },
1.125 + },
1.126 + "rom/mag");
1.127 +
1.128 +-- Show the terminal.
1.129 +
1.130 +local term = l:new_channel();
1.131 +
1.132 +l:start({
1.133 + caps = {
1.134 + fb = mag_caps.svc:create(L4.Proto.Goos, "g=800x460+0+0", "barheight=20"),
1.135 + term = term:svr(),
1.136 + },
1.137 + },
1.138 + "rom/fbterminal");
1.139 +
1.140 +-- Show the hello example.
1.141 +
1.142 +l:start({
1.143 + log_cap = term,
1.144 + },
1.145 + "rom/hello");
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/conf/landfall-examples/mips-letux400-fbterminal.list Sun May 20 16:54:53 2018 +0200
2.3 @@ -0,0 +1,22 @@
2.4 +
2.5 +modaddr 0x1100000
2.6 +
2.7 +entry mips-letux400-fbterminal-example
2.8 +bootstrap bootstrap -serial
2.9 +kernel fiasco -serial_esc
2.10 +roottask moe rom/mips-letux400-fbterminal.cfg
2.11 +module mips-letux400-fbterminal.cfg
2.12 +module mips-letux400-common.io
2.13 +module plat-letux400/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_pwm_jz4730
2.20 +module dev_backlight_pwm
2.21 +module dev_display_letux400
2.22 +module dev_panel_letux400
2.23 +module dev_cpm_jz4730
2.24 +module fbterminal
2.25 +module hello
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/conf/landfall-examples/mips-qi_lb60-fbterminal.cfg Sun May 20 16:54:53 2018 +0200
3.3 @@ -0,0 +1,140 @@
3.4 +-- vim: ft=lua ts=2 et sw=2
3.5 +
3.6 +-- Start Mag to multiplex the framebuffer showing only a single program.
3.7 +-- This example shows a framebuffer terminal showing the hello example's output.
3.8 +-- The target platform is the Ben NanoNote.
3.9 +
3.10 +local L4 = require("L4");
3.11 +
3.12 +local l = L4.default_loader;
3.13 +
3.14 +-- Define general access to peripherals.
3.15 +
3.16 +local io_buses = {
3.17 + cpm = l:new_channel();
3.18 + gpio = l:new_channel();
3.19 + lcd = l:new_channel();
3.20 + };
3.21 +
3.22 +l:start({
3.23 + caps = {
3.24 + cpm = io_buses.cpm:svr(),
3.25 + gpio = io_buses.gpio:svr(),
3.26 + lcd = io_buses.lcd:svr(),
3.27 +
3.28 + icu = L4.Env.icu,
3.29 + sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0),
3.30 + },
3.31 + },
3.32 + "rom/io rom/hw_devices.io rom/mips-qi_lb60-common.io");
3.33 +
3.34 +-- Expose a SPI peripheral as a device.
3.35 +
3.36 +local spi = l:new_channel();
3.37 +
3.38 +l:startv({
3.39 + caps = {
3.40 + vbus = io_buses.gpio,
3.41 + spi = spi:svr(),
3.42 + },
3.43 + },
3.44 + "rom/dev_spi_jz4740", "C23", "C22", "C21"); -- specifying clock, data, enable pin details
3.45 +
3.46 +-- Expose a SPI backlight device for the Ben.
3.47 +
3.48 +local backlight = l:new_channel(); -- exposes backlight device
3.49 +
3.50 +l:start({
3.51 + caps = {
3.52 + spi = spi,
3.53 + backlight = backlight:svr(),
3.54 + },
3.55 + },
3.56 + "rom/dev_backlight_spi_qi_lb60");
3.57 +
3.58 +-- Expose a display device for the Ben.
3.59 +
3.60 +local display = l:new_channel(); -- exposes display device
3.61 +
3.62 +l:start({
3.63 + caps = {
3.64 + backlight = backlight,
3.65 + display = display:svr(),
3.66 + vbus = io_buses.gpio,
3.67 + },
3.68 + },
3.69 + "rom/dev_display_qi_lb60");
3.70 +
3.71 +-- Expose a panel definition for the Ben.
3.72 +
3.73 +local panel = l:new_channel(); -- exposes panel
3.74 +
3.75 +l:start({
3.76 + caps = {
3.77 + panel = panel:svr(),
3.78 + },
3.79 + },
3.80 + "rom/dev_panel_qi_lb60");
3.81 +
3.82 +-- Expose the CPM peripheral.
3.83 +
3.84 +local cpm = l:new_channel();
3.85 +
3.86 +l:start({
3.87 + caps = {
3.88 + vbus = io_buses.cpm,
3.89 + cpm = cpm:svr(),
3.90 + },
3.91 + },
3.92 + "rom/dev_cpm_jz4740");
3.93 +
3.94 +-- Expose a framebuffer device.
3.95 +
3.96 +local fbdrv_fb = l:new_channel();
3.97 +
3.98 +l:start({
3.99 + caps = {
3.100 + vbus = io_buses.lcd,
3.101 + fb = fbdrv_fb:svr(),
3.102 + cpm = cpm,
3.103 + display = display, -- needed by LCD driver
3.104 + panel = panel,
3.105 + },
3.106 + },
3.107 + "rom/fb-drv");
3.108 +
3.109 +-- Multiplex the framebuffer.
3.110 +
3.111 +local mag_caps = {
3.112 + mag = l:new_channel(),
3.113 + svc = l:new_channel(),
3.114 + };
3.115 +
3.116 +l:start({
3.117 + caps = {
3.118 + vbus = io_buses.gpio, -- needed by input driver
3.119 + fb = fbdrv_fb,
3.120 + mag = mag_caps.mag:svr(),
3.121 + svc = mag_caps.svc:svr(),
3.122 + },
3.123 + },
3.124 + "rom/mag");
3.125 +
3.126 +-- Show the terminal.
3.127 +
3.128 +local term = l:new_channel();
3.129 +
3.130 +l:start({
3.131 + caps = {
3.132 + fb = mag_caps.svc:create(L4.Proto.Goos, "g=320x230+0+0", "barheight=10"),
3.133 + term = term:svr(),
3.134 + },
3.135 + },
3.136 + "rom/fbterminal");
3.137 +
3.138 +-- Show the hello example.
3.139 +
3.140 +l:start({
3.141 + log_cap = term,
3.142 + },
3.143 + "rom/hello");
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/conf/landfall-examples/mips-qi_lb60-fbterminal.list Sun May 20 16:54:53 2018 +0200
4.3 @@ -0,0 +1,22 @@
4.4 +
4.5 +modaddr 0x1100000
4.6 +
4.7 +entry mips-qi_lb60-fbterminal-example
4.8 +bootstrap bootstrap -serial
4.9 +kernel fiasco -serial_esc
4.10 +roottask moe rom/mips-qi_lb60-fbterminal.cfg
4.11 +module mips-qi_lb60-fbterminal.cfg
4.12 +module mips-qi_lb60-common.io
4.13 +module plat-qi_lb60/hw_devices.io
4.14 +module l4re
4.15 +module io
4.16 +module ned
4.17 +module fb-drv
4.18 +module mag
4.19 +module dev_spi_jz4740
4.20 +module dev_backlight_spi_qi_lb60
4.21 +module dev_display_qi_lb60
4.22 +module dev_panel_qi_lb60
4.23 +module dev_cpm_jz4740
4.24 +module fbterminal
4.25 +module hello