diff options
Diffstat (limited to 'include/env/ti')
-rw-r--r-- | include/env/ti/dfu.h | 81 | ||||
-rw-r--r-- | include/env/ti/k3_dfu.env | 30 | ||||
-rw-r--r-- | include/env/ti/k3_dfu.h | 46 | ||||
-rw-r--r-- | include/env/ti/k3_rproc.env | 26 | ||||
-rw-r--r-- | include/env/ti/k3_rproc.h | 52 | ||||
-rw-r--r-- | include/env/ti/mmc.env | 76 | ||||
-rw-r--r-- | include/env/ti/mmc.h | 73 | ||||
-rw-r--r-- | include/env/ti/nand.env | 14 | ||||
-rw-r--r-- | include/env/ti/nand.h | 25 | ||||
-rw-r--r-- | include/env/ti/ti_armv7_common.env | 34 | ||||
-rw-r--r-- | include/env/ti/ti_armv7_keystone2.env | 61 | ||||
-rw-r--r-- | include/env/ti/ufs.env | 22 | ||||
-rw-r--r-- | include/env/ti/ufs.h | 33 |
13 files changed, 573 insertions, 0 deletions
diff --git a/include/env/ti/dfu.h b/include/env/ti/dfu.h new file mode 100644 index 0000000000..3c90570107 --- /dev/null +++ b/include/env/ti/dfu.h @@ -0,0 +1,81 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for DFU on TI boards. + */ + +#ifndef __TI_DFU_H +#define __TI_DFU_H + +#define DFU_ALT_INFO_MMC \ + "dfu_alt_info_mmc=" \ + "boot part 0 1;" \ + "rootfs part 0 2;" \ + "MLO fat 0 1;" \ + "MLO.raw raw 0x100 0x200;" \ + "u-boot.img.raw raw 0x300 0x1000;" \ + "u-env.raw raw 0x1300 0x200;" \ + "spl-os-args.raw raw 0x1500 0x200;" \ + "spl-os-image.raw raw 0x1700 0x6900;" \ + "spl-os-args fat 0 1;" \ + "spl-os-image fat 0 1;" \ + "u-boot.img fat 0 1;" \ + "uEnv.txt fat 0 1\0" + +#define DFU_ALT_INFO_EMMC \ + "dfu_alt_info_emmc=" \ + "rawemmc raw 0 3751936;" \ + "boot part 1 1;" \ + "rootfs part 1 2;" \ + "MLO fat 1 1;" \ + "MLO.raw raw 0x100 0x200;" \ + "u-boot.img.raw raw 0x300 0x1000;" \ + "u-env.raw raw 0x1300 0x200;" \ + "spl-os-args.raw raw 0x1500 0x200;" \ + "spl-os-image.raw raw 0x1700 0x6900;" \ + "spl-os-args fat 1 1;" \ + "spl-os-image fat 1 1;" \ + "u-boot.img fat 1 1;" \ + "uEnv.txt fat 1 1\0" + +#ifdef CONFIG_MTD_RAW_NAND +#define DFU_ALT_INFO_NAND \ + "dfu_alt_info_nand=" \ + "SPL part 0 1;" \ + "SPL.backup1 part 0 2;" \ + "SPL.backup2 part 0 3;" \ + "SPL.backup3 part 0 4;" \ + "u-boot part 0 5;" \ + "u-boot-spl-os part 0 6;" \ + "kernel part 0 8;" \ + "rootfs part 0 9\0" +#else +#define DFU_ALT_INFO_NAND "" +#endif + +#define DFU_ALT_INFO_RAM \ + "dfu_alt_info_ram=" \ + "kernel ram 0x80200000 0x4000000;" \ + "fdt ram 0x80f80000 0x80000;" \ + "ramdisk ram 0x81000000 0x4000000\0" + +#define DFU_ALT_INFO_QSPI_XIP \ + "dfu_alt_info_qspi=" \ + "u-boot.bin raw 0x0 0x080000;" \ + "u-boot.backup raw 0x080000 0x080000;" \ + "u-boot-spl-os raw 0x100000 0x010000;" \ + "u-boot-env raw 0x110000 0x010000;" \ + "u-boot-env.backup raw 0x120000 0x010000;" \ + "kernel raw 0x130000 0x800000\0" + +#define DFU_ALT_INFO_QSPI \ + "dfu_alt_info_qspi=" \ + "MLO raw 0x0 0x040000;" \ + "u-boot.img raw 0x040000 0x0100000;" \ + "u-boot-spl-os raw 0x140000 0x080000;" \ + "u-boot-env raw 0x1C0000 0x010000;" \ + "u-boot-env.backup raw 0x1D0000 0x010000;" \ + "kernel raw 0x1E0000 0x800000\0" + +#endif /* __TI_DFU_H */ diff --git a/include/env/ti/k3_dfu.env b/include/env/ti/k3_dfu.env new file mode 100644 index 0000000000..201529636c --- /dev/null +++ b/include/env/ti/k3_dfu.env @@ -0,0 +1,30 @@ +dfu_alt_info_mmc= + boot part 1 1; + rootfs part 1 2; + tiboot3.bin fat 1 1; + tispl.bin fat 1 1; + u-boot.img fat 1 1; + uEnv.txt fat 1 1; + sysfw.itb fat 1 1 + +dfu_alt_info_emmc= + rawemmc raw 0 0x800000 mmcpart 1; + rootfs part 0 1 mmcpart 0; + tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; + tispl.bin.raw raw 0x400 0x1000 mmcpart 1; + u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; + u-env.raw raw 0x3400 0x100 mmcpart 1; + sysfw.itb.raw raw 0x3600 0x800 mmcpart 1 + +dfu_alt_info_ospi= + tiboot3.bin raw 0x0 0x080000; + tispl.bin raw 0x080000 0x200000; + u-boot.img raw 0x280000 0x400000; + u-boot-env raw 0x680000 0x020000; + sysfw.itb raw 0x6c0000 0x100000; + rootfs raw 0x800000 0x3800000 + +dfu_alt_info_ram= + tispl.bin ram 0x80080000 0x200000; + u-boot.img ram 0x81000000 0x400000 + diff --git a/include/env/ti/k3_dfu.h b/include/env/ti/k3_dfu.h new file mode 100644 index 0000000000..a16a3adeca --- /dev/null +++ b/include/env/ti/k3_dfu.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for DFU on TI K3 SoCs. + * + */ + +#ifndef __TI_DFU_H +#define __TI_DFU_H + +#define DFU_ALT_INFO_MMC \ + "dfu_alt_info_mmc=" \ + "boot part 1 1;" \ + "rootfs part 1 2;" \ + "tiboot3.bin fat 1 1;" \ + "tispl.bin fat 1 1;" \ + "u-boot.img fat 1 1;" \ + "uEnv.txt fat 1 1;" \ + "sysfw.itb fat 1 1\0" + +#define DFU_ALT_INFO_EMMC \ + "dfu_alt_info_emmc=" \ + "rawemmc raw 0 0x800000 mmcpart 1;" \ + "rootfs part 0 1 mmcpart 0;" \ + "tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;" \ + "tispl.bin.raw raw 0x400 0x1000 mmcpart 1;" \ + "u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;" \ + "u-env.raw raw 0x3400 0x100 mmcpart 1;" \ + "sysfw.itb.raw raw 0x3600 0x800 mmcpart 1\0" + +#define DFU_ALT_INFO_OSPI \ + "dfu_alt_info_ospi=" \ + "tiboot3.bin raw 0x0 0x080000;" \ + "tispl.bin raw 0x080000 0x200000;" \ + "u-boot.img raw 0x280000 0x400000;" \ + "u-boot-env raw 0x680000 0x020000;" \ + "sysfw.itb raw 0x6c0000 0x100000;" \ + "rootfs raw 0x800000 0x3800000\0" + +#define DFU_ALT_INFO_RAM \ + "dfu_alt_info_ram=" \ + "tispl.bin ram 0x80080000 0x200000;" \ + "u-boot.img ram 0x81000000 0x400000\0" \ + +#endif /* __TI_DFU_H */ diff --git a/include/env/ti/k3_rproc.env b/include/env/ti/k3_rproc.env new file mode 100644 index 0000000000..87d9d76eba --- /dev/null +++ b/include/env/ti/k3_rproc.env @@ -0,0 +1,26 @@ +dorprocboot=0 +boot_rprocs= + if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then + rproc init; + run boot_rprocs_mmc; + fi; +rproc_load_and_boot_one= + if load mmc ${bootpart} $loadaddr ${rproc_fw}; then + if rproc load ${rproc_id} ${loadaddr} ${filesize}; then + rproc start ${rproc_id}; + fi; + fi +boot_rprocs_mmc= + env set rproc_id; + env set rproc_fw; + for i in ${rproc_fw_binaries} ; do + if test -z "${rproc_id}" ; then + env set rproc_id $i; + else + env set rproc_fw $i; + run rproc_load_and_boot_one; + env set rproc_id; + env set rproc_fw; + fi; + done + diff --git a/include/env/ti/k3_rproc.h b/include/env/ti/k3_rproc.h new file mode 100644 index 0000000000..3418cb42be --- /dev/null +++ b/include/env/ti/k3_rproc.h @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * rproc environment variable definitions for various TI K3 SoCs. + */ + +#ifndef __TI_RPROC_H +#define __TI_RPROC_H + +/* + * should contain a list of <rproc_id fw_name> tuplies, + * override in board config files with the actual list + */ +#define DEFAULT_RPROCS "" + +#ifdef CONFIG_CMD_REMOTEPROC +#define EXTRA_ENV_RPROC_SETTINGS \ + "dorprocboot=0\0" \ + "boot_rprocs=" \ + "if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then "\ + "rproc init;" \ + "run boot_rprocs_mmc;" \ + "fi;\0" \ + "rproc_load_and_boot_one=" \ + "if load mmc ${bootpart} $loadaddr ${rproc_fw}; then " \ + "if rproc load ${rproc_id} ${loadaddr} ${filesize}; then "\ + "rproc start ${rproc_id};" \ + "fi;" \ + "fi\0" \ + "boot_rprocs_mmc=" \ + "env set rproc_id;" \ + "env set rproc_fw;" \ + "for i in ${rproc_fw_binaries} ; do " \ + "if test -z \"${rproc_id}\" ; then " \ + "env set rproc_id $i;" \ + "else " \ + "env set rproc_fw $i;" \ + "run rproc_load_and_boot_one;" \ + "env set rproc_id;" \ + "env set rproc_fw;" \ + "fi;" \ + "done\0" \ + "rproc_fw_binaries=" \ + DEFAULT_RPROCS \ + "\0" +#else +#define EXTRA_ENV_RPROC_SETTINGS \ + "boot_rprocs= \0" +#endif /* CONFIG_CMD_REMOTEPROC */ + +#endif /* __TI_RPROC_H */ diff --git a/include/env/ti/mmc.env b/include/env/ti/mmc.env new file mode 100644 index 0000000000..6fb47fb266 --- /dev/null +++ b/include/env/ti/mmc.env @@ -0,0 +1,76 @@ +mmcdev=0 +mmcrootfstype=ext4 rootwait +finduuid=part uuid ${boot} ${bootpart} uuid +args_mmc=run finduuid;setenv bootargs console=${console} + ${optargs} + root=PARTUUID=${uuid} rw + rootfstype=${mmcrootfstype} +loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr +bootscript=echo Running bootscript from mmc${mmcdev} ...; + source ${loadaddr} +bootenvfile=uEnv.txt +importbootenv=echo Importing environment from mmc${mmcdev} ...; + env import -t ${loadaddr} ${filesize} +loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} +loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} +loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile} +get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt} +envboot=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 env from ${bootenvfile}; + run importbootenv; + fi; + if test -n $uenvcmd; then + echo Running uenvcmd ...; + run uenvcmd; + fi; + fi; + fi; +mmcloados= + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then + if run get_fdt_mmc; then + bootz ${loadaddr} - ${fdtaddr}; + else + if test ${boot_fdt} = try; then + bootz; + else + echo WARN: Cannot load the DT; + fi; + fi; + else + bootz; + fi; +mmcboot=mmc dev ${mmcdev}; + devnum=${mmcdev}; + devtype=mmc; + if mmc rescan; then + echo SD/MMC found on device ${mmcdev}; + if run loadimage; then + run args_mmc; + if test ${boot_fit} -eq 1; then + run run_fit; + else + run mmcloados; + fi; + fi; +fi; + +init_mmc=run args_all args_mmc +get_overlay_mmc= + fdt address ${fdtaddr}; + fdt resize 0x100000; + for overlay in $name_overlays; + do; + load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/${overlay} && + fdt apply ${dtboaddr}; + done; +get_kern_mmc=load mmc ${bootpart} ${loadaddr} + ${bootdir}/${name_kern} +get_fit_mmc=load mmc ${bootpart} ${addr_fit} + ${bootdir}/${name_fit} +partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs} diff --git a/include/env/ti/mmc.h b/include/env/ti/mmc.h new file mode 100644 index 0000000000..769ea9d5ef --- /dev/null +++ b/include/env/ti/mmc.h @@ -0,0 +1,73 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for MMC/SD on TI boards. + */ + +#ifndef __TI_MMC_H +#define __TI_MMC_H + +#define DEFAULT_MMC_TI_ARGS \ + "mmcdev=0\0" \ + "mmcrootfstype=ext4 rootwait\0" \ + "finduuid=part uuid ${boot} ${bootpart} uuid\0" \ + "args_mmc=run finduuid;setenv bootargs console=${console} " \ + "${optargs} " \ + "root=PARTUUID=${uuid} rw " \ + "rootfstype=${mmcrootfstype}\0" \ + "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ + "source ${loadaddr}\0" \ + "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" \ + "envboot=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 env from ${bootenvfile};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "fi;" \ + "fi;\0" \ + "mmcloados=" \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ + "if run loadfdt; then " \ + "bootz ${loadaddr} - ${fdtaddr}; " \ + "else " \ + "if test ${boot_fdt} = try; then " \ + "bootz; " \ + "else " \ + "echo WARN: Cannot load the DT; " \ + "fi; " \ + "fi; " \ + "else " \ + "bootz; " \ + "fi;\0" \ + "mmcboot=mmc dev ${mmcdev}; " \ + "devnum=${mmcdev}; " \ + "devtype=mmc; " \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadimage; then " \ + "run args_mmc; " \ + "if test ${boot_fit} -eq 1; then " \ + "run run_fit; " \ + "else " \ + "run mmcloados;" \ + "fi;" \ + "fi;" \ + "fi;\0" + +#endif /* __TI_MMC_H */ diff --git a/include/env/ti/nand.env b/include/env/ti/nand.env new file mode 100644 index 0000000000..4e185c1b5f --- /dev/null +++ b/include/env/ti/nand.env @@ -0,0 +1,14 @@ +mtdids=nor0=47040000.spi.0,nor0=47034000.hyperbus +mtdparts=mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),-@8m(hbmc.rootfs) +nandargs=setenv bootargs console=${console} + ${optargs} + root=${nandroot} + rootfstype=${nandrootfstype} +nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 +nandrootfstype=ubifs rootwait +nandboot=echo Booting from nand ...; + run nandargs; + nand read ${fdtaddr} NAND.u-boot-spl-os; + nand read ${loadaddr} NAND.kernel; + bootz ${loadaddr} - ${fdtaddr} + diff --git a/include/env/ti/nand.h b/include/env/ti/nand.h new file mode 100644 index 0000000000..7d00afa2b1 --- /dev/null +++ b/include/env/ti/nand.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for NAND on TI boards. + */ + +#ifdef CONFIG_MTD_RAW_NAND +#define NANDARGS \ + "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ + "nandargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "root=${nandroot} " \ + "rootfstype=${nandrootfstype}\0" \ + "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \ + "nandrootfstype=ubifs rootwait\0" \ + "nandboot=echo Booting from nand ...; " \ + "run nandargs; " \ + "nand read ${fdtaddr} NAND.u-boot-spl-os; " \ + "nand read ${loadaddr} NAND.kernel; " \ + "bootz ${loadaddr} - ${fdtaddr}\0" +#else +#define NANDARGS "" +#endif diff --git a/include/env/ti/ti_armv7_common.env b/include/env/ti/ti_armv7_common.env new file mode 100644 index 0000000000..e87a41a659 --- /dev/null +++ b/include/env/ti/ti_armv7_common.env @@ -0,0 +1,34 @@ +loadaddr=0x82000000 +kernel_addr_r=0x82000000 +fdtaddr=0x88000000 +dtboaddr=0x89000000 +fdt_addr_r=0x88000000 +fdtoverlay_addr_r=0x89000000 +rdaddr=0x88080000 +ramdisk_addr_r=0x88080000 +scriptaddr=0x80000000 +pxefile_addr_r=0x80100000 +bootm_size=0x10000000 +boot_fdt=try + +boot_fit=0 +addr_fit=0x90000000 +name_fit=fitImage +update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit} +get_overlaystring= + for overlay in $name_overlays; + do; + setenv overlaystring ${overlaystring}'#'${overlay}; + done; +get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile} +run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring} +bootcmd_ti_mmc= + run findfdt; run init_${boot}; +#if CONFIG_CMD_REMOTEPROC + run main_cpsw0_qsgmii_phyinit; run boot_rprocs; +#endif + if test ${boot_fit} -eq 1; + then run get_fit_${boot}; run get_overlaystring; run run_fit; + else; + run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; + fi; diff --git a/include/env/ti/ti_armv7_keystone2.env b/include/env/ti/ti_armv7_keystone2.env new file mode 100644 index 0000000000..e0395d302c --- /dev/null +++ b/include/env/ti/ti_armv7_keystone2.env @@ -0,0 +1,61 @@ +name_fw_rd=k2-fw-initrd.cpio.gz +set_rd_spec=setenv rd_spec ${rdaddr}:${filesize} +init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; run set_rd_spec +init_fw_rd_nfs=nfs ${rdaddr} ${nfs_root}/boot/${name_fw_rd}; run set_rd_spec +init_fw_rd_ramfs=setenv rd_spec - +init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; run set_rd_spec + +dfu_bufsiz=0x10000 +dfu_alt_info_mmc= + MLO fat 0 1; + u-boot.img fat 0 1; + uEnv.txt fat 0 1 + +bootdir=/boot +tftp_root=/ +nfs_root=/export +mem_lpae=1 +uinitrd_fixup=1 +addr_ubi=0x82000000 +addr_secdb_key=0xc000000 +name_kern=zImage +addr_mon=0x87000000 +addr_non_sec_mon=0x0c097fc0 +addr_load_sec_bm=0x0c09c000 +run_mon=mon_install ${addr_mon} +run_mon_hs=mon_install ${addr_non_sec_mon} ${addr_load_sec_bm} +run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr} +init_net=run args_all args_net +init_nfs=setenv autoload no; dhcp; run args_all args_net +init_ubi=run args_all args_ubi; ubi part ubifs; ubifsmount ubi:rootfs; +get_fdt_net=dhcp ${fdtaddr} ${tftp_root}/${name_fdt} +get_fdt_nfs=nfs ${fdtaddr} ${nfs_root}/boot/${name_fdt} +get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt} +get_kern_net=dhcp ${loadaddr} ${tftp_root}/${name_kern} +get_kern_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_kern} +get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern} +get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon} +get_mon_nfs=nfs ${addr_mon} ${nfs_root}/boot/${name_mon} +get_mon_ubi=ubifsload ${addr_mon} ${bootdir}/${name_mon} +get_fit_net=dhcp ${addr_fit} ${tftp_root}/${name_fit} +get_fit_nfs=nfs ${addr_fit} ${nfs_root}/boot/${name_fit} +get_fit_ubi=ubifsload ${addr_fit} ${bootdir}/${name_fit} +get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit} +get_uboot_net=dhcp ${loadaddr} ${tftp_root}/${name_uboot} +get_uboot_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_uboot} +burn_uboot_spi=sf probe; sf erase 0 0x100000; sf write ${loadaddr} 0 ${filesize} +burn_uboot_nand=nand erase 0 0x100000; nand write ${loadaddr} 0 ${filesize} +args_all=setenv bootargs console=ttyS0,115200n8 rootwait +args_net=setenv bootargs ${bootargs} rootfstype=nfs root=/dev/nfs rw nfsroot=${serverip}:${nfs_root},${nfs_options} ip=dhcp +nfs_options=v3,tcp,rsize=4096,wsize=4096 +get_fdt_ramfs=dhcp ${fdtaddr} ${tftp_root}/${name_fdt} +get_kern_ramfs=dhcp ${loadaddr} ${tftp_root}/${name_kern} +get_mon_ramfs=dhcp ${addr_mon} ${tftp_root}/${name_mon} +get_fit_ramfs=dhcp ${addr_fit} ${tftp_root}/${name_fit} +get_fs_ramfs=dhcp ${rdaddr} ${tftp_root}/${name_fs} +get_ubi_net=dhcp ${addr_ubi} ${tftp_root}/${name_ubi} +get_ubi_nfs=nfs ${addr_ubi} ${nfs_root}/boot/${name_ubi} +burn_ubi=nand erase.part ubifs; nand write ${addr_ubi} ubifs ${filesize} +init_ramfs=run args_all args_ramfs get_fs_ramfs +args_ramfs=setenv bootargs ${bootargs} rdinit=/sbin/init rw root=/dev/ram0 initrd=0x808080000,80M +no_post=1 diff --git a/include/env/ti/ufs.env b/include/env/ti/ufs.env new file mode 100644 index 0000000000..509a87b89e --- /dev/null +++ b/include/env/ti/ufs.env @@ -0,0 +1,22 @@ +scsirootfstype=ext4 rootwait +ufs_finduuid=part uuid scsi ${bootpart} uuid +args_ufs=setenv devtype scsi;setenv bootpart 1:1; + run ufs_finduuid; + setenv bootargs console = ${console} + ${optargs} + root=PARTUUID=${uuid} rw + rootfstype=${scsirootfstype}; + setenv devtype scsi; + setenv bootpart 1:1 +init_ufs=ufs init; scsi scan; run args_ufs +get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern} +get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} +get_overlay_ufs= + fdt address ${fdtaddr}; + fdt resize 0x100000; + for overlay in $name_overlays; + do; + load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && + fdt apply ${dtboaddr}; + done; + diff --git a/include/env/ti/ufs.h b/include/env/ti/ufs.h new file mode 100644 index 0000000000..6619ec9c88 --- /dev/null +++ b/include/env/ti/ufs.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for UFS on TI boards. + */ + +#ifndef __TI_UFS_H +#define __TI_UFS_H + +#define DEFAULT_UFS_TI_ARGS \ + "scsirootfstype=ext4 rootwait\0" \ + "ufs_finduuid=part uuid scsi ${bootpart} uuid\0" \ + "args_ufs=setenv devtype scsi;setenv bootpart 1:1;" \ + "run ufs_finduuid;setenv bootargs console = ${console} " \ + "${optargs}" \ + "root=PARTUUID=${uuid} rw " \ + "rootfstype=${scsirootfstype};" \ + "setenv devtype scsi;" \ + "setenv bootpart 1:1\0" \ + "init_ufs=ufs init; scsi scan; run args_ufs\0" \ + "get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern}\0" \ + "get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "get_overlay_ufs=" \ + "fdt address ${fdtaddr};" \ + "fdt resize 0x100000;" \ + "for overlay in $name_overlays;" \ + "do;" \ + "load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \ + "fdt apply ${dtboaddr};" \ + "done;\0" + +#endif |