1.1 --- a/README.txt Mon May 28 23:44:25 2018 +0200 1.2 +++ b/README.txt Tue May 29 00:25:45 2018 +0200 1.3 @@ -26,6 +26,22 @@ 1.4 configuring and building the software. Building can be done after the steps 1.5 described below. 1.6 1.7 +Configuring this Software 1.8 +------------------------- 1.9 + 1.10 +Some files may need to be adjusted for the device on which the software is to 1.11 +be deployed. A script is provided to check and update them: 1.12 + 1.13 +$LANDFALL/tools/checkconfig.sh 1.14 + 1.15 +(Here, $LANDFALL needs to expand to the location of this distribution.) 1.16 + 1.17 +For example: 1.18 + 1.19 +$LANDFALL/tools/checkconfig.sh qi_lb60 1.20 + 1.21 +This configures the files for the Ben NanoNote. 1.22 + 1.23 Installing this Software 1.24 ------------------------ 1.25 1.26 @@ -89,7 +105,6 @@ 1.27 input - input event delivery 1.28 keypad - keypad/keyboard scanning 1.29 lcd - LCD and other display peripheral support 1.30 - panel - device-specific panel definitions 1.31 pwm - pulse width modulation support 1.32 spi - serial peripheral interface support 1.33 1.34 @@ -130,7 +145,6 @@ 1.35 \-> dev_display_qi_lb60 Display control 1.36 \-> dev_backlight_spi_ili8960 Backlight control 1.37 \-> dev_spi_jz4740 Backlight communication 1.38 - \-> dev_panel_qi_lb60 Panel information 1.39 1.40 And here is how the Letux 400's framebuffer is supported: 1.41 1.42 @@ -138,15 +152,14 @@ 1.43 \-> dev_display_letux400 Display control 1.44 \-> dev_backlight_pwm Backlight control 1.45 \-> dev_pwm_jz4730 Backlight communication 1.46 - \-> dev_panel_letux400 Panel information 1.47 1.48 (*) fb-drv links to the same generic JZ4740 LCD controller library in both 1.49 cases 1.50 1.51 Here, the CPM device provides access to the clock and power management 1.52 functionality, the display device provides access to the backlight and is 1.53 -responsible for configuring pins for the display, and the panel device 1.54 -provides information about the screen that the LCD controller needs. 1.55 +responsible for configuring pins for the display. Panel information is 1.56 +provided via a dynamically-loaded library. 1.57 1.58 Potential Improvements 1.59 ---------------------- 1.60 @@ -159,9 +172,9 @@ 1.61 by libraries. For example, GPIO functionality is currently not exposed via a 1.62 server. 1.63 1.64 -Panel device servers may eventually be replaced by simple resources given that 1.65 -their only job is to provide precomputed data via a capability channel. This 1.66 -could be done using a file bundled with the payload. 1.67 +Panel details are provided by libraries containing the structure definitions 1.68 +required by the LCD device code. These libraries may eventually be replaced by 1.69 +simple resource data files. 1.70 1.71 Framebuffer device servers are not currently used, since fb-drv effectively 1.72 offers the desired functionality together with other things.
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/conf/landfall-examples/mips-jz4740-panel.txt Tue May 29 00:25:45 2018 +0200 2.3 @@ -0,0 +1,1 @@ 2.4 +rom/libpanel_qi_lb60.so 2.5 \ No newline at end of file
3.1 --- a/conf/landfall-examples/mips-letux400-fbdrv.cfg Mon May 28 23:44:25 2018 +0200 3.2 +++ b/conf/landfall-examples/mips-letux400-fbdrv.cfg Tue May 29 00:25:45 2018 +0200 3.3 @@ -66,17 +66,6 @@ 3.4 }, 3.5 "rom/dev_display_letux400"); 3.6 3.7 --- Expose a panel definition for the Letux. 3.8 - 3.9 -local panel = l:new_channel(); -- exposes panel 3.10 - 3.11 -l:start({ 3.12 - caps = { 3.13 - panel = panel:svr(), 3.14 - }, 3.15 - }, 3.16 - "rom/dev_panel_letux400"); 3.17 - 3.18 -- Expose the CPM peripheral. 3.19 3.20 local cpm = l:new_channel(); 3.21 @@ -99,7 +88,6 @@ 3.22 fb = fbdrv_fb:svr(), 3.23 cpm = cpm, 3.24 display = display, -- needed by LCD driver 3.25 - panel = panel, 3.26 }, 3.27 }, 3.28 "rom/fb-drv");
4.1 --- a/conf/landfall-examples/mips-letux400-fbdrv.list Mon May 28 23:44:25 2018 +0200 4.2 +++ b/conf/landfall-examples/mips-letux400-fbdrv.list Tue May 29 00:25:45 2018 +0200 4.3 @@ -15,5 +15,6 @@ 4.4 module dev_pwm_jz4730 4.5 module dev_backlight_pwm 4.6 module dev_display_letux400 4.7 -module dev_panel_letux400 4.8 module dev_cpm_jz4730 4.9 +module libpanel_letux400.so 4.10 +module mips-jz4740-panel.txt
5.1 --- a/conf/landfall-examples/mips-letux400-fbterminal.cfg Mon May 28 23:44:25 2018 +0200 5.2 +++ b/conf/landfall-examples/mips-letux400-fbterminal.cfg Tue May 29 00:25:45 2018 +0200 5.3 @@ -67,17 +67,6 @@ 5.4 }, 5.5 "rom/dev_display_letux400"); 5.6 5.7 --- Expose a panel definition for the Letux. 5.8 - 5.9 -local panel = l:new_channel(); -- exposes panel 5.10 - 5.11 -l:start({ 5.12 - caps = { 5.13 - panel = panel:svr(), 5.14 - }, 5.15 - }, 5.16 - "rom/dev_panel_letux400"); 5.17 - 5.18 -- Expose the CPM peripheral. 5.19 5.20 local cpm = l:new_channel(); 5.21 @@ -100,7 +89,6 @@ 5.22 fb = fbdrv_fb:svr(), 5.23 cpm = cpm, 5.24 display = display, -- needed by LCD driver 5.25 - panel = panel, 5.26 }, 5.27 }, 5.28 "rom/fb-drv");
6.1 --- a/conf/landfall-examples/mips-letux400-fbterminal.list Mon May 28 23:44:25 2018 +0200 6.2 +++ b/conf/landfall-examples/mips-letux400-fbterminal.list Tue May 29 00:25:45 2018 +0200 6.3 @@ -16,7 +16,8 @@ 6.4 module dev_pwm_jz4730 6.5 module dev_backlight_pwm 6.6 module dev_display_letux400 6.7 -module dev_panel_letux400 6.8 module dev_cpm_jz4730 6.9 module fbterminal 6.10 module hello 6.11 +module libpanel_letux400.so 6.12 +module mips-jz4740-panel.txt
7.1 --- a/conf/landfall-examples/mips-letux400-input-event-client.cfg Mon May 28 23:44:25 2018 +0200 7.2 +++ b/conf/landfall-examples/mips-letux400-input-event-client.cfg Tue May 29 00:25:45 2018 +0200 7.3 @@ -67,17 +67,6 @@ 7.4 }, 7.5 "rom/dev_display_letux400"); 7.6 7.7 --- Expose a panel definition for the Letux. 7.8 - 7.9 -local panel = l:new_channel(); -- exposes panel 7.10 - 7.11 -l:start({ 7.12 - caps = { 7.13 - panel = panel:svr(), 7.14 - }, 7.15 - }, 7.16 - "rom/dev_panel_letux400"); 7.17 - 7.18 -- Expose the CPM peripheral. 7.19 7.20 local cpm = l:new_channel(); 7.21 @@ -100,7 +89,6 @@ 7.22 fb = fbdrv_fb:svr(), 7.23 cpm = cpm, 7.24 display = display, -- needed by LCD driver 7.25 - panel = panel, 7.26 }, 7.27 }, 7.28 "rom/fb-drv");
8.1 --- a/conf/landfall-examples/mips-letux400-input-event-client.list Mon May 28 23:44:25 2018 +0200 8.2 +++ b/conf/landfall-examples/mips-letux400-input-event-client.list Tue May 29 00:25:45 2018 +0200 8.3 @@ -16,8 +16,9 @@ 8.4 module dev_pwm_jz4730 8.5 module dev_backlight_pwm 8.6 module dev_display_letux400 8.7 -module dev_panel_letux400 8.8 module dev_cpm_jz4730 8.9 module dev_keypad_letux400 8.10 module dev_input_keypad_letux400 8.11 module ex_input_event_client 8.12 +module libpanel_letux400.so 8.13 +module mips-jz4740-panel.txt
9.1 --- a/conf/landfall-examples/mips-letux400-keypad-demo.cfg Mon May 28 23:44:25 2018 +0200 9.2 +++ b/conf/landfall-examples/mips-letux400-keypad-demo.cfg Tue May 29 00:25:45 2018 +0200 9.3 @@ -67,17 +67,6 @@ 9.4 }, 9.5 "rom/dev_display_letux400"); 9.6 9.7 --- Expose a panel definition for the Letux. 9.8 - 9.9 -local panel = l:new_channel(); -- exposes panel 9.10 - 9.11 -l:start({ 9.12 - caps = { 9.13 - panel = panel:svr(), 9.14 - }, 9.15 - }, 9.16 - "rom/dev_panel_letux400"); 9.17 - 9.18 -- Expose the CPM peripheral. 9.19 9.20 local cpm = l:new_channel(); 9.21 @@ -100,7 +89,6 @@ 9.22 fb = fbdrv_fb:svr(), 9.23 cpm = cpm, 9.24 display = display, -- needed by LCD driver 9.25 - panel = panel, 9.26 }, 9.27 }, 9.28 "rom/fb-drv");
10.1 --- a/conf/landfall-examples/mips-letux400-keypad-demo.list Mon May 28 23:44:25 2018 +0200 10.2 +++ b/conf/landfall-examples/mips-letux400-keypad-demo.list Tue May 29 00:25:45 2018 +0200 10.3 @@ -16,7 +16,6 @@ 10.4 module dev_pwm_jz4730 10.5 module dev_backlight_pwm 10.6 module dev_display_letux400 10.7 -module dev_panel_letux400 10.8 module dev_cpm_jz4730 10.9 module dev_keypad_letux400 10.10 module dev_input_keypad_letux400 10.11 @@ -24,3 +23,5 @@ 10.12 module ex_keypad_ds_client 10.13 module ex_letux400_backlight 10.14 module ex_letux400_keypad_physical 10.15 +module libpanel_letux400.so 10.16 +module mips-jz4740-panel.txt
11.1 --- a/conf/landfall-examples/mips-letux400-keypad-ds.cfg Mon May 28 23:44:25 2018 +0200 11.2 +++ b/conf/landfall-examples/mips-letux400-keypad-ds.cfg Tue May 29 00:25:45 2018 +0200 11.3 @@ -68,17 +68,6 @@ 11.4 }, 11.5 "rom/dev_display_letux400"); 11.6 11.7 --- Expose a panel definition for the Letux. 11.8 - 11.9 -local panel = l:new_channel(); -- exposes panel 11.10 - 11.11 -l:start({ 11.12 - caps = { 11.13 - panel = panel:svr(), 11.14 - }, 11.15 - }, 11.16 - "rom/dev_panel_letux400"); 11.17 - 11.18 -- Expose the CPM peripheral. 11.19 11.20 local cpm = l:new_channel(); 11.21 @@ -101,7 +90,6 @@ 11.22 fb = fbdrv_fb:svr(), 11.23 cpm = cpm, 11.24 display = display, -- needed by LCD driver 11.25 - panel = panel, 11.26 }, 11.27 }, 11.28 "rom/fb-drv");
12.1 --- a/conf/landfall-examples/mips-letux400-keypad-ds.list Mon May 28 23:44:25 2018 +0200 12.2 +++ b/conf/landfall-examples/mips-letux400-keypad-ds.list Tue May 29 00:25:45 2018 +0200 12.3 @@ -16,7 +16,8 @@ 12.4 module dev_pwm_jz4730 12.5 module dev_backlight_pwm 12.6 module dev_display_letux400 12.7 -module dev_panel_letux400 12.8 module dev_cpm_jz4730 12.9 module dev_keypad_letux400 12.10 module ex_keypad_ds_client 12.11 +module libpanel_letux400.so 12.12 +module mips-jz4740-panel.txt
13.1 --- a/conf/landfall-examples/mips-letux400-keypad.cfg Mon May 28 23:44:25 2018 +0200 13.2 +++ b/conf/landfall-examples/mips-letux400-keypad.cfg Tue May 29 00:25:45 2018 +0200 13.3 @@ -67,17 +67,6 @@ 13.4 }, 13.5 "rom/dev_display_letux400"); 13.6 13.7 --- Expose a panel definition for the Letux. 13.8 - 13.9 -local panel = l:new_channel(); -- exposes panel 13.10 - 13.11 -l:start({ 13.12 - caps = { 13.13 - panel = panel:svr(), 13.14 - }, 13.15 - }, 13.16 - "rom/dev_panel_letux400"); 13.17 - 13.18 -- Expose the CPM peripheral. 13.19 13.20 local cpm = l:new_channel(); 13.21 @@ -100,7 +89,6 @@ 13.22 fb = fbdrv_fb:svr(), 13.23 cpm = cpm, 13.24 display = display, -- needed by LCD driver 13.25 - panel = panel, 13.26 }, 13.27 }, 13.28 "rom/fb-drv");
14.1 --- a/conf/landfall-examples/mips-letux400-keypad.list Mon May 28 23:44:25 2018 +0200 14.2 +++ b/conf/landfall-examples/mips-letux400-keypad.list Tue May 29 00:25:45 2018 +0200 14.3 @@ -16,9 +16,10 @@ 14.4 module dev_pwm_jz4730 14.5 module dev_backlight_pwm 14.6 module dev_display_letux400 14.7 -module dev_panel_letux400 14.8 module dev_cpm_jz4730 14.9 module ex_letux400_keypad 14.10 +module libpanel_letux400.so 14.11 +module mips-jz4740-panel.txt 14.12 module lib4re-c.so 14.13 module lib4re-c-util.so 14.14 module lib4re.so
15.1 --- a/conf/landfall-examples/mips-letux400-lcd-driver.cfg Mon May 28 23:44:25 2018 +0200 15.2 +++ b/conf/landfall-examples/mips-letux400-lcd-driver.cfg Tue May 29 00:25:45 2018 +0200 15.3 @@ -65,17 +65,6 @@ 15.4 }, 15.5 "rom/dev_display_letux400"); 15.6 15.7 --- Expose a panel definition for the Letux. 15.8 - 15.9 -local panel = l:new_channel(); -- exposes panel 15.10 - 15.11 -l:start({ 15.12 - caps = { 15.13 - panel = panel:svr(), 15.14 - }, 15.15 - }, 15.16 - "rom/dev_panel_letux400"); 15.17 - 15.18 -- Expose the CPM peripheral. 15.19 15.20 local cpm = l:new_channel(); 15.21 @@ -96,7 +85,6 @@ 15.22 vbus = io_buses.lcd, 15.23 cpm = cpm, 15.24 display = display, -- needed by LCD driver 15.25 - panel = panel, 15.26 }, 15.27 }, 15.28 "rom/ex_jz4740_lcd_driver");
16.1 --- a/conf/landfall-examples/mips-letux400-lcd-driver.list Mon May 28 23:44:25 2018 +0200 16.2 +++ b/conf/landfall-examples/mips-letux400-lcd-driver.list Tue May 29 00:25:45 2018 +0200 16.3 @@ -14,6 +14,7 @@ 16.4 module dev_pwm_jz4730 16.5 module dev_backlight_pwm 16.6 module dev_display_letux400 16.7 -module dev_panel_letux400 16.8 module dev_cpm_jz4730 16.9 module ex_jz4740_lcd_driver 16.10 +module libpanel_letux400.so 16.11 +module mips-jz4740-panel.txt
17.1 --- a/conf/landfall-examples/mips-letux400-spectrum.cfg Mon May 28 23:44:25 2018 +0200 17.2 +++ b/conf/landfall-examples/mips-letux400-spectrum.cfg Tue May 29 00:25:45 2018 +0200 17.3 @@ -67,17 +67,6 @@ 17.4 }, 17.5 "rom/dev_display_letux400"); 17.6 17.7 --- Expose a panel definition for the Letux. 17.8 - 17.9 -local panel = l:new_channel(); -- exposes panel 17.10 - 17.11 -l:start({ 17.12 - caps = { 17.13 - panel = panel:svr(), 17.14 - }, 17.15 - }, 17.16 - "rom/dev_panel_letux400"); 17.17 - 17.18 -- Expose the CPM peripheral. 17.19 17.20 local cpm = l:new_channel(); 17.21 @@ -100,7 +89,6 @@ 17.22 fb = fbdrv_fb:svr(), 17.23 cpm = cpm, 17.24 display = display, -- needed by LCD driver 17.25 - panel = panel, 17.26 }, 17.27 }, 17.28 "rom/fb-drv");
18.1 --- a/conf/landfall-examples/mips-letux400-spectrum.list Mon May 28 23:44:25 2018 +0200 18.2 +++ b/conf/landfall-examples/mips-letux400-spectrum.list Tue May 29 00:25:45 2018 +0200 18.3 @@ -16,6 +16,7 @@ 18.4 module dev_pwm_jz4730 18.5 module dev_backlight_pwm 18.6 module dev_display_letux400 18.7 -module dev_panel_letux400 18.8 module dev_cpm_jz4730 18.9 module ex_fb_spectrum_cc 18.10 +module libpanel_letux400.so 18.11 +module mips-jz4740-panel.txt
19.1 --- a/conf/landfall-examples/mips-qi_lb60-dl-example.cfg Mon May 28 23:44:25 2018 +0200 19.2 +++ b/conf/landfall-examples/mips-qi_lb60-dl-example.cfg Tue May 29 00:25:45 2018 +0200 19.3 @@ -65,17 +65,6 @@ 19.4 }, 19.5 "rom/dev_display_qi_lb60"); 19.6 19.7 --- Expose a panel definition for the Ben. 19.8 - 19.9 -local panel = l:new_channel(); -- exposes panel 19.10 - 19.11 -l:start({ 19.12 - caps = { 19.13 - panel = panel:svr(), 19.14 - }, 19.15 - }, 19.16 - "rom/dev_panel_qi_lb60"); 19.17 - 19.18 -- Expose the CPM peripheral. 19.19 19.20 local cpm = l:new_channel(); 19.21 @@ -98,35 +87,10 @@ 19.22 fb = fbdrv_fb:svr(), 19.23 cpm = cpm, 19.24 display = display, -- needed by LCD driver 19.25 - panel = panel, 19.26 }, 19.27 }, 19.28 "rom/fb-drv"); 19.29 19.30 --- Expose the keypad matrix. 19.31 - 19.32 -local keypad = l:new_channel(); 19.33 - 19.34 -l:start({ 19.35 - caps = { 19.36 - vbus = io_buses.gpio, 19.37 - keypad = keypad:svr(), 19.38 - }, 19.39 - }, 19.40 - "rom/dev_keypad_qi_lb60"); 19.41 - 19.42 --- Expose the keypad events. 19.43 - 19.44 -local ev = l:new_channel(); 19.45 - 19.46 -l:start({ 19.47 - caps = { 19.48 - keypad = keypad, 19.49 - ev = ev:svr(), 19.50 - }, 19.51 - }, 19.52 - "rom/dev_input_keypad_qi_lb60"); 19.53 - 19.54 -- Multiplex the framebuffer. 19.55 19.56 local mag_caps = { 19.57 @@ -140,7 +104,6 @@ 19.58 fb = fbdrv_fb, 19.59 mag = mag_caps.mag:svr(), 19.60 svc = mag_caps.svc:svr(), 19.61 - ev = ev, 19.62 }, 19.63 }, 19.64 "rom/mag"); 19.65 @@ -157,7 +120,7 @@ 19.66 }, 19.67 "rom/fbterminal"); 19.68 19.69 --- Show the hello example. 19.70 +-- Show the dynamic loading example. 19.71 19.72 l:start({ 19.73 log_cap = term,
20.1 --- a/conf/landfall-examples/mips-qi_lb60-dl-example.list Mon May 28 23:44:25 2018 +0200 20.2 +++ b/conf/landfall-examples/mips-qi_lb60-dl-example.list Tue May 29 00:25:45 2018 +0200 20.3 @@ -16,10 +16,11 @@ 20.4 module dev_spi_jz4740 20.5 module dev_backlight_spi_ili8960 20.6 module dev_display_qi_lb60 20.7 -module dev_panel_qi_lb60 20.8 module dev_cpm_jz4740 20.9 module dev_keypad_qi_lb60 20.10 module dev_input_keypad_qi_lb60 20.11 module fbterminal 20.12 module ex_dl_test 20.13 module libdl_test_data.so 20.14 +module libpanel_qi_lb60.so 20.15 +module mips-jz4740-panel.txt
21.1 --- a/conf/landfall-examples/mips-qi_lb60-fbdrv.cfg Mon May 28 23:44:25 2018 +0200 21.2 +++ b/conf/landfall-examples/mips-qi_lb60-fbdrv.cfg Tue May 29 00:25:45 2018 +0200 21.3 @@ -64,17 +64,6 @@ 21.4 }, 21.5 "rom/dev_display_qi_lb60"); 21.6 21.7 --- Expose a panel definition for the Ben. 21.8 - 21.9 -local panel = l:new_channel(); -- exposes panel 21.10 - 21.11 -l:start({ 21.12 - caps = { 21.13 - panel = panel:svr(), 21.14 - }, 21.15 - }, 21.16 - "rom/dev_panel_qi_lb60"); 21.17 - 21.18 -- Expose the CPM peripheral. 21.19 21.20 local cpm = l:new_channel(); 21.21 @@ -97,7 +86,6 @@ 21.22 fb = fbdrv_fb:svr(), 21.23 cpm = cpm, 21.24 display = display, -- needed by LCD driver 21.25 - panel = panel, 21.26 }, 21.27 }, 21.28 "rom/fb-drv");
22.1 --- a/conf/landfall-examples/mips-qi_lb60-fbdrv.list Mon May 28 23:44:25 2018 +0200 22.2 +++ b/conf/landfall-examples/mips-qi_lb60-fbdrv.list Tue May 29 00:25:45 2018 +0200 22.3 @@ -15,5 +15,6 @@ 22.4 module dev_spi_jz4740 22.5 module dev_backlight_spi_ili8960 22.6 module dev_display_qi_lb60 22.7 -module dev_panel_qi_lb60 22.8 module dev_cpm_jz4740 22.9 +module libpanel_qi_lb60.so 22.10 +module mips-jz4740-panel.txt
23.1 --- a/conf/landfall-examples/mips-qi_lb60-fbterminal.cfg Mon May 28 23:44:25 2018 +0200 23.2 +++ b/conf/landfall-examples/mips-qi_lb60-fbterminal.cfg Tue May 29 00:25:45 2018 +0200 23.3 @@ -65,17 +65,6 @@ 23.4 }, 23.5 "rom/dev_display_qi_lb60"); 23.6 23.7 --- Expose a panel definition for the Ben. 23.8 - 23.9 -local panel = l:new_channel(); -- exposes panel 23.10 - 23.11 -l:start({ 23.12 - caps = { 23.13 - panel = panel:svr(), 23.14 - }, 23.15 - }, 23.16 - "rom/dev_panel_qi_lb60"); 23.17 - 23.18 -- Expose the CPM peripheral. 23.19 23.20 local cpm = l:new_channel(); 23.21 @@ -98,7 +87,6 @@ 23.22 fb = fbdrv_fb:svr(), 23.23 cpm = cpm, 23.24 display = display, -- needed by LCD driver 23.25 - panel = panel, 23.26 }, 23.27 }, 23.28 "rom/fb-drv");
24.1 --- a/conf/landfall-examples/mips-qi_lb60-fbterminal.list Mon May 28 23:44:25 2018 +0200 24.2 +++ b/conf/landfall-examples/mips-qi_lb60-fbterminal.list Tue May 29 00:25:45 2018 +0200 24.3 @@ -16,7 +16,8 @@ 24.4 module dev_spi_jz4740 24.5 module dev_backlight_spi_ili8960 24.6 module dev_display_qi_lb60 24.7 -module dev_panel_qi_lb60 24.8 module dev_cpm_jz4740 24.9 module fbterminal 24.10 module hello 24.11 +module libpanel_qi_lb60.so 24.12 +module mips-jz4740-panel.txt
25.1 --- a/conf/landfall-examples/mips-qi_lb60-input-event-client.cfg Mon May 28 23:44:25 2018 +0200 25.2 +++ b/conf/landfall-examples/mips-qi_lb60-input-event-client.cfg Tue May 29 00:25:45 2018 +0200 25.3 @@ -65,17 +65,6 @@ 25.4 }, 25.5 "rom/dev_display_qi_lb60"); 25.6 25.7 --- Expose a panel definition for the Ben. 25.8 - 25.9 -local panel = l:new_channel(); -- exposes panel 25.10 - 25.11 -l:start({ 25.12 - caps = { 25.13 - panel = panel:svr(), 25.14 - }, 25.15 - }, 25.16 - "rom/dev_panel_qi_lb60"); 25.17 - 25.18 -- Expose the CPM peripheral. 25.19 25.20 local cpm = l:new_channel(); 25.21 @@ -98,7 +87,6 @@ 25.22 fb = fbdrv_fb:svr(), 25.23 cpm = cpm, 25.24 display = display, -- needed by LCD driver 25.25 - panel = panel, 25.26 }, 25.27 }, 25.28 "rom/fb-drv");
26.1 --- a/conf/landfall-examples/mips-qi_lb60-input-event-client.list Mon May 28 23:44:25 2018 +0200 26.2 +++ b/conf/landfall-examples/mips-qi_lb60-input-event-client.list Tue May 29 00:25:45 2018 +0200 26.3 @@ -16,8 +16,9 @@ 26.4 module dev_spi_jz4740 26.5 module dev_backlight_spi_ili8960 26.6 module dev_display_qi_lb60 26.7 -module dev_panel_qi_lb60 26.8 module dev_cpm_jz4740 26.9 module dev_keypad_qi_lb60 26.10 module dev_input_keypad_qi_lb60 26.11 module ex_input_event_client 26.12 +module libpanel_qi_lb60.so 26.13 +module mips-jz4740-panel.txt
27.1 --- a/conf/landfall-examples/mips-qi_lb60-keypad-demo.cfg Mon May 28 23:44:25 2018 +0200 27.2 +++ b/conf/landfall-examples/mips-qi_lb60-keypad-demo.cfg Tue May 29 00:25:45 2018 +0200 27.3 @@ -65,17 +65,6 @@ 27.4 }, 27.5 "rom/dev_display_qi_lb60"); 27.6 27.7 --- Expose a panel definition for the Ben. 27.8 - 27.9 -local panel = l:new_channel(); -- exposes panel 27.10 - 27.11 -l:start({ 27.12 - caps = { 27.13 - panel = panel:svr(), 27.14 - }, 27.15 - }, 27.16 - "rom/dev_panel_qi_lb60"); 27.17 - 27.18 -- Expose the CPM peripheral. 27.19 27.20 local cpm = l:new_channel(); 27.21 @@ -98,7 +87,6 @@ 27.22 fb = fbdrv_fb:svr(), 27.23 cpm = cpm, 27.24 display = display, -- needed by LCD driver 27.25 - panel = panel, 27.26 }, 27.27 }, 27.28 "rom/fb-drv");
28.1 --- a/conf/landfall-examples/mips-qi_lb60-keypad-demo.list Mon May 28 23:44:25 2018 +0200 28.2 +++ b/conf/landfall-examples/mips-qi_lb60-keypad-demo.list Tue May 29 00:25:45 2018 +0200 28.3 @@ -16,7 +16,6 @@ 28.4 module dev_spi_jz4740 28.5 module dev_backlight_spi_ili8960 28.6 module dev_display_qi_lb60 28.7 -module dev_panel_qi_lb60 28.8 module dev_cpm_jz4740 28.9 module dev_keypad_qi_lb60 28.10 module dev_input_keypad_qi_lb60 28.11 @@ -24,3 +23,5 @@ 28.12 module ex_keypad_ds_client 28.13 module ex_qi_lb60_keypad_physical 28.14 module ex_qi_lb60_backlight 28.15 +module libpanel_qi_lb60.so 28.16 +module mips-jz4740-panel.txt
29.1 --- a/conf/landfall-examples/mips-qi_lb60-keypad-ds.cfg Mon May 28 23:44:25 2018 +0200 29.2 +++ b/conf/landfall-examples/mips-qi_lb60-keypad-ds.cfg Tue May 29 00:25:45 2018 +0200 29.3 @@ -66,17 +66,6 @@ 29.4 }, 29.5 "rom/dev_display_qi_lb60"); 29.6 29.7 --- Expose a panel definition for the Ben. 29.8 - 29.9 -local panel = l:new_channel(); -- exposes panel 29.10 - 29.11 -l:start({ 29.12 - caps = { 29.13 - panel = panel:svr(), 29.14 - }, 29.15 - }, 29.16 - "rom/dev_panel_qi_lb60"); 29.17 - 29.18 -- Expose the CPM peripheral. 29.19 29.20 local cpm = l:new_channel(); 29.21 @@ -99,7 +88,6 @@ 29.22 fb = fbdrv_fb:svr(), 29.23 cpm = cpm, 29.24 display = display, -- needed by LCD driver 29.25 - panel = panel, 29.26 }, 29.27 }, 29.28 "rom/fb-drv");
30.1 --- a/conf/landfall-examples/mips-qi_lb60-keypad-ds.list Mon May 28 23:44:25 2018 +0200 30.2 +++ b/conf/landfall-examples/mips-qi_lb60-keypad-ds.list Tue May 29 00:25:45 2018 +0200 30.3 @@ -16,7 +16,8 @@ 30.4 module dev_spi_jz4740 30.5 module dev_backlight_spi_ili8960 30.6 module dev_display_qi_lb60 30.7 -module dev_panel_qi_lb60 30.8 module dev_cpm_jz4740 30.9 module dev_keypad_qi_lb60 30.10 module ex_keypad_ds_client 30.11 +module libpanel_qi_lb60.so 30.12 +module mips-jz4740-panel.txt
31.1 --- a/conf/landfall-examples/mips-qi_lb60-keypad.cfg Mon May 28 23:44:25 2018 +0200 31.2 +++ b/conf/landfall-examples/mips-qi_lb60-keypad.cfg Tue May 29 00:25:45 2018 +0200 31.3 @@ -65,17 +65,6 @@ 31.4 }, 31.5 "rom/dev_display_qi_lb60"); 31.6 31.7 --- Expose a panel definition for the Ben. 31.8 - 31.9 -local panel = l:new_channel(); -- exposes panel 31.10 - 31.11 -l:start({ 31.12 - caps = { 31.13 - panel = panel:svr(), 31.14 - }, 31.15 - }, 31.16 - "rom/dev_panel_qi_lb60"); 31.17 - 31.18 -- Expose the CPM peripheral. 31.19 31.20 local cpm = l:new_channel(); 31.21 @@ -98,7 +87,6 @@ 31.22 fb = fbdrv_fb:svr(), 31.23 cpm = cpm, 31.24 display = display, -- needed by LCD driver 31.25 - panel = panel, 31.26 }, 31.27 }, 31.28 "rom/fb-drv");
32.1 --- a/conf/landfall-examples/mips-qi_lb60-keypad.list Mon May 28 23:44:25 2018 +0200 32.2 +++ b/conf/landfall-examples/mips-qi_lb60-keypad.list Tue May 29 00:25:45 2018 +0200 32.3 @@ -16,6 +16,7 @@ 32.4 module dev_spi_jz4740 32.5 module dev_backlight_spi_ili8960 32.6 module dev_display_qi_lb60 32.7 -module dev_panel_qi_lb60 32.8 module dev_cpm_jz4740 32.9 module ex_qi_lb60_keypad 32.10 +module libpanel_qi_lb60.so 32.11 +module mips-jz4740-panel.txt
33.1 --- a/conf/landfall-examples/mips-qi_lb60-lcd-driver.cfg Mon May 28 23:44:25 2018 +0200 33.2 +++ b/conf/landfall-examples/mips-qi_lb60-lcd-driver.cfg Tue May 29 00:25:45 2018 +0200 33.3 @@ -63,17 +63,6 @@ 33.4 }, 33.5 "rom/dev_display_qi_lb60"); 33.6 33.7 --- Expose a panel definition for the Ben. 33.8 - 33.9 -local panel = l:new_channel(); -- exposes panel 33.10 - 33.11 -l:start({ 33.12 - caps = { 33.13 - panel = panel:svr(), 33.14 - }, 33.15 - }, 33.16 - "rom/dev_panel_qi_lb60"); 33.17 - 33.18 -- Expose the CPM peripheral. 33.19 33.20 local cpm = l:new_channel(); 33.21 @@ -94,7 +83,6 @@ 33.22 vbus = io_buses.lcd, 33.23 cpm = cpm, 33.24 display = display, -- needed by LCD driver 33.25 - panel = panel, 33.26 }, 33.27 }, 33.28 "rom/ex_jz4740_lcd_driver");
34.1 --- a/conf/landfall-examples/mips-qi_lb60-lcd-driver.list Mon May 28 23:44:25 2018 +0200 34.2 +++ b/conf/landfall-examples/mips-qi_lb60-lcd-driver.list Tue May 29 00:25:45 2018 +0200 34.3 @@ -14,6 +14,7 @@ 34.4 module dev_spi_jz4740 34.5 module dev_backlight_spi_ili8960 34.6 module dev_display_qi_lb60 34.7 -module dev_panel_qi_lb60 34.8 module dev_cpm_jz4740 34.9 module ex_jz4740_lcd_driver 34.10 +module libpanel_qi_lb60.so 34.11 +module mips-jz4740-panel.txt
35.1 --- a/conf/landfall-examples/mips-qi_lb60-spectrum.cfg Mon May 28 23:44:25 2018 +0200 35.2 +++ b/conf/landfall-examples/mips-qi_lb60-spectrum.cfg Tue May 29 00:25:45 2018 +0200 35.3 @@ -65,17 +65,6 @@ 35.4 }, 35.5 "rom/dev_display_qi_lb60"); 35.6 35.7 --- Expose a panel definition for the Ben. 35.8 - 35.9 -local panel = l:new_channel(); -- exposes panel 35.10 - 35.11 -l:start({ 35.12 - caps = { 35.13 - panel = panel:svr(), 35.14 - }, 35.15 - }, 35.16 - "rom/dev_panel_qi_lb60"); 35.17 - 35.18 -- Expose the CPM peripheral. 35.19 35.20 local cpm = l:new_channel(); 35.21 @@ -98,7 +87,6 @@ 35.22 fb = fbdrv_fb:svr(), 35.23 cpm = cpm, 35.24 display = display, -- needed by LCD driver 35.25 - panel = panel, 35.26 }, 35.27 }, 35.28 "rom/fb-drv");
36.1 --- a/conf/landfall-examples/mips-qi_lb60-spectrum.list Mon May 28 23:44:25 2018 +0200 36.2 +++ b/conf/landfall-examples/mips-qi_lb60-spectrum.list Tue May 29 00:25:45 2018 +0200 36.3 @@ -16,6 +16,7 @@ 36.4 module dev_spi_jz4740 36.5 module dev_backlight_spi_ili8960 36.6 module dev_display_qi_lb60 36.7 -module dev_panel_qi_lb60 36.8 module dev_cpm_jz4740 36.9 module ex_fb_spectrum_cc 36.10 +module libpanel_qi_lb60.so 36.11 +module mips-jz4740-panel.txt
37.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 37.2 +++ b/conf/landfall-examples/platforms.txt Tue May 29 00:25:45 2018 +0200 37.3 @@ -0,0 +1,3 @@ 37.4 +ci20 37.5 +letux400 37.6 +qi_lb60
38.1 --- a/pkg/devices/Control Mon May 28 23:44:25 2018 +0200 38.2 +++ b/pkg/devices/Control Tue May 29 00:25:45 2018 +0200 38.3 @@ -10,8 +10,6 @@ 38.4 provides: devices-input-keypad-qi_lb60 38.5 provides: devices-keypad-letux400 38.6 provides: devices-keypad-qi_lb60 38.7 -provides: devices-panel-letux400 38.8 -provides: devices-panel-qi_lb60 38.9 provides: devices-pwm-jz4730 38.10 provides: devices-spi-jz4740 38.11 provides: libdevice-backlight-client 38.12 @@ -32,9 +30,6 @@ 38.13 provides: libdevice-keypad-server 38.14 provides: libdevice-lcd 38.15 provides: libdevice-lcd-jz4740 38.16 -provides: libdevice-panel-client 38.17 -provides: libdevice-panel-ops 38.18 -provides: libdevice-panel-server 38.19 provides: libdevice-pwm-client 38.20 provides: libdevice-spi-client 38.21 provides: libdevice-util 38.22 @@ -47,6 +42,9 @@ 38.23 provides: libdrivers-keypad-qi_lb60 38.24 provides: libdrivers-lcd-headers 38.25 provides: libdrivers-lcd-jz4740 38.26 +provides: libdrivers-panel-headers 38.27 +provides: libdrivers-panel-letux400 38.28 +provides: libdrivers-panel-qi_lb60 38.29 provides: libdrivers-pwm 38.30 requires: libc l4re_c libio 38.31 Maintainer: paul@boddie.org.uk
39.1 --- a/pkg/devices/Makefile Mon May 28 23:44:25 2018 +0200 39.2 +++ b/pkg/devices/Makefile Tue May 29 00:25:45 2018 +0200 39.3 @@ -1,7 +1,7 @@ 39.4 PKGDIR = . 39.5 L4DIR ?= $(PKGDIR)/../.. 39.6 39.7 -TARGET = backlight cpm display fb input keypad lcd lib panel pwm spi util 39.8 +TARGET = backlight cpm display fb input keypad lcd lib pwm spi util 39.9 39.10 include $(L4DIR)/mk/subdir.mk 39.11 39.12 @@ -15,7 +15,6 @@ 39.13 fb: lcd lib util 39.14 input: keypad lib 39.15 keypad: lib util 39.16 -lcd: display panel lib util 39.17 -panel: lib 39.18 +lcd: display lib util 39.19 pwm: lib util 39.20 spi: lib util
40.1 --- a/pkg/devices/lcd/src/jz4740/Makefile Mon May 28 23:44:25 2018 +0200 40.2 +++ b/pkg/devices/lcd/src/jz4740/Makefile Tue May 29 00:25:45 2018 +0200 40.3 @@ -8,6 +8,6 @@ 40.4 40.5 PRIVATE_INCDIR += $(PKGDIR)/lcd/include 40.6 40.7 -REQUIRES_LIBS := l4re_c l4re_c-util libdevice-lcd libdrivers-lcd-jz4740 libdevice-cpm-client libdevice-panel-client libdevice-util 40.8 +REQUIRES_LIBS := l4re_c l4re_c-util libdevice-lcd libdrivers-lcd-jz4740 libdrivers-panel-headers libdevice-cpm-client libdevice-util 40.9 40.10 include $(L4DIR)/mk/lib.mk
41.1 --- a/pkg/devices/lcd/src/jz4740/lcd-jz4740-device.cc Mon May 28 23:44:25 2018 +0200 41.2 +++ b/pkg/devices/lcd/src/jz4740/lcd-jz4740-device.cc Tue May 29 00:25:45 2018 +0200 41.3 @@ -21,8 +21,8 @@ 41.4 41.5 #include <l4/devices/cpm-client.h> 41.6 #include <l4/devices/display-client.h> 41.7 -#include <l4/devices/panel-client.h> 41.8 #include <l4/devices/lcd-jz4740.h> 41.9 +#include <l4/devices/dl.h> 41.10 #include <l4/devices/memory.h> 41.11 #include "lcd-jz4740-device.h" 41.12 41.13 @@ -39,17 +39,16 @@ 41.14 41.15 static l4_addr_t lcd_virt_base = 0, lcd_virt_base_end = 0; 41.16 41.17 -// LCD, CPM, display and panel device abstractions. 41.18 +// LCD, CPM and display device abstractions. 41.19 41.20 static Lcd_jz4740_chip *lcd_chip = 0; 41.21 41.22 static L4::Cap<Cpm_device_interface> cpm_device; 41.23 static L4::Cap<Display_device_interface> display_device; 41.24 -static L4::Cap<Panel_device_interface> panel_device; 41.25 41.26 // Panel definition. 41.27 41.28 -static struct Jz4740_lcd_panel panel; 41.29 +static struct Jz4740_lcd_panel *panel; 41.30 41.31 41.32 41.33 @@ -239,7 +238,7 @@ 41.34 if (get_memory("jz4740-lcd", &lcd_virt_base, &lcd_virt_base_end)) 41.35 return 1; 41.36 41.37 - // Obtain access to the CPM, display and panel devices. 41.38 + // Obtain access to the CPM and display devices. 41.39 41.40 cpm_device = L4Re::Env::env()->get_cap<Cpm_device_interface>("cpm"); 41.41 if (!cpm_device.is_valid()) return 1; 41.42 @@ -247,17 +246,17 @@ 41.43 display_device = L4Re::Env::env()->get_cap<Display_device_interface>("display"); 41.44 if (!display_device.is_valid()) return 1; 41.45 41.46 - panel_device = L4Re::Env::env()->get_cap<Panel_device_interface>("panel"); 41.47 - if (!panel_device.is_valid()) return 1; 41.48 + // Load the panel data. 41.49 41.50 - // Populate the panel. 41.51 + void *(*panel_get)(void); 41.52 + panel_get = (void *(*)(void)) load_function("rom/mips-jz4740-panel.txt", "panel_get"); 41.53 + if (!panel_get) return 1; 41.54 41.55 - if (panel_device->get_panel((uint8_t *) &panel, sizeof(panel))) 41.56 - return 1; 41.57 + panel = (struct Jz4740_lcd_panel *) panel_get(); 41.58 41.59 // Initialise the LCD abstraction. 41.60 41.61 - lcd_chip = new Lcd_jz4740_chip(lcd_virt_base, &panel); 41.62 + lcd_chip = new Lcd_jz4740_chip(lcd_virt_base, panel); 41.63 41.64 return 0; 41.65 }
42.1 --- a/pkg/devices/lib/Makefile Mon May 28 23:44:25 2018 +0200 42.2 +++ b/pkg/devices/lib/Makefile Tue May 29 00:25:45 2018 +0200 42.3 @@ -1,7 +1,7 @@ 42.4 PKGDIR ?= .. 42.5 L4DIR ?= $(PKGDIR)/../.. 42.6 42.7 -TARGET := common cpm gpio i2c keypad lcd pwm 42.8 +TARGET := common cpm gpio i2c keypad lcd panel pwm 42.9 42.10 include $(L4DIR)/mk/subdir.mk 42.11 42.12 @@ -10,4 +10,5 @@ 42.13 i2c: common 42.14 keypad: common 42.15 lcd: common 42.16 +panel: lcd 42.17 pwm: common
43.1 --- a/pkg/devices/lib/lcd/include/lcd-jz4740-config.h Mon May 28 23:44:25 2018 +0200 43.2 +++ b/pkg/devices/lib/lcd/include/lcd-jz4740-config.h Tue May 29 00:25:45 2018 +0200 43.3 @@ -21,7 +21,7 @@ 43.4 43.5 #pragma once 43.6 43.7 -enum Jz4740_lcd_config_bits : unsigned 43.8 +enum Jz4740_lcd_config_bits 43.9 { 43.10 Jz4740_lcd_config_lcd_pin = 31, /* LCDPIN */ 43.11 Jz4740_lcd_config_tv_pal_halfline = 30, /* JZ4780: TVEPEH */ 43.12 @@ -49,14 +49,14 @@ 43.13 Jz4740_lcd_config_mode = 0, 43.14 }; 43.15 43.16 -enum Jz4740_lcd_bpp_values : unsigned 43.17 +enum Jz4740_lcd_bpp_values 43.18 { 43.19 Jz4740_lcd_bpp_16 = 0, 43.20 Jz4740_lcd_bpp_24 = 1, /* JZ4780 */ 43.21 Jz4740_lcd_bpp_18 = 2, 43.22 }; 43.23 43.24 -enum Jz4740_lcd_modes : unsigned 43.25 +enum Jz4740_lcd_modes 43.26 { 43.27 Jz4740_lcd_mode_tft_generic = 0, /* parallel 16/18/24-bit panel */ 43.28 Jz4740_lcd_mode_tft_sharp = 1, 43.29 @@ -72,7 +72,7 @@ 43.30 Jz4740_lcd_mode_lcm = 13, /* JZ4780 */ 43.31 }; 43.32 43.33 -enum Jz4740_lcd_config_values : unsigned 43.34 +enum Jz4740_lcd_config_values 43.35 { 43.36 Jz4740_lcd_de_positive = 0 << Jz4740_lcd_config_de_active_low, 43.37 Jz4740_lcd_de_negative = 1 << Jz4740_lcd_config_de_active_low,
44.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 44.2 +++ b/pkg/devices/lib/panel/Makefile Tue May 29 00:25:45 2018 +0200 44.3 @@ -0,0 +1,8 @@ 44.4 +PKGDIR ?= ../.. 44.5 +L4DIR ?= $(PKGDIR)/../.. 44.6 + 44.7 +TARGET := include src 44.8 + 44.9 +include $(L4DIR)/mk/subdir.mk 44.10 + 44.11 +src: include
45.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 45.2 +++ b/pkg/devices/lib/panel/include/Makefile Tue May 29 00:25:45 2018 +0200 45.3 @@ -0,0 +1,6 @@ 45.4 +PKGDIR = ../../.. 45.5 +L4DIR ?= $(PKGDIR)/../.. 45.6 + 45.7 +PC_FILENAME := libdrivers-panel-headers 45.8 + 45.9 +include $(L4DIR)/mk/include.mk
46.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 46.2 +++ b/pkg/devices/lib/panel/include/panel.h Tue May 29 00:25:45 2018 +0200 46.3 @@ -0,0 +1,32 @@ 46.4 +/* 46.5 + * Panel description access. 46.6 + * 46.7 + * (c) 2018 Paul Boddie <paul@boddie.org.uk> 46.8 + * 46.9 + * This program is free software; you can redistribute it and/or 46.10 + * modify it under the terms of the GNU General Public License as 46.11 + * published by the Free Software Foundation; either version 2 of 46.12 + * the License, or (at your option) any later version. 46.13 + * 46.14 + * This program is distributed in the hope that it will be useful, 46.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 46.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 46.17 + * GNU General Public License for more details. 46.18 + * 46.19 + * You should have received a copy of the GNU General Public License 46.20 + * along with this program; if not, write to the Free Software 46.21 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, 46.22 + * Boston, MA 02110-1301, USA 46.23 + */ 46.24 + 46.25 +#pragma once 46.26 + 46.27 +#include <l4/sys/types.h> 46.28 + 46.29 +/* C language interface. */ 46.30 + 46.31 +EXTERN_C_BEGIN 46.32 + 46.33 +void *panel_get(void); 46.34 + 46.35 +EXTERN_C_END
47.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 47.2 +++ b/pkg/devices/lib/panel/src/Makefile Tue May 29 00:25:45 2018 +0200 47.3 @@ -0,0 +1,6 @@ 47.4 +PKGDIR ?= ../../.. 47.5 +L4DIR ?= $(PKGDIR)/../.. 47.6 + 47.7 +TARGET := letux400 qi_lb60 47.8 + 47.9 +include $(L4DIR)/mk/subdir.mk
48.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 48.2 +++ b/pkg/devices/lib/panel/src/letux400/Makefile Tue May 29 00:25:45 2018 +0200 48.3 @@ -0,0 +1,13 @@ 48.4 +PKGDIR ?= ../../../.. 48.5 +L4DIR ?= $(PKGDIR)/../.. 48.6 + 48.7 +TARGET = libpanel_letux400.so 48.8 +PC_FILENAME := libdrivers-panel-letux400 48.9 + 48.10 +SRC_C := panel-letux400.c 48.11 + 48.12 +PRIVATE_INCDIR += $(PKGDIR)/lib/panel/include 48.13 + 48.14 +REQUIRES_LIBS := libdrivers-lcd-headers 48.15 + 48.16 +include $(L4DIR)/mk/lib.mk
49.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 49.2 +++ b/pkg/devices/lib/panel/src/letux400/panel-letux400.c Tue May 29 00:25:45 2018 +0200 49.3 @@ -0,0 +1,52 @@ 49.4 +/* 49.5 + * Export a panel structure for the Letux 400 notebook computer. 49.6 + * 49.7 + * (c) 2018 Paul Boddie <paul@boddie.org.uk> 49.8 + * 49.9 + * This program is free software; you can redistribute it and/or 49.10 + * modify it under the terms of the GNU General Public License as 49.11 + * published by the Free Software Foundation; either version 2 of 49.12 + * the License, or (at your option) any later version. 49.13 + * 49.14 + * This program is distributed in the hope that it will be useful, 49.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 49.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 49.17 + * GNU General Public License for more details. 49.18 + * 49.19 + * You should have received a copy of the GNU General Public License 49.20 + * along with this program; if not, write to the Free Software 49.21 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, 49.22 + * Boston, MA 02110-1301, USA 49.23 + */ 49.24 + 49.25 +#include <l4/devices/lcd-jz4740-config.h> 49.26 +#include <l4/devices/lcd-jz4740-panel.h> 49.27 + 49.28 +static struct Jz4740_lcd_panel panel = { 49.29 + .config = ( 49.30 + Jz4740_lcd_mode_tft_generic 49.31 + | Jz4740_lcd_pclock_negative 49.32 + | Jz4740_lcd_hsync_negative 49.33 + | Jz4740_lcd_vsync_negative 49.34 + | Jz4740_lcd_de_positive), 49.35 + 49.36 + .width = 800, 49.37 + .height = 480, 49.38 + .bpp = 16, 49.39 + .frame_rate = 60, 49.40 + .hsync = 80, 49.41 + .vsync = 20, 49.42 + .line_start = 0, 49.43 + .line_end = 0, 49.44 + .frame_start = 0, 49.45 + .frame_end = 0, 49.46 +}; 49.47 + 49.48 +/* Employ an opaque pointer type. */ 49.49 + 49.50 +void *panel_get(void); 49.51 + 49.52 +void *panel_get(void) 49.53 +{ 49.54 + return &panel; 49.55 +}
50.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 50.2 +++ b/pkg/devices/lib/panel/src/qi_lb60/Makefile Tue May 29 00:25:45 2018 +0200 50.3 @@ -0,0 +1,13 @@ 50.4 +PKGDIR ?= ../../../.. 50.5 +L4DIR ?= $(PKGDIR)/../.. 50.6 + 50.7 +TARGET = libpanel_qi_lb60.so 50.8 +PC_FILENAME := libdrivers-panel-qi_lb60 50.9 + 50.10 +SRC_C := panel-qi_lb60.c 50.11 + 50.12 +PRIVATE_INCDIR += $(PKGDIR)/lib/panel/include 50.13 + 50.14 +REQUIRES_LIBS := libdrivers-lcd-headers 50.15 + 50.16 +include $(L4DIR)/mk/lib.mk
51.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 51.2 +++ b/pkg/devices/lib/panel/src/qi_lb60/panel-qi_lb60.c Tue May 29 00:25:45 2018 +0200 51.3 @@ -0,0 +1,52 @@ 51.4 +/* 51.5 + * Export a panel structure for the Ben NanoNote. 51.6 + * 51.7 + * (c) 2018 Paul Boddie <paul@boddie.org.uk> 51.8 + * 51.9 + * This program is free software; you can redistribute it and/or 51.10 + * modify it under the terms of the GNU General Public License as 51.11 + * published by the Free Software Foundation; either version 2 of 51.12 + * the License, or (at your option) any later version. 51.13 + * 51.14 + * This program is distributed in the hope that it will be useful, 51.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 51.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 51.17 + * GNU General Public License for more details. 51.18 + * 51.19 + * You should have received a copy of the GNU General Public License 51.20 + * along with this program; if not, write to the Free Software 51.21 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, 51.22 + * Boston, MA 02110-1301, USA 51.23 + */ 51.24 + 51.25 +#include <l4/devices/lcd-jz4740-config.h> 51.26 +#include <l4/devices/lcd-jz4740-panel.h> 51.27 + 51.28 +static struct Jz4740_lcd_panel panel = { 51.29 + .config = ( 51.30 + Jz4740_lcd_mode_tft_serial 51.31 + | Jz4740_lcd_pclock_negative 51.32 + | Jz4740_lcd_hsync_negative 51.33 + | Jz4740_lcd_vsync_negative 51.34 + | Jz4740_lcd_de_positive), 51.35 + 51.36 + .width = 320, 51.37 + .height = 240, 51.38 + .bpp = 32, 51.39 + .frame_rate = 70, 51.40 + .hsync = 1, 51.41 + .vsync = 1, 51.42 + .line_start = 140, 51.43 + .line_end = 273, 51.44 + .frame_start = 20, 51.45 + .frame_end = 1, 51.46 +}; 51.47 + 51.48 +/* Employ an opaque pointer type. */ 51.49 + 51.50 +void *panel_get(void); 51.51 + 51.52 +void *panel_get(void) 51.53 +{ 51.54 + return &panel; 51.55 +}
52.1 --- a/pkg/devices/panel/Makefile Mon May 28 23:44:25 2018 +0200 52.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 52.3 @@ -1,8 +0,0 @@ 52.4 -PKGDIR ?= .. 52.5 -L4DIR ?= $(PKGDIR)/../.. 52.6 - 52.7 -TARGET := include src 52.8 - 52.9 -include $(L4DIR)/mk/subdir.mk 52.10 - 52.11 -src: include
53.1 --- a/pkg/devices/panel/include/Makefile Mon May 28 23:44:25 2018 +0200 53.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 53.3 @@ -1,6 +0,0 @@ 53.4 -PKGDIR = ../.. 53.5 -L4DIR ?= $(PKGDIR)/../.. 53.6 - 53.7 -PC_FILENAME := libdevice-panel-ops 53.8 - 53.9 -include $(L4DIR)/mk/include.mk
54.1 --- a/pkg/devices/panel/include/panel-client.h Mon May 28 23:44:25 2018 +0200 54.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 54.3 @@ -1,39 +0,0 @@ 54.4 -/* 54.5 - * Panel client to access panel servers. 54.6 - * 54.7 - * (c) 2018 Paul Boddie <paul@boddie.org.uk> 54.8 - * 54.9 - * This program is free software; you can redistribute it and/or 54.10 - * modify it under the terms of the GNU General Public License as 54.11 - * published by the Free Software Foundation; either version 2 of 54.12 - * the License, or (at your option) any later version. 54.13 - * 54.14 - * This program is distributed in the hope that it will be useful, 54.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 54.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 54.17 - * GNU General Public License for more details. 54.18 - * 54.19 - * You should have received a copy of the GNU General Public License 54.20 - * along with this program; if not, write to the Free Software 54.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, 54.22 - * Boston, MA 02110-1301, USA 54.23 - */ 54.24 - 54.25 -#pragma once 54.26 - 54.27 -#ifdef __cplusplus 54.28 - 54.29 -#include <l4/re/dataspace> 54.30 -#include <l4/re/env> 54.31 - 54.32 -#include <stdint.h> 54.33 - 54.34 -class Panel_device_interface : public L4::Kobject_t<Panel_device_interface, L4::Kobject> 54.35 -{ 54.36 - L4_KOBJECT(Panel_device_interface) 54.37 - 54.38 -public: 54.39 - int get_panel(uint8_t *data, unsigned long datalen) throw(); 54.40 -}; 54.41 - 54.42 -#endif
55.1 --- a/pkg/devices/panel/include/panel-ops.h Mon May 28 23:44:25 2018 +0200 55.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 55.3 @@ -1,24 +0,0 @@ 55.4 -/* 55.5 - * Panel server operations. 55.6 - * 55.7 - * (c) 2018 Paul Boddie <paul@boddie.org.uk> 55.8 - * 55.9 - * This program is free software; you can redistribute it and/or 55.10 - * modify it under the terms of the GNU General Public License as 55.11 - * published by the Free Software Foundation; either version 2 of 55.12 - * the License, or (at your option) any later version. 55.13 - * 55.14 - * This program is distributed in the hope that it will be useful, 55.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 55.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55.17 - * GNU General Public License for more details. 55.18 - * 55.19 - * You should have received a copy of the GNU General Public License 55.20 - * along with this program; if not, write to the Free Software 55.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, 55.22 - * Boston, MA 02110-1301, USA 55.23 - */ 55.24 - 55.25 -#pragma once 55.26 - 55.27 -enum { Panel_op_get_panel };
56.1 --- a/pkg/devices/panel/include/panel-server.h Mon May 28 23:44:25 2018 +0200 56.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 56.3 @@ -1,49 +0,0 @@ 56.4 -/* 56.5 - * Common panel server functionality. 56.6 - * 56.7 - * (c) 2018 Paul Boddie <paul@boddie.org.uk> 56.8 - * 56.9 - * This program is free software; you can redistribute it and/or 56.10 - * modify it under the terms of the GNU General Public License as 56.11 - * published by the Free Software Foundation; either version 2 of 56.12 - * the License, or (at your option) any later version. 56.13 - * 56.14 - * This program is distributed in the hope that it will be useful, 56.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 56.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 56.17 - * GNU General Public License for more details. 56.18 - * 56.19 - * You should have received a copy of the GNU General Public License 56.20 - * along with this program; if not, write to the Free Software 56.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, 56.22 - * Boston, MA 02110-1301, USA 56.23 - */ 56.24 - 56.25 -#pragma once 56.26 - 56.27 -#ifdef __cplusplus 56.28 - 56.29 -#include <l4/cxx/ipc_server> 56.30 -#include <l4/re/dataspace> 56.31 -#include <l4/re/env> 56.32 - 56.33 -/* Server object to provide panel data access. */ 56.34 - 56.35 -class Panel_server : public L4::Server_object_t<L4::Kobject> 56.36 -{ 56.37 -private: 56.38 - void *_panel; 56.39 - unsigned long _size; 56.40 - 56.41 -public: 56.42 - /* Initialise the server with an opaque pointer to the panel data and the 56.43 - size of the data. */ 56.44 - 56.45 - explicit Panel_server(void *panel, unsigned long size) 56.46 - : _panel(panel), _size(size) 56.47 - {} 56.48 - 56.49 - int dispatch(l4_umword_t obj, L4::Ipc::Iostream &ios); 56.50 -}; 56.51 - 56.52 -#endif
57.1 --- a/pkg/devices/panel/src/Makefile Mon May 28 23:44:25 2018 +0200 57.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 57.3 @@ -1,9 +0,0 @@ 57.4 -PKGDIR ?= ../.. 57.5 -L4DIR ?= $(PKGDIR)/../.. 57.6 - 57.7 -TARGET := client letux400 qi_lb60 server 57.8 - 57.9 -include $(L4DIR)/mk/subdir.mk 57.10 - 57.11 -letux400: server 57.12 -qi_lb60: server
58.1 --- a/pkg/devices/panel/src/client/Makefile Mon May 28 23:44:25 2018 +0200 58.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 58.3 @@ -1,13 +0,0 @@ 58.4 -PKGDIR ?= ../../.. 58.5 -L4DIR ?= $(PKGDIR)/../.. 58.6 - 58.7 -TARGET = libdevice_panel_client.o.a 58.8 -PC_FILENAME := libdevice-panel-client 58.9 - 58.10 -SRC_CC := panel-client.cc 58.11 - 58.12 -PRIVATE_INCDIR += $(PKGDIR)/panel/include 58.13 - 58.14 -REQUIRES_LIBS := l4re_c l4re_c-util 58.15 - 58.16 -include $(L4DIR)/mk/lib.mk
59.1 --- a/pkg/devices/panel/src/client/panel-client.cc Mon May 28 23:44:25 2018 +0200 59.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 59.3 @@ -1,46 +0,0 @@ 59.4 -/* 59.5 - * Panel client to access panel servers. 59.6 - * 59.7 - * (c) 2018 Paul Boddie <paul@boddie.org.uk> 59.8 - * 59.9 - * This program is free software; you can redistribute it and/or 59.10 - * modify it under the terms of the GNU General Public License as 59.11 - * published by the Free Software Foundation; either version 2 of 59.12 - * the License, or (at your option) any later version. 59.13 - * 59.14 - * This program is distributed in the hope that it will be useful, 59.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 59.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 59.17 - * GNU General Public License for more details. 59.18 - * 59.19 - * You should have received a copy of the GNU General Public License 59.20 - * along with this program; if not, write to the Free Software 59.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, 59.22 - * Boston, MA 02110-1301, USA 59.23 - */ 59.24 - 59.25 -#include <l4/cxx/ipc_stream> 59.26 -#include <l4/re/env> 59.27 -#include <l4/sys/err.h> 59.28 - 59.29 -#include "panel-client.h" 59.30 -#include "panel-ops.h" 59.31 - 59.32 -#include <stdint.h> 59.33 - 59.34 -int 59.35 -Panel_device_interface::get_panel(uint8_t *data, unsigned long datalen) throw() 59.36 -{ 59.37 - L4::Ipc::Iostream s(l4_utcb()); 59.38 - 59.39 - int err = l4_error(s.call(cap(), Panel_op_get_panel)); 59.40 - if (err) return err; 59.41 - 59.42 - // Obtain the message from the stream. 59.43 - 59.44 - unsigned long size = datalen; 59.45 - s >> L4::Ipc::buf_cp_in<uint8_t>(data, datalen); 59.46 - 59.47 - if (size != datalen) return -L4_EIO; 59.48 - return L4_EOK; 59.49 -}
60.1 --- a/pkg/devices/panel/src/letux400/Makefile Mon May 28 23:44:25 2018 +0200 60.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 60.3 @@ -1,13 +0,0 @@ 60.4 -PKGDIR ?= ../../.. 60.5 -L4DIR ?= $(PKGDIR)/../.. 60.6 - 60.7 -TARGET = dev_panel_letux400 60.8 -PC_FILENAME := devices-panel-letux400 60.9 - 60.10 -SRC_CC := panel-letux400.cc 60.11 - 60.12 -PRIVATE_INCDIR += $(PKGDIR)/panel/include 60.13 - 60.14 -REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-lcd-headers libdevice-panel-server 60.15 - 60.16 -include $(L4DIR)/mk/prog.mk
61.1 --- a/pkg/devices/panel/src/letux400/panel-letux400.cc Mon May 28 23:44:25 2018 +0200 61.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 61.3 @@ -1,61 +0,0 @@ 61.4 -/* 61.5 - * Export a panel structure. 61.6 - * 61.7 - * (c) 2018 Paul Boddie <paul@boddie.org.uk> 61.8 - * 61.9 - * This program is free software; you can redistribute it and/or 61.10 - * modify it under the terms of the GNU General Public License as 61.11 - * published by the Free Software Foundation; either version 2 of 61.12 - * the License, or (at your option) any later version. 61.13 - * 61.14 - * This program is distributed in the hope that it will be useful, 61.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 61.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 61.17 - * GNU General Public License for more details. 61.18 - * 61.19 - * You should have received a copy of the GNU General Public License 61.20 - * along with this program; if not, write to the Free Software 61.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, 61.22 - * Boston, MA 02110-1301, USA 61.23 - */ 61.24 - 61.25 -#include <l4/devices/lcd-jz4740-config.h> 61.26 -#include <l4/devices/lcd-jz4740-panel.h> 61.27 -#include "panel-server.h" 61.28 - 61.29 -#include <l4/re/util/object_registry> 61.30 - 61.31 -static struct Jz4740_lcd_panel panel = { 61.32 - .config = ( 61.33 - Jz4740_lcd_mode_tft_generic 61.34 - | Jz4740_lcd_pclock_negative 61.35 - | Jz4740_lcd_hsync_negative 61.36 - | Jz4740_lcd_vsync_negative 61.37 - | Jz4740_lcd_de_positive), 61.38 - 61.39 - .width = 800, 61.40 - .height = 480, 61.41 - .bpp = 16, 61.42 - .frame_rate = 60, 61.43 - .hsync = 80, 61.44 - .vsync = 20, 61.45 - .line_start = 0, 61.46 - .line_end = 0, 61.47 - .frame_start = 0, 61.48 - .frame_end = 0, 61.49 -}; 61.50 - 61.51 -static L4Re::Util::Registry_server<> server; 61.52 - 61.53 -int main(void) 61.54 -{ 61.55 - /* Initialise and register a new server object. */ 61.56 - 61.57 - Panel_server server_obj(&panel, sizeof(panel)); 61.58 - server.registry()->register_obj(&server_obj, "panel"); 61.59 - 61.60 - /* Enter the IPC server loop. */ 61.61 - 61.62 - server.loop(); 61.63 - return 0; 61.64 -}
62.1 --- a/pkg/devices/panel/src/qi_lb60/Makefile Mon May 28 23:44:25 2018 +0200 62.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 62.3 @@ -1,13 +0,0 @@ 62.4 -PKGDIR ?= ../../.. 62.5 -L4DIR ?= $(PKGDIR)/../.. 62.6 - 62.7 -TARGET = dev_panel_qi_lb60 62.8 -PC_FILENAME := devices-panel-qi_lb60 62.9 - 62.10 -SRC_CC := panel-qi_lb60.cc 62.11 - 62.12 -PRIVATE_INCDIR += $(PKGDIR)/panel/include 62.13 - 62.14 -REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-lcd-headers libdevice-panel-server 62.15 - 62.16 -include $(L4DIR)/mk/prog.mk
63.1 --- a/pkg/devices/panel/src/qi_lb60/panel-qi_lb60.cc Mon May 28 23:44:25 2018 +0200 63.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 63.3 @@ -1,61 +0,0 @@ 63.4 -/* 63.5 - * Export a panel structure. 63.6 - * 63.7 - * (c) 2018 Paul Boddie <paul@boddie.org.uk> 63.8 - * 63.9 - * This program is free software; you can redistribute it and/or 63.10 - * modify it under the terms of the GNU General Public License as 63.11 - * published by the Free Software Foundation; either version 2 of 63.12 - * the License, or (at your option) any later version. 63.13 - * 63.14 - * This program is distributed in the hope that it will be useful, 63.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 63.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 63.17 - * GNU General Public License for more details. 63.18 - * 63.19 - * You should have received a copy of the GNU General Public License 63.20 - * along with this program; if not, write to the Free Software 63.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, 63.22 - * Boston, MA 02110-1301, USA 63.23 - */ 63.24 - 63.25 -#include <l4/devices/lcd-jz4740-config.h> 63.26 -#include <l4/devices/lcd-jz4740-panel.h> 63.27 -#include "panel-server.h" 63.28 - 63.29 -#include <l4/re/util/object_registry> 63.30 - 63.31 -static struct Jz4740_lcd_panel panel = { 63.32 - .config = ( 63.33 - Jz4740_lcd_mode_tft_serial 63.34 - | Jz4740_lcd_pclock_negative 63.35 - | Jz4740_lcd_hsync_negative 63.36 - | Jz4740_lcd_vsync_negative 63.37 - | Jz4740_lcd_de_positive), 63.38 - 63.39 - .width = 320, 63.40 - .height = 240, 63.41 - .bpp = 32, 63.42 - .frame_rate = 70, 63.43 - .hsync = 1, 63.44 - .vsync = 1, 63.45 - .line_start = 140, 63.46 - .line_end = 273, 63.47 - .frame_start = 20, 63.48 - .frame_end = 1, 63.49 -}; 63.50 - 63.51 -static L4Re::Util::Registry_server<> server; 63.52 - 63.53 -int main(void) 63.54 -{ 63.55 - /* Initialise and register a new server object. */ 63.56 - 63.57 - Panel_server server_obj(&panel, sizeof(panel)); 63.58 - server.registry()->register_obj(&server_obj, "panel"); 63.59 - 63.60 - /* Enter the IPC server loop. */ 63.61 - 63.62 - server.loop(); 63.63 - return 0; 63.64 -}
64.1 --- a/pkg/devices/panel/src/server/Makefile Mon May 28 23:44:25 2018 +0200 64.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 64.3 @@ -1,13 +0,0 @@ 64.4 -PKGDIR ?= ../../.. 64.5 -L4DIR ?= $(PKGDIR)/../.. 64.6 - 64.7 -TARGET = libdevice_panel_server.o.a 64.8 -PC_FILENAME := libdevice-panel-server 64.9 - 64.10 -SRC_CC := panel-server.cc 64.11 - 64.12 -PRIVATE_INCDIR += $(PKGDIR)/panel/include 64.13 - 64.14 -REQUIRES_LIBS := l4re_c l4re_c-util 64.15 - 64.16 -include $(L4DIR)/mk/lib.mk
65.1 --- a/pkg/devices/panel/src/server/panel-server.cc Mon May 28 23:44:25 2018 +0200 65.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 65.3 @@ -1,53 +0,0 @@ 65.4 -/* 65.5 - * Common panel server functionality. 65.6 - * 65.7 - * (c) 2018 Paul Boddie <paul@boddie.org.uk> 65.8 - * 65.9 - * This program is free software; you can redistribute it and/or 65.10 - * modify it under the terms of the GNU General Public License as 65.11 - * published by the Free Software Foundation; either version 2 of 65.12 - * the License, or (at your option) any later version. 65.13 - * 65.14 - * This program is distributed in the hope that it will be useful, 65.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 65.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 65.17 - * GNU General Public License for more details. 65.18 - * 65.19 - * You should have received a copy of the GNU General Public License 65.20 - * along with this program; if not, write to the Free Software 65.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, 65.22 - * Boston, MA 02110-1301, USA 65.23 - */ 65.24 - 65.25 -#include "panel-client.h" 65.26 -#include "panel-server.h" 65.27 -#include "panel-ops.h" 65.28 - 65.29 -#include <l4/cxx/ipc_server> 65.30 -#include <l4/re/env> 65.31 -#include <l4/sys/typeinfo_svr> 65.32 -#include <l4/util/util.h> 65.33 - 65.34 -/* Handle invocations. */ 65.35 - 65.36 -int 65.37 -Panel_server::dispatch(l4_umword_t obj, L4::Ipc::Iostream &ios) 65.38 -{ 65.39 - l4_msgtag_t tag; 65.40 - 65.41 - (void) obj; 65.42 - ios >> tag; 65.43 - 65.44 - switch (tag.label()) 65.45 - { 65.46 - case L4::Meta::Protocol: 65.47 - return L4::Util::handle_meta_request<Panel_device_interface>(ios); 65.48 - 65.49 - case Panel_op_get_panel: 65.50 - ios << L4::Ipc::buf_cp_out<uint8_t>((uint8_t *) _panel, _size); 65.51 - return L4_EOK; 65.52 - 65.53 - default: 65.54 - return -L4_EBADPROTO; 65.55 - } 65.56 -}
66.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 66.2 +++ b/tools/checkconfig.sh Tue May 29 00:25:45 2018 +0200 66.3 @@ -0,0 +1,57 @@ 66.4 +#!/bin/sh 66.5 + 66.6 +if ! which realpath > /dev/null ; then 66.7 + echo "Please install the realpath program." 1>&2 66.8 + exit 1 66.9 +fi 66.10 + 66.11 +THISDIR=`dirname "$0"` 66.12 +DIRNAME=`realpath "$THISDIR/.."` 66.13 +PROGNAME=`basename "$0"` 66.14 + 66.15 +if [ "$1" = '--help' ] || [ ! "$1" ] ; then 66.16 + cat 1>&2 <<EOF 66.17 +Usage: $PROGNAME <platform> | <build directory> 66.18 + 66.19 +Update platform-specific files for the indicated platform type. If a build 66.20 +directory is specified, try and obtain a configured platform type and use that 66.21 +to update the files. 66.22 + 66.23 +This program updates files in the distribution. They must then be installed 66.24 +using the install program: 66.25 + 66.26 +$THISDIR/install.sh 66.27 +EOF 66.28 + exit 1 66.29 +fi 66.30 + 66.31 +# Check for a build directory and obtain a platform type. 66.32 + 66.33 +if [ -e "$1" ] && [ -e "$1/.config.platform" ] ; then 66.34 + PLATFORM=`grep -e 'CONFIG_PLATFORM_TYPE=' "$1/.config.platform" | sed 's/^.*"\(.*\)".*$/\1/'` 66.35 + 66.36 +# Check for a recognised platform type. 66.37 + 66.38 +elif grep -q -F -e "$1" "$DIRNAME/conf/landfall-examples/platforms.txt" ; then 66.39 + PLATFORM="$1" 66.40 + 66.41 +# Show an error for anything else. 66.42 + 66.43 +else 66.44 + cat 1>&2 <<EOF 66.45 +Platform not recognised: $1 66.46 +EOF 66.47 + exit 1 66.48 +fi 66.49 + 66.50 +# Panel configuration file in this distribution. 66.51 + 66.52 +PANELCONF="$DIRNAME/conf/landfall-examples/mips-jz4740-panel.txt" 66.53 + 66.54 +# Determine the required value of the panel configuration. 66.55 + 66.56 +PANELLIB="rom/libpanel_$PLATFORM.so" 66.57 + 66.58 +# Write it to the configuration file. 66.59 + 66.60 +echo -n "$PANELLIB" > "$PANELCONF"