phycore_imx8mm: Switch to using env text files
PATCH v3 1/3 phycore_imx8mm: Switch to using env text files
Move the environment into the board directory and convert header to a txt file. In addition, this patch also applies following changes:
- Change default nfsroot path to /srv/nfs due to compliance with Linux FHS 3.0.
- Rename specific variables as stated in the bootstd documentation. Renamed variables:
fdt_addr => fdt_addr_r
fdt_file => fdtfile
---
Changes in v3:
- Removed sd_dev entry
- Added Maintainers and reviewers
- Added changes description
--- .../phytec/phycore_imx8mm/phycore_imx8mm.env | 51 +++++++++++++++++++ include/configs/phycore_imx8mm.h | 46 ----------------- 2 files changed, 51 insertions(+), 46 deletions(-) create mode 100644 board/phytec/phycore_imx8mm/phycore_imx8mm.env
board/phytec/phycore_imx8mm/phycore_imx8mm.env new file +51 -0
@@ -0,0 +1,51 @@ +console=ttymxc2,115200 +emmc_dev=2 +fdt_addr_r=0x48000000 +fdtfile=CONFIG_DEFAULT_FDT_FILE +image=Image +ip_dyn=yes +loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image} +loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile} +mmcargs= + setenv bootargs console=${console} + root=/dev/mmcblk${mmcdev}p${mmcroot} rootwait rw +mmcautodetect=yes +mmcboot= + echo Booting from mmc ...; + run mmcargs; + if run loadfdt; then + if test ${dofitboot} = 1; then + booti ${loadaddr} - ${fdt_addr_r} + else + echo WARN: Cannot load the DT; + fi; + fi; +mmcdev=CONFIG_SYS_MMC_ENV_DEV +mmcpart=1 +mmcroot=2 +netargs= + setenv bootargs console=${console} root=/dev/nfs ip=dhcp + nfsroot=${serverip}:${nfsroot},v3,tcp +netboot= + echo Booting from net ...; + if test ${ip_dyn} = yes; then + setenv get_cmd dhcp; + else + setenv get_cmd tftp; + fi; + ${get_cmd} ${loadaddr} ${image}; + run netargs; + if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then + booti ${loadaddr} - ${fdt_addr_r}; + else + echo WARN: Cannot load the DT; + fi; +nfsroot=/srv/nfs +update_bootimg= + mmc dev ${mmcdev}; + if dhcp ${loadaddr} ${update_filepath}/${update_filename}; then + setexpr fw_sz ${filesize} / 0x200; + mmc write ${loadaddr} ${update_offset} ${fw_sz}; + fi; +update_filename=flash.bin +update_offset=0x42
include/configs/phycore_imx8mm.h +0 -46
52 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v3 2/3 phycore_imx8mm: Move default bootcmd to board env
Move the default bootcmd from the defconfig to the board environment.
---
Changes in v3:
- Added Maintainers and reviewers
- Added Changes description
--- board/phytec/phycore_imx8mm/phycore_imx8mm.env | 9 +++++++++ configs/phycore-imx8mm_defconfig | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-)
board/phytec/phycore_imx8mm/phycore_imx8mm.env +9 -0
@@ -1,3 +1,12 @@ +bootcmd= + mmc dev ${mmcdev}; + if mmc rescan; then + if run loadimage; then + run mmcboot; + else + run netboot; + fi; + fi; console=ttymxc2,115200 emmc_dev=2 fdt_addr_r=0x48000000
configs/phycore-imx8mm_defconfig +0 -2
@@ -31,8 +31,6 @@ CONFIG_FIT=y CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_SPL_LOAD_FIT=y CONFIG_OF_SYSTEM_SETUP=y -CONFIG_USE_BOOTCOMMAND=y -CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadimage; then run mmcboot; else run netboot; fi; fi;" CONFIG_DEFAULT_FDT_FILE="oftree" CONFIG_SYS_CBSIZE=2048 CONFIG_SYS_PBSIZE=2074
Signature · 1 line
2.25.1
PATCH v3 3/3 board: phytec: phycore_imx8mm: Add RAUC boot logic to environment
In reply to Yunus BasAdd RAUC boot logic to the environment.
---
Changes in v3:
- Added Maintainers and reviewers
- Added Changes description
--- board/phytec/phycore_imx8mm/phycore_imx8mm.env | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
board/phytec/phycore_imx8mm/phycore_imx8mm.env +6 -1
@@ -1,6 +1,11 @@ +#include <env/phytec/rauc.env> + bootcmd= mmc dev ${mmcdev}; if mmc rescan; then + if test ${doraucboot} = 1; then + run raucinit; + fi; if run loadimage; then run mmcboot; else
@@ -17,7 +22,7 @@ loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image} loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile} mmcargs= setenv bootargs console=${console} - root=/dev/mmcblk${mmcdev}p${mmcroot} rootwait rw + root=/dev/mmcblk${mmcdev}p${mmcroot} ${raucargs} rootwait rw mmcautodetect=yes mmcboot= echo Booting from mmc ...;
Signature · 1 line
2.25.1
Fabio Estevam
reviewerQuoted 12 lines · Yunus Bas
Move the environment into the board directory and convert header to a txt file. In addition, this patch also applies following changes:
- Change default nfsroot path to
/srv/nfsdue to compliance with Linux FHS 3.0.- Rename specific variables as stated in the bootstd documentation. Renamed variables:
fdt_addr=>fdt_addr_r
fdt_file=> fdtfile
Quoted 6 lines
Signed-off-by Yunus Bas <[email protected]>---
Changes in v3:
- Removedsd_deventry
- Added Maintainers and reviewers
- Added changes description
Applied all to u-boot-imx/next, thanks.