configs: pcm051: Support distro bootcmds
PATCH 1/4 configs: pcm051: Support distro bootcmds
Add support for distro bootcmds.
--- include/configs/pcm051.h | 49 ++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-)
include/configs/pcm051.h +29 -20
@@ -25,6 +25,34 @@#define CONFIG_MACH_TYPE MACH_TYPE_PCM051/* set to negative value for no autoboot */ +#define BOOTENV_DEV_LEGACY_MMC (devtypeu, devtypel, instance) \ + "bootcmd_" #devtypel #instance "=" \ + "setenv mmcdev " #instance"; "\ + "setenv bootpart " #instance":2 ; "\ + "run mmcboot\0" + +#define BOOTENV_DEV_NAME_LEGACY_MMC (devtypeu, devtypel, instance) \ + #devtypel #instance " " + +#define BOOTENV_DEV_NAND (devtypeu, devtypel, instance) \ + "bootcmd_" #devtypel "=" \ + "run nandboot\0" + +#define BOOTENV_DEV_NAME_NAND (devtypeu, devtypel, instance) \ + #devtypel #instance " " + +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(LEGACY_MMC, legacy_mmc, 0) \ + func(MMC, mmc, 1) \ + func(LEGACY_MMC, legacy_mmc, 1) \ + func(NAND, nand, 0) + +#define CONFIG_BOOTCOMMAND \ + "run distro_bootcmd" + +#include <config_distro_bootcmd.h> +#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80007fc0\0" \ "fdtaddr=0x80000000\0" \
@@ -62,26 +90,7 @@"ramboot=echo Booting from ramdisk ...; " \"run ramargs; " \"bootm ${loadaddr}\0" \ - -#define CONFIG_BOOTCOMMAND \ - "mmc dev ${mmcdev}; if mmc rescan; then " \ - "echo SD/MMC found on device ${mmcdev};" \ - "if run loadbootscript; then " \ - "run bootscript;" \ - "else " \ - "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ - "run importbootenv;" \ - "fi;" \ - "if test -n $uenvcmd; then " \ - "echo Running uenvcmd ...;" \ - "run uenvcmd;" \ - "fi;" \ - "if run loaduimage; then " \ - "run mmcboot;" \ - "fi;" \ - "fi ;" \ - "fi;" \ +BOOTENV /* Clock Defines */#define V_OSCK 25000000/* Clock output from T2 */
Signature · 1 line
2.13.6
PATCH 2/4 configs: pcm051: Use DEFAULT_MMC_TI_ARGS instead of hardcoded duplicates
--- include/configs/pcm051.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
include/configs/pcm051.h +5 -8
@@ -53,7 +53,11 @@#include <config_distro_bootcmd.h> +#include <environment/ti/dfu.h> +#include <environment/ti/mmc.h> +#define CONFIG_EXTRA_ENV_SETTINGS \ + DEFAULT_MMC_TI_ARGS \ "loadaddr=0x80007fc0\0" \ "fdtaddr=0x80000000\0" \ "rdaddr=0x81000000\0" \
@@ -61,15 +65,8 @@"fdtfile=pcm051.dtb\0" \"console=ttyO0,115200n8\0" \"optargs=\0" \ -"mmcdev=0\0" \ -"mmcroot=/dev/mmcblk0p2 ro\0" \ -"mmcrootfstype=ext4 rootwait\0" \"ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \"ramrootfstype=ext2\0" \ -"mmcargs=setenv bootargs console=${console} " \ -"${optargs} " \ -"root=${mmcroot} " \ -"rootfstype=${mmcrootfstype}\0" \"bootenv=uEnv.txt\0" \"loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
@@ -85,7 +82,7 @@"loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \"loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \"mmcboot=echo Booting from mmc ...; " \ -"run mmcargs; " \ +"run args_mmc; " \"bootm ${loadaddr}\0" \"ramboot=echo Booting from ramdisk ...; " \"run ramargs; " \
Signature · 1 line
2.13.6
PATCH 2/4 configs: pcm051: Use DEFAULT_MMC_TI_ARGS instead of hardcoded duplicates
Quoted 1 line · Matwey V. Kornilov
Signed-off-by Matwey V. Kornilov <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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/20180613/187aa7dc/attachment.sig>
PATCH 3/4 configs: pcm051: Use DEFAULT_LINUX_BOOT_ENV instead of hardcoded values
In reply to Matwey V. KornilovIt appears that DEFAULT_LINUX_BOOT_ENV can be used to boot pcm051 board.
--- include/configs/pcm051.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
include/configs/pcm051.h +1 -3
@@ -57,10 +57,8 @@#include <environment/ti/mmc.h> #define CONFIG_EXTRA_ENV_SETTINGS \ + DEFAULT_LINUX_BOOT_ENV \ DEFAULT_MMC_TI_ARGS \ - "loadaddr=0x80007fc0\0" \ - "fdtaddr=0x80000000\0" \ - "rdaddr=0x81000000\0" \ "bootfile=uImage\0" \ "fdtfile=pcm051.dtb\0" \ "console=ttyO0,115200n8\0" \
Signature · 1 line
2.13.6
PATCH 3/4 configs: pcm051: Use DEFAULT_LINUX_BOOT_ENV instead of hardcoded values
Quoted 3 lines · Matwey V. Kornilov
It appears that
DEFAULT_LINUX_BOOT_ENVcan be used to boot pcm051 board.Signed-off-by Matwey V. Kornilov <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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/20180613/02c0b900/attachment.sig>
PATCH 4/4 configs: pcm051: Use am335x-wega-rdk.dtb as fdtfile
In reply to Matwey V. KornilovIn upstream Linux kernel, the fdtfile
for this specific board is called am335x-wega-rdk.dtb
--- include/configs/pcm051.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/pcm051.h +1 -1
@@ -60,7 +60,7 @@DEFAULT_LINUX_BOOT_ENV \ DEFAULT_MMC_TI_ARGS \"bootfile=uImage\0" \ -"fdtfile=pcm051.dtb\0" \ +"fdtfile=am335x-wega-rdk.dtb\0" \"console=ttyO0,115200n8\0" \"optargs=\0" \"ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
Signature · 1 line
2.13.6
PATCH 4/4 configs: pcm051: Use am335x-wega-rdk.dtb as fdtfile
Quoted 4 lines · Matwey V. Kornilov
In upstream Linux kernel, the fdtfile
for this specific board is called am335x-wega-rdk.dtbSigned-off-by Matwey V. Kornilov <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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/20180613/3c1f77b0/attachment.sig>
PATCH 1/4 configs: pcm051: Support distro bootcmds
In reply to Matwey V. KornilovQuoted 3 lines · Matwey V. Kornilov
Add support for distro bootcmds.
Signed-off-by Matwey V. Kornilov <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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/20180613/2ca20dae/attachment.sig>