Hi Conor,

On Fri, Mar 30, 2012 at 04:17:06PM +0100, Conor O'Gorman wrote:
> On Fri, 2012-02-17 at 00:50 +0100, Luka Perkov wrote:
> > This patch makes several changes with uboot-envtools package:
> > 
> >  * bumps to version 2011.12
> >  * adds md5sum
> >  * creates a menu so it will look better in 'make menuconfig'
> >  * adds /etc/fw_env.config to conffile
> >  * refresh patches
> >  * removes init script because we should be using uci-defaults instead
> > 
> > -board=$(lantiq_board_name)
> > -
> > -case "$board" in
> > -GIGASX76X)
> > -   uboot_environment_configuration "/dev/mtd1" "0x0" "0x10000" "0x10000" 
> > "1"
> > -   ;;
> 
> Why not go for a more general mechanism, you will have a lot of board
> specific options here. Is there a convention (or majority) for naming
> the env partition? such as 'uboot_env':
> 
> root@OpenWrt:/# cat /proc/mtd 
> dev:    size   erasesize  name
> mtd0: 00010000 00010000 "uboot"
> mtd1: 003e0000 00010000 "spare"
> mtd2: 00010000 00010000 "uboot_env"
> mtd3: 00c00000 00010000 "linux"
> mtd4: 00105026 00010000 "kernel"
> mtd5: 00afafda 00010000 "rootfs"
> mtd6: 00990000 00010000 "rootfs_data"

I dont think that would be a good approach. This way you could get "MTD
device name", "Device offset" and "Env. size". But "Flash sector size"
and "Number of sectors" I'm not so sure... Also, if the script would mess
something up you could brick the unit when using fw_setenv.

This patch as it is makes a big improvement to the package.

I'll resend v3 tomorrow due to recent changes in lantiq target.

Regards,
Luka

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to