* [PATCH 0/32] Add additional sandbox features and infrastructure
@ 2013-11-10 17:26 Simon Glass
2013-11-10 17:27 ` [PATCH 20/32] sandbox: dts: Add display and keyboard to sandbox Simon Glass
0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2013-11-10 17:26 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: u-boot-review-hpIqsD4AKlfQT0dZR+AlfA, Simon Glass, Mike Frysinger,
Jerry Van Baren, Devicetree Discuss, Jagannadha Sutradharudu Teki,
Vadim Bendebury, Jagannadha Sutradharudu Teki
At present sandbox only supports a basic set of features. To help address
this, a recent series added SPI and SPI flash support; this series expands
the coverage further.
Firstly SDL is used to provide LCD and audio support. Sandbox gains its own
LCD driver which can display images, host a command line, etc. The audio
support is basic and needs additional work, but it is a starting point.
SDL also provides a keyboard emulation (using the Chrome OS EC code as a
base).
Secondly a TPM emulation is added. This does not include all features (the
implementation is quite simplistic) but it is enough to do basic secure
boot operations.
Finally, various pieces of useful infrastructure are adding, including:
- loading and saving of the emulated SDRAM to permit test runs to carry
over state
- loading and saving of general sandbox state (for example a driver can
save its stage and reload it on the next run)
- support for using bootm to load a kernel
- providing a device tree for use by sandbox
- block device emulation using host files
- a means to jump to another U-Boot while preserving state (useful for
test environments which want to run a series of tests with
script-selectable state)
- allowing the console to be active on start-up so that errors are not
silent supressed
The block device emulation provides access to filesystems from sandbox
which should make it possible to write comprehensive filesystem tests.
Major functions which still remain without sandbox support are I2C,
networking and USB.
Che-Liang Chiou (1):
sandbox: tpm: Fix nvwrite command
Henrik Nordström (1):
sandbox: block driver using host file/device as backing store
Simon Glass (29):
Add crc8 routine
sandbox: Use system headers first for sandbox's os.c
sandbox: Use uint64_t instead of u64 for time
sandbox: Increase memory size to 32MB
sandbox: spi: Adjust 'sf test' to work on sandbox
sandbox: Build a device tree file for sandbox
sandbox: config: Don't use 64-bit physical memory
sandbox: Correct data sizes and printf() strings in fdtdec.c
sandbox: Use os functions to read host device tree
sandbox: Improve/augment memory allocation functions
sandbox: Correct help message <arg> garbling
sandbox: Allow return from board_init_f()
sandbox: Implement the bootm command for sandbox
sandbox: Allow the console to work earlier
sandbox: Add -i option to enter interactive mode
sandbox: Allow reading/writing of RAM buffer
sandbox: Add facility to save/restore sandbox state
sandbox: tpm: Add TPM emulation
sandbox: dts: Add display and keyboard to sandbox
sandbox: Add a prototype for cleanup_before_linux()
cros_ec: Add an enum for the number of flash regions
fdt: Add a function for reading a flash map entry
cros_ec: Add a function for decoding the Chrome OS EC flashmap
cros_ec: sandbox: Add Chrome OS EC emulation
sandbox: Add os_jump_to_image() to run another executable
sandbox: Add -j option to indicate a jump from a previous U-Boot
sandbox: Add SDL library for LCD, keyboard, audio
sandbox: Add a simple sound driver
sandbox: Add LCD driver
Vadim Bendebury (1):
cros_ec: Move EC interface into common library
Makefile | 1 +
arch/sandbox/config.mk | 7 +
arch/sandbox/cpu/Makefile | 12 +-
arch/sandbox/cpu/cpu.c | 21 +-
arch/sandbox/cpu/os.c | 187 ++++++++-
arch/sandbox/cpu/sdl.c | 334 +++++++++++++++
arch/sandbox/cpu/start.c | 121 +++++-
arch/sandbox/cpu/state.c | 353 ++++++++++++++++
arch/sandbox/include/asm/arch-sandbox/sound.h | 14 +
arch/sandbox/include/asm/global_data.h | 2 +-
arch/sandbox/include/asm/sdl.h | 20 +
arch/sandbox/include/asm/state.h | 132 +++++-
arch/sandbox/include/asm/types.h | 4 +-
arch/sandbox/include/asm/u-boot-sandbox.h | 5 +
board/samsung/smdk5250/exynos5-dt.c | 5 -
board/sandbox/dts/sandbox.dts | 91 +++++
board/sandbox/sandbox/sandbox.c | 19 +-
common/Makefile | 1 +
common/board_f.c | 63 ++-
common/cmd_sandbox.c | 64 +++
common/cmd_sf.c | 14 +-
common/console.c | 16 +-
common/cros_ec.c | 44 ++
common/lcd.c | 21 +-
config.mk | 9 +-
disk/part.c | 23 +-
doc/device-tree-bindings/video/sandbox-fb.txt | 13 +
drivers/block/Makefile | 1 +
drivers/block/sandbox.c | 124 ++++++
drivers/misc/Makefile | 1 +
drivers/misc/cros_ec.c | 50 +++
drivers/misc/cros_ec_sandbox.c | 558 ++++++++++++++++++++++++++
drivers/serial/sandbox.c | 4 +
drivers/sound/Makefile | 2 +
drivers/sound/sandbox.c | 23 ++
drivers/tpm/Makefile | 1 +
drivers/tpm/tpm_tis_sandbox.c | 260 ++++++++++++
drivers/video/Makefile | 1 +
drivers/video/sandbox_sdl.c | 70 ++++
include/config_fallbacks.h | 3 +-
include/configs/sandbox.h | 9 +-
include/cros_ec.h | 45 +++
include/ec_commands.h | 4 +-
include/fdtdec.h | 20 +
include/lcd.h | 3 +
include/linux/crc8.h | 23 ++
include/os.h | 88 +++-
include/part.h | 5 +
include/sandboxblockdev.h | 18 +
lib/Makefile | 1 +
lib/crc8.c | 25 ++
lib/fdtdec.c | 34 +-
52 files changed, 2866 insertions(+), 103 deletions(-)
create mode 100644 arch/sandbox/cpu/sdl.c
create mode 100644 arch/sandbox/include/asm/arch-sandbox/sound.h
create mode 100644 arch/sandbox/include/asm/sdl.h
create mode 100644 board/sandbox/dts/sandbox.dts
create mode 100644 common/cros_ec.c
create mode 100644 doc/device-tree-bindings/video/sandbox-fb.txt
create mode 100644 drivers/block/sandbox.c
create mode 100644 drivers/misc/cros_ec_sandbox.c
create mode 100644 drivers/sound/sandbox.c
create mode 100644 drivers/tpm/tpm_tis_sandbox.c
create mode 100644 drivers/video/sandbox_sdl.c
create mode 100644 include/linux/crc8.h
create mode 100644 include/sandboxblockdev.h
create mode 100644 lib/crc8.c
--
1.8.4.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 20/32] sandbox: dts: Add display and keyboard to sandbox
2013-11-10 17:26 [PATCH 0/32] Add additional sandbox features and infrastructure Simon Glass
@ 2013-11-10 17:27 ` Simon Glass
0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2013-11-10 17:27 UTC (permalink / raw)
To: U-Boot Mailing List; +Cc: Devicetree Discuss, u-boot-review
Add an LCD display and keyboard to the sandbox device tree so that these
features can be used.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
---
board/sandbox/dts/sandbox.dts | 62 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/board/sandbox/dts/sandbox.dts b/board/sandbox/dts/sandbox.dts
index 9d7700c..e380df2 100644
--- a/board/sandbox/dts/sandbox.dts
+++ b/board/sandbox/dts/sandbox.dts
@@ -26,4 +26,66 @@
colour = "white";
sides = <6>;
};
+
+ lcd {
+ compatible = "sandbox,lcd-sdl";
+ xres = <800>;
+ yres = <600>;
+ };
+
+ cros-ec-keyb {
+ compatible = "google,cros-ec-keyb";
+ google,key-rows = <8>;
+ google,key-columns = <13>;
+ google,repeat-delay-ms = <240>;
+ google,repeat-rate-ms = <30>;
+ google,ghost-filter;
+ /*
+ * Keymap entries take the form of 0xRRCCKKKK where
+ * RR=Row CC=Column KKKK=Key Code
+ * The values below are for a US keyboard layout and
+ * are taken from the Linux driver. Note that the
+ * 102ND key is not used for US keyboards.
+ */
+ linux,keymap = <
+ /* CAPSLCK F1 B F10 */
+ 0x0001003a 0x0002003b 0x00030030 0x00040044
+ /* N = R_ALT ESC */
+ 0x00060031 0x0008000d 0x000a0064 0x01010001
+ /* F4 G F7 H */
+ 0x0102003e 0x01030022 0x01040041 0x01060023
+ /* ' F9 BKSPACE L_CTRL */
+ 0x01080028 0x01090043 0x010b000e 0x0200001d
+ /* TAB F3 T F6 */
+ 0x0201000f 0x0202003d 0x02030014 0x02040040
+ /* ] Y 102ND [ */
+ 0x0205001b 0x02060015 0x02070056 0x0208001a
+ /* F8 GRAVE F2 5 */
+ 0x02090042 0x03010029 0x0302003c 0x03030006
+ /* F5 6 - \ */
+ 0x0304003f 0x03060007 0x0308000c 0x030b002b
+ /* R_CTRL A D F */
+ 0x04000061 0x0401001e 0x04020020 0x04030021
+ /* S K J ; */
+ 0x0404001f 0x04050025 0x04060024 0x04080027
+ /* L ENTER Z C */
+ 0x04090026 0x040b001c 0x0501002c 0x0502002e
+ /* V X , M */
+ 0x0503002f 0x0504002d 0x05050033 0x05060032
+ /* L_SHIFT / . SPACE */
+ 0x0507002a 0x05080035 0x05090034 0x050B0039
+ /* 1 3 4 2 */
+ 0x06010002 0x06020004 0x06030005 0x06040003
+ /* 8 7 0 9 */
+ 0x06050009 0x06060008 0x0608000b 0x0609000a
+ /* L_ALT DOWN RIGHT Q */
+ 0x060a0038 0x060b006c 0x060c006a 0x07010010
+ /* E R W I */
+ 0x07020012 0x07030013 0x07040011 0x07050017
+ /* U R_SHIFT P O */
+ 0x07060016 0x07070036 0x07080019 0x07090018
+ /* UP LEFT */
+ 0x070b0067 0x070c0069>;
+ };
+
};
--
1.8.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 0/32] Add additional sandbox features and infrastructure
@ 2013-11-10 17:43 Simon Glass
0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2013-11-10 17:43 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: u-boot-review-hpIqsD4AKlfQT0dZR+AlfA, Simon Glass, Mike Frysinger,
Jerry Van Baren, Devicetree Discuss, Jagannadha Sutradharudu Teki,
Vadim Bendebury, Jagannadha Sutradharudu Teki
At present sandbox only supports a basic set of features. To help address
this, a recent series added SPI and SPI flash support; this series expands
the coverage further.
Firstly SDL is used to provide LCD and audio support. Sandbox gains its own
LCD driver which can display images, host a command line, etc. The audio
support is basic and needs additional work, but it is a starting point.
SDL also provides a keyboard emulation (using the Chrome OS EC code as a
base).
Secondly a TPM emulation is added. This does not include all features (the
implementation is quite simplistic) but it is enough to do basic secure
boot operations.
Finally, various pieces of useful infrastructure are adding, including:
- loading and saving of the emulated SDRAM to permit test runs to carry
over state
- loading and saving of general sandbox state (for example a driver can
save its stage and reload it on the next run)
- support for using bootm to load a kernel
- providing a device tree for use by sandbox
- block device emulation using host files
- a means to jump to another U-Boot while preserving state (useful for
test environments which want to run a series of tests with
script-selectable state)
- allowing the console to be active on start-up so that errors are not
silent supressed
The block device emulation provides access to filesystems from sandbox
which should make it possible to write comprehensive filesystem tests.
Major functions which still remain without sandbox support are I2C,
networking and USB.
Che-Liang Chiou (1):
sandbox: tpm: Fix nvwrite command
Henrik Nordström (1):
sandbox: block driver using host file/device as backing store
Simon Glass (29):
Add crc8 routine
sandbox: Use system headers first for sandbox's os.c
sandbox: Use uint64_t instead of u64 for time
sandbox: Increase memory size to 32MB
sandbox: spi: Adjust 'sf test' to work on sandbox
sandbox: Build a device tree file for sandbox
sandbox: config: Don't use 64-bit physical memory
sandbox: Correct data sizes and printf() strings in fdtdec.c
sandbox: Use os functions to read host device tree
sandbox: Improve/augment memory allocation functions
sandbox: Correct help message <arg> garbling
sandbox: Allow return from board_init_f()
sandbox: Implement the bootm command for sandbox
sandbox: Allow the console to work earlier
sandbox: Add -i option to enter interactive mode
sandbox: Allow reading/writing of RAM buffer
sandbox: Add facility to save/restore sandbox state
sandbox: tpm: Add TPM emulation
sandbox: dts: Add display and keyboard to sandbox
sandbox: Add a prototype for cleanup_before_linux()
cros_ec: Add an enum for the number of flash regions
fdt: Add a function for reading a flash map entry
cros_ec: Add a function for decoding the Chrome OS EC flashmap
cros_ec: sandbox: Add Chrome OS EC emulation
sandbox: Add os_jump_to_image() to run another executable
sandbox: Add -j option to indicate a jump from a previous U-Boot
sandbox: Add SDL library for LCD, keyboard, audio
sandbox: Add a simple sound driver
sandbox: Add LCD driver
Vadim Bendebury (1):
cros_ec: Move EC interface into common library
Makefile | 1 +
arch/sandbox/config.mk | 7 +
arch/sandbox/cpu/Makefile | 12 +-
arch/sandbox/cpu/cpu.c | 21 +-
arch/sandbox/cpu/os.c | 187 ++++++++-
arch/sandbox/cpu/sdl.c | 334 +++++++++++++++
arch/sandbox/cpu/start.c | 121 +++++-
arch/sandbox/cpu/state.c | 353 ++++++++++++++++
arch/sandbox/include/asm/arch-sandbox/sound.h | 14 +
arch/sandbox/include/asm/global_data.h | 2 +-
arch/sandbox/include/asm/sdl.h | 20 +
arch/sandbox/include/asm/state.h | 132 +++++-
arch/sandbox/include/asm/types.h | 4 +-
arch/sandbox/include/asm/u-boot-sandbox.h | 5 +
board/samsung/smdk5250/exynos5-dt.c | 5 -
board/sandbox/dts/sandbox.dts | 91 +++++
board/sandbox/sandbox/sandbox.c | 19 +-
common/Makefile | 1 +
common/board_f.c | 63 ++-
common/cmd_sandbox.c | 64 +++
common/cmd_sf.c | 14 +-
common/console.c | 16 +-
common/cros_ec.c | 44 ++
common/lcd.c | 21 +-
config.mk | 9 +-
disk/part.c | 23 +-
doc/device-tree-bindings/video/sandbox-fb.txt | 13 +
drivers/block/Makefile | 1 +
drivers/block/sandbox.c | 124 ++++++
drivers/misc/Makefile | 1 +
drivers/misc/cros_ec.c | 50 +++
drivers/misc/cros_ec_sandbox.c | 558 ++++++++++++++++++++++++++
drivers/serial/sandbox.c | 4 +
drivers/sound/Makefile | 2 +
drivers/sound/sandbox.c | 23 ++
drivers/tpm/Makefile | 1 +
drivers/tpm/tpm_tis_sandbox.c | 260 ++++++++++++
drivers/video/Makefile | 1 +
drivers/video/sandbox_sdl.c | 70 ++++
include/config_fallbacks.h | 3 +-
include/configs/sandbox.h | 9 +-
include/cros_ec.h | 45 +++
include/ec_commands.h | 4 +-
include/fdtdec.h | 20 +
include/lcd.h | 3 +
include/linux/crc8.h | 23 ++
include/os.h | 88 +++-
include/part.h | 5 +
include/sandboxblockdev.h | 18 +
lib/Makefile | 1 +
lib/crc8.c | 25 ++
lib/fdtdec.c | 34 +-
52 files changed, 2866 insertions(+), 103 deletions(-)
create mode 100644 arch/sandbox/cpu/sdl.c
create mode 100644 arch/sandbox/include/asm/arch-sandbox/sound.h
create mode 100644 arch/sandbox/include/asm/sdl.h
create mode 100644 board/sandbox/dts/sandbox.dts
create mode 100644 common/cros_ec.c
create mode 100644 doc/device-tree-bindings/video/sandbox-fb.txt
create mode 100644 drivers/block/sandbox.c
create mode 100644 drivers/misc/cros_ec_sandbox.c
create mode 100644 drivers/sound/sandbox.c
create mode 100644 drivers/tpm/tpm_tis_sandbox.c
create mode 100644 drivers/video/sandbox_sdl.c
create mode 100644 include/linux/crc8.h
create mode 100644 include/sandboxblockdev.h
create mode 100644 lib/crc8.c
--
1.8.4.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-10 17:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-10 17:26 [PATCH 0/32] Add additional sandbox features and infrastructure Simon Glass
2013-11-10 17:27 ` [PATCH 20/32] sandbox: dts: Add display and keyboard to sandbox Simon Glass
-- strict thread matches above, loose matches on Subject: below --
2013-11-10 17:43 [PATCH 0/32] Add additional sandbox features and infrastructure Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).