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 jbrnd » Thu Sep 03, 2015 11:28 pm

That's probably a hardware problem then. Thanks for your time!
jbrnd
 
Posts: 17
Joined: Sun Jul 08, 2012 2:15 am

Re: U-Boot v2015.07 released

Postby Kabbone » Fri Sep 04, 2015 12:46 pm

As znark already mentioned it before on page 3, the install routine after installing uboot-nas325 doesn't work. But how can I change the command line option for mtdparts?

EDIT: if needed, here is the error message
Code: Select all
(1/1) reinstalling uboot-nsa325                    [#####################] 100%
A new U-Boot version needs to be flashed to NAND.
Do you want to do this now? [y|N]
y
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
Kabbone
 
Posts: 82
Joined: Thu Jul 25, 2013 9:20 am

Re: U-Boot v2015.07 released

Postby moonman » Sat Sep 05, 2015 10:19 am

I don't have the device, but according to znark he changed nand_mtd to orion_nand. This is passed to kernel on boot.

What is the output of:
Code: Select all
cat /proc/mtd

and
Code: Select all
dmesg | grep mtdparts

and
Code: Select all
dmesg | grep nand

and
Code: Select all
mtdinfo
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3089
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada

Re: U-Boot v2015.07 released

Postby Kabbone » Sat Sep 05, 2015 11:18 am

I found some threads and a how to for flashing the NSA325v2 at doozan, where bodhi explained some stuff. I think I can get it done with it.
Nevertheless here are the desired outputs:
Code: Select all
#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"

Code: Select all
#dmesg | grep mtdparts
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8

Code: Select all
#dmesg | grep nand
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8
[   18.698231] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[   18.704796] nand: Eon NAND 128MiB 3,3V 8-bit
[   18.709083] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[   18.792350] Creating 9 MTD partitions on "orion_nand":

Code: Select all
#mtdinfo
Count of MTD devices:           9
Present MTD devices:            mtd0, mtd1, mtd2, mtd3, mtd4, mtd5, mtd6, mtd7, mtd8
Sysfs interface supported:      yes
Kabbone
 
Posts: 82
Joined: Thu Jul 25, 2013 9:20 am

Re: U-Boot v2015.07 released

Postby moonman » Sat Sep 05, 2015 11:29 am

Yeah, so
Code: Select all
mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)

should be
Code: Select all
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)

for arch kernel

But to change it you would need access to U-Boot serial, or boot into stock/kernel that expects this mtd-id. Or you can take .kwb and environemnt image from the package and flash it from within stock if you have access to that.

Code: Select all
flash_erase /dev/mtd0 0 4
flash_erase /dev/mtd0 0xc0000 1
nandwrite /dev/mtd0 /path/to//uboot-nsa325.kwb
nandwrite -s 0xc0000 /dev/mtd0 /path/to/uboot-nsa325.env
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3089
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada

Re: U-Boot v2015.07 released

Postby Kabbone » Sat Sep 05, 2015 12:03 pm

Thanks for your help moonman. I have serial access as well as stock firmware. I think I give serial a shot.
Kabbone
 
Posts: 82
Joined: Thu Jul 25, 2013 9:20 am

Re: U-Boot v2015.07 released

Postby Kabbone » Sat Sep 05, 2015 3:16 pm

Flashing worked so far :)
But now uboot doesn't find my uImage. I want to boot from USB with a separate boot partition.
I don't really know where to take a look at.

Code: Select all
NSA325> boot

Reset IDE: Bus 0: OK Bus 1: OK
  Device 0: Model: SAMSUNG HD753LJ  Firm: 1AA01113 Ser#: xxxxxxxxxxx
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
  Device 1: Model: SAMSUNG HD103SI  Firm: 1AG01118 Ser#: xxxxxxxxxx
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)

USB device 0:
    Device 0: Vendor: JetFlash Rev: 1100 Prod: Transcend 32GB 
            Type: Removable Hard Disk
            Capacity: 30720.0 MB = 30.0 GB (62914560 x 512)
... is now current device
usb found on device 0
Checking for: /boot/uEnv.txt ...
** File not found /boot/zImage **
** File not found /boot/uImage **
No kernel found

USB device 1: unknown device

IDE device 0: Model: SAMSUNG HD753LJ  Firm: 1AA01113 Ser#: xxxxxxxxx
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
... is now current device
ide found on device 0
Checking for: /boot/uEnv.txt ...
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
No kernel found

IDE device 1: Model: SAMSUNG HD103SI  Firm: 1AG01118 Ser#: xxxxxxxxxxx
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
... is now current device
ide found on device 1
Checking for: /boot/uEnv.txt ...
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
No kernel found

IDE device 2: unknown device
Trying to boot from NAND ...
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
UBI init error 22
Error reading superblock on volume 'ubi0:rootfs' errno=-19!
ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume


Code: Select all
NSA325> printenv
bootcmd=run startboot;run bootubi
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootpart=1:1
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
devnum=2
ethact=egiga0
ethaddr=00:00:11:22:33:44
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-nsa325.dtb
ipaddr=10.10.10.3
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtddevname=u-boot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
partition=nand0,0
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then  setenv stdin nc; setenv stdout nc;  setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; ide reset; for devtype in usb ide; do  setenv devnum 0; while ${devtype} dev ${devnum}; do  echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then  load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then  echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi;  run mainargs; if run loadfdt; then  if run loadrd; then  bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootz ${loadaddr} - ${fdtaddr}; fi; else  if run loadrd; then echo Booting uImage with initrd;  bootm ${loadaddr} ${rdaddr}:${filesize}; else  bootm ${loadaddr}; fi; fi; else  echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;

Environment size: 2870/131068 bytes


Code: Select all
cat /boot/uEnv.txt
root=LABEL=rootfs
Kabbone
 
Posts: 82
Joined: Thu Jul 25, 2013 9:20 am

Re: U-Boot v2015.07 released

Postby moonman » Sat Sep 05, 2015 5:52 pm

It didn't recognise your usb device at all. Obviously uEnv.txt wasn't read from it. Also, for root=LABEL=* to work, you need initrd, which is not supplied. Better use root=PARTUUID= which you can find out with blkid
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3089
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada

Re: U-Boot v2015.07 released

Postby Kabbone » Sat Sep 05, 2015 5:56 pm

but doesn't this part tell me, it is recognized?
Code: Select all
...
USB device 0:
    Device 0: Vendor: JetFlash Rev: 1100 Prod: Transcend 32GB
            Type: Removable Hard Disk
            Capacity: 30720.0 MB = 30.0 GB (62914560 x 512)
... is now current device
usb found on device 0
Checking for: /boot/uEnv.txt ...
** File not found /boot/zImage **
** File not found /boot/uImage **
No kernel found
...
Kabbone
 
Posts: 82
Joined: Thu Jul 25, 2013 9:20 am

Re: U-Boot v2015.07 released

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

Sorry missed that.
Where is the uImage? In the root of the partition or under a 'boot' directory? Everything has to be under boot
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3089
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada

PreviousNext

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 3 guests