From: Derald D. Woods <woods.technical@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] ARM: omap3: evm: Fix distro bootcmd UBIFS and MMC support
Date: Sat, 20 Jan 2018 21:16:14 -0600 [thread overview]
Message-ID: <20180121031614.29091-3-woods.technical@gmail.com> (raw)
In-Reply-To: <20180121031614.29091-1-woods.technical@gmail.com>
The omap3_evm board does not boot when commit:
a47ca2cf67 ("ARM: omap3: evm: Add kernel image loading from UBIFS and EXT4")
is applied after commit:
3dde8f2037 ("Merge git://git.denx.de/u-boot-mmc")
This commit reduces the CONFIG_EXTRA_ENV_SETTINGS size and better
leverages the existing distro bootcmd infrastructure.
- Use updated UBIFS support from config_distro_bootcmd.h
- Use LEGACY_MMC naming found in am335x_evm.h and ti_omap4_common.h
- Remove extra environment content that is no longer needed
[MMC(0:1)/extlinux/extlinux.conf]
---8<-------------------------------------------------------------------
default omap3-evm-mmc-fat
label omap3-evm-mmc-fat
kernel /zImage
fdt /omap3-evm.dtb
append console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
---8<-------------------------------------------------------------------
[MMC(0:2)/boot/extlinux/extlinux.conf]
---8<-------------------------------------------------------------------
default omap3-evm-mmc-ext4
label omap3-evm-mmc-ext4
kernel /boot/zImage
fdt /boot/omap3-evm.dtb
append console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
---8<-------------------------------------------------------------------
[NAND(ubi0:rootfs)/boot/extlinux/extlinux.conf]
---8<-------------------------------------------------------------------
default omap3-evm-nand-ubifs
label omap3-evm-nand-ubifs
kernel /boot/zImage
fdt /boot/omap3-evm.dtb
append console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=rootfs noinitrd rootfstype=ubifs rootwait
---8<-------------------------------------------------------------------
Fixes: a47ca2cf67 ("ARM: omap3: evm: Add kernel image loading from UBIFS and EXT4")
Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
---
include/configs/omap3_evm.h | 80 ++++++++++++++-------------------------------
1 file changed, 25 insertions(+), 55 deletions(-)
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 3ecfdbb3ce..c329d97528 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -89,43 +89,24 @@
#define MEM_LAYOUT_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV
-#if defined(CONFIG_NAND) && defined(CONFIG_CMD_UBI)
-/* NAND boot with uImage from NAND 'kernel' partition */
#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
"bootcmd_" #devtypel #instance "=" \
"run nandboot\0"
#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
#devtypel #instance " "
-/* NAND boot with zImage from UBIFS '/boot/zImage' */
-#define BOOTENV_DEV_UBIFS_NAND(devtypeu, devtypel, instance) \
+#define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
"bootcmd_" #devtypel #instance "=" \
- "run nandbootubifs\0"
-#define BOOTENV_DEV_NAME_UBIFS_NAND(devtypeu, devtypel, instance) \
- #devtypel #instance " "
-#endif /* CONFIG_NAND && CONFIG_CMD_UBI */
-
-/* MMC boot with uImage from MMC 0:2 '/boot/uImage' */
-#define BOOTENV_DEV_UIMAGE_MMC(devtypeu, devtypel, instance) \
- "bootcmd_" #devtypel #instance "=" \
- "setenv mmcdev " #instance"; " \
- "run mmcboot\0"
-#define BOOTENV_DEV_NAME_UIMAGE_MMC(devtypeu, devtypel, instance) \
- #devtypel #instance " "
-
-/* MMC boot with zImage from MMC 0:2 '/boot/zImage' */
-#define BOOTENV_DEV_ZIMAGE_MMC(devtypeu, devtypel, instance) \
- "bootcmd_" #devtypel #instance "=" \
- "setenv mmcdev " #instance"; " \
- "run mmcbootz\0"
-#define BOOTENV_DEV_NAME_ZIMAGE_MMC(devtypeu, devtypel, instance) \
+ "setenv mmcdev " #instance "; " \
+ "setenv bootpart " #instance ":${mmcpart} ; " \
+ "run mmcboot\0"
+#define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
#devtypel #instance " "
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
- func(ZIMAGE_MMC, zimage_mmc, 0) \
- func(UIMAGE_MMC, uimage_mmc, 0) \
- func(UBIFS_NAND, ubifs_nand, 0) \
+ func(LEGACY_MMC, legacy_mmc, 0) \
+ func(UBIFS, ubifs, 0) \
func(NAND, nand, 0)
#include <config_distro_bootcmd.h>
@@ -138,9 +119,13 @@
"fdt_high=0xffffffff\0" \
"bootdir=/boot\0" \
"bootenv=uEnv.txt\0" \
+ "bootfile=zImage\0" \
+ "bootubivol=rootfs\0" \
+ "bootubipart=rootfs\0" \
"optargs=\0" \
"mmcdev=0\0" \
"mmcpart=2\0" \
+ "bootpart=${mmcdev}:${mmcpart}\0" \
"console=ttyO0,115200n8\0" \
"mmcargs=setenv bootargs console=${console} " \
"${mtdparts} " \
@@ -153,7 +138,7 @@
"root=ubi0:rootfs rw ubi.mtd=rootfs noinitrd " \
"rootfstype=ubifs rootwait\0" \
"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
- "ext4bootenv=ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}/${bootenv}\0" \
+ "ext4bootenv=ext4load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootenv}\0" \
"importbootenv=echo Importing environment from mmc ...; " \
"env import -t ${loadaddr} ${filesize}\0" \
"mmcbootenv=mmc dev ${mmcdev}; " \
@@ -165,39 +150,24 @@
"run uenvcmd; " \
"fi; " \
"fi\0" \
- "loaduimage=setenv bootfile uImage; " \
- "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
- "loadzimage=setenv bootfile zImage; " \
- "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
- "loaddtb=ext4load mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
- "loadubizimage=setenv bootfile zImage; " \
- "ubifsload ${loadaddr} ${bootdir}/${bootfile}\0" \
- "loadubidtb=ubifsload ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+ "loadimage=ext4load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+ "loaddtb=ext4load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
"mmcboot=run mmcbootenv; " \
- "if run loaduimage && run loaddtb; then " \
- "echo Booting ${bootdir}/${bootfile} from mmc ${mmcdev}:${mmcpart} ...; " \
+ "if run loadimage && run loaddtb; then " \
+ "echo Booting ${bootdir}/${bootfile} from mmc ${bootpart} ...; " \
"run mmcargs; " \
- "bootm ${loadaddr} - ${fdtaddr}; " \
- "fi\0" \
- "mmcbootz=run mmcbootenv; " \
- "if run loadzimage && run loaddtb; then " \
- "echo Booting ${bootdir}/${bootfile} from mmc ${mmcdev}:${mmcpart} ...; " \
- "run mmcargs; " \
- "bootz ${loadaddr} - ${fdtaddr}; " \
+ "if test ${bootfile} = uImage; then " \
+ "bootm ${loadaddr} - ${fdtaddr}; " \
+ "fi; " \
+ "if test ${bootfile} = zImage; then " \
+ "bootz ${loadaddr} - ${fdtaddr}; " \
+ "fi; " \
"fi\0" \
"nandboot=" \
- "nand read ${loadaddr} kernel; " \
- "nand read ${fdtaddr} dtb; " \
- "echo Booting uImage from NAND MTD 'kernel' partition ...; " \
- "run nandargs; " \
- "bootm ${loadaddr} - ${fdtaddr}\0" \
- "nandbootubifs=" \
- "ubi part rootfs; " \
- "ubifsmount ubi0:rootfs; " \
- "if run loadubizimage && run loadubidtb; then " \
- "echo Booting ${bootdir}/${bootfile} from NAND ubi0:rootfs ...; " \
+ "if nand read ${loadaddr} kernel && nand read ${fdtaddr} dtb; then " \
+ "echo Booting uImage from NAND MTD 'kernel' partition ...; " \
"run nandargs; " \
- "bootz ${loadaddr} - ${fdtaddr}; " \
+ "bootm ${loadaddr} - ${fdtaddr}; " \
"fi\0" \
BOOTENV
--
2.16.0
next prev parent reply other threads:[~2018-01-21 3:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-21 3:16 [U-Boot] [PATCH 0/2] ARM: omap3: evm: Fix distro bootcmd Derald D. Woods
2018-01-21 3:16 ` [U-Boot] [PATCH 1/2] distro bootcmd: Allow board defined UBI partition and volume names Derald D. Woods
2018-01-28 18:53 ` [U-Boot] [U-Boot, " Tom Rini
2018-01-21 3:16 ` Derald D. Woods [this message]
2018-01-28 18:53 ` [U-Boot] [U-Boot, 2/2] ARM: omap3: evm: Fix distro bootcmd UBIFS and MMC support Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180121031614.29091-3-woods.technical@gmail.com \
--to=woods.technical@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.