Re: [U-Boot] [PATCH] arm: ls1021atwr: Add distro boot support

2017-08-07 Thread York Sun
On 05/26/2017 01:01 AM, Alison Wang wrote:
> This patch includes common config_distro_defaults.h and
> config_distro_bootcmd.h for u-boot enviroments to support distro boot
> which automatically scan boot.scr from storage devices(e.g.
> SD/USB/SATA/SCSI disk) and execute autoboot script on LS1021ATWR board.
> 
> Signed-off-by: Shengzhou Liu 
> Signed-off-by: Alison Wang 
> ---

Applied to fsl-qoriq master. Thanks.

York

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] arm: ls1021atwr: Add distro boot support

2017-06-14 Thread York Sun

> On Jun 14, 2017, at 18:08, Alison Wang  wrote:
> 
> Hi, York,
> 
>>> On 05/26/2017 01:01 AM, Alison Wang wrote:
>>> This patch includes common config_distro_defaults.h and
>>> config_distro_bootcmd.h for u-boot enviroments to support distro boot
>>> which automatically scan boot.scr from storage devices(e.g.
>>> SD/USB/SATA/SCSI disk) and execute autoboot script on LS1021ATWR
>> board.
>>> 
>>> Signed-off-by: Shengzhou Liu 
>>> Signed-off-by: Alison Wang 
>>> ---
>> 
>> Wouldn't it be helpful to document the steps for distro boot in board
>> README file?
>> 
> [Alison Wang] As doc/README.distro gives enough descriptions, I think board 
> README file couldn't give more.

OK. Let me check if there is something new since last time I tried.


York
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] arm: ls1021atwr: Add distro boot support

2017-06-14 Thread Alison Wang
Hi, York,

> On 05/26/2017 01:01 AM, Alison Wang wrote:
> > This patch includes common config_distro_defaults.h and
> > config_distro_bootcmd.h for u-boot enviroments to support distro boot
> > which automatically scan boot.scr from storage devices(e.g.
> > SD/USB/SATA/SCSI disk) and execute autoboot script on LS1021ATWR
> board.
> >
> > Signed-off-by: Shengzhou Liu 
> > Signed-off-by: Alison Wang 
> > ---
> 
> Wouldn't it be helpful to document the steps for distro boot in board
> README file?
> 
[Alison Wang] As doc/README.distro gives enough descriptions, I think board 
README file couldn't give more.

Thanks.

Best Regards,
Alison Wang
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] arm: ls1021atwr: Add distro boot support

2017-06-13 Thread York Sun
On 05/26/2017 01:01 AM, Alison Wang wrote:
> This patch includes common config_distro_defaults.h and
> config_distro_bootcmd.h for u-boot enviroments to support distro boot
> which automatically scan boot.scr from storage devices(e.g.
> SD/USB/SATA/SCSI disk) and execute autoboot script on LS1021ATWR board.
> 
> Signed-off-by: Shengzhou Liu 
> Signed-off-by: Alison Wang 
> ---

Wouldn't it be helpful to document the steps for distro boot in board 
README file?

York
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] arm: ls1021atwr: Add distro boot support

2017-05-26 Thread Alison Wang
This patch includes common config_distro_defaults.h and
config_distro_bootcmd.h for u-boot enviroments to support distro boot
which automatically scan boot.scr from storage devices(e.g.
SD/USB/SATA/SCSI disk) and execute autoboot script on LS1021ATWR board.

Signed-off-by: Shengzhou Liu 
Signed-off-by: Alison Wang 
---
 configs/ls1021atwr_nor_defconfig |  1 +
 configs/ls1021atwr_sdcard_ifc_defconfig  |  1 +
 configs/ls1021atwr_sdcard_qspi_defconfig |  1 +
 include/configs/ls1021atwr.h | 81 ++--
 4 files changed, 81 insertions(+), 3 deletions(-)

diff --git a/configs/ls1021atwr_nor_defconfig b/configs/ls1021atwr_nor_defconfig
index c56533a..dcacdac 100644
--- a/configs/ls1021atwr_nor_defconfig
+++ b/configs/ls1021atwr_nor_defconfig
@@ -44,3 +44,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
 CONFIG_VIDEO_FSL_DCU_FB=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/ls1021atwr_sdcard_ifc_defconfig 
b/configs/ls1021atwr_sdcard_ifc_defconfig
index 9809c60..616bec6 100644
--- a/configs/ls1021atwr_sdcard_ifc_defconfig
+++ b/configs/ls1021atwr_sdcard_ifc_defconfig
@@ -56,3 +56,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
 CONFIG_VIDEO_FSL_DCU_FB=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/ls1021atwr_sdcard_qspi_defconfig 
b/configs/ls1021atwr_sdcard_qspi_defconfig
index 5ccfc96..293e735 100644
--- a/configs/ls1021atwr_sdcard_qspi_defconfig
+++ b/configs/ls1021atwr_sdcard_qspi_defconfig
@@ -63,3 +63,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
 CONFIG_VIDEO_FSL_DCU_FB=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_DISTRO_DEFAULTS=y
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 60c3d5d..74ee74d 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -354,7 +354,6 @@
 #endif
 
 #define CONFIG_CMDLINE_TAG
-#define CONFIG_CMDLINE_EDITING
 
 #define CONFIG_PEN_ADDR_BIG_ENDIAN
 #define CONFIG_LAYERSCAPE_NS_ACCESS
@@ -366,19 +365,95 @@
 
 #define CONFIG_FSL_DEVICE_DISABLE
 
+#include 
+#define BOOT_TARGET_DEVICES(func) \
+   func(MMC, mmc, 0) \
+   func(USB, usb, 0)
+#include 
 
 #ifdef CONFIG_LPUART
 #define CONFIG_EXTRA_ENV_SETTINGS   \
"bootargs=root=/dev/ram0 rw console=ttyLP0,115200\0" \
"initrd_high=0x\0"  \
-   "fdt_high=0x\0"
+   "fdt_high=0x\0" \
+   "fdt_addr=0x64f0\0" \
+   "kernel_addr=0x6500\0"  \
+   "scriptaddr=0x8000\0"   \
+   "fdtheader_addr_r=0x8010\0" \
+   "kernelheader_addr_r=0x8020\0"  \
+   "kernel_addr_r=0x8100\0"\
+   "fdt_addr_r=0x9000\0"   \
+   "ramdisk_addr_r=0xa000\0"   \
+   "load_addr=0xa000\0"\
+   "kernel_size=0x280\0"   \
+   BOOTENV \
+   "boot_scripts=ls1021atwr_boot.scr\0"\
+   "scan_dev_for_boot_part="   \
+   "part list ${devtype} ${devnum} devplist; " \
+   "env exists devplist || setenv devplist 1; "\
+   "for distro_bootpart in ${devplist}; do "   \
+   "if fstype ${devtype} " \
+   "${devnum}:${distro_bootpart} " \
+   "bootfstype; then " \
+   "run scan_dev_for_boot; "   \
+   "fi; "  \
+   "done\0"\
+   "installer=load mmc 0:2 $load_addr "\
+   "/flex_installer_arm32.itb; "   \
+   "bootm $load_addr#ls1021atwr\0" \
+   "qspi_bootcmd=echo Trying load from qspi..;"\
+   "sf probe && sf read $load_addr "   \
+   "$kernel_addr $kernel_size && bootm $load_addr#$board\0"
\
+   "nor_bootcmd=echo Trying load from nor..;"  \
+   "cp.b $kernel_addr $load_addr " \
+   "$kernel_size && bootm $load_addr#$board\0"
 #else
 #define CONFIG_EXTRA_ENV_SETTINGS  \
"bootargs=root=/dev/ram0 rw console=ttyS0,115200\0" \
"initrd_high=0x\0"  \
-   "fdt_high=0x\0"
+   "fdt_high=0x\0" \
+   "fdt_addr=0x64f0\0" \
+   "kernel_addr=0x6500\0"  \
+   "scriptaddr=0x8000\0"   \
+   "fdtheader_addr_r=0x8010\0" \
+   "kernelheader_addr_r=0x8020\0"  \
+   "kernel_addr_r=0x8100\0"\
+   "fdt_addr_r=0x9000\0"   \
+   "ramdisk_addr_r=0xa000\0"   \
+   "load_addr=0xa000\0"\
+   "kernel_size=0x280\0"   \
+   BOOTENV \
+   "boot_scripts=ls1021atwr_boot.scr\0"\
+