U-Boot v2016.09 released

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Re: U-Boot v2015.07 released

Postby Kabbone » Sat Sep 05, 2015 6:09 pm

it's in the boot directory, but I have an seperate boot partition. The system was already running with the stock u-boot version
Kabbone
 
Posts: 153
Joined: Thu Jul 25, 2013 9:20 am

Re: U-Boot v2015.07 released

Postby moonman » Sat Sep 05, 2015 6:22 pm

Not sure if we are on the same page...
Maybe you had that boot partition mounted under /boot, that would mean that all the files reside in the root of the partition.

Interrupt uboot and try this:
$this->bbcode_second_pass_code('', 'setenv bootdir
run startboot')
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: U-Boot v2015.07 released

Postby Kabbone » Sat Sep 05, 2015 6:29 pm

you are right, I missunderstood you :D
yes the boot partition was mounted to the boot folder at the root partition, so the uImage is not in a boot folder if you are just looking at the boot partition. Now uboot finds uImage, just have to modify my UUID for root, seems like I made a mistake there.
Thanks for your efforts moonman!
Kabbone
 
Posts: 153
Joined: Thu Jul 25, 2013 9:20 am

Re: U-Boot v2015.07 released

Postby moonman » Sat Sep 05, 2015 8:06 pm

Beware that UUID is not the same as PARTUUID.
UUID requires initrd just like LABEL, PARTUUID doesn't since kernel 3.7
Also, your modification uboot environment was not saved, at uboot prompt you need to run 'saveenv' to save it. Better yet place everythithin on your boot partition into /boot directory so with next uboot update you don't run into the same problem.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: U-Boot v2015.07 released

Postby Kabbone » Sat Sep 05, 2015 8:31 pm

Yeah, I recognized that UUID and PARTUUID differs, this was the mistake. I decided to repartition my device and delete the boot partition, because I don't need it anymore.
Everything is running fine now :) next step is DT-Kernel to use the new marvell_cesa
Kabbone
 
Posts: 153
Joined: Thu Jul 25, 2013 9:20 am

Re: U-Boot v2015.07 released

Postby summers » Thu Oct 08, 2015 4:12 pm

Gulp. Installed uboot-nsa325 on my ZyXEL NSA325, and recieved:

$this->bbcode_second_pass_code('', 'Warning: Bad CRC, using default environment
flash_erase: error!: /dev/mtd0
error 13 (Permission denied)
flash_erase: error!: /dev/mtd0
error 13 (Permission denied)
nandwrite: error!: /dev/mtd0
error 13 (Permission denied)
nandwrite: error!: /dev/mtd0
error 13 (Permission denied)
Warning: Bad CRC, using default environment
Can't open /dev/mtd0: Permission denied
Error: can't write fw_env to flash
error: command failed to execute correctly
')

Checked the uboot evn variables - and they have changed from last time checked:

$this->bbcode_second_pass_code('', '
[root@nas summers]# fw_printenv
Warning: Bad CRC, using default environment
bootargs=
bootcmd=
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth5addr=00:00:11:22:33:46
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0
boot_extlinux=sysboot ${devtype} ${devnum}:${bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
')

So am I in a bad place, e.g. come the next reboot - the machine won't come to life?

is there anything I can check whilst the machine stays up?

Thanks,

David
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: U-Boot v2015.07 released

Postby summers » Thu Oct 08, 2015 4:29 pm

Ah /etc/fw_env.config was wrong. Updated to:

$this->bbcode_second_pass_code('', '/dev/mtd1 0x0 0x20000 0x20000')

and fw_printenv is back to what it was again.

So is it safe to try and reinstall uboot-nsa325 ?
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: U-Boot v2015.07 released

Postby summers » Thu Oct 08, 2015 5:04 pm

And reading the tread carefully, and checking the file system, what I need to do is:

$this->bbcode_second_pass_code('', '
cd /boot
ls -l
flash_erase /dev/mtd0 0 4
flash_erase /dev/mtd0 0xc0000 1
nandwrite /dev/mtd0 uboot-nsa325.kwb
nandwrite -s 0xc0000 /dev/mtd0 uboot-nsa325.env
')

the ls -l gives:

$this->bbcode_second_pass_code('', 'total 4752
drwx------ 2 root root 12288 Oct 3 13:32 lost+found
-rw-r--r-- 1 root root 4176856 Oct 5 09:13 uImage
-rw-r----- 1 root root 131072 Sep 6 03:49 uboot-nsa325.env
-rw-r--r-- 1 root root 524288 Sep 6 03:49 uboot-nsa325.kwb')

It begs the question of why the second flash_erase and nandwrite aren't

$this->bbcode_second_pass_code('', '
flash_erase /dev/mtd1 0 1
nandwrite /dev/mtd1 uboot-nsa325.env
')

And where the 0xc0000 comes from when /proc/mtd is;
$this->bbcode_second_pass_code('', '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"
')
e.g. why not 0x100000 ?
Last edited by summers on Thu Oct 08, 2015 9:23 pm, edited 2 times in total.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: U-Boot v2015.07 released

Postby summers » Thu Oct 08, 2015 5:53 pm

The plot thickens. In the uboout-nsa325 package the .INSTALL file, specifically the function flash_uboot() is what set the /etc/fw_env.config to

$this->bbcode_second_pass_code('', '/dev/mtd0 0xc0000 0x20000 0x20000')

So really looks like I'm going to have to do the install by hand. But I guess I really need to know where there 0xc0000 value came from ....

Or rather this is what is in dmesg:

$this->bbcode_second_pass_code('', '
[ 14.023998] Creating 9 MTD partitions on "orion_nand":
[ 14.029163] 0x000000000000-0x000000100000 : "uboot"
[ 14.034454] 0x000000100000-0x000000180000 : "uboot_env"
[ 14.040036] 0x000000180000-0x000000200000 : "key_store"
[ 14.045577] 0x000000200000-0x000000280000 : "info"
[ 14.050727] 0x000000280000-0x000000c80000 : "etc"
[ 14.055757] 0x000000c80000-0x000001680000 : "kernel_1"
[ 14.061262] 0x000001680000-0x000004640000 : "rootfs1"
[ 14.066676] 0x000004640000-0x000005040000 : "kernel_2"
[ 14.072176] 0x000005040000-0x000008000000 : "rootfs2"
')
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: U-Boot v2015.07 released

Postby summers » Thu Oct 08, 2015 9:00 pm

and now at home. checked a backup, even in September 2014 I had is /etc/fw_env.config

$this->bbcode_second_pass_code('', '/dev/mtd1 0x0 0x20000 0x20000')

So its suggests that even then I could only open the uboot_env from mtd1. How this is passed to linux during boot says you can't access uboot_env from mtd0. So this suggests that the uboot-nsa325 is and always has been broken.

Half wonder if the flash layout is difference between v1 and v2 of NSA325? I have v2.

Anyway suggests that for v2 at least, and maybe for all NSA325 should change the uboot to untested.

Hopefully I'll get a chance to check everything, before I go on holiday next week - then can suggest what we need on NSA325v2 ....
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

PreviousNext

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 1 guest