# HG changeset patch # User Paul Boddie # Date 1592601114 -7200 # Node ID a375b1ffd68e97fb47cf797e4539c5bdc8bf4781 # Parent c83b850e4dd824c2e657fc44426dcfaa39959fbd Added fbterminal examples for the CI20 demonstrating the hello example. diff -r c83b850e4dd8 -r a375b1ffd68e conf/landfall-examples/mips-ci20-fbterminal.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/landfall-examples/mips-ci20-fbterminal.cfg Fri Jun 19 23:11:54 2020 +0200 @@ -0,0 +1,107 @@ +-- vim: ft=lua ts=2 et sw=2 + +-- Start Mag to multiplex the framebuffer showing only a single program. +-- This example shows a framebuffer terminal showing the hello example's output. +-- The target platform is the MIPS Creator CI20. + +local L4 = require("L4"); + +local l = L4.default_loader; + +-- Define general access to peripherals. + +local io_buses = { + cpm = l:new_channel(); + gpio = l:new_channel(); + hdmi = l:new_channel(); + lcd = l:new_channel(); + }; + +l:start({ + caps = { + cpm = io_buses.cpm:svr(), + gpio = io_buses.gpio:svr(), + hdmi = io_buses.hdmi:svr(), + lcd = io_buses.lcd:svr(), + + icu = L4.Env.icu, + sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), + }, + }, + "rom/io rom/hw_devices.io rom/mips-ci20-common.io"); + +-- Expose the CPM peripheral. + +local cpm = l:new_channel(); + +l:start({ + caps = { + vbus = io_buses.cpm, + cpm = cpm:svr(), + }, + }, + "rom/dev_cpm_jz4780"); + +-- Expose a display device for the CI20. + +local display = l:new_channel(); -- exposes display device + +l:start({ + caps = { + cpm = cpm, + display = display:svr(), + icu = L4.Env.icu, + vbus = io_buses.hdmi, -- for HDMI resource access + }, + }, + "rom/dev_display_ci20_hdmi"); + +-- Expose a framebuffer device. + +local fbdrv_fb = l:new_channel(); + +l:start({ + caps = { + vbus = io_buses.lcd, + fb = fbdrv_fb:svr(), + cpm = cpm, + display = display, -- needed by LCD driver + }, + }, + "rom/fb-drv"); + +-- Multiplex the framebuffer. + +local mag_caps = { + mag = l:new_channel(), + svc = l:new_channel(), + }; + +l:start({ + caps = { + vbus = io_buses.gpio, -- needed by input driver + fb = fbdrv_fb, + mag = mag_caps.mag:svr(), + svc = mag_caps.svc:svr(), + }, + }, + "rom/mag"); + +-- Show the terminal. + +local term = l:new_channel(); + +l:start({ + caps = { + fb = mag_caps.svc:create(L4.Proto.Goos, "g=1280x1014+0+0", "barheight=10"), + term = term:svr(), + }, + }, + "rom/fbterminal"); + +-- Show the hello example. + +l:start({ + log_cap = term, + }, + "rom/hello"); diff -r c83b850e4dd8 -r a375b1ffd68e conf/landfall-examples/mips-ci20-fbterminal.list --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/landfall-examples/mips-ci20-fbterminal.list Fri Jun 19 23:11:54 2020 +0200 @@ -0,0 +1,21 @@ + +modaddr 0x1100000 + +entry mips-ci20-fbterminal-example +bootstrap bootstrap -serial +kernel fiasco -serial_esc +roottask moe rom/mips-ci20-fbterminal.cfg +module mips-ci20-fbterminal.cfg +module mips-ci20-common.io +module plat-mips-ci20/hw_devices.io +module l4re +module io +module ned +module fb-drv +module mag +module dev_display_ci20_hdmi +module dev_cpm_jz4780 +module fbterminal +module hello +module libpanel_ci20.so +module mips-jz4740-panel.txt