Welcome! Log In Create A New Profile

Advanced

2017.07-2023.04 U-Boot Kirkwood - GoFlexNet, GoFlexHome, PogoE02, Dockstar, iConnect, NetgearStora, PogoV4/Mobile, Sheevaplug, NSA325, NSA320, NSA310S, NSA320S, NSA310, HP T5325, Dreamplug

Posted by bodhi 
hi bohdi,
well, i would prefere to use "your" rescue image, so that i can use your env completely...

jay
Hi jay,

I don't have rescue system installed on my plugs. I've only installed Jeff's resue system on one of my GoFlex Nets as an experiment.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 08/12/2015 02:45AM by bodhi.
wtf is in my mind? i could swear...
where are the (wrong) rescue bootargs in my live env from?
i will try again... :-)
tnx for now

jay
jay Wrote:
-------------------------------------------------------
> wtf is in my mind? i could swear...
> where are the (wrong) rescue bootargs in my live
> env from?
> i will try again... :-)
> tnx for now
>
> jay


:) I think either from Jeff's or davygravy's rescue system envs. Incorporate either settings into my envs is not difficult. If you have trouble, let me know.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hi

I'm trying to flash my u-boot for the first time, but when following step 6 I receive the following message:
Quote
/i-data/fe8bf781/admin # flash_erase /dev/mtd0 0 4
-sh: flash_erase: not found


Then I downloaded the flash_erase given in the description when my system hasn't got flash_erase, but then I receive the following message:
Quote
/i-data/fe8bf781/admin # sh flash_erase /dev/mtd0 0 4
flash_erase: line 1: syntax error: unexpected word (expecting ")")


I did then some more research and my system knows the command: flash_eraseall, but then the output is totally different then what is in the guide and nothing more:
Quote
/i-data/fe8bf781/admin # flash_eraseall /dev/mtd0 0 4
Erasing 128 Kibyte @ e0000 -- 87 % complete.


Can someone help me how I could procedure the next steps...

Friendly regards


Kristof
Hi

And ow yes I forgot to mention, but I'm using the following device: Zyxel NSA325 v2.
Also I have a serial connection at hand if needed.

friendly regards


Kristof
Kristof,

Quote

sh flash_erase

This command is a wrong way to execute it. When you download a binary and want to execute it, cd to the directory where the binary is and:
./flash_erase /dev/mtd0 0 4

Quote

flash_eraseall /dev/mtd0 0 4

You should never execute a flash_eraseall like above. Use flash_erase only to avoid mistake. And flash_eraseall has been deprecated, too.

With all that said, what you did above did not hurt anything. However, when messing with NAND, it is best to ask question first, don't try to test a command that you're not sure if it works :)

Before proceeding, please post output of:
uname -a
cat /proc/mtd
cat /etc/fw_env.config

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Bodhi

Thanks for this clear explanation.

Like asked the outpot
uname -a
Linux NSA325-v2 2.6.31.8 #2 Fri May 15 12:20:01 CST 2015 armv5tel GNU/Linux

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"

cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.
# Notice, that the \"Number of sectors\" is ignored on NOR.

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
# NAND example
/dev/mtd1		0x0000		0x20000		0x20000			4

I will not proceed like asked.

grtz


Ziggy aka Kristof



Edited 2 time(s). Last edit at 08/16/2015 11:52PM by ziggy.
Hi ziggy,

Your system info looks OK.

You can proceed with the installation, however, I did not like the look of the output you've shown in step 6. So proceed but starting from step 6. And the expected output shoutd be like shown in the instruction:

6. Erase mtd0
./flash_erase /dev/mtd0 0 4

Expected output:
Erase Total 4 Units 
Performing Flash Erase of length 131072 at offset 0x60000 done

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Bodhi

Many thx for your help!

I performed step 6 again and get a correct output:
/i-data/fe8bf781/admin # ./flash_erase /dev/mtd0 0 4
Erase Total 4 Units
Performing Flash Erase of length 131072 at offset 0x60000 done

but after performing step 7 I don't receive a correct output:
/i-data/fe8bf781/admin/tmp # nandwrite /dev/mtd0 uboot.2014.07-tld-4.nsa325.mtd0.kwb 
Writing data to block 0
Writing data to block 20000
Writing data to block 40000
Writing data to block 60000

----
Friendly regards


Ziggy
Ziggy,

I don't see anything wrong with the ouput above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 08/17/2015 03:34PM by bodhi.
Bodhi

ok, because in setp 7 the expected output should look like this:
Writing data to block 0 at offset 0x0 
Writing data to block 1 at offset 0x20000 
Writing data to block 2 at offset 0x40000 
Writing data to block 3 at offset 0x60000

In my output I don't see an offset.

----
Friendly regards


Ziggy
I proceeded but now I'm stuck on section B at sub d: Flash u-boot envs to NAND location 0xC0000.

The first step succeeded:
/i-data/fe8bf781/admin # ./flash_erase /dev/mtd0 0xc0000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done
But the second I receive the following output when doing this command:
/i-data/fe8bf781/admin/tmp # nandwrite -s 786432 /dev/mtd0 uboot.2014.07-tld-2.environment.img
output:
Writing data to block c0000

This is not exactly the same as the output it should give:
Writing data to block 6 at offset 0xc0000

----
Friendly regards


Ziggy
ziggy,

>
> Writing data to block c0000
>
>
> This is not exactly the same as the output it
> should give:
>
> Writing data to block 6 at offset 0xc0000
>

This is fine. The output of different version of nandwrites are slightly different, but it is correct. The version you've downloaded from Jeff's site is older.

After you've gone through all the steps, if you'd like me to look over, post tthe entire log of what you've done before reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hi bodhi,

I have a nsa325v2. I had changed the /etc/fw_env.config to get it readable as described here: https://micha.stoecker.me/p/X9M4
I followed your description except the fw_config.
You write in section B to /dev/mtd0, but the uboot_env resides in /dev/mtd1! Is that correct?

root@debian:/mnt/sdc1/uboot# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
...

I already executed succesfully the 2 following commands, but fw_printenv showed my old environment.
commands:
./flash_erase /dev/mtd0 0xc0000 1
./nandwrite -s 786432 /dev/mtd0 uboot.2014.07-tld-2.environment.img

After changing /etc/fw_env.config as you described to /dev/mtd0 0x2000... it shows the new environment.
The saved environment has only variable ethaddr, but not mtdparts and rootfstype.
What should I do before reboot?
Should I restore?
What would be the right command to restore the saved mtd0?
Attachments:
open | download - fw_printenv.txt (2.4 KB)
open | download - screenlog.uboot.txt (114.1 KB)
open | download - screenlog.uboot-2.txt (12.7 KB)
edinger,

> You write in section B to /dev/mtd0, but the
> uboot_env resides in /dev/mtd1! Is that correct?

Correct.

>
> root@debian:/mnt/sdc1/uboot# cat /proc/mtd
> dev: size erasesize name
> mtd0: 00100000 00020000 "uboot"
> mtd1: 00080000 00020000 "uboot_env"
> ...
>
> I already executed succesfully the 2 following
> commands, but fw_printenv showed my old
> environment.
> commands:
> ./flash_erase /dev/mtd0 0xc0000 1
> ./nandwrite -s 786432 /dev/mtd0
> uboot.2014.07-tld-2.environment.img
>
> After changing /etc/fw_env.config as you described
> to /dev/mtd0 0x2000... it shows the new
> environment.

It's all good!

> Should I restore?
> What would be the right command to restore the
> saved mtd0?

No need to restore.

> The saved environment has only variable ethaddr,
> but not mtdparts and rootfstype.
> What should I do before reboot?

Set your mtdparts and check rootfstype. I believe you have the new rootfs type Ext3?
fw_setenv mtdparts 'mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)'
If it shows ext3 here:
fw_printenv rootfstype

then reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hi bodhi,

reboot worked, but u-boot cannot find kernel. The usb stick has 2 partitions sda1 (ext2 boot) and sda2 (ext4 root)
So your default configuration does not work.

 (Re)start USB...^M
USB0:   USB EHCI 1.00^M
scanning bus 0 for devices... 4 USB Device(s) found^M
       scanning usb for storage devices... 2 Storage Device(s) found^M
** File not found /boot/uImage **^M
** File not found /boot/uInitrd **^M

I tried with:
setenv usb_root /dev/sda1
setenv usb_load_uimage 'ext2load usb $device 0x800000  /uImage'
setenv usb_load_uinitrd 'ext2load usb $device 0x1100000 /uInitrd'

and u-boot loads the kernel, but then stops as there is no rootfs in sda1.
Is there no ext4-support in u-boot?

I tried the following commands also without success:

setenv usb_root /dev/sda2
setenv usb_load_uimage 'ext2load usb $device 0x800000  /boot/uImage'
setenv usb_load_uinitrd 'ext2load usb $device 0x1100000 /boot/uInitrd'
setenv rootfstype ext4
saveenv
boot
and
setenv usb_root /dev/sda2
setenv usb_load_uimage 'ext2load usb /dev/sda1 0x800000  /uImage'
setenv usb_load_uinitrd 'ext2load usb /dev/sda1 0x1100000 /uInitrd'
setenv rootfstype ext4
saveenv
boot

How is the correct env parameter setting?
edinger,

> reboot worked, but u-boot cannot find kernel. The
> usb stick has 2 partitions sda1 (ext2 boot) and
> sda2 (ext4 root)
> So your default configuration does not work.

It works if you follow the instruction when creating rootfs :) When you install anything, instruction are to be followed exactly as written, unless you are an experienced embedded Linux user. And you should not assume that the instruction does not work ;) Always assume that you have done a wrong step somewhere and review your installation log.

Quote

Updated 24 Feb 2015:

This rootfs is the first Debian jessie rootfs in my Kirkwood kernel/rootfs release series, and to keep in sync with kernel Linux-3.18.5-kirkwood-tld-1.
...
1. Format a new USB drive with a single Ext3 partition, and label it rootfs. Note: if your existing uBoot env for rootfs type is ext2, then you might want to keep it consistent and use Ext2 USB drive. It will work with Ext3 drive without problem, though.


See the explanation (also found in my signature) for problems might arise when booting with multiple-partition USB/HDD drive:
http://forum.doozan.com/read.php?3,19093

So the bottom line is you should have a single partition type Ext3 for your rootfs (you can choose Ext4, but with a single Ext4 partition, no swap). And then after everything is working, consider swap file or partition. I'd recommend swap file, because of the flexibility it'll provide, and the simplicity of the rootfs structure.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I've uploaded the Pogopug E02 u-boot-2014.07-tld-3 image. Please see first post for download link.

This version adds the enhancement so that u-boot can boot stock Pogo OS. There no need to upgrade if you don't intend to use stock OS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
so does this new uboot enable the booting from the original Pogoplug software by default, or I have to set this in the uboot env?

I have this question because I have problem booting the device into Pogoplug stock system while there's no USB device attched, the front LED keeps flashing green and I can not see it in the network.

U-Boot 2014.07-tld-3 (Mar 31 2015 - 16:56:13)
Pogo E02
gcc (Debian 4.9.1-19) 4.9.1
GNU ld (GNU Binutils for Debian) 2.25
Hit any key to stop autoboot:  0
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Unknown command 'mmc' - try 'help'
Unknown command 'ide' - try 'help'

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            3860480         18fa4960-01     83
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **
Unknown command 'mmc' - try 'help'
Unknown command 'ide' - try 'help'
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
4120976 bytes read in 350 ms (11.2 MiB/s)
** File not found /boot/uInitrd **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.1.6-1-ARCH
   Created:      2015-08-17   8:10:56 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4120912 Bytes = 3.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK


Starting kernel ...

mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
baudrate=115200
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
partition=nand0,2
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
arcNumber=3542
machid=dd6
ethaddr=00:25:****
devices=usb mmc ide
bootcmd=run bootcmd_uenv; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
preboot=run preboot_nc
ipaddr=192.168.1.4
serverip=192.168.1.10

well to answer myself, I have to modify these two to make it able to boot into the Pogoplug stock system while no usb drive is presented:

pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
bootcmd=run bootcmd_uenv; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run pogo_bootcmd; reset



Edited 2 time(s). Last edit at 08/27/2015 09:03AM by rynax.
the current uenv_read_disk settings seems to only read /boot/uEnv.txt while the booting device is mmc?

uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi

Can I just change the mmc to usb in this string to make it read the /boot/uEnv.txt from usb drive?

I have this setting in the /boot/uEnv.txt
usb_root=LABLE=ROOTFS
boot usb driver's partition lable is ROOTFS,

will this be suffice to make it always booting from this usb drive, regardless of how many usb drivers are attched?
rynax Wrote:
-------------------------------------------------------
> the current uenv_read_disk settings seems to only
> read /boot/uEnv.txt while the booting device is
> mmc?
>

No, it scans all kind of drives for uEnv.txt.


> I have this setting in the /boot/uEnv.txt
>
> usb_root=LABLE=ROOTFS
>
> boot usb driver's partition lable is ROOTFS,
>
> will this be suffice to make it always booting
> from this usb drive, regardless of how many usb
> drivers are attched?

This is for picking the right rootfs only. To detect the system drive (find uImage):
http://forum.doozan.com/read.php?3,19093

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I've uploaded the Zyxel NSA310S/320S u-boot-2014.07-tld-4 image. Please see 1st post for download link.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
@bodhi,

i'm trying to flash the new u-boot for nsa310s but i'm a bit scared of those bad blocks you're mentioning in the tutorial. My dmesg is this:

[    1.982828] Bad eraseblock 100 at 0x000000c80000
[    1.992505] Bad eraseblock 200 at 0x000001900000

Is it safe to flash? Or i need some workaround? I'm a bit confused about this considering your warning:

Be sure there is no bad block in the first 1M of your NAND (check dmesg). 
JohnnyUSA Wrote:
-------------------------------------------------------
> @bodhi,
>
> i'm trying to flash the new u-boot for nsa310s but
> i'm a bit scared of those bad blocks you're
> mentioning in the tutorial. My dmesg is this:
>
>
> [    1.982828] Bad eraseblock 100 at
> 0x000000c80000
> [    1.992505] Bad eraseblock 200 at
> 0x000001900000
>
>
> Is it safe to flash? Or i need some workaround?
> I'm a bit confused about this considering your
> warning:
>
>
> Be sure there is no bad block in the first 1M of
> your NAND (check dmesg).

Johnny,

It is OK to flash. Your bad blocks are not in the 1st 1M (block 0 to 7).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
@bodhi, thanks! it worked!
Stock bootloader got too annoying, too much reports of people with issues with my script, caused by u-boot not recognizing stuff.

So, I installed the NSA325 uboot, then I flashed default envs, then I made some modifications to get it to boot FDT kernel.

did some cleanup and re-arranging, I was planning to dump the nand block to get a proper FDT default envs people could flash more easily than flashing a non-FDT one and then rewriting half of it for FDT booting.

these are my envs, assuming Debian is in an ext4 partition with label "rootfs".
arcNumber=4495
baudrate=115200
board_dtb=kirkwood-nsa325.dtb
bootcmd=run bootcmd_uenv; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset
bootcmd_mmc=run mmc_init; run mmc_bootargs; run mmc_boot
bootcmd_sata=run sata_init; run sata_bootargs; run sata_boot;
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootcmd_usb=run usb_init; run usb_bootargs; run usb_boot;
bootdelay=3
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=<removed for this post, it's real in my envs>
if_netconsole=ping $serverip
init=/sbin/init
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_dtb; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
mmc_bootargs=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$mmc_rootfstype $mtdparts init=$init
mmc_init=mmc rescan
mmc_load_dtb=ext4load mmc $mmc_partition 0x1c00000 /boot/dts/$board_dtb
mmc_load_uimage=ext4load mmc $mmc_partition 0x800000 /boot/uImage
mmc_load_uinitrd=ext4load mmc $mmc_partition 0x1100000 /boot/uInitrd
mmc_partition=0:1
mmc_root=LABEL=rootfs
mmc_rootfstype=ext4
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext4
sata_boot=mw 0x800000 0 1; run sata_load_dtb; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
sata_bootargs=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$sata_rootfstype $mtdparts init=$init
sata_init=ide reset
sata_load_dtb=ext4load ide $sata_partition 0x1c00000 /boot/dts/$board_dtb
sata_load_uimage=ext4load ide $sata_partition 0x800000 /boot/uImage
sata_load_uinitrd=ext4load ide $sata_partition 0x1100000 /boot/uInitrd
sata_partition=0:1
sata_root=LABEL=rootfs
sata_rootfstype=ext4
serverip=192.168.0.220
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; mmc rescan; ide reset; setenv uenv_loaded 0; for devtype in usb mmc ide; do for disknum in 0; do run uenv_read_disk; done; done
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_boot=mw 0x800000 0 1; run usb_load_dtb; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
usb_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$usb_rootfstype $mtdparts init=$init
usb_init=usb start
usb_load_dtb=ext4load usb $usb_partition 0x1c00000 /boot/dts/$board_dtb
usb_load_uimage=ext4load usb $usb_partition 0x800000 /boot/uImage
usb_load_uinitrd=ext4load usb $usb_partition 0x1100000 /boot/uInitrd
usb_partition=0:1
usb_root=LABEL=rootfs
usb_rootfstype=ext4

the only thing needed is to change board_dtb and arcNumber with the right one after flashing it.

How do I generate the dump of these envs so they can be flashed easily?



Edited 5 time(s). Last edit at 09/18/2015 01:03PM by bobafetthotmail.
bobafetthotmail,

> How do I generate the dump of these envs so they
> can be flashed easily?

You could generate your own now, or wait till I release a DTB-enable u-boot env image? I have prepared such image, but have not have time to release it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
-------------------------------------------------------
> bobafetthotmail,
>
> > How do I generate the dump of these envs so
> they
> > can be flashed easily?
>
> You could generate your own now, or wait till I
> release a DTB-enable u-boot env image? I have
> prepared such image, but have not have time to
> release it.

Only if it is cooler than mine, lol. :D

Anyway, did you use mkenveimage? http://free-electrons.com/blog/mkenvimage-uboot-binary-env-generator/
are u-boot envs single or redundant? (i think single)
Of course it is cooler :)

In any case, here is the binary from my 2014.07 build.

md5
c46b7ffa8b164a2017e065ad2582eda2 mkenvimage.tar

Use this command to generate image from uboot.environment file.

./mkenvimage  -s 131072 -o uboot.environment.img uboot.environment


The env file should contain the envs in name=value format. For example, the one I've released:

Quote

uboot.2014.07-tld-2.environment (the content of the default envs in text format)

or take the list that you posted above, put them inside the uboot.environment text file.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 3 time(s). Last edit at 09/19/2015 05:19PM by bodhi.
Attachments:
open | download - mkenvimage.tar (20 KB)
Sorry, you can't reply to this topic. It has been closed.