uBoot 2016 upgrade on NSA325—but no uEnv.txt file created

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

uBoot 2016 upgrade on NSA325—but no uEnv.txt file created

Postby wpault » Thu Dec 10, 2020 12:24 am

I attempted to updated my very old 2014 uBoot to the latest 2016 version so that I could eventually upgrade my kernel beyond that v. 4.4.x .

pacman -S nsa325-uboot reported a "Warning: Bad CRC, using default environment"

However, the flash appeard to work, and via the serial interface, uboot is reporting the right version and the environment variables have been updated, e.g., for boot to look for /boot/uEnv.txt

However, my filesystem has no such file so can't boot.

As I'd rather not have to reinstall and wipe everything from a 3TB hard disk and then restore afterwards, could anyone please tell me either:

1. The contents of the /boot/uEnv.txt file that will work for my system

Or.

2. The right uboot commands so that I can boot the system, as previously, and then what commands to run to tell the system to generate a uEnv.txt file

Thanks for your help
wpault
 
Posts: 17
Joined: Fri Oct 24, 2014 9:29 am

Re: uBoot 2016 upgrade on NSA325—but no uEnv.txt file create

Postby wpault » Thu Dec 10, 2020 12:31 am

Boot log is:

U-Boot 2016.09.01-1 (Oct 10 2016 - 23:14:59 -0600) Arch Linux ARM
Zyxel NSA325

SoC: Kirkwood 88F6282_A1
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
MV88E1318 PHY initialized on egiga0
IDE: Bus 0: OK Bus 1: OK
Device 0: Model: WDC WD30EFRX-68EUZN0 Firm: 82.00A82 Ser#: WD-WMC4N0D6TTDR
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
Device 1: Model: WDC WD30EFRX-68EUZN0 Firm: 82.00A82 Ser#: WD-WMC4N0D38VEK
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
Using egiga0 device

ARP Retry count exceeded; starting again
ping failed; host 10.10.10.5 is not alive
Hit any key to stop autoboot: 0
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: OK
Device 0: Model: WDC WD30EFRX-68EUZN0 Firm: 82.00A82 Ser#: WD-WMC4N0D6TTDR
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
Device 1: Model: WDC WD30EFRX-68EUZN0 Firm: 82.00A82 Ser#: WD-WMC4N0D38VEK
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)

USB device 0: unknown device

Device 0: Model: WDC WD30EFRX-68EUZN0 Firm: 82.00A82 Ser#: WD-WMC4N0D6TTDR
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
... is now current device
ide found on device 0
Checking for: /boot/uEnv.txt ...
** File not found /boot/zImage **
** File not found /boot/uImage **
No kernel found



printenv:
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 ${load addr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; seten v bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs ro otwait ${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} ${fdt addr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || loa d ${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 e xists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncar gsusr}; 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; set env ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; ide reset; for devtype in usb ide; do setenv devnum 0; whi le ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; sete nv 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 Loade d 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; els e 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}:${fil esize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;

Environment size: 2870/131068 bytes
wpault
 
Posts: 17
Joined: Fri Oct 24, 2014 9:29 am

Re: uBoot 2016 upgrade on NSA325—but no uEnv.txt file create

Postby wpault » Thu Dec 10, 2020 12:39 am

Files in /boot
initramfs-linux.img
uboot-nsa325.env
uboot-nsa325.kwb
uImage
wpault
 
Posts: 17
Joined: Fri Oct 24, 2014 9:29 am

Re: uBoot 2016 upgrade on NSA325—but no uEnv.txt file create

Postby moonman » Thu Dec 10, 2020 3:59 am

It looks like you have everything in place. uBoot is looking on the first partition of every usb and sata device connected, and it can't find zImage or uImage under /boot/. Check to make sure you have GUID and not MBR (or hybrid) partition table, that /boot is in fact on first partition, and that partition is ext4 (preferably) or ext3/2.

uEnv.txt doesn't exist by default and it's only used to override (or add) certain variables without actually touching the environment which is stored in device's nand.
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: 3323
Joined: Sat Jan 15, 2011 3:36 am

Re: uBoot 2016 upgrade on NSA325—but no uEnv.txt file create

Postby wpault » Thu Dec 10, 2020 11:34 am

Ah, thanks

I think that explains my problem. From memory (I set this up many years ago), I think I am using a hybrid MBR partitioning scheme
wpault
 
Posts: 17
Joined: Fri Oct 24, 2014 9:29 am

Re: uBoot 2016 upgrade on NSA325—but no uEnv.txt file create

Postby summers » Thu Dec 10, 2020 12:44 pm

What also may be the issue, is back when arch arm was first set up on the nsa325 with the installed bootloader, is that /boot and root were separate partitions. /boot was ext2 formatted, so uboot could read it whilst root was ext4 that gave journalling and the like.

This means that when looking in the first (/boot) partition, all the files are in the top directory. So the bootdir is / ...

If so simple way to solve in short term is to pull the hdd, and make a subdirectory in /boot of /boot/boot - then move everything into that.

What I did though, was instead was merge the boot and root partitions (by copying off all files, and recreating the filesystems as ext4, and then copying everything back - did this on my desktop.) This means the first partition is root and has the directory /boot that contains all boot files.

Oh yes, if you look carefully at your uboot env variables, you see that spaces have been inserted everywhere, so it is certainly corrupt. If this is bad blocks, not sure there is much we can do. Sometimes the flash can't cope with the speed of writing, then slowing down the speed of the flash can help. That said though if thats the case, you usually can't write anything, so that you could write something - suggests it is actually bad blocks.

If you check your boot message, you should be able to see where all bad blocks are, if all are in the uboot env variable location, you could recompile uboot with a different address for the variables.

Oh yes if you want to try downclocking the flash, way to do it is in /boot/uEnv.txt to add a line like:
Code: Select all
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}; fdt addr ${fdtaddr}; fdt set /mbus@f1000000/nand@12f chip-delay <45>
summers
 
Posts: 923
Joined: Sat Sep 06, 2014 12:56 pm

Re: uBoot 2016 upgrade on NSA325—but no uEnv.txt file create

Postby wpault » Thu Dec 10, 2020 1:38 pm

Thanks, for your help. I've now checked the partition table & its a hyrid MBR + GPT:
Code: Select all
sudo gdisk -l /dev/sdc
GPT fdisk (gdisk) version 1.0.5

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.
Disk /dev/sdc: 5860533168 sectors, 2.7 TiB
Model: 106X           
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 3D5EE380-A1E6-44F2-AEC6-B68E5E300C4B
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 8-sector boundaries
Total free space is 29 sectors (14.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              63           48194   23.5 MiB    8300  Linux filesystem
   2           48195       107003903   51.0 GiB    8300  Linux filesystem
   3       107003904      5860533134   2.7 TiB     8300  Linux filesystem


With separate /boot and / partitions:
Code: Select all
sdc                                                                   
├─sdc1
│    ext2   boot  7d008afa-237c-440b-9c4e-5c385f904f71               
├─sdc2
│    ext4   rootfs
│                 7cb7b9d5-30ca-495f-adce-7ddb6b1665ff               
└─sdc3
     ext4         fdda00f1-f0cf-41a2-b3f8-d8ff8e4d0d43               


PS. I'm checking the disk out on an ubuntu system where the drive is /dev/sdc, and which I think is reading the GPT
wpault
 
Posts: 17
Joined: Fri Oct 24, 2014 9:29 am

Re: uBoot 2016 upgrade on NSA325—but no uEnv.txt file create

Postby wpault » Thu Dec 10, 2020 1:55 pm

Yip, copying the four files from /boot into /boot/boot enables the system to boot up a little before bailing out trying to mount the root partition:

Code: Select all
U-Boot 2016.09.01-1 (Oct 10 2016 - 23:14:59 -0600) Arch Linux ARM
Zyxel NSA325

SoC:   Kirkwood 88F6282_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
IDE:   Bus 0: OK Bus 1: OK
  Device 0: Model: WDC WD30EFRX-68EUZN0 Firm: 82.00A82 Ser#:  WD-WMC4N0D6TTDR
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
  Device 1: Model: WDC WD30EFRX-68EUZN0 Firm: 82.00A82 Ser#:  WD-WMC4N0D38VEK
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
No link on egiga0
ping failed; host 10.10.10.5 is not alive
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: OK
  Device 0: Model: WDC WD30EFRX-68EUZN0 Firm: 82.00A82 Ser#:  WD-WMC4N0D6TTDR
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
  Device 1: Model: WDC WD30EFRX-68EUZN0 Firm: 82.00A82 Ser#:  WD-WMC4N0D38VEK
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)

USB device 0: unknown device

Device 0: Model: WDC WD30EFRX-68EUZN0 Firm: 82.00A82 Ser#:  WD-WMC4N0D6TTDR
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
... is now current device
ide found on device 0
Checking for: /boot/uEnv.txt ...
** File not found /boot/zImage **
4662168 bytes read in 761 ms (5.8 MiB/s)
loading /boot/dtbs/kirkwood-nsa325.dtb ...
** File not found /boot/dtbs/kirkwood-nsa325.dtb **
8215137 bytes read in 1295 ms (6 MiB/s)
Booting uImage with initrd
## Booting kernel from Legacy Image at 00810000 ...
   Image Name:   Linux-4.4.238-1-ARCH
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4662104 Bytes = 4.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.238-1-ARCH (builduser@leming) (gcc version 10.2.0 (GCC) ) #1 PREEMPT Sat Oct 3 05:39:18 UTC 2020
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: ZyXEL NSA325 2-Bay Power Media Server
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:1M(u-boot),-(rootfs) root=PARTUUID=00f2f78e-a137-4081-b90d-8d8453c03e4b rw rootwait
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 500992K/524288K available (6741K kernel code, 549K rwdata, 1876K rodata, 300K init, 720K bss, 23296K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0872938   (8619 kB)
[    0.000000]       .init : 0xc0873000 - 0xc08be000   ( 300 kB)
[    0.000000]       .data : 0xc08be000 - 0xc094749c   ( 550 kB)
[    0.000000]        .bss : 0xc094749c - 0xc09fb658   ( 721 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:114
[    0.000010] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    7.155208] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    7.155372] Console: colour dummy device 80x30
[    7.155396] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[    7.245258] pid_max: default: 32768 minimum: 301
[    7.245333] Security Framework initialized
[    7.245401] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    7.245415] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    7.246012] Initializing cgroup subsys io
[    7.246039] Initializing cgroup subsys memory
[    7.246081] Initializing cgroup subsys devices
[    7.246101] Initializing cgroup subsys freezer
[    7.246118] Initializing cgroup subsys net_cls
[    7.246133] Initializing cgroup subsys perf_event
[    7.246152] Initializing cgroup subsys net_prio
[    7.246219] CPU: Testing write buffer coherency: ok
[    7.246603] Setting up static identity map for 0x81e0 - 0x8238
[    7.248238] devtmpfs: initialized
[    7.250008] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    7.250035] futex hash table entries: 256 (order: -1, 3072 bytes)
[    7.250423] pinctrl core: initialized pinctrl subsystem
[    7.251085] NET: Registered protocol family 16
[    7.251424] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    7.275281] cpuidle: using governor ladder
[    7.305279] cpuidle: using governor menu
[    7.305376] Kirkwood: MV88F6282-Rev-A1, TCLK=200000000.
[    7.305396] Feroceon L2: Enabling L2
[    7.305423] Feroceon L2: Cache support initialised.
[    7.307098] Kirkwood PCIe port 0: link up
[    7.307106] PCI: bus0 uses PCIe port 0
[    7.307279] PCI host bridge to bus 0000:00
[    7.307292] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    7.307301] pci_bus 0000:00: root bus resource [io  0x1000-0xffff]
[    7.307309] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    7.307933] PCI: bus0: Fast back to back transfers disabled
[    7.307970] pci 0000:00:01.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    7.336417] vgaarb: loaded
[    7.336671] SCSI subsystem initialized
[    7.337043] usbcore: registered new interface driver usbfs
[    7.337103] usbcore: registered new interface driver hub
[    7.337147] usbcore: registered new device driver usb
[    7.337262] pps_core: LinuxPPS API ver. 1 registered
[    7.337268] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    7.337291] PTP clock support registered
[    7.338053] clocksource: Switched to clocksource orion_clocksource
[    7.369298] FS-Cache: Loaded
[    7.378671] NET: Registered protocol family 2
[    7.379288] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    7.379343] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    7.379393] TCP: Hash tables configured (established 4096 bind 4096)
[    7.379448] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    7.379467] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    7.379624] NET: Registered protocol family 1
[    7.379874] RPC: Registered named UNIX socket transport module.
[    7.379883] RPC: Registered udp transport module.
[    7.379888] RPC: Registered tcp transport module.
[    7.379892] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    7.379938] pci 0000:00:01.0: enabling device (0140 -> 0142)
[    7.380232] Trying to unpack rootfs image as initramfs...
[    7.796993] Freeing initrd memory: 8024K
[    7.807842] VFS: Disk quotas dquot_6.6.0
[    7.808042] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    7.809639] FS-Cache: Netfs 'nfs' registered for caching
[    7.810499] NFS: Registering the id_resolver key type
[    7.810545] Key type id_resolver registered
[    7.810550] Key type id_legacy registered
[    7.810621] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    7.811578] fuse init (API version 7.23)
[    7.813128] aufs 4.4-20170911
[    7.817059] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    7.817075] io scheduler noop registered
[    7.817084] io scheduler deadline registered
[    7.817289] io scheduler cfq registered
[    7.817479] io scheduler bfq registered (default)
[    7.817485] BFQ I/O-scheduler: v7r11
[    7.817659] mv_xor mv_xor.0: Marvell shared XOR driver
[    7.859021] mv_xor mv_xor.0: Marvell XOR (Registers Mode): ( xor cpy )
[    7.859213] mv_xor mv_xor.1: Marvell shared XOR driver
[    7.898978] mv_xor mv_xor.1: Marvell XOR (Registers Mode): ( xor cpy )
[    7.903082] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.903842] console [ttyS0] disabled
[    7.923898] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33, base_baud = 12500000) is a 16550A
[    8.542702] console [ttyS0] enabled
[    8.557517] brd: module loaded
[    8.566194] loop: module loaded
[    8.569705] sata_mv sata_mv.0: cannot get optional clkdev
[    8.575218] sata_mv sata_mv.0: slots 32 ports 2
[    8.582071] scsi host0: sata_mv
[    8.585618] scsi host1: sata_mv
[    8.589056] ata1: SATA max UDMA/133 irq 21
[    8.593169] ata2: SATA max UDMA/133 irq 21
[    8.597869] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    8.604444] nand: Eon NAND 128MiB 3,3V 8-bit
[    8.608750] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    8.616356] Scanning device for bad blocks
[    8.625797] Bad eraseblock 100 at 0x000000c80000
[    8.635686] Bad eraseblock 200 at 0x000001900000
[    8.683558] 2 cmdlinepart partitions found on MTD device orion_nand
[    8.689855] Creating 2 MTD partitions on "orion_nand":
[    8.695012] 0x000000000000-0x000000100000 : "u-boot"
[    8.700393] 0x000000100000-0x000008000000 : "rootfs"
[    8.719221] libphy: orion_mdio_bus: probed
[    8.723427] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    8.732789] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:00:11:22:33:44
[    8.741710] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.748296] ehci-pci: EHCI PCI platform driver
[    8.752805] ehci-orion: EHCI orion driver
[    8.756893] orion-ehci orion-ehci.0: EHCI Host Controller
[    8.762362] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[    8.770102] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[    8.788076] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[    8.794766] hub 1-0:1.0: USB hub found
[    8.798590] hub 1-0:1.0: 1 port detected
[    8.803018] xhci_hcd 0000:00:01.0: xHCI Host Controller
[    8.808319] xhci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 2
[    8.816023] xhci_hcd 0000:00:01.0: hcc params 0x014042cb hci version 0x96 quirks 0x00000004
[    8.825118] hub 2-0:1.0: USB hub found
[    8.828959] hub 2-0:1.0: 2 ports detected
[    8.833448] xhci_hcd 0000:00:01.0: xHCI Host Controller
[    8.838738] xhci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 3
[    8.846223] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    8.855012] hub 3-0:1.0: USB hub found
[    8.858834] hub 3-0:1.0: 2 ports detected
[    8.863538] usbcore: registered new interface driver uas
[    8.869043] usbcore: registered new interface driver usb-storage
[    8.875115] usbcore: registered new interface driver ums-alauda
[    8.881131] usbcore: registered new interface driver ums-cypress
[    8.887199] usbcore: registered new interface driver ums-datafab
[    8.893295] usbcore: registered new interface driver ums_eneub6250
[    8.899613] usbcore: registered new interface driver ums-freecom
[    8.905678] usbcore: registered new interface driver ums-isd200
[    8.911688] usbcore: registered new interface driver ums-jumpshot
[    8.917844] usbcore: registered new interface driver ums-karma
[    8.923750] usbcore: registered new interface driver ums-onetouch
[    8.930036] usbcore: registered new interface driver ums-realtek
[    8.936107] usbcore: registered new interface driver ums-sddr09
[    8.942100] usbcore: registered new interface driver ums-sddr55
[    8.948161] usbcore: registered new interface driver ums-usbat
[    8.954349] mousedev: PS/2 mouse device common for all mice
[    9.108083] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    9.118071] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    9.128288] ata1.00: ATA-9: WDC WD30EFRX-68EUZN0, 82.00A82, max UDMA/133
[    9.135030] ata1.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    9.158272] ata1.00: configured for UDMA/133
[    9.178820] scsi 0:0:0:0: Direct-Access     ATA      WDC WD30EFRX-68E 0A82 PQ: 0 ANSI: 5
[    9.187659] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[    9.195737] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    9.201099] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    9.206793] sd 0:0:0:0: [sda] Write Protect is off
[    9.211728] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    9.270295] hub 1-1:1.0: USB hub found
[    9.274488] hub 1-1:1.0: 4 ports detected
[    9.282255]  sda: sda1 sda2 sda3
[    9.286874] sd 0:0:0:0: [sda] Attached SCSI disk
[    9.708079] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    9.728300] ata2.00: ATA-9: WDC WD30EFRX-68EUZN0, 82.00A82, max UDMA/133
[    9.735041] ata2.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    9.758271] ata2.00: configured for UDMA/133
[    9.778422] scsi 1:0:0:0: Direct-Access     ATA      WDC WD30EFRX-68E 0A82 PQ: 0 ANSI: 5
[    9.787245] sd 1:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[    9.795313] sd 1:0:0:0: Attached scsi generic sg1 type 0
[    9.800669] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    9.806253] sd 1:0:0:0: [sdb] Write Protect is off
[    9.811162] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    9.871340]  sdb: sdb1
[    9.874665] sd 1:0:0:0: [sdb] Attached SCSI disk
[    9.968070] rtc-mv rtc-mv: internal RTC not ticking
[    9.973083] i2c /dev entries driver
[    9.977425] sdhci: Secure Digital Host Controller Interface driver
[    9.983653] sdhci: Copyright(c) Pierre Ossman
[    9.988089] sdhci-pltfm: SDHCI platform and OF driver helper
[    9.994860] ledtrig-cpu: registered to indicate activity on CPUs
[   10.001020] usbcore: registered new interface driver r8712u
[   10.006813] gre: GRE over IPv4 demultiplexor driver
[   10.011767] NET: Registered protocol family 17
[   10.016320] Key type dns_resolver registered
[   10.021335] registered taskstats version 1
[   10.049952] Key type encrypted registered
[   10.054517] console [netcon0] enabled
[   10.058353] netconsole: network logging started
[   10.063230] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[   10.070288] hctosys: unable to open rtc device (rtc0)
[   10.077075] Freeing unused kernel memory: 300K
:: running early hook [udev]
Starting version 246.6-1.1-arch
:: running hook [udev]
:: Triggering uevents...
:: performing fsck on '/dev/sda1'
boot: ignoring check interval, broken_system_clock set
boot: clean, 16/6024 files, 14050/24066 blocks
:: mounting '/dev/sda1' on real root
[   11.391812] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[   11.439837] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
:: running cleanup hook [udev]
ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.

sh: can't access tty; job control turned off
[rootfs ]# [  126.738072] random: nonblocking pool is initialized

wpault
 
Posts: 17
Joined: Fri Oct 24, 2014 9:29 am

Re: uBoot 2016 upgrade on NSA325—but no uEnv.txt file create

Postby wpault » Thu Dec 10, 2020 2:03 pm

Thanks, summers. :D

It seems to think that /dev/sda1, the boot partition, should be the root partition and failing to identify that the root partition is actually /dev/sda2. I think I will have to merge the two partitions together as per your last post

df:
Code: Select all
Filesystem           1K-blocks      Used Available Use% Mounted on
dev                     250496         0    250496   0% /dev
run                     254656         4    254652   0% /run
/dev/sda1                23302     13286      8813  60% /new_root
[rootfs ]# ls /new_root
boot        lost+found
[rootfs ]# ls /new_root/boot
initramfs-linux.img  uboot-nsa325.env
uImage               uboot-nsa325.kwb
wpault
 
Posts: 17
Joined: Fri Oct 24, 2014 9:29 am

Re: uBoot 2016 upgrade on NSA325—but no uEnv.txt file create

Postby summers » Thu Dec 10, 2020 2:21 pm

Use:
Code: Select all
sudo blkid
to get the PARTUUID of the root partition, then try adding the uEnv.txt file something like:
Code: Select all
root=PARTUUID=94a2dc27-01
- but change it to your PARTUUID.

And whats interesting:
Code: Select all
[    8.616356] Scanning device for bad blocks
[    8.625797] Bad eraseblock 100 at 0x000000c80000
[    8.635686] Bad eraseblock 200 at 0x000001900000
is that it didn't find many bad blocks. So maybe try writing the env variables again, but think of trying a slower chip delay ...

... but you'll have to update to using the device tree first ...
summers
 
Posts: 923
Joined: Sat Sep 06, 2014 12:56 pm

Next

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 3 guests