[U-Boot] [PATCH] sandbox: set sandbox's vendor as null

Masahiro Yamada yamada.m at jp.panasonic.com
Wed Apr 30 06:08:22 CEST 2014


Because sandbox is not a real hardware, setting vendor=sandbox is
almost meaningless.

This commit sets sandbox's vendor field to '-'.

It is a good thing that it reduces one level directory hierarchy.
The files board/sandbox/sandbox/* have been moved to board/sandbox/*.

Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
Cc: Simon Glass <sjg at chromium.org>
---
 board/sandbox/Makefile               |  7 +++
 board/sandbox/README.sandbox         | 91 ++++++++++++++++++++++++++++++++++++
 board/sandbox/sandbox.c              | 83 ++++++++++++++++++++++++++++++++
 board/sandbox/sandbox/Makefile       |  7 ---
 board/sandbox/sandbox/README.sandbox | 91 ------------------------------------
 board/sandbox/sandbox/sandbox.c      | 83 --------------------------------
 boards.cfg                           |  2 +-
 7 files changed, 182 insertions(+), 182 deletions(-)
 create mode 100644 board/sandbox/Makefile
 create mode 100644 board/sandbox/README.sandbox
 create mode 100644 board/sandbox/sandbox.c
 delete mode 100644 board/sandbox/sandbox/Makefile
 delete mode 100644 board/sandbox/sandbox/README.sandbox
 delete mode 100644 board/sandbox/sandbox/sandbox.c

diff --git a/board/sandbox/Makefile b/board/sandbox/Makefile
new file mode 100644
index 0000000..a0b9880
--- /dev/null
+++ b/board/sandbox/Makefile
@@ -0,0 +1,7 @@
+#
+# Copyright (c) 2011 The Chromium OS Authors.
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	:= sandbox.o
diff --git a/board/sandbox/README.sandbox b/board/sandbox/README.sandbox
new file mode 100644
index 0000000..6989557
--- /dev/null
+++ b/board/sandbox/README.sandbox
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+Native Execution of U-Boot
+==========================
+
+The 'sandbox' architecture is designed to allow U-Boot to run under Linux on
+almost any hardware. To achieve this it builds U-Boot (so far as possible)
+as a normal C application with a main() and normal C libraries.
+
+All of U-Boot's architecture-specific code therefore cannot be built as part
+of the sandbox U-Boot. The purpose of running U-Boot under Linux is to test
+all the generic code, not specific to any one architecture. The idea is to
+create unit tests which we can run to test this upper level code.
+
+CONFIG_SANDBOX is defined when building a native board.
+
+The chosen vendor and board names are also 'sandbox', so there is a single
+board in board/sandbox/sandbox.
+
+CONFIG_SANDBOX_BIG_ENDIAN should be defined when running on big-endian
+machines.
+
+Note that standalone/API support is not available at present.
+
+The serial driver is a very simple implementation which reads and writes to
+the console. It does not set the terminal into raw mode, so cursor keys and
+history will not work yet.
+
+
+SPI Emulation
+-------------
+
+Sandbox supports SPI and SPI flash emulation.
+
+This is controlled by the spi_sf argument, the format of which is:
+
+   bus:cs:device:file
+
+   bus    - SPI bus number
+   cs     - SPI chip select number
+   device - SPI device emulation name
+   file   - File on disk containing the data
+
+For example:
+
+ dd if=/dev/zero of=spi.bin bs=1M count=4
+ ./u-boot --spi_sf 0:0:M25P16:spi.bin
+
+With this setup you can issue SPI flash commands as normal:
+
+=>sf probe
+SF: Detected M25P16 with page size 64 KiB, total 2 MiB
+=>sf read 0 0 10000
+SF: 65536 bytes @ 0x0 Read: OK
+=>
+
+Since this is a full SPI emulation (rather than just flash), you can
+also use low-level SPI commands:
+
+=>sspi 0:0 32 9f
+FF202015
+
+This is issuing a READ_ID command and getting back 20 (ST Micro) part
+0x2015 (the M25P16).
+
+Drivers are connected to a particular bus/cs using sandbox's state
+structure (see the 'spi' member). A set of operations must be provided
+for each driver.
+
+
+Configuration settings for the curious are:
+
+CONFIG_SANDBOX_SPI_MAX_BUS
+	The maximum number of SPI buses supported by the driver (default 1).
+
+CONFIG_SANDBOX_SPI_MAX_CS
+	The maximum number of chip selects supported by the driver
+	(default 10).
+
+CONFIG_SPI_IDLE_VAL
+	The idle value on the SPI bus
+
+
+Tests
+-----
+
+So far we have no tests, but when we do these will be documented here.
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
new file mode 100644
index 0000000..e4d4e02
--- /dev/null
+++ b/board/sandbox/sandbox.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors.
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <cros_ec.h>
+#include <dm.h>
+#include <os.h>
+#include <asm/u-boot-sandbox.h>
+
+/*
+ * Pointer to initial global data area
+ *
+ * Here we initialize it.
+ */
+gd_t *gd;
+
+/* Add a simple GPIO device */
+U_BOOT_DEVICE(gpio_sandbox) = {
+	.name = "gpio_sandbox",
+};
+
+void flush_cache(unsigned long start, unsigned long size)
+{
+}
+
+unsigned long timer_read_counter(void)
+{
+	return os_get_nsec() / 1000;
+}
+
+int dram_init(void)
+{
+	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+	return 0;
+}
+
+#ifdef CONFIG_BOARD_EARLY_INIT_F
+int board_early_init_f(void)
+{
+#ifdef CONFIG_VIDEO_SANDBOX_SDL
+	int ret;
+
+	ret = sandbox_lcd_sdl_early_init();
+	if (ret) {
+		puts("Could not init sandbox LCD emulation\n");
+		return ret;
+	}
+#endif
+
+	return 0;
+}
+#endif
+
+int arch_early_init_r(void)
+{
+#ifdef CONFIG_CROS_EC
+	if (cros_ec_board_init()) {
+		printf("%s: Failed to init EC\n", __func__);
+		return 0;
+	}
+#endif
+
+	return 0;
+}
+
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+	if (cros_ec_get_error()) {
+		/* Force console on */
+		gd->flags &= ~GD_FLG_SILENT;
+
+		printf("cros-ec communications failure %d\n",
+		       cros_ec_get_error());
+		puts("\nPlease reset with Power+Refresh\n\n");
+		panic("Cannot init cros-ec device");
+		return -1;
+	}
+	return 0;
+}
+#endif
diff --git a/board/sandbox/sandbox/Makefile b/board/sandbox/sandbox/Makefile
deleted file mode 100644
index a0b9880..0000000
--- a/board/sandbox/sandbox/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# Copyright (c) 2011 The Chromium OS Authors.
-#
-# SPDX-License-Identifier:	GPL-2.0+
-#
-
-obj-y	:= sandbox.o
diff --git a/board/sandbox/sandbox/README.sandbox b/board/sandbox/sandbox/README.sandbox
deleted file mode 100644
index 6989557..0000000
--- a/board/sandbox/sandbox/README.sandbox
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2011 The Chromium OS Authors.
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-Native Execution of U-Boot
-==========================
-
-The 'sandbox' architecture is designed to allow U-Boot to run under Linux on
-almost any hardware. To achieve this it builds U-Boot (so far as possible)
-as a normal C application with a main() and normal C libraries.
-
-All of U-Boot's architecture-specific code therefore cannot be built as part
-of the sandbox U-Boot. The purpose of running U-Boot under Linux is to test
-all the generic code, not specific to any one architecture. The idea is to
-create unit tests which we can run to test this upper level code.
-
-CONFIG_SANDBOX is defined when building a native board.
-
-The chosen vendor and board names are also 'sandbox', so there is a single
-board in board/sandbox/sandbox.
-
-CONFIG_SANDBOX_BIG_ENDIAN should be defined when running on big-endian
-machines.
-
-Note that standalone/API support is not available at present.
-
-The serial driver is a very simple implementation which reads and writes to
-the console. It does not set the terminal into raw mode, so cursor keys and
-history will not work yet.
-
-
-SPI Emulation
--------------
-
-Sandbox supports SPI and SPI flash emulation.
-
-This is controlled by the spi_sf argument, the format of which is:
-
-   bus:cs:device:file
-
-   bus    - SPI bus number
-   cs     - SPI chip select number
-   device - SPI device emulation name
-   file   - File on disk containing the data
-
-For example:
-
- dd if=/dev/zero of=spi.bin bs=1M count=4
- ./u-boot --spi_sf 0:0:M25P16:spi.bin
-
-With this setup you can issue SPI flash commands as normal:
-
-=>sf probe
-SF: Detected M25P16 with page size 64 KiB, total 2 MiB
-=>sf read 0 0 10000
-SF: 65536 bytes @ 0x0 Read: OK
-=>
-
-Since this is a full SPI emulation (rather than just flash), you can
-also use low-level SPI commands:
-
-=>sspi 0:0 32 9f
-FF202015
-
-This is issuing a READ_ID command and getting back 20 (ST Micro) part
-0x2015 (the M25P16).
-
-Drivers are connected to a particular bus/cs using sandbox's state
-structure (see the 'spi' member). A set of operations must be provided
-for each driver.
-
-
-Configuration settings for the curious are:
-
-CONFIG_SANDBOX_SPI_MAX_BUS
-	The maximum number of SPI buses supported by the driver (default 1).
-
-CONFIG_SANDBOX_SPI_MAX_CS
-	The maximum number of chip selects supported by the driver
-	(default 10).
-
-CONFIG_SPI_IDLE_VAL
-	The idle value on the SPI bus
-
-
-Tests
------
-
-So far we have no tests, but when we do these will be documented here.
diff --git a/board/sandbox/sandbox/sandbox.c b/board/sandbox/sandbox/sandbox.c
deleted file mode 100644
index e4d4e02..0000000
--- a/board/sandbox/sandbox/sandbox.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2011 The Chromium OS Authors.
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#include <common.h>
-#include <cros_ec.h>
-#include <dm.h>
-#include <os.h>
-#include <asm/u-boot-sandbox.h>
-
-/*
- * Pointer to initial global data area
- *
- * Here we initialize it.
- */
-gd_t *gd;
-
-/* Add a simple GPIO device */
-U_BOOT_DEVICE(gpio_sandbox) = {
-	.name = "gpio_sandbox",
-};
-
-void flush_cache(unsigned long start, unsigned long size)
-{
-}
-
-unsigned long timer_read_counter(void)
-{
-	return os_get_nsec() / 1000;
-}
-
-int dram_init(void)
-{
-	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
-	return 0;
-}
-
-#ifdef CONFIG_BOARD_EARLY_INIT_F
-int board_early_init_f(void)
-{
-#ifdef CONFIG_VIDEO_SANDBOX_SDL
-	int ret;
-
-	ret = sandbox_lcd_sdl_early_init();
-	if (ret) {
-		puts("Could not init sandbox LCD emulation\n");
-		return ret;
-	}
-#endif
-
-	return 0;
-}
-#endif
-
-int arch_early_init_r(void)
-{
-#ifdef CONFIG_CROS_EC
-	if (cros_ec_board_init()) {
-		printf("%s: Failed to init EC\n", __func__);
-		return 0;
-	}
-#endif
-
-	return 0;
-}
-
-#ifdef CONFIG_BOARD_LATE_INIT
-int board_late_init(void)
-{
-	if (cros_ec_get_error()) {
-		/* Force console on */
-		gd->flags &= ~GD_FLG_SILENT;
-
-		printf("cros-ec communications failure %d\n",
-		       cros_ec_get_error());
-		puts("\nPlease reset with Power+Refresh\n\n");
-		panic("Cannot init cros-ec device");
-		return -1;
-	}
-	return 0;
-}
-#endif
diff --git a/boards.cfg b/boards.cfg
index c1d4b2d..2f517d7 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -1178,7 +1178,7 @@ Active  powerpc     ppc4xx         -           xilinx          ppc405-generic
 Active  powerpc     ppc4xx         -           xilinx          ppc405-generic      xilinx-ppc405-generic_flash          xilinx-ppc405-generic:SYS_TEXT_BASE=0xF7F60000,RESET_VECTOR_ADDRESS=0xF7FFFFFC                                                    Ricardo Ribalda <ricardo.ribalda at uam.es>
 Active  powerpc     ppc4xx         -           xilinx          ppc440-generic      xilinx-ppc440-generic                xilinx-ppc440-generic:SYS_TEXT_BASE=0x04000000,RESET_VECTOR_ADDRESS=0x04100000,BOOT_FROM_XMD=1                                    Ricardo Ribalda <ricardo.ribalda at uam.es>
 Active  powerpc     ppc4xx         -           xilinx          ppc440-generic      xilinx-ppc440-generic_flash          xilinx-ppc440-generic:SYS_TEXT_BASE=0xF7F60000,RESET_VECTOR_ADDRESS=0xF7FFFFFC                                                    Ricardo Ribalda <ricardo.ribalda at uam.es>
-Active  sandbox     sandbox        -           sandbox         sandbox             sandbox                              -                                                                                                                                 Simon Glass <sjg at chromium.org>
+Active  sandbox     sandbox        -           -               sandbox             sandbox                              -                                                                                                                                 Simon Glass <sjg at chromium.org>
 Active  sh          sh2            -           renesas         rsk7203             rsk7203                              -                                                                                                                                 Nobuhiro Iwamatsu <iwamatsu.nobuhiro at renesas.com>:Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
 Active  sh          sh2            -           renesas         rsk7264             rsk7264                              -                                                                                                                                 Phil Edworthy <phil.edworthy at renesas.com>
 Active  sh          sh2            -           renesas         rsk7269             rsk7269                              -                                                                                                                                 -
-- 
1.8.3.2



More information about the U-Boot mailing list