All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/4] Add support for BeagleBoard.org PocketBeagle
@ 2018-03-07 10:40 Jason Kridner
  2018-03-07 10:40 ` [U-Boot] [PATCH 1/4] " Jason Kridner
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Jason Kridner @ 2018-03-07 10:40 UTC (permalink / raw)
  To: u-boot

This series sets up the am335x_evm_usbspl_defconfig to boot the TI
AM335x based BeagleBoard.org PocketBeagle using the BeagleBoard.org
provided Debian images and enables NETCONSOLE over USB when the
environment is updated as needed.

Jason Kridner (4):
  Add support for BeagleBoard.org PocketBeagle
  am335x_evm: scan more partitions and use uname_r
  Handle NETCONSOLE and SPL enabled
  am335x: am335x_evm_usbspl_defconfig: NETCONSOLE

 board/ti/am335x/board.c             | 10 ++++++----
 board/ti/am335x/board.h             |  7 ++++++-
 board/ti/am335x/mux.c               |  3 +++
 configs/am335x_evm_usbspl_defconfig |  7 +++++++
 include/configs/am335x_evm.h        |  7 ++++++-
 include/environment/ti/mmc.h        | 13 +++++++++----
 include/net.h                       |  6 +++---
 7 files changed, 40 insertions(+), 13 deletions(-)

-- 
2.15.1

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

* [U-Boot] [PATCH 1/4] Add support for BeagleBoard.org PocketBeagle
  2018-03-07 10:40 [U-Boot] [PATCH 0/4] Add support for BeagleBoard.org PocketBeagle Jason Kridner
@ 2018-03-07 10:40 ` Jason Kridner
  2018-03-07 14:27   ` Tom Rini
  2018-04-07  0:44   ` [U-Boot] [U-Boot, " Tom Rini
  2018-03-07 10:40 ` [U-Boot] [PATCH 2/4] am335x_evm: scan more partitions and use uname_r Jason Kridner
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 15+ messages in thread
From: Jason Kridner @ 2018-03-07 10:40 UTC (permalink / raw)
  To: u-boot

Texas Instruments AM3358 based low-cost board using Octavo Systems OSD3358 SIP
with built-in TPS65217 PMIC and 512MB DDR3. Board features small 35mm x
55mm size, high-speed USB OTG, microSD and 72 0.1" expansion header
pins with 2xSPI, 2xI2C, 2xUART, USB, 8xADC, up-to-44 GPIO, PRU pins and much more.

https://beagleboard.org/pocket

This was tested using the am335x_evm_usbspl_defconfig.

Note that MII pins are enabled despite not having Ethernet on this
board. This avoids an issue where otherwise many timeout errors would be
generated. See https://e2e.ti.com/support/arm/sitara_arm/f/791/t/298976
for some related discussion.

Signed-off-by: Jason Kridner <jdk@ti.com>
Cc: Tom Rini <trini@konsulko.com>
---
 board/ti/am335x/board.c      | 10 ++++++----
 board/ti/am335x/board.h      |  7 ++++++-
 board/ti/am335x/mux.c        |  3 +++
 include/configs/am335x_evm.h |  2 ++
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index b144fd1821..87bdd2d63d 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -264,7 +264,7 @@ const struct dpll_params *get_dpll_ddr_params(void)
 
 	if (board_is_evm_sk())
 		return &dpll_ddr3_303MHz[ind];
-	else if (board_is_bone_lt() || board_is_icev2())
+	else if (board_is_pb() || board_is_bone_lt() || board_is_icev2())
 		return &dpll_ddr3_400MHz[ind];
 	else if (board_is_evm_15_or_later())
 		return &dpll_ddr3_303MHz[ind];
@@ -295,7 +295,7 @@ const struct dpll_params *get_dpll_mpu_params(void)
 	if (bone_not_connected_to_ac_power())
 		freq = MPUPLL_M_600;
 
-	if (board_is_bone_lt())
+	if (board_is_pb() || board_is_bone_lt())
 		freq = MPUPLL_M_1000;
 
 	switch (freq) {
@@ -341,7 +341,7 @@ static void scale_vcores_bone(int freq)
 	 * Override what we have detected since we know if we have
 	 * a Beaglebone Black it supports 1GHz.
 	 */
-	if (board_is_bone_lt())
+	if (board_is_pb() || board_is_bone_lt())
 		freq = MPUPLL_M_1000;
 
 	switch (freq) {
@@ -542,7 +542,7 @@ void sdram_init(void)
 	if (board_is_evm_sk())
 		config_ddr(303, &ioregs_evmsk, &ddr3_data,
 			   &ddr3_cmd_ctrl_data, &ddr3_emif_reg_data, 0);
-	else if (board_is_bone_lt())
+	else if (board_is_pb() || board_is_bone_lt())
 		config_ddr(400, &ioregs_bonelt,
 			   &ddr3_beagleblack_data,
 			   &ddr3_beagleblack_cmd_ctrl_data,
@@ -931,6 +931,8 @@ int board_fit_config_name_match(const char *name)
 		return 0;
 	else if (board_is_bone_lt() && !strcmp(name, "am335x-boneblack"))
 		return 0;
+	else if (board_is_pb() && !strcmp(name, "am335x-pocketbeagle"))
+		return 0;
 	else if (board_is_evm_sk() && !strcmp(name, "am335x-evmsk"))
 		return 0;
 	else if (board_is_bbg1() && !strcmp(name, "am335x-bonegreen"))
diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
index e13fcff02a..bab5b77f34 100644
--- a/board/ti/am335x/board.h
+++ b/board/ti/am335x/board.h
@@ -34,6 +34,11 @@ static inline int board_is_bone_lt(void)
 	return board_ti_is("A335BNLT");
 }
 
+static inline int board_is_pb(void)
+{
+	return board_ti_is("A335PBGL");
+}
+
 static inline int board_is_bbg1(void)
 {
 	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4);
@@ -41,7 +46,7 @@ static inline int board_is_bbg1(void)
 
 static inline int board_is_beaglebonex(void)
 {
-	return board_is_bone() || board_is_bone_lt() || board_is_bbg1();
+	return board_is_pb() || board_is_bone() || board_is_bone_lt() || board_is_bbg1();
 }
 
 static inline int board_is_evm_sk(void)
diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
index ad85b3a19a..aa187605d0 100644
--- a/board/ti/am335x/mux.c
+++ b/board/ti/am335x/mux.c
@@ -390,6 +390,9 @@ void enable_board_pin_mux(void)
 #else
 		configure_module_pin_mux(mmc1_pin_mux);
 #endif
+	} else if (board_is_pb()) {
+		configure_module_pin_mux(mii1_pin_mux);
+		configure_module_pin_mux(mmc0_pin_mux);
 	} else if (board_is_icev2()) {
 		configure_module_pin_mux(mmc0_pin_mux);
 		configure_module_pin_mux(gpio0_18_pin_mux);
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 158b7d4e8e..8d45b6fade 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -133,6 +133,8 @@
 			"setenv fdtfile am335x-bone.dtb; fi; " \
 		"if test $board_name = A335BNLT; then " \
 			"setenv fdtfile am335x-boneblack.dtb; fi; " \
+		"if test $board_name = A335PBGL; then " \
+			"setenv fdtfile am335x-pocketbeagle.dtb; fi; " \
 		"if test $board_name = BBBW; then " \
 			"setenv fdtfile am335x-boneblack-wireless.dtb; fi; " \
 		"if test $board_name = BBG1; then " \
-- 
2.15.1

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

* [U-Boot] [PATCH 2/4] am335x_evm: scan more partitions and use uname_r
  2018-03-07 10:40 [U-Boot] [PATCH 0/4] Add support for BeagleBoard.org PocketBeagle Jason Kridner
  2018-03-07 10:40 ` [U-Boot] [PATCH 1/4] " Jason Kridner
@ 2018-03-07 10:40 ` Jason Kridner
  2018-03-07 14:27   ` Tom Rini
  2018-03-07 10:40 ` [U-Boot] [PATCH 3/4] Handle NETCONSOLE and SPL enabled Jason Kridner
  2018-03-07 10:40 ` [U-Boot] [PATCH 4/4] am335x: am335x_evm_usbspl_defconfig: NETCONSOLE Jason Kridner
  3 siblings, 1 reply; 15+ messages in thread
From: Jason Kridner @ 2018-03-07 10:40 UTC (permalink / raw)
  To: u-boot

This enables mainline u-boot to boot the BeagleBoard.org Debian
distribution builds without extensive environment modifications.

Some boot layouts only have a single partition on the
MMC/eMMC. This will scan those partitions after the second
partition that was already being scanned.

Some layouts use uname_r to define the kernel being used for the boot to
support multiple kernels stored within the boot file system without
using symlinks.

See http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 for
more details on the BeagleBoard.org Debian image layout.

Signed-off-by: Jason Kridner <jdk@ti.com>
Cc: Robert Nelson <robertcnelson@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
---
 include/configs/am335x_evm.h |  5 ++++-
 include/environment/ti/mmc.h | 13 +++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 8d45b6fade..32fe0e0cd5 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -61,7 +61,10 @@
 #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
 	"bootcmd_" #devtypel #instance "=" \
 	"setenv mmcdev " #instance"; "\
-	"setenv bootpart " #instance":2 ; "\
+	"setenv bootpart " #instance":2; "\
+	"run mmcboot;"\
+	"setenv mmcdev " #instance"; "\
+	"setenv bootpart " #instance":1; "\
 	"run mmcboot\0"
 
 #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h
index 4305ebdaaf..b803ecccb7 100644
--- a/include/environment/ti/mmc.h
+++ b/include/environment/ti/mmc.h
@@ -23,9 +23,10 @@
 	"bootenvfile=uEnv.txt\0" \
 	"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
 		"env import -t ${loadaddr} ${filesize}\0" \
-	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
-	"loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
-	"loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+	"loadbootenv=if fatload mmc ${mmcdev} ${loadaddr} ${bootdir}/${bootenvfile}; then echo Found ${bootdir}/${bootenvfile} in FAT partition; else load mmc ${mmcdev} ${loadaddr} ${bootdir}/${bootenvfile}; fi\0" \
+	"loadimage=if test -n ${uname_r}; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/vmlinuz-${uname_r}; run loadrd; else load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}; fi\0" \
+	"loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/initrd.img-${uname_r}; setenv rdsize ${filesize}\0" \
+	"loadfdt=if test -n ${uname_r}; then load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtbs/${uname_r}/${fdtfile}; else load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}; fi;\0" \
 	"envboot=mmc dev ${mmcdev}; " \
 		"if mmc rescan; then " \
 			"echo SD/MMC found on device ${mmcdev};" \
@@ -45,7 +46,11 @@
 	"mmcloados=run args_mmc; " \
 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
 			"if run loadfdt; then " \
-				"bootz ${loadaddr} - ${fdtaddr}; " \
+				"if test -n ${uname_r}; then " \
+					"bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \
+				"else " \
+					"bootz ${loadaddr} - ${fdtaddr}; " \
+				"fi; " \
 			"else " \
 				"if test ${boot_fdt} = try; then " \
 					"bootz; " \
-- 
2.15.1

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

* [U-Boot] [PATCH 3/4] Handle NETCONSOLE and SPL enabled
  2018-03-07 10:40 [U-Boot] [PATCH 0/4] Add support for BeagleBoard.org PocketBeagle Jason Kridner
  2018-03-07 10:40 ` [U-Boot] [PATCH 1/4] " Jason Kridner
  2018-03-07 10:40 ` [U-Boot] [PATCH 2/4] am335x_evm: scan more partitions and use uname_r Jason Kridner
@ 2018-03-07 10:40 ` Jason Kridner
  2018-03-07 14:27   ` Tom Rini
                     ` (2 more replies)
  2018-03-07 10:40 ` [U-Boot] [PATCH 4/4] am335x: am335x_evm_usbspl_defconfig: NETCONSOLE Jason Kridner
  3 siblings, 3 replies; 15+ messages in thread
From: Jason Kridner @ 2018-03-07 10:40 UTC (permalink / raw)
  To: u-boot

From: Jason Kridner <jkridner@beagleboard.org>

NETCONSOLE isn't compiled in with SPL, so the include file needs to recognize that.

Signed-off-by: Jason Kridner <jdk@ti.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
---
 include/net.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/net.h b/include/net.h
index 455b48f6c7..3101096e9a 100644
--- a/include/net.h
+++ b/include/net.h
@@ -676,7 +676,7 @@ int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport,
 /* Processes a received packet */
 void net_process_received_packet(uchar *in_packet, int len);
 
-#ifdef CONFIG_NETCONSOLE
+#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD)
 void nc_start(void);
 int nc_input_packet(uchar *pkt, struct in_addr src_ip, unsigned dest_port,
 	unsigned src_port, unsigned len);
@@ -684,7 +684,7 @@ int nc_input_packet(uchar *pkt, struct in_addr src_ip, unsigned dest_port,
 
 static __always_inline int eth_is_on_demand_init(void)
 {
-#ifdef CONFIG_NETCONSOLE
+#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD)
 	extern enum proto_t net_loop_last_protocol;
 
 	return net_loop_last_protocol != NETCONS;
@@ -695,7 +695,7 @@ static __always_inline int eth_is_on_demand_init(void)
 
 static inline void eth_set_last_protocol(int protocol)
 {
-#ifdef CONFIG_NETCONSOLE
+#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD)
 	extern enum proto_t net_loop_last_protocol;
 
 	net_loop_last_protocol = protocol;
-- 
2.15.1

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

* [U-Boot] [PATCH 4/4] am335x: am335x_evm_usbspl_defconfig: NETCONSOLE
  2018-03-07 10:40 [U-Boot] [PATCH 0/4] Add support for BeagleBoard.org PocketBeagle Jason Kridner
                   ` (2 preceding siblings ...)
  2018-03-07 10:40 ` [U-Boot] [PATCH 3/4] Handle NETCONSOLE and SPL enabled Jason Kridner
@ 2018-03-07 10:40 ` Jason Kridner
  2018-03-07 14:27   ` Tom Rini
  2018-04-07  0:44   ` [U-Boot] [U-Boot, " Tom Rini
  3 siblings, 2 replies; 15+ messages in thread
From: Jason Kridner @ 2018-03-07 10:40 UTC (permalink / raw)
  To: u-boot

Enable NETCONSOLE by default. Still requires changes to the boot
environment to enable on the platform.

Signed-of-by: Jason Kridner <jdk@ti.com>
Cc: Tom Rini <trini@konsulko.com>
---
 configs/am335x_evm_usbspl_defconfig | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configs/am335x_evm_usbspl_defconfig b/configs/am335x_evm_usbspl_defconfig
index e4bf757923..19f7c49951 100644
--- a/configs/am335x_evm_usbspl_defconfig
+++ b/configs/am335x_evm_usbspl_defconfig
@@ -6,7 +6,13 @@ CONFIG_AM33XX=y
 CONFIG_DISTRO_DEFAULTS=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd"
+CONFIG_CONSOLE_MUX=y
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
+# CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE is not set
+CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
+# CONFIG_SYS_STDIO_DEREGISTER is not set
+# CONFIG_FIT_EMBED is not set
 CONFIG_VERSION_VARIABLE=y
 CONFIG_ARCH_MISC_INIT=y
 CONFIG_SPL=y
@@ -50,3 +56,4 @@ CONFIG_USB_ETHER=y
 CONFIG_LZO=y
 CONFIG_OF_LIBFDT=y
 CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_NETCONSOLE=y
-- 
2.15.1

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

* [U-Boot] [PATCH 1/4] Add support for BeagleBoard.org PocketBeagle
  2018-03-07 10:40 ` [U-Boot] [PATCH 1/4] " Jason Kridner
@ 2018-03-07 14:27   ` Tom Rini
  2018-04-07  0:44   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2018-03-07 14:27 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 07, 2018 at 05:40:41AM -0500, Jason Kridner wrote:

> Texas Instruments AM3358 based low-cost board using Octavo Systems OSD3358 SIP
> with built-in TPS65217 PMIC and 512MB DDR3. Board features small 35mm x
> 55mm size, high-speed USB OTG, microSD and 72 0.1" expansion header
> pins with 2xSPI, 2xI2C, 2xUART, USB, 8xADC, up-to-44 GPIO, PRU pins and much more.
> 
> https://beagleboard.org/pocket
> 
> This was tested using the am335x_evm_usbspl_defconfig.
> 
> Note that MII pins are enabled despite not having Ethernet on this
> board. This avoids an issue where otherwise many timeout errors would be
> generated. See https://e2e.ti.com/support/arm/sitara_arm/f/791/t/298976
> for some related discussion.
> 
> Signed-off-by: Jason Kridner <jdk@ti.com>
> Cc: Tom Rini <trini@konsulko.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180307/7e909b3b/attachment.sig>

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

* [U-Boot] [PATCH 2/4] am335x_evm: scan more partitions and use uname_r
  2018-03-07 10:40 ` [U-Boot] [PATCH 2/4] am335x_evm: scan more partitions and use uname_r Jason Kridner
@ 2018-03-07 14:27   ` Tom Rini
  2018-03-10 16:34     ` Jason Kridner
  0 siblings, 1 reply; 15+ messages in thread
From: Tom Rini @ 2018-03-07 14:27 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 07, 2018 at 05:40:42AM -0500, Jason Kridner wrote:

> This enables mainline u-boot to boot the BeagleBoard.org Debian
> distribution builds without extensive environment modifications.
> 
> Some boot layouts only have a single partition on the
> MMC/eMMC. This will scan those partitions after the second
> partition that was already being scanned.
> 
> Some layouts use uname_r to define the kernel being used for the boot to
> support multiple kernels stored within the boot file system without
> using symlinks.
> 
> See http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 for
> more details on the BeagleBoard.org Debian image layout.
> 
> Signed-off-by: Jason Kridner <jdk@ti.com>
> Cc: Robert Nelson <robertcnelson@gmail.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  include/configs/am335x_evm.h |  5 ++++-
>  include/environment/ti/mmc.h | 13 +++++++++----
>  2 files changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
> index 8d45b6fade..32fe0e0cd5 100644
> --- a/include/configs/am335x_evm.h
> +++ b/include/configs/am335x_evm.h
> @@ -61,7 +61,10 @@
>  #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
>  	"bootcmd_" #devtypel #instance "=" \
>  	"setenv mmcdev " #instance"; "\
> -	"setenv bootpart " #instance":2 ; "\
> +	"setenv bootpart " #instance":2; "\
> +	"run mmcboot;"\
> +	"setenv mmcdev " #instance"; "\
> +	"setenv bootpart " #instance":1; "\
>  	"run mmcboot\0"
>  
>  #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
> diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h
> index 4305ebdaaf..b803ecccb7 100644
> --- a/include/environment/ti/mmc.h
> +++ b/include/environment/ti/mmc.h
> @@ -23,9 +23,10 @@
>  	"bootenvfile=uEnv.txt\0" \
>  	"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
>  		"env import -t ${loadaddr} ${filesize}\0" \
> -	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
> -	"loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
> -	"loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
> +	"loadbootenv=if fatload mmc ${mmcdev} ${loadaddr} ${bootdir}/${bootenvfile}; then echo Found ${bootdir}/${bootenvfile} in FAT partition; else load mmc ${mmcdev} ${loadaddr} ${bootdir}/${bootenvfile}; fi\0" \
> +	"loadimage=if test -n ${uname_r}; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/vmlinuz-${uname_r}; run loadrd; else load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}; fi\0" \
> +	"loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/initrd.img-${uname_r}; setenv rdsize ${filesize}\0" \
> +	"loadfdt=if test -n ${uname_r}; then load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtbs/${uname_r}/${fdtfile}; else load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}; fi;\0" \
>  	"envboot=mmc dev ${mmcdev}; " \
>  		"if mmc rescan; then " \
>  			"echo SD/MMC found on device ${mmcdev};" \
> @@ -45,7 +46,11 @@
>  	"mmcloados=run args_mmc; " \
>  		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
>  			"if run loadfdt; then " \
> -				"bootz ${loadaddr} - ${fdtaddr}; " \
> +				"if test -n ${uname_r}; then " \
> +					"bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \
> +				"else " \
> +					"bootz ${loadaddr} - ${fdtaddr}; " \
> +				"fi; " \
>  			"else " \
>  				"if test ${boot_fdt} = try; then " \
>  					"bootz; " \

Why does this all differ from the usual Debian case?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180307/2d2b47ed/attachment.sig>

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

* [U-Boot] [PATCH 3/4] Handle NETCONSOLE and SPL enabled
  2018-03-07 10:40 ` [U-Boot] [PATCH 3/4] Handle NETCONSOLE and SPL enabled Jason Kridner
@ 2018-03-07 14:27   ` Tom Rini
  2018-03-07 18:01   ` Joe Hershberger
  2018-04-07  0:44   ` [U-Boot] [U-Boot,3/4] " Tom Rini
  2 siblings, 0 replies; 15+ messages in thread
From: Tom Rini @ 2018-03-07 14:27 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 07, 2018 at 05:40:43AM -0500, Jason Kridner wrote:

> From: Jason Kridner <jkridner@beagleboard.org>
> 
> NETCONSOLE isn't compiled in with SPL, so the include file needs to recognize that.
> 
> Signed-off-by: Jason Kridner <jdk@ti.com>
> Cc: Joe Hershberger <joe.hershberger@ni.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180307/9d359771/attachment.sig>

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

* [U-Boot] [PATCH 4/4] am335x: am335x_evm_usbspl_defconfig: NETCONSOLE
  2018-03-07 10:40 ` [U-Boot] [PATCH 4/4] am335x: am335x_evm_usbspl_defconfig: NETCONSOLE Jason Kridner
@ 2018-03-07 14:27   ` Tom Rini
  2018-04-07  0:44   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2018-03-07 14:27 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 07, 2018 at 05:40:44AM -0500, Jason Kridner wrote:

> Enable NETCONSOLE by default. Still requires changes to the boot
> environment to enable on the platform.
> 
> Signed-of-by: Jason Kridner <jdk@ti.com>
> Cc: Tom Rini <trini@konsulko.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180307/0cf9b0f8/attachment.sig>

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

* [U-Boot] [PATCH 3/4] Handle NETCONSOLE and SPL enabled
  2018-03-07 10:40 ` [U-Boot] [PATCH 3/4] Handle NETCONSOLE and SPL enabled Jason Kridner
  2018-03-07 14:27   ` Tom Rini
@ 2018-03-07 18:01   ` Joe Hershberger
  2018-04-07  0:44   ` [U-Boot] [U-Boot,3/4] " Tom Rini
  2 siblings, 0 replies; 15+ messages in thread
From: Joe Hershberger @ 2018-03-07 18:01 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 7, 2018 at 4:40 AM, Jason Kridner <jkridner@gmail.com> wrote:
> From: Jason Kridner <jkridner@beagleboard.org>
>
> NETCONSOLE isn't compiled in with SPL, so the include file needs to recognize that.
>
> Signed-off-by: Jason Kridner <jdk@ti.com>
> Cc: Joe Hershberger <joe.hershberger@ni.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

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

* [U-Boot] [PATCH 2/4] am335x_evm: scan more partitions and use uname_r
  2018-03-07 14:27   ` Tom Rini
@ 2018-03-10 16:34     ` Jason Kridner
  2018-03-10 23:13       ` Vagrant Cascadian
  0 siblings, 1 reply; 15+ messages in thread
From: Jason Kridner @ 2018-03-10 16:34 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 7, 2018 at 9:27 AM Tom Rini <trini@konsulko.com> wrote:

> On Wed, Mar 07, 2018 at 05:40:42AM -0500, Jason Kridner wrote:
>
> > This enables mainline u-boot to boot the BeagleBoard.org Debian
> > distribution builds without extensive environment modifications.
> >
> > Some boot layouts only have a single partition on the
> > MMC/eMMC. This will scan those partitions after the second
> > partition that was already being scanned.
> >
> > Some layouts use uname_r to define the kernel being used for the boot to
> > support multiple kernels stored within the boot file system without
> > using symlinks.
> >
> > See http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 for
> > more details on the BeagleBoard.org Debian image layout.
> >
> > Signed-off-by: Jason Kridner <jdk@ti.com>
> > Cc: Robert Nelson <robertcnelson@gmail.com>
> > Cc: Tom Rini <trini@konsulko.com>
> > ---
> >  include/configs/am335x_evm.h |  5 ++++-
> >  include/environment/ti/mmc.h | 13 +++++++++----
> >  2 files changed, 13 insertions(+), 5 deletions(-)
> >
> > diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
> > index 8d45b6fade..32fe0e0cd5 100644
> > --- a/include/configs/am335x_evm.h
> > +++ b/include/configs/am335x_evm.h
> > @@ -61,7 +61,10 @@
> >  #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
> >       "bootcmd_" #devtypel #instance "=" \
> >       "setenv mmcdev " #instance"; "\
> > -     "setenv bootpart " #instance":2 ; "\
> > +     "setenv bootpart " #instance":2; "\
> > +     "run mmcboot;"\
> > +     "setenv mmcdev " #instance"; "\
> > +     "setenv bootpart " #instance":1; "\
> >       "run mmcboot\0"
> >
> >  #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
> > diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h
> > index 4305ebdaaf..b803ecccb7 100644
> > --- a/include/environment/ti/mmc.h
> > +++ b/include/environment/ti/mmc.h
> > @@ -23,9 +23,10 @@
> >       "bootenvfile=uEnv.txt\0" \
> >       "importbootenv=echo Importing environment from mmc${mmcdev} ...; "
> \
> >               "env import -t ${loadaddr} ${filesize}\0" \
> > -     "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
> > -     "loadimage=load ${devtype} ${bootpart} ${loadaddr}
> ${bootdir}/${bootfile}\0" \
> > -     "loadfdt=load ${devtype} ${bootpart} ${fdtaddr}
> ${bootdir}/${fdtfile}\0" \
> > +     "loadbootenv=if fatload mmc ${mmcdev} ${loadaddr}
> ${bootdir}/${bootenvfile}; then echo Found ${bootdir}/${bootenvfile} in FAT
> partition; else load mmc ${mmcdev} ${loadaddr} ${bootdir}/${bootenvfile};
> fi\0" \
> > +     "loadimage=if test -n ${uname_r}; then load ${devtype} ${bootpart}
> ${loadaddr} ${bootdir}/vmlinuz-${uname_r}; run loadrd; else load ${devtype}
> ${bootpart} ${loadaddr} ${bootdir}/${bootfile}; fi\0" \
> > +     "loadrd=load ${devtype} ${bootpart} ${rdaddr}
> ${bootdir}/initrd.img-${uname_r}; setenv rdsize ${filesize}\0" \
> > +     "loadfdt=if test -n ${uname_r}; then load ${devtype} ${bootpart}
> ${fdtaddr} ${bootdir}/dtbs/${uname_r}/${fdtfile}; else load ${devtype}
> ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}; fi;\0" \
> >       "envboot=mmc dev ${mmcdev}; " \
> >               "if mmc rescan; then " \
> >                       "echo SD/MMC found on device ${mmcdev};" \
> > @@ -45,7 +46,11 @@
> >       "mmcloados=run args_mmc; " \
> >               "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then
> " \
> >                       "if run loadfdt; then " \
> > -                             "bootz ${loadaddr} - ${fdtaddr}; " \
> > +                             "if test -n ${uname_r}; then " \
> > +                                     "bootz ${loadaddr}
> ${rdaddr}:${rdsize} ${fdtaddr}; " \
> > +                             "else " \
> > +                                     "bootz ${loadaddr} - ${fdtaddr}; "
> \
> > +                             "fi; " \
> >                       "else " \
> >                               "if test ${boot_fdt} = try; then " \
> >                                       "bootz; " \
>
> Why does this all differ from the usual Debian case?  Thanks!
>

I believe the distros typically use /boot/extlinux/extlinux.conf. We need
some way to specify a number of other environment variables we use
elsewhere in our u-boot scripts for applying device-tree overlays and such.
This patch doesn't comprehend that. It does at least get our images to boot
without applying any overlays in u-boot.

I believe Robert is preparing a subsequent series to add the application of
overlays.

Do you have something else in mind with regards to envboot's future?


>
> --
> Tom
>
-- 
https://beagleboard.org/about

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

* [U-Boot] [PATCH 2/4] am335x_evm: scan more partitions and use uname_r
  2018-03-10 16:34     ` Jason Kridner
@ 2018-03-10 23:13       ` Vagrant Cascadian
  0 siblings, 0 replies; 15+ messages in thread
From: Vagrant Cascadian @ 2018-03-10 23:13 UTC (permalink / raw)
  To: u-boot

On 2018-03-10, Jason Kridner wrote:
> On Wed, Mar 7, 2018 at 9:27 AM Tom Rini <trini@konsulko.com> wrote:
>> On Wed, Mar 07, 2018 at 05:40:42AM -0500, Jason Kridner wrote:
>> > This enables mainline u-boot to boot the BeagleBoard.org Debian
>> > distribution builds without extensive environment modifications.
>> >
>> > Some boot layouts only have a single partition on the
>> > MMC/eMMC. This will scan those partitions after the second
>> > partition that was already being scanned.
>> >
>> > Some layouts use uname_r to define the kernel being used for the boot to
>> > support multiple kernels stored within the boot file system without
>> > using symlinks.
>> >
>> > See http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 for
>> > more details on the BeagleBoard.org Debian image layout.
...
>> Why does this all differ from the usual Debian case?  Thanks!
>>
>
> I believe the distros typically use /boot/extlinux/extlinux.conf.

Debian typically uses a boot script, at least when installing from
debian-installer. There's a package called u-boot-menu which generates
the extlinux.conf file. There are some ideas floating around to try to
use u-boot's EFI emulation to boot grub-efi for platforms that don't
support EFI natively, as well.

But the majority of officially supported platforms in Debian still just
use boot scripts, for better or worse.


> We need some way to specify a number of other environment variables we
> use elsewhere in our u-boot scripts for applying device-tree overlays
> and such.

Could this functionality can't be implemented as a boot script, rather
than hard-coding it into the u-boot binary?

I know the official BeagleBoard.org images have been using a patched
u-boot for quite some time, and so there is something to be said for
pushing that upstream. Though there is a lot of duplication of
functionality supporting distro_bootcmd, legacy boot, and the patchsets
that BeagleBoard.org images use.


live well,
  vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180310/64616eae/attachment.sig>

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

* [U-Boot] [U-Boot, 1/4] Add support for BeagleBoard.org PocketBeagle
  2018-03-07 10:40 ` [U-Boot] [PATCH 1/4] " Jason Kridner
  2018-03-07 14:27   ` Tom Rini
@ 2018-04-07  0:44   ` Tom Rini
  1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2018-04-07  0:44 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 07, 2018 at 05:40:41AM -0500, Jason Kridner wrote:

> Texas Instruments AM3358 based low-cost board using Octavo Systems OSD3358 SIP
> with built-in TPS65217 PMIC and 512MB DDR3. Board features small 35mm x
> 55mm size, high-speed USB OTG, microSD and 72 0.1" expansion header
> pins with 2xSPI, 2xI2C, 2xUART, USB, 8xADC, up-to-44 GPIO, PRU pins and much more.
> 
> https://beagleboard.org/pocket
> 
> This was tested using the am335x_evm_usbspl_defconfig.
> 
> Note that MII pins are enabled despite not having Ethernet on this
> board. This avoids an issue where otherwise many timeout errors would be
> generated. See https://e2e.ti.com/support/arm/sitara_arm/f/791/t/298976
> for some related discussion.
> 
> Signed-off-by: Jason Kridner <jdk@ti.com>
> Cc: Tom Rini <trini@konsulko.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/a3a9c9c3/attachment.sig>

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

* [U-Boot] [U-Boot,3/4] Handle NETCONSOLE and SPL enabled
  2018-03-07 10:40 ` [U-Boot] [PATCH 3/4] Handle NETCONSOLE and SPL enabled Jason Kridner
  2018-03-07 14:27   ` Tom Rini
  2018-03-07 18:01   ` Joe Hershberger
@ 2018-04-07  0:44   ` Tom Rini
  2 siblings, 0 replies; 15+ messages in thread
From: Tom Rini @ 2018-04-07  0:44 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 07, 2018 at 05:40:43AM -0500, Jason Kridner wrote:

> From: Jason Kridner <jkridner@beagleboard.org>
> 
> NETCONSOLE isn't compiled in with SPL, so the include file needs to recognize that.
> 
> Signed-off-by: Jason Kridner <jdk@ti.com>
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/c71a3e8b/attachment.sig>

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

* [U-Boot] [U-Boot, 4/4] am335x: am335x_evm_usbspl_defconfig: NETCONSOLE
  2018-03-07 10:40 ` [U-Boot] [PATCH 4/4] am335x: am335x_evm_usbspl_defconfig: NETCONSOLE Jason Kridner
  2018-03-07 14:27   ` Tom Rini
@ 2018-04-07  0:44   ` Tom Rini
  1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2018-04-07  0:44 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 07, 2018 at 05:40:44AM -0500, Jason Kridner wrote:

> Enable NETCONSOLE by default. Still requires changes to the boot
> environment to enable on the platform.
> 
> Signed-of-by: Jason Kridner <jdk@ti.com>
> Cc: Tom Rini <trini@konsulko.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/c77aab0f/attachment.sig>

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

end of thread, other threads:[~2018-04-07  0:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07 10:40 [U-Boot] [PATCH 0/4] Add support for BeagleBoard.org PocketBeagle Jason Kridner
2018-03-07 10:40 ` [U-Boot] [PATCH 1/4] " Jason Kridner
2018-03-07 14:27   ` Tom Rini
2018-04-07  0:44   ` [U-Boot] [U-Boot, " Tom Rini
2018-03-07 10:40 ` [U-Boot] [PATCH 2/4] am335x_evm: scan more partitions and use uname_r Jason Kridner
2018-03-07 14:27   ` Tom Rini
2018-03-10 16:34     ` Jason Kridner
2018-03-10 23:13       ` Vagrant Cascadian
2018-03-07 10:40 ` [U-Boot] [PATCH 3/4] Handle NETCONSOLE and SPL enabled Jason Kridner
2018-03-07 14:27   ` Tom Rini
2018-03-07 18:01   ` Joe Hershberger
2018-04-07  0:44   ` [U-Boot] [U-Boot,3/4] " Tom Rini
2018-03-07 10:40 ` [U-Boot] [PATCH 4/4] am335x: am335x_evm_usbspl_defconfig: NETCONSOLE Jason Kridner
2018-03-07 14:27   ` Tom Rini
2018-04-07  0:44   ` [U-Boot] [U-Boot, " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.