[PATCH 3/4] mediatek: mt7622: add ubi support for bananapi bpi-r64

Daniel Golle daniel at makrotopia.org
Mon Apr 5 20:49:31 BST 2021


On Mon, Apr 05, 2021 at 08:38:13PM +0200, Adrian Schmutzler wrote:
> Hi,
> 
> > -----Original Message-----
> > From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> > On Behalf Of Oskari Lemmela
> > Sent: Montag, 5. April 2021 19:53
> > To: openwrt-devel at lists.openwrt.org
> > Cc: Oskari Lemmela <oskari at lemmela.net>
> > Subject: [PATCH 3/4] mediatek: mt7622: add ubi support for bananapi bpi-r64
> 
> Patches 3 and 4 lack a commit message. That's mandatory.
> 
> An additional comment below.
> 
> > 
> > Signed-off-by: Oskari Lemmela <oskari at lemmela.net>
> > ---
> >  package/boot/uboot-envtools/files/mediatek    | 14 ++++++--
> >  .../mt7622/base-files/lib/upgrade/platform.sh | 34 +++++++++++++------
> >  2 files changed, 34 insertions(+), 14 deletions(-)
> > 
> > diff --git a/package/boot/uboot-envtools/files/mediatek
> > b/package/boot/uboot-envtools/files/mediatek
> > index 50269c9500..85d7db206d 100644
> > --- a/package/boot/uboot-envtools/files/mediatek
> > +++ b/package/boot/uboot-envtools/files/mediatek
> > @@ -21,9 +21,17 @@ case "$board" in
> >  	. /lib/upgrade/common.sh
> >  	export_bootdevice
> >  	export_partdevice rootdev 0
> > -	local envdev=/dev/$(get_partition_by_name $rootdev ubootenv)
> > -	ubootenv_add_uci_config "$envdev" "0x0" "0x80000" "0x80000" "1"
> > -	ubootenv_add_uci_config "$envdev" "0x80000" "0x80000" "0x80000"
> > "1"
> > +	case "$rootdev" in
> > +	mmc*)
> > +		local envdev=/dev/$(get_partition_by_name $rootdev
> > ubootenv)
> > +		ubootenv_add_uci_config "$envdev" "0x0" "0x80000"
> > "0x80000" "1"
> > +		ubootenv_add_uci_config "$envdev" "0x80000" "0x80000"
> > "0x80000" "1"
> > +		;;
> > +	ubi*)
> > +		ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000"
> > "0x1f000" "1"
> > +		ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000"
> > "0x1f000" "1"
> > +		;;
> > +	esac
> 
> Are you sure these globs will work in each and every case?

This switch statement is inside the case handling bpi-r64 (which is
not obvious from looking at the patch without context).
It does handle all three cases (eMMC, SD Card, SPI-NAND) for the
BPi-R64 properly.



More information about the openwrt-devel mailing list