mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: add a machine number mechanism for boarddata
@ 2015-07-02  7:19 Sascha Hauer
  2015-07-02  7:19 ` [PATCH 2/3] ARM: beagleboard: Move to multiimage support Sascha Hauer
  2015-07-02  7:19 ` [PATCH 3/3] ARM: beagleboard: register update handlers for NAND Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-07-02  7:19 UTC (permalink / raw)
  To: Barebox List

Multi machine barebox builds have to pass information on which
board we are running on via boarddata. Usually this will be a
pointer to a device tree. Some boards might not have a device
tree available though because they are either not ported over
to device tree yet, or are running in some limited first state
environment which does not offer enough space for a device
tree. For these cases this patch adds a mechanism to embed a
machine number into a struct type along with a magic number.
This makes it possible to check for a specific machine
later during regular runtime.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/cpu/start.c               | 43 ++++++++++++++++++++++++--------------
 arch/arm/include/asm/barebox-arm.h | 27 +++++++++++++++++++++++-
 2 files changed, 53 insertions(+), 17 deletions(-)

diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index 304ed0c..91badc9 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -28,17 +28,22 @@
 #include <asm/cache.h>
 #include <memory.h>
 
+#include <debug_ll.h>
 #include "mmu-early.h"
 
 unsigned long arm_stack_top;
 static void *barebox_boarddata;
 
-/*
- * return the boarddata variable passed to barebox_arm_entry
- */
-void *barebox_arm_boarddata(void)
+u32 barebox_arm_machine(void)
 {
-	return barebox_boarddata;
+	struct barebox_arm_boarddata *bd;
+
+	if (!barebox_boarddata)
+		return 0;
+
+	bd = barebox_boarddata;
+
+	return bd->machine;
 }
 
 static void *barebox_boot_dtb;
@@ -81,17 +86,23 @@ static noinline __noreturn void __start(unsigned long membase,
 		}
 	}
 
-	/*
-	 * If boarddata is a pointer inside valid memory and contains a
-	 * FDT magic then use it as later to probe devices
-	 */
-	if (boarddata && get_unaligned_be32(boarddata) == FDT_MAGIC) {
-		uint32_t totalsize = get_unaligned_be32(boarddata + 4);
-		endmem -= ALIGN(totalsize, 64);
-		barebox_boot_dtb = (void *)endmem;
-		pr_debug("found DTB in boarddata, copying to 0x%p\n",
-				barebox_boot_dtb);
-		memcpy(barebox_boot_dtb, boarddata, totalsize);
+	if (boarddata) {
+		if (get_unaligned_be32(boarddata) == FDT_MAGIC) {
+			uint32_t totalsize = get_unaligned_be32(boarddata + 4);
+			endmem -= ALIGN(totalsize, 64);
+			barebox_boot_dtb = (void *)endmem;
+			pr_debug("found DTB in boarddata, copying to 0x%p\n",
+					barebox_boot_dtb);
+			memcpy(barebox_boot_dtb, boarddata, totalsize);
+		} else if (((struct barebox_arm_boarddata *)boarddata)->magic ==
+				BAREBOX_ARM_BOARDDATA_MAGIC) {
+			endmem -= ALIGN(sizeof(struct barebox_arm_boarddata), 64);
+			barebox_boarddata = (void *)endmem;
+			pr_debug("found machine type in boarddata, copying to 0x%p\n",
+					barebox_boarddata);
+			memcpy(barebox_boarddata, boarddata,
+					sizeof(struct barebox_arm_boarddata));
+		}
 	}
 
 	if ((unsigned long)_text > membase + memsize ||
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index dbc8aaa..0b8acb8 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -48,7 +48,32 @@ void setup_c(void);
 void relocate_to_current_adr(void);
 void relocate_to_adr(unsigned long target);
 void __noreturn barebox_arm_entry(unsigned long membase, unsigned long memsize, void *boarddata);
-void *barebox_arm_boarddata(void);
+
+struct barebox_arm_boarddata {
+#define BAREBOX_ARM_BOARDDATA_MAGIC	0xabe742c3
+	u32 magic;
+	u32 machine; /* machine number to pass to barebox. This may or may
+		      * not be a ARM machine number registered on arm.linux.org.uk.
+		      * It must only be unique across barebox. Please use a number
+		      * that do not potientially clashes with registered machines,
+		      * i.e. use a number > 0x10000.
+		      */
+};
+
+/*
+ * Create a boarddata struct at given address. Suitable to be passed
+ * as boarddata to barebox_arm_entry(). The machine can be retrieved
+ * later with barebox_arm_machine().
+ */
+static inline void boarddata_create(void *adr, u32 machine)
+{
+	struct barebox_arm_boarddata *bd = adr;
+
+	bd->magic = BAREBOX_ARM_BOARDDATA_MAGIC;
+	bd->machine = machine;
+}
+
+u32 barebox_arm_machine(void);
 
 #if defined(CONFIG_RELOCATABLE) && defined(CONFIG_ARM_EXCEPTIONS)
 void arm_fixup_vectors(void);
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/3] ARM: beagleboard: Move to multiimage support
  2015-07-02  7:19 [PATCH 1/3] ARM: add a machine number mechanism for boarddata Sascha Hauer
@ 2015-07-02  7:19 ` Sascha Hauer
  2015-07-02  7:19 ` [PATCH 3/3] ARM: beagleboard: register update handlers for NAND Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-07-02  7:19 UTC (permalink / raw)
  To: Barebox List

Breathe some life back into the beagleboard:

- switch to multiimage support
- update config
- initialize early UART for debugging

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/beagle/Makefile                    |  1 +
 arch/arm/boards/beagle/board.c                     | 13 ++++
 arch/arm/boards/beagle/defaultenv-beagle/boot/mmc  |  5 ++
 .../boards/beagle/defaultenv-beagle/boot/nand-ubi  |  4 ++
 .../beagle/defaultenv-beagle/boot/nand-ubi-dt      |  5 ++
 .../beagle/defaultenv-beagle/init/mtdparts-nand    | 11 +++
 .../beagle/defaultenv-beagle/network/eth0-discover |  5 ++
 arch/arm/boards/beagle/env/boot/mmc                |  5 --
 arch/arm/boards/beagle/env/boot/nand-ubi           |  4 --
 arch/arm/boards/beagle/env/boot/nand-ubi-dt        |  5 --
 arch/arm/boards/beagle/env/init/mtdparts-nand      | 11 ---
 arch/arm/boards/beagle/env/network/eth0-discover   |  5 --
 arch/arm/boards/beagle/lowlevel.c                  | 39 +++++++++--
 arch/arm/configs/omap3530_beagle_defconfig         | 81 +++++++++++++---------
 arch/arm/configs/omap3530_beagle_xload_defconfig   | 17 +++--
 arch/arm/mach-omap/Kconfig                         | 14 ++--
 images/Makefile                                    |  1 +
 images/Makefile.omap3                              | 19 +++++
 18 files changed, 162 insertions(+), 83 deletions(-)
 create mode 100644 arch/arm/boards/beagle/defaultenv-beagle/boot/mmc
 create mode 100644 arch/arm/boards/beagle/defaultenv-beagle/boot/nand-ubi
 create mode 100644 arch/arm/boards/beagle/defaultenv-beagle/boot/nand-ubi-dt
 create mode 100644 arch/arm/boards/beagle/defaultenv-beagle/init/mtdparts-nand
 create mode 100644 arch/arm/boards/beagle/defaultenv-beagle/network/eth0-discover
 delete mode 100644 arch/arm/boards/beagle/env/boot/mmc
 delete mode 100644 arch/arm/boards/beagle/env/boot/nand-ubi
 delete mode 100644 arch/arm/boards/beagle/env/boot/nand-ubi-dt
 delete mode 100644 arch/arm/boards/beagle/env/init/mtdparts-nand
 delete mode 100644 arch/arm/boards/beagle/env/network/eth0-discover
 create mode 100644 images/Makefile.omap3

diff --git a/arch/arm/boards/beagle/Makefile b/arch/arm/boards/beagle/Makefile
index 01c7a25..3bee9a2 100644
--- a/arch/arm/boards/beagle/Makefile
+++ b/arch/arm/boards/beagle/Makefile
@@ -1,2 +1,3 @@
 obj-y += board.o
 lwl-y += lowlevel.o
+bbenv-y += defaultenv-beagle
diff --git a/arch/arm/boards/beagle/board.c b/arch/arm/boards/beagle/board.c
index 7756210..b7efe95 100644
--- a/arch/arm/boards/beagle/board.c
+++ b/arch/arm/boards/beagle/board.c
@@ -22,6 +22,7 @@
 #include <linux/sizes.h>
 #include <io.h>
 #include <ns16550.h>
+#include <envfs.h>
 #include <asm/armlinux.h>
 #include <generated/mach-types.h>
 #include <mach/gpmc.h>
@@ -31,6 +32,7 @@
 #include <i2c/i2c.h>
 #include <linux/err.h>
 #include <usb/ehci.h>
+#include <asm/barebox-arm.h>
 
 #ifdef CONFIG_DRIVER_SERIAL_NS16550
 
@@ -42,6 +44,9 @@
  */
 static int beagle_console_init(void)
 {
+	if (barebox_arm_machine() != MACH_TYPE_OMAP3_BEAGLE)
+		return 0;
+
 	barebox_set_model("Texas Instruments beagle");
 	barebox_set_hostname("beagle");
 
@@ -82,6 +87,9 @@ static struct gpmc_nand_platform_data nand_plat = {
 
 static int beagle_mem_init(void)
 {
+	if (barebox_arm_machine() != MACH_TYPE_OMAP3_BEAGLE)
+		return 0;
+
 	omap_add_ram0(SZ_128M);
 
 	return 0;
@@ -90,6 +98,9 @@ mem_initcall(beagle_mem_init);
 
 static int beagle_devices_init(void)
 {
+	if (barebox_arm_machine() != MACH_TYPE_OMAP3_BEAGLE)
+		return 0;
+
 	i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
 	omap3_add_i2c1(NULL);
 
@@ -107,6 +118,8 @@ static int beagle_devices_init(void)
 
 	armlinux_set_architecture(MACH_TYPE_OMAP3_BEAGLE);
 
+	defaultenv_append_directory(defaultenv_beagle);
+
 	return 0;
 }
 device_initcall(beagle_devices_init);
diff --git a/arch/arm/boards/beagle/defaultenv-beagle/boot/mmc b/arch/arm/boards/beagle/defaultenv-beagle/boot/mmc
new file mode 100644
index 0000000..db638f8
--- /dev/null
+++ b/arch/arm/boards/beagle/defaultenv-beagle/boot/mmc
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+global.bootm.image="/boot/zImage"
+#global.bootm.oftree="/boot/oftree"
+global.linux.bootargs.dyn.root="root=mmcblk0p2 rootfstype=ext3 rootwait"
diff --git a/arch/arm/boards/beagle/defaultenv-beagle/boot/nand-ubi b/arch/arm/boards/beagle/defaultenv-beagle/boot/nand-ubi
new file mode 100644
index 0000000..e0ef904
--- /dev/null
+++ b/arch/arm/boards/beagle/defaultenv-beagle/boot/nand-ubi
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+global.bootm.image="/dev/nand0.kernel.bb"
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rootfstype=ubifs"
diff --git a/arch/arm/boards/beagle/defaultenv-beagle/boot/nand-ubi-dt b/arch/arm/boards/beagle/defaultenv-beagle/boot/nand-ubi-dt
new file mode 100644
index 0000000..5fc0a6c
--- /dev/null
+++ b/arch/arm/boards/beagle/defaultenv-beagle/boot/nand-ubi-dt
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+global.bootm.image="/dev/nand0.kernel.bb"
+global.bootm.oftree="/dev/nand0.oftree.bb"
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rootfstype=ubifs"
diff --git a/arch/arm/boards/beagle/defaultenv-beagle/init/mtdparts-nand b/arch/arm/boards/beagle/defaultenv-beagle/init/mtdparts-nand
new file mode 100644
index 0000000..9335bb1
--- /dev/null
+++ b/arch/arm/boards/beagle/defaultenv-beagle/init/mtdparts-nand
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	init-menu-add-entry "$0" "NAND partitions"
+	exit
+fi
+
+mtdparts="128k(nand0.xload),256k(nand0.barebox)ro,128k(nand0.bareboxenv),128k(nand0.oftree),4M(nand0.kernel),120M(nand0.rootfs),-(nand0.data)"
+kernelname="omap2-nand"
+
+mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}
diff --git a/arch/arm/boards/beagle/defaultenv-beagle/network/eth0-discover b/arch/arm/boards/beagle/defaultenv-beagle/network/eth0-discover
new file mode 100644
index 0000000..86d13f5
--- /dev/null
+++ b/arch/arm/boards/beagle/defaultenv-beagle/network/eth0-discover
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# The beagle board supports a network adapter on USB
+
+usb
diff --git a/arch/arm/boards/beagle/env/boot/mmc b/arch/arm/boards/beagle/env/boot/mmc
deleted file mode 100644
index db638f8..0000000
--- a/arch/arm/boards/beagle/env/boot/mmc
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-global.bootm.image="/boot/zImage"
-#global.bootm.oftree="/boot/oftree"
-global.linux.bootargs.dyn.root="root=mmcblk0p2 rootfstype=ext3 rootwait"
diff --git a/arch/arm/boards/beagle/env/boot/nand-ubi b/arch/arm/boards/beagle/env/boot/nand-ubi
deleted file mode 100644
index e0ef904..0000000
--- a/arch/arm/boards/beagle/env/boot/nand-ubi
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-global.bootm.image="/dev/nand0.kernel.bb"
-global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rootfstype=ubifs"
diff --git a/arch/arm/boards/beagle/env/boot/nand-ubi-dt b/arch/arm/boards/beagle/env/boot/nand-ubi-dt
deleted file mode 100644
index 5fc0a6c..0000000
--- a/arch/arm/boards/beagle/env/boot/nand-ubi-dt
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-global.bootm.image="/dev/nand0.kernel.bb"
-global.bootm.oftree="/dev/nand0.oftree.bb"
-global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rootfstype=ubifs"
diff --git a/arch/arm/boards/beagle/env/init/mtdparts-nand b/arch/arm/boards/beagle/env/init/mtdparts-nand
deleted file mode 100644
index 9335bb1..0000000
--- a/arch/arm/boards/beagle/env/init/mtdparts-nand
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "NAND partitions"
-	exit
-fi
-
-mtdparts="128k(nand0.xload),256k(nand0.barebox)ro,128k(nand0.bareboxenv),128k(nand0.oftree),4M(nand0.kernel),120M(nand0.rootfs),-(nand0.data)"
-kernelname="omap2-nand"
-
-mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}
diff --git a/arch/arm/boards/beagle/env/network/eth0-discover b/arch/arm/boards/beagle/env/network/eth0-discover
deleted file mode 100644
index 86d13f5..0000000
--- a/arch/arm/boards/beagle/env/network/eth0-discover
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-# The beagle board supports a network adapter on USB
-
-usb
diff --git a/arch/arm/boards/beagle/lowlevel.c b/arch/arm/boards/beagle/lowlevel.c
index d6e6b9f..30cc1f2 100644
--- a/arch/arm/boards/beagle/lowlevel.c
+++ b/arch/arm/boards/beagle/lowlevel.c
@@ -1,4 +1,5 @@
 #include <init.h>
+#include <debug_ll.h>
 #include <io.h>
 #include <linux/sizes.h>
 #include <asm/barebox-arm-head.h>
@@ -11,6 +12,7 @@
 #include <mach/sdrc.h>
 #include <mach/syslib.h>
 #include <mach/sys_info.h>
+#include <generated/mach-types.h>
 
 /**
  * @brief Do the pin muxing required for Board operation.
@@ -157,6 +159,22 @@ static void sdrc_init(void)
 	return;
 }
 
+static noinline int beagle_board_init_sdram(void)
+{
+	struct barebox_arm_boarddata *bd = (void *)OMAP3_SRAM_SCRATCH_SPACE + 0x10;
+
+	boarddata_create(bd, MACH_TYPE_OMAP3_BEAGLE);
+
+	barebox_arm_entry(0x80000000, SZ_128M, bd);
+}
+
+ENTRY_FUNCTION(start_omap3_beagleboard_sdram, bootinfo, r1, r2)
+{
+	omap3_save_bootinfo((void *)bootinfo);
+
+	beagle_board_init_sdram();
+}
+
 /**
  * @brief The basic entry point for board initialization.
  *
@@ -166,28 +184,37 @@ static void sdrc_init(void)
  *
  * @return void
  */
-static int beagle_board_init(void)
+static noinline int beagle_board_init(void)
 {
 	int in_sdram = omap3_running_in_sdram();
+	struct barebox_arm_boarddata bd;
 
 	if (!in_sdram)
 		omap3_core_init();
 
 	mux_config();
+
+	omap_uart_lowlevel_init((void *)OMAP3_UART3_BASE);
+
 	/* Dont reconfigure SDRAM while running in SDRAM! */
 	if (!in_sdram)
 		sdrc_init();
 
-	return 0;
+	boarddata_create(&bd, MACH_TYPE_OMAP3_BEAGLE);
+
+	barebox_arm_entry(0x80000000, SZ_128M, &bd);
 }
 
-void __naked  __bare_init barebox_arm_reset_vector(uint32_t *data)
+ENTRY_FUNCTION(start_omap3_beagleboard_sram, bootinfo, r1, r2)
 {
-	omap3_save_bootinfo(data);
+	omap3_save_bootinfo((void *)bootinfo);
 
 	arm_cpu_lowlevel_init();
 
-	beagle_board_init();
+	omap3_gp_romcode_call(OMAP3_GP_ROMCODE_API_L2_INVAL, 0);
+
+	relocate_to_current_adr();
+	setup_c();
 
-	barebox_arm_entry(0x80000000, SZ_128M, NULL);
+	beagle_board_init();
 }
diff --git a/arch/arm/configs/omap3530_beagle_defconfig b/arch/arm/configs/omap3530_beagle_defconfig
index 3068fbb..070f156 100644
--- a/arch/arm/configs/omap3530_beagle_defconfig
+++ b/arch/arm/configs/omap3530_beagle_defconfig
@@ -1,67 +1,79 @@
 CONFIG_ARCH_OMAP=y
+CONFIG_OMAP_MULTI_BOARDS=y
 CONFIG_MACH_BEAGLE=y
 CONFIG_THUMB2_BAREBOX=y
-CONFIG_CMD_ARM_MMUINFO=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
 CONFIG_ARM_UNWIND=y
-CONFIG_PBL_IMAGE=y
 CONFIG_MMU=y
-CONFIG_TEXT_BASE=0x87e00000
-CONFIG_MALLOC_SIZE=0x2000000
+CONFIG_TEXT_BASE=0x0
+CONFIG_MALLOC_SIZE=0x0
 CONFIG_MALLOC_TLSF=y
 CONFIG_KALLSYMS=y
+CONFIG_RELOCATABLE=y
 CONFIG_PROMPT="barebox> "
-CONFIG_LONGHELP=y
 CONFIG_HUSH_FANCY_PROMPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
+CONFIG_BLSPEC=y
+CONFIG_IMD_TARGET=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/beagle/env"
-CONFIG_CMD_EDIT=y
-CONFIG_CMD_SLEEP=y
-CONFIG_CMD_MSLEEP=y
-CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_EXPORT=y
-CONFIG_CMD_PRINTENV=y
-CONFIG_CMD_READLINE=y
-CONFIG_CMD_MENU=y
-CONFIG_CMD_MENU_MANAGEMENT=y
-CONFIG_CMD_TIME=y
-CONFIG_CMD_DIRNAME=y
-CONFIG_CMD_LN=y
-CONFIG_CMD_READLINK=y
-CONFIG_CMD_TFTP=y
-CONFIG_CMD_ECHO_E=y
-CONFIG_CMD_LOADB=y
-CONFIG_CMD_MEMINFO=y
+CONFIG_RESET_SOURCE=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_OMAP_UART_PORT=3
+CONFIG_DEBUG_INITCALLS=y
+CONFIG_CMD_DMESG=y
+CONFIG_LONGHELP=y
 CONFIG_CMD_IOMEM=y
-CONFIG_CMD_CRC=y
-CONFIG_CMD_CRC_CMP=y
-CONFIG_CMD_MD5SUM=y
-CONFIG_CMD_FLASH=y
+CONFIG_CMD_IMD=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_ARM_MMUINFO=y
 CONFIG_CMD_BOOTM_SHOW_TYPE=y
 CONFIG_CMD_BOOTM_VERBOSE=y
 CONFIG_CMD_BOOTM_INITRD=y
 CONFIG_CMD_BOOTM_OFTREE=y
 CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
 # CONFIG_CMD_BOOTU is not set
-CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
-CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_RESET=y
 CONFIG_CMD_PARTITION=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_DEFAULTENV=y
+CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_MAGICVAR=y
 CONFIG_CMD_MAGICVAR_HELP=y
-CONFIG_CMD_GPIO=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_FILETYPE=y
+CONFIG_CMD_LN=y
+CONFIG_CMD_MD5SUM=y
 CONFIG_CMD_UNCOMPRESS=y
-CONFIG_CMD_I2C=y
+CONFIG_CMD_MSLEEP=y
+CONFIG_CMD_READF=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_HOST=y
 CONFIG_CMD_MIITOOL=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TFTP=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_MENUTREE=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_CRC=y
+CONFIG_CMD_CRC_CMP=y
+CONFIG_CMD_DETECT=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_BAREBOX_UPDATE=y
+CONFIG_CMD_TIME=y
 CONFIG_NET=y
-CONFIG_CMD_DHCP=y
 CONFIG_NET_NFS=y
-CONFIG_CMD_PING=y
 CONFIG_NET_NETCONSOLE=y
-CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
 CONFIG_NET_USB=y
@@ -81,6 +93,7 @@ CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
 CONFIG_MCI_OMAP_HSMMC=y
 CONFIG_MFD_TWL4030=y
+CONFIG_FS_EXT4=y
 CONFIG_FS_TFTP=y
 CONFIG_FS_NFS=y
 CONFIG_FS_FAT=y
diff --git a/arch/arm/configs/omap3530_beagle_xload_defconfig b/arch/arm/configs/omap3530_beagle_xload_defconfig
index 585ee0f..074cc21 100644
--- a/arch/arm/configs/omap3530_beagle_xload_defconfig
+++ b/arch/arm/configs/omap3530_beagle_xload_defconfig
@@ -1,21 +1,25 @@
 CONFIG_ARCH_OMAP=y
 CONFIG_OMAP_BUILD_IFT=y
+CONFIG_OMAP3_USBBOOT=y
+CONFIG_OMAP3_USB_LOADER=y
+CONFIG_OMAP_MULTI_BOARDS=y
 CONFIG_MACH_BEAGLE=y
 CONFIG_THUMB2_BAREBOX=y
-# CONFIG_CMD_ARM_CPUINFO is not set
-# CONFIG_ARM_EXCEPTIONS is not set
-CONFIG_TEXT_BASE=0x40200000
-CONFIG_MEMORY_LAYOUT_FIXED=y
-CONFIG_STACK_BASE=0x4020F000
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_ARM_UNWIND=y
+CONFIG_MMU=y
+CONFIG_TEXT_BASE=0x0
 CONFIG_STACK_SIZE=0xc00
-CONFIG_MALLOC_BASE=0x87BFFF10
+CONFIG_MALLOC_SIZE=0x0
 CONFIG_MALLOC_DUMMY=y
+CONFIG_RELOCATABLE=y
 CONFIG_PROMPT="X-load Beagle>"
 CONFIG_SHELL_NONE=y
 # CONFIG_ERRNO_MESSAGES is not set
 # CONFIG_TIMESTAMP is not set
 CONFIG_CONSOLE_SIMPLE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
+CONFIG_OFDEVICE=y
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
 # CONFIG_SPI is not set
@@ -33,6 +37,7 @@ CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
 # CONFIG_MCI_WRITE is not set
 CONFIG_MCI_OMAP_HSMMC=y
+# CONFIG_PINCTRL is not set
 # CONFIG_FS_RAMFS is not set
 # CONFIG_FS_DEVFS is not set
 CONFIG_FS_FAT=y
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index abf204a..af35975 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -157,6 +157,13 @@ config MACH_AFI_GF
 	  help
 	  Say Y here if you are using afis GF
 
+config MACH_BEAGLE
+	bool "Texas Instrument's Beagle Board"
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
+	select ARCH_OMAP3
+	help
+	  Say Y here if you are using Beagle Board
+
 config MACH_BEAGLEBONE
 	bool "Texas Instrument's Beagle Bone"
 	select ARCH_AM33XX
@@ -180,13 +187,6 @@ config MACH_OMAP343xSDP
 	help
 	  Say Y here if you are using SDP343x platform
 
-config MACH_BEAGLE
-	bool "Texas Instrument's Beagle Board"
-	select HAVE_DEFAULT_ENVIRONMENT_NEW
-	select ARCH_OMAP3
-	help
-	  Say Y here if you are using Beagle Board
-
 config MACH_OMAP3EVM
 	bool "Texas Instrument's OMAP3 EVM"
 	select ARCH_OMAP3
diff --git a/images/Makefile b/images/Makefile
index 587cb26..1e1771f 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -105,6 +105,7 @@ include $(srctree)/images/Makefile.imx
 include $(srctree)/images/Makefile.imxhabv4
 include $(srctree)/images/Makefile.mvebu
 include $(srctree)/images/Makefile.mxs
+include $(srctree)/images/Makefile.omap3
 include $(srctree)/images/Makefile.rockchip
 include $(srctree)/images/Makefile.socfpga
 include $(srctree)/images/Makefile.tegra
diff --git a/images/Makefile.omap3 b/images/Makefile.omap3
new file mode 100644
index 0000000..694ec30
--- /dev/null
+++ b/images/Makefile.omap3
@@ -0,0 +1,19 @@
+# %.mlo - convert into mlo image
+# ----------------------------------------------------------------
+quiet_cmd_omap3_mlo_image = MLO     $@
+      cmd_omap3_mlo_image = scripts/omap_signGP -o $@ -l 0x40200000 -c $<
+
+$(obj)/%.omap3_mlo: $(obj)/% FORCE
+	$(call if_changed,omap3_mlo_image)
+
+pblx-$(CONFIG_MACH_BEAGLE) += start_omap3_beagleboard_sdram start_omap3_beagleboard_sram
+FILE_barebox-beagleboard.img = start_omap3_beagleboard_sdram.pblx
+omap3-barebox-$(CONFIG_MACH_BEAGLE) += barebox-beagleboard.img
+FILE_barebox-beagleboard-mlo.img = start_omap3_beagleboard_sram.pblx.omap3_mlo
+omap3-mlo-$(CONFIG_MACH_BEAGLE) += barebox-beagleboard-mlo.img
+
+ifdef CONFIG_OMAP_BUILD_IFT
+image-y += $(omap3-mlo-y)
+else
+image-y += $(omap3-barebox-y)
+endif
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 3/3] ARM: beagleboard: register update handlers for NAND
  2015-07-02  7:19 [PATCH 1/3] ARM: add a machine number mechanism for boarddata Sascha Hauer
  2015-07-02  7:19 ` [PATCH 2/3] ARM: beagleboard: Move to multiimage support Sascha Hauer
@ 2015-07-02  7:19 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-07-02  7:19 UTC (permalink / raw)
  To: Barebox List

To make updating barebox to nand easy. To bootstrap from a SD
card:

barebox_update -t nand-xload /boot/MLO
barebox_update -t nand /boot/barebox.bin

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/beagle/board.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boards/beagle/board.c b/arch/arm/boards/beagle/board.c
index b7efe95..a7ff3a4 100644
--- a/arch/arm/boards/beagle/board.c
+++ b/arch/arm/boards/beagle/board.c
@@ -21,6 +21,7 @@
 #include <driver.h>
 #include <linux/sizes.h>
 #include <io.h>
+#include <bbu.h>
 #include <ns16550.h>
 #include <envfs.h>
 #include <asm/armlinux.h>
@@ -120,6 +121,11 @@ static int beagle_devices_init(void)
 
 	defaultenv_append_directory(defaultenv_beagle);
 
+	bbu_register_std_file_update("nand-xload", 0,
+			"/dev/nand0.xload.bb", filetype_ch_image);
+	bbu_register_std_file_update("nand", 0,
+			"/dev/nand0.barebox.bb", filetype_arm_barebox);
+
 	return 0;
 }
 device_initcall(beagle_devices_init);
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-02  7:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-02  7:19 [PATCH 1/3] ARM: add a machine number mechanism for boarddata Sascha Hauer
2015-07-02  7:19 ` [PATCH 2/3] ARM: beagleboard: Move to multiimage support Sascha Hauer
2015-07-02  7:19 ` [PATCH 3/3] ARM: beagleboard: register update handlers for NAND Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox