Quantcast
Channel: Linux Device Hacking - uBoot
Viewing all 902 articles
Browse latest View live

/boot/uEnv.txt ignored (1 reply)

$
0
0
I have a FAT partition on a USB stick which is not being read using normal envs. Can't understand why...

envs:-

uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
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_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=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /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_ready_retry=15

If i stop autoboot and enter:-
setenv load_bsdenv 'usb start; load usb 0:1 0x810000 /boot/uEnv.txt; env import -t 0x810000 $filesize'
setenv boot_bsd 'run load_bsdenv; boot'

and then run:-
run boot_bsd

I get:-
reading /boot/uEnv.txt
287 bytes read in 64 ms (3.9 KiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
reading ubldr
295973 bytes read in 90 ms (3.1 MiB/s)
CACHE: Misaligned operation at range [01000098, 01030c04]
CACHE: Misaligned operation at range [01030c04, 01031707]
CACHE: Misaligned operation at range [01031708, 010330f0]
CACHE: Misaligned operation at range [010330f0, 0103558b]
CACHE: Misaligned operation at range [01035590, 01036c98]
CACHE: Misaligned operation at range [01036c98, 01036cf4]
CACHE: Misaligned operation at range [01036cf4, 01036d5c]
CACHE: Misaligned operation at range [01036d5c, 01036e30]
CACHE: Misaligned operation at range [01036e30, 01036e3c]
## Starting application at 0x01000098 ...
Consoles: U-Boot console  
Compatible U-Boot API signature found @0x7b12860

FreeBSD/arm U-Boot loader, Revision 1.2
(Thu Nov 30 14:06:37 GMT 2017 root@Test)

DRAM: 128MB
Number of U-Boot devices: 2
U-Boot env: loaderdev='usb 0:1'
Found U-Boot device: disk
  Checking unit=0 slice=1 partition=<auto>... good.
Booting from disk0s1:

uBoot clearly sees the disk:-
GoFlexHome> usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
GoFlexHome> ls usb 0:1 /
            .tmp/
            boot/
   295973   ubldr 
            tmp/
    12784   typescript.007 
    12310   typescript.008 
   314989   ubldr.pie 
      287   uenv.txt 
    12005   typescript 
    12005   typescript.006 
7 file(s), 3 dir(s)

What should I change so that /boot/uEnv.txt on this USB stick is read automatically?

NSA325 not booting after uBoot installation from stock rom (1 reply)

$
0
0
Hello Forum,
I've tried to flash my NSA325 from stock rom to Debian. Based on what I've read I thought I have to flash first the uBoot, which was successfully. My serial interface boots up with

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server

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
Hit any key to stop autoboot:  0

I'm trying to use the NSA325 internal SATA drive for the debian package. So I've created one primary partition and formated with EXT3 format and define the name of harddisk "rootfs".

And then begins my adventure. Based on the situation I don't have any linux system running (except a VM), I've tried it with a USB SATA adapter, Windows and ext3 driver for write access. Formating was done with Easeus Partition Master. Then I've unzip the file linux-4.20.6-kirkwood-tld-1-bodhi.tar.bz2 and unzip the DTS folder below \boot on my ext3 paritiion and even unzip linux-image-4.20.6-kirkwood-tld-1_1.0_armel.deb and paste the folder etc, usr, lib and boot.

Now the start of my NAS fails with the following output
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ST500LM000-1EJ162  Firm: DEM7 Ser#: W372BHJ5
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Unknown command 'mmc' - try 'help'

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            30461952        28833e54-01     0c Boot

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
reading /boot/uEnv.txt
** Unable to read file /boot/uEnv.txt **

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

Part    Start Sector    Num Sectors     UUID            Type
  1     63              976768002       dc8bfeba-01     83
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
reading /boot/uImage
** Unable to read file /boot/uImage **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ST500LM000-1EJ162  Firm: DEM7 Ser#: W372BHJ5
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
device ide 0:1
** File not found /boot/uImage **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
loading uImage ...
reading /boot/uImage
** Unable to read file /boot/uImage **
loading uInitrd ...
reading /boot/uInitrd
** Unable to read file /boot/uInitrd **
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
reading /boot/dts/kirkwood-pogo_e02.dtb
** Unable to read file /boot/dts/kirkwood-pogo_e02.dtb **
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!

Before I've restarted I've read the fw_printenv

/e-data/F05C-9247/test/tools # fw_printenv
bootargs=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=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
kernel_addr=C80000
MODEL_ID=AA03
PRODUCT_NAME=NSA-325
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=C8:6C:87:6F:54:8D
arcNumber=4495
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
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)
dtb_file=/boot/dts/kirkwood-nsa325.dtb

Inside the description of how to install Debian, I didn't understand how to use this commands:

apt-get remove flash-kernel 
dpkg -i linux-image-4.20.6-kirkwood-tld-1_1.0_armel.deb
With the Zyxel stock rom I couldn't run this command and on my VM I was afraid overwrite my original kernel inside the VM. This explain why I did all the extracting manually.

Now the Box doesn't boot anymore. Any hint would be really appreciated :-)


Best regards
Filou

NSA-310 How to (2 replies)

$
0
0
Hello,
I have an old NSA310 nas and would like to install debian. Still with stock firmware. No uBoot, nothing.

It seems that all detailed guides pointing to forum.nas-central.org which is not working anymore. I havent found any guide on this forum.

Is there any step-by-step guide how to change bootloader, boot debian?

Thanks,
Michal

tftpboot & loadderdev (no replies)

$
0
0
Here is my latest attempt to boot a recently built version of FreeBSD/ARM for the GoFlex Home using tftpboot:-

Hit any key to stop autoboot:  0 
GoFlexHome> setenv serverip 192.168.1.1
GoFlexHome> tftpboot 900000 gfh2/ubldr.bin
Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.23
Filename 'gfh2/ubldr.bin'.
Load address: 0x900000
Loading: #################
	 4.7 MiB/s
done
Bytes transferred = 244612 (3bb84 hex)
GoFlexHome> go 900000
## Starting application at 0x00900000 ...
Consoles: U-Boot console  
Compatible U-Boot API signature found @0x7b12860

FreeBSD/arm U-Boot loader, Revision 1.2
(Fri Mar 15 10:33:29 UTC 2019 root@Pristine)

DRAM: 128MB
Number of U-Boot devices: 1

U-Boot env: loaderdev not set, will probe all devices.
Found U-Boot device: net
Booting from net0:
/
can't load 'kernel'

Type '?' for a list of commands, 'help' for more detailed help.
loader>

This manages to run the FreeBSD boot loader, but I'm missing a couple of steps.

It seems that it is expecting a variable called loaderdev, so maybe I should have setenv loaderdev net0 or somesuch.
Still can't work out how to point ubldr.bin to kernel... would that be via DHCP using the filename and root-path options ?

Address in SROM (no replies)

$
0
0
I'm not sure of the origin of my current ethaddr but it does not corresond with the MAC address on the base of my GoFlex Home unit, so I thought I'd change it using setenv... but was surprised to see that the original MAC address was held in something called SROM.

How do you display the original MAC address? Presumably the Product Key can also be accessed...

environment.img (1 reply)

$
0
0
How do you create an environment.img from a text file?

I have looked for instructions but haven't come across any.

Howto reset envs to uboot.2016.05-tld-1.environment while in netconsole (3 replies)

$
0
0
In this instruction, the Pogo E02 is used as example. The current installed u-boot is uboot.2016.05-tld-1 or later.

It will work if you have uboot.2016.05-tld-1 or later installed on your box. Earlier u-boot will work with some more adjustment.

Preparation:

Download the uboot.2016.05-tld-1.environment.bodhi.tar tarball from the u-boot release thread:
https://forum.doozan.com/read.php?3,12381

Quote

a. Download the default u-boot envs at Dropbox:

uboot.2016.05-tld-1.environment.bodhi.tar
md5:
3823eef10011b864859d31a76470e0e3
sha256:
c8db95a4225e8d78bdaaaa372bd5a87e4b98f3448dd9c62fc96c72b2df1a997c

Instruction:

1. Extract the tarball uboot.2016.05-tld-1.environment.bodhi.tar and copy the envs file in text format to the Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 rootfs on USB.

(Assuming the USB rootfs is mounted on another Linux box as /media/sdb1)

cp -a uboot.2016.05-tld-1.environment /media/sdb1/boot/uEnv.txt

2. Modify the envs in uEnv.txt to make it usable in netconsole (that you already has set up and working).

Remove the following lines in uEnv.txt

ethaddr=52:3b:20:9c:11:51
ipaddr=192.168.0.231
serverip=192.168.0.220
stderr=serial
stdin=serial
stdout=serial

3. sync and umount the USB rootfs

cd
sync

4. Plug the USB rootfs into the Pogo E02 and power up, interrupt netconsole. At the prompt:

usb start
ext2load usb 0:1 0x810000 /boot/uEnv.txt
env import -t 0x810000 $filesize
printenv

5. At this point your current u-boot envs are set to a correct set of u-boot envs to boot the USB rootfs (If you want confirmation, post the log of netconsole up until this point here).

Go ahead and boot

boot

U-Boot for Buffalo Linkstations (7 replies)

$
0
0
Hello everyone,

I am still having some older Buffalo Linkstations lying around that I like to set up similar to my other NSA325. Due to restricted hardware I only like to use those as NFS-servers for rsync on another location.

I would like to use the same debian from here:
https://forum.doozan.com/read.php?2,12096
and benefit from the up-to-date kernels as well as from the possibility to boot from USB.

So I do have some questions for the LS-XHL, LS-CHLv2:
- assuming that it would be able to compile and flash this u-boot version. Would it then be possible to boot from an USB-flash drive? - Having a simple one partition layout on the installed hard drive instead of the 4 partition layout required by the buffalo boot-loader and systems
- would it remove the limit of 2TB hard-drives? as stated on the first post or could there be some more component that limits that

To give some information of what I found using a fresh installed Debian Stretch using the Debian Installer: https://miniconf.debian.or.jp/assets/files/Debian%20Installer%20for%20Buffalo%20Linkstation%20NAS.pdf

This is the output of dmesg of the LS-CHLv2
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0-9-marvell (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 Debian 4.9.168-1+deb9u2 (2019-05-13)
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt:Machine model: Buffalo Linkstation LS-XHL
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat c0596e1c, node_mem_map c3f78000
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,12M panic=5 BOOTVER=0.21
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 46548K/65536K available (3794K kernel code, 397K rwdata, 1132K rodata, 292K init, 245K bss, 18988K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
                   lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0xc0008000 - 0xc03bcc60   (3796 kB)
                     .init : 0xc04f9000 - 0xc0542000   ( 292 kB)
                     .data : 0xc0542000 - 0xc05a5770   ( 398 kB)
                      .bss : 0xc05a5770 - 0xc05e2d7c   ( 246 kB)
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns
[    0.000015] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.000850] Console: colour dummy device 80x30
[    0.000898] Calibrating delay loop... 595.96 BogoMIPS (lpj=1191936)
[    0.028102] pid_max: default: 32768 minimum: 301
[    0.028391] Security Framework initialized
[    0.028417] Yama: disabled by default; enable with sysctl kernel.yama.*
[    0.028664] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.028696] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.030365] CPU: Testing write buffer coherency: ok
[    0.030524] ftrace: allocating 17012 entries in 34 pages
[    0.098699] Setting up static identity map for 0x8200 - 0x823c
[    0.099125] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.104618] devtmpfs: initialized
[    0.114199] VFP support v0.3: not present
[    0.114488] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.114532] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.114928] pinctrl core: initialized pinctrl subsystem
[    0.116837] NET: Registered protocol family 16
[    0.117436] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.119934] cpuidle: using governor ladder
[    0.119960] cpuidle: using governor menu
[    0.120658] Feroceon L2: Enabling L2
[    0.120724] Feroceon L2: Cache support initialised.
[    0.121160] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.121332] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.129353] No ATAGs?
[    0.138796] clocksource: Switched to clocksource orion_clocksource
[    0.163587] VFS: Disk quotas dquot_6.6.0
[    0.163720] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.177802] NET: Registered protocol family 2
[    0.179342] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.179389] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.179426] TCP: Hash tables configured (established 1024 bind 1024)
[    0.179522] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.179561] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.179863] NET: Registered protocol family 1
[    0.179921] PCI: CLS 0 bytes, default 32
[    0.180331] Unpacking initramfs...
[    0.775952] Initramfs unpacking failed: junk in compressed archive
[    0.824423] Freeing initrd memory: 12292K
[    0.825633] audit: initializing netlink subsys (disabled)
[    0.825744] audit: type=2000 audit(0.788:1): initialized
[    0.826388] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.826540] zbud: loaded
[    0.829474] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.829720] io scheduler noop registered
[    0.829855] io scheduler cfq registered (default)
[    0.831961] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.835204] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.873207] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.873508] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.909188] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.909833] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.911597] console [ttyS0] disabled
[    0.911689] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 10416666) is a 16550A
[    1.234350] random: fast init done
[    1.389999] console [ttyS0] enabled
[    1.397270] mousedev: PS/2 mouse device common for all mice
[    1.403336] rtc-mv f1010300.rtc: retrieved alarm date/time is not valid.
[    1.410378] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    1.417567] i2c /dev entries driver
[    1.422770] ledtrig-cpu: registered to indicate activity on CPUs
[    1.429485] NET: Registered protocol family 17
[    1.434987] registered taskstats version 1
[    1.439181] zswap: loaded using pool lzo/zbud
[    1.446211] rtc-mv f1010300.rtc: setting system clock to 2019-05-15 13:52:24 UTC (1557928344)
[    1.456735] Freeing unused kernel memory: 292K
[    1.461210] This architecture does not have kernel memory protection.
[    1.633392] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    1.655879] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    1.666017] random: udevadm: uninitialized urandom read (16 bytes read)
[    2.044845] SCSI subsystem initialized
[    2.121506] libata version 3.00 loaded.
[    2.125174] sata_mv f1080000.sata: version 1.28
[    2.125476] sata_mv f1080000.sata: slots 32 ports 1
[    2.164932] scsi host0: sata_mv
[    2.174427] ata1: SATA max UDMA/133 irq 33
[    2.658864] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    2.669794] ata1.00: ATA-8: Hitachi HTS545050B9A300, PB4OC60G, max UDMA/133
[    2.676772] ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    2.690323] ata1.00: configured for UDMA/133
[    2.695445] scsi 0:0:0:0: Direct-Access     ATA      Hitachi HTS54505 C60G PQ: 0 ANSI: 5
[    2.735137] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    2.745568] sd 0:0:0:0: [sda] Write Protect is off
[    2.750415] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.750603] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.820143]  sda: sda1 sda2 sda3 sda4
[    2.832919] sd 0:0:0:0: [sda] Attached SCSI disk
[    4.023160] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    5.534223] NET: Registered protocol family 10
[    5.563986] ip_tables: (C) 2000-2006 Netfilter Core Team
[    5.584700] random: crng init done
[    5.588101] random: 7 urandom warning(s) missed due to ratelimiting
[    5.658887] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    5.677680] systemd[1]: Detected architecture arm.
[    5.714836] systemd[1]: Set hostname to <LS-CHL>.
[    7.187950] systemd[1]: Listening on Syslog Socket.
[    7.207584] systemd[1]: Listening on udev Control Socket.
[    7.227526] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    7.251503] systemd[1]: Listening on Journal Socket (/dev/log).
[    7.272941] systemd[1]: Created slice System Slice.
[    7.292753] systemd[1]: Created slice system-getty.slice.
[    7.317382] systemd[1]: Mounting Debug File System...
[    7.711238] RPC: Registered named UNIX socket transport module.
[    7.717359] RPC: Registered udp transport module.
[    7.722082] RPC: Registered tcp transport module.
[    7.726801] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    7.860257] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro
[    7.979610] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    9.127658] systemd-journald[128]: Received request to flush runtime journal from PID 1
[   10.453803] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   10.532770] gpio-fan gpio_fan: GPIO fan initialized
[   10.674916] m25p80 spi0.0: m25p40 (512 Kbytes)
[   10.722926] 3 ofpart partitions found on MTD device spi0.0
[   10.728681] Creating 3 MTD partitions on "spi0.0":
[   10.749068] orion_wdt: Initial timeout 25 sec
[   10.838907] 0x000000000000-0x000000060000 : "uboot"
[   10.904607] 0x000000060000-0x000000070000 : "dtb"
[   10.921710] libphy: Fixed MDIO Bus: probed
[   10.968870] 0x000000070000-0x000000080000 : "uboot_env"
[   10.979025] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   10.994993] usbcore: registered new interface driver usbfs
[   11.036059] usbcore: registered new interface driver hub
[   11.079262] marvell-cesa f1030000.crypto: CESA device successfully registered
[   11.113678] usbcore: registered new device driver usb
[   11.130059] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   11.172077] libphy: orion_mdio_bus: probed
[   11.200495] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   11.303602] ehci-orion: EHCI orion driver
[   11.355202] orion-ehci f1050000.ehci: EHCI Host Controller
[   11.407948] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   11.417894] mv643xx_eth_port mv643xx_eth_port.1 eth0: port 0 with MAC address 00:24:a5:55:90:23
[   11.495164] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   11.590901] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   11.651212] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   11.658040] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   11.665281] usb usb1: Product: EHCI Host Controller
[   11.670177] usb usb1: Manufacturer: Linux 4.9.0-9-marvell ehci_hcd
[   11.676371] usb usb1: SerialNumber: f1050000.ehci
[   11.943506] hub 1-0:1.0: USB hub found
[   11.980757] hub 1-0:1.0: 1 port detected
[   13.037850] Adding 524284k swap on /dev/sda3.  Priority:-1 extents:1 across:524284k FS
[   14.932890] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   15.117573] NFSD: starting 90-second grace period (net c05902c8)
[   17.179161] mv643xx_eth_port mv643xx_eth_port.1 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   17.189047] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready


quite similar for the LS-XHL
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0-9-marvell (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 Debian 4.9.168-1+deb9u2 (2019-05-13)
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt:Machine model: Buffalo Linkstation LS-XHL
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat c0596e1c, node_mem_map c3f78000
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,12M panic=5 BOOTVER=0.10
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 46548K/65536K available (3794K kernel code, 397K rwdata, 1132K rodata, 292K init, 245K bss, 18988K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
                   lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0xc0008000 - 0xc03bcc60   (3796 kB)
                     .init : 0xc04f9000 - 0xc0542000   ( 292 kB)
                     .data : 0xc0542000 - 0xc05a5770   ( 398 kB)
                      .bss : 0xc05a5770 - 0xc05e2d7c   ( 246 kB)
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000009] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000519] Console: colour dummy device 80x30
[    0.000552] Calibrating delay loop... 1191.93 BogoMIPS (lpj=2383872)
[    0.020065] pid_max: default: 32768 minimum: 301
[    0.020232] Security Framework initialized
[    0.020249] Yama: disabled by default; enable with sysctl kernel.yama.*
[    0.020397] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.020417] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.021498] CPU: Testing write buffer coherency: ok
[    0.021600] ftrace: allocating 17012 entries in 34 pages
[    0.057665] Setting up static identity map for 0x8200 - 0x823c
[    0.057927] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.061444] devtmpfs: initialized
[    0.067396] VFP support v0.3: not present
[    0.067583] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.067612] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.067864] pinctrl core: initialized pinctrl subsystem
[    0.069109] NET: Registered protocol family 16
[    0.069519] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.071120] cpuidle: using governor ladder
[    0.071138] cpuidle: using governor menu
[    0.071503] Feroceon L2: Enabling L2
[    0.071546] Feroceon L2: Cache support initialised.
[    0.071819] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.071920] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.076615] No ATAGs?
[    0.082199] clocksource: Switched to clocksource orion_clocksource
[    0.096881] VFS: Disk quotas dquot_6.6.0
[    0.096966] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.105318] NET: Registered protocol family 2
[    0.106270] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.106300] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.106323] TCP: Hash tables configured (established 1024 bind 1024)
[    0.106387] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.106410] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.106598] NET: Registered protocol family 1
[    0.106635] PCI: CLS 0 bytes, default 32
[    0.106891] Unpacking initramfs...
[    0.421734] Initramfs unpacking failed: junk in compressed archive
[    0.457006] Freeing initrd memory: 12292K
[    0.457770] audit: initializing netlink subsys (disabled)
[    0.457846] audit: type=2000 audit(0.436:1): initialized
[    0.458304] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.458400] zbud: loaded
[    0.460166] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.460320] io scheduler noop registered
[    0.460399] io scheduler cfq registered (default)
[    0.461582] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.463498] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.491541] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.491737] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.519521] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.519936] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.520992] console [ttyS0] disabled
[    0.521052] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    0.999129] console [ttyS0] enabled
[    1.004876] mousedev: PS/2 mouse device common for all mice
[    1.010728] rtc-mv f1010300.rtc: invalid RTC date, resetting to January 1st, 2013
[    1.018325] rtc-mv f1010300.rtc: retrieved alarm date/time is not valid.
[    1.025268] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    1.032382] i2c /dev entries driver
[    1.036908] ledtrig-cpu: registered to indicate activity on CPUs
[    1.043396] NET: Registered protocol family 17
[    1.048482] registered taskstats version 1
[    1.052670] zswap: loaded using pool lzo/zbud
[    1.058696] rtc-mv f1010300.rtc: setting system clock to 2013-01-01 20:12:23 UTC (1357071143)
[    1.068497] Freeing unused kernel memory: 292K
[    1.072985] This architecture does not have kernel memory protection.
[    1.177233] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    1.194881] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    1.202589] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.450774] SCSI subsystem initialized
[    1.502422] libata version 3.00 loaded.
[    1.504584] sata_mv f1080000.sata: version 1.28
[    1.504790] sata_mv f1080000.sata: slots 32 ports 1
[    1.534378] scsi host0: sata_mv
[    1.537849] ata1: SATA max UDMA/133 irq 33
[    2.018295] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    2.029149] ata1.00: ATA-8: Hitachi HTS545050B9A300, PB4OC60G, max UDMA/133
[    2.036170] ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    2.049634] ata1.00: configured for UDMA/133
[    2.054480] scsi 0:0:0:0: Direct-Access     ATA      Hitachi HTS54505 C60G PQ: 0 ANSI: 5
[    2.078644] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    2.087921] sd 0:0:0:0: [sda] Write Protect is off
[    2.092776] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.092890] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.161770]  sda: sda1 sda2 sda3 sda4
[    2.171209] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.298215] random: fast init done
[    5.612567] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    5.719696] random: crng init done
[    5.723126] random: 7 urandom warning(s) missed due to ratelimiting
[    6.604879] systemd[1]: System time before build time, advancing clock.
[    6.874622] NET: Registered protocol family 10
[    6.905414] ip_tables: (C) 2000-2006 Netfilter Core Team
[    7.008198] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    7.026845] systemd[1]: Detected architecture arm.
[    7.068088] systemd[1]: Set hostname to <LS-CHL>.
[    8.400801] systemd[1]: Listening on Syslog Socket.
[    8.418645] systemd[1]: Listening on RPCbind Server Activation Socket.
[    8.442633] systemd[1]: Listening on Journal Socket (/dev/log).
[    8.462625] systemd[1]: Listening on udev Kernel Socket.
[    8.482817] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    8.507311] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    8.534663] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    8.978522] RPC: Registered named UNIX socket transport module.
[    8.984508] RPC: Registered udp transport module.
[    8.989242] RPC: Registered tcp transport module.
[    8.993975] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    9.041216] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro
[    9.166362] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    9.865723] systemd-journald[131]: Received request to flush runtime journal from PID 1
[   10.783744] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   10.845702] orion_wdt: Initial timeout 21 sec
[   10.903137] usbcore: registered new interface driver usbfs
[   10.919943] usbcore: registered new interface driver hub
[   10.943593] usbcore: registered new device driver usb
[   10.973529] m25p80 spi0.0: m25p40 (512 Kbytes)
[   10.994869] 3 ofpart partitions found on MTD device spi0.0
[   11.000443] Creating 3 MTD partitions on "spi0.0":
[   11.014126] gpio-fan gpio_fan: GPIO fan initialized
[   11.063367] libphy: Fixed MDIO Bus: probed
[   11.070865] 0x000000000000-0x000000060000 : "uboot"
[   11.103873] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   11.132678] 0x000000060000-0x000000070000 : "dtb"
[   11.193727] 0x000000070000-0x000000080000 : "uboot_env"
[   11.201340] marvell-cesa f1030000.crypto: CESA device successfully registered
[   11.232327] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   11.266098] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   11.301592] ehci-orion: EHCI orion driver
[   11.315295] libphy: orion_mdio_bus: probed
[   11.416600] orion-ehci f1050000.ehci: EHCI Host Controller
[   11.458300] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   11.487746] mv643xx_eth_port mv643xx_eth_port.1 eth0: port 0 with MAC address 00:24:a5:55:57:be
[   11.562463] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   11.634276] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   11.662756] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   11.669616] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   11.676954] usb usb1: Product: EHCI Host Controller
[   11.681873] usb usb1: Manufacturer: Linux 4.9.0-9-marvell ehci_hcd
[   11.688105] usb usb1: SerialNumber: f1050000.ehci
[   11.905440] hub 1-0:1.0: USB hub found
[   11.954030] hub 1-0:1.0: 1 port detected
[   12.357185] Adding 524284k swap on /dev/sda3.  Priority:-1 extents:1 across:524284k FS
[   13.470374] NFSD: starting 90-second grace period (net c05902c8)
[   13.567458] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   15.782909] mv643xx_eth_port mv643xx_eth_port.1 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   15.792826] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

here is what: cat /proc/mtd for LS-CHLv2 (and LS-XHL)
dev:    size   erasesize  name
mtd0: 00060000 00010000 "uboot"
mtd1: 00010000 00010000 "dtb"
mtd2: 00010000 00010000 "uboot_env"

output of grep -a --null-data U-Boot /dev/mtd0 for LS-CHLv2
U-Boot 1.1.4 (Mar 15 2011 - 14:53:08) Marvell version: 3.4.25If U-Boot Endiannes is going to change (LE->BE or BE->LE), Then Env parameters should be overriden..
U-Boot
** Invalid partition type "%.32s" (expect "U-Boot")
U-Boot code: %08lX -> %08lX  BSS: -> %08lX
Addresses %dM - 0M are saved for the U-Boot usage.

and LS-XHL
U-Boot 1.1.4 (Jul 24 2009 - 19:21:56) Marvell version: 3.4.16If U-Boot Endiannes is going to change (LE->BE or BE->LE), Then Env parameters should be overriden..
U-Boot
** Invalid partition type "%.32s" (expect "U-Boot")
U-Boot code: %08lX -> %08lX  BSS: -> %08lX
Addresses %dM - 0M are saved for the U-Boot usage.


and this is cat /dev/mtd2 for LS-CHLv2
▒q▒baudrate=115200loads_echo=0ipaddr=192.168.11.150serverip=192.168.11.1rootpath=/mnt/ARM_FS/netmask=255.255.255.0eth1addr=00:24:A5:55:90:11stdin=serialstdout=serialstderr=serialconsole=console=ttyS0,115200mainlineLinux=noCASset=minenaMonExt=noenaCpuStream=noenaWrAllo=nopexMode=RCdisL2Cache=nosetL2CacheWT=yesdisL2Prefetch=yesenaICPref=yesenaDCPref=yessata_dma_mode=yesMALLOC_len=1bootargs_root=root=/dev/sda2 rw initrd=0x00800040,12M panic=5bootargs_end=:::DB88FXX81:eth0:noneimage_name=uImagebuffalo_ver=BOOTVER=0.21kernel=uImage.buffaloinitrd=initrd.buffalobootcommon=setenv bootargs $console $bootargs_root $bootargs_func $buffalo_ver $mtdparts $tftpboot $nandboot; bootm 0x00100000 0x00800000tftpbootcmd=tftp 0x00100000 $kernel; tftp 0x00800000 $initrd; setenv tftpboot tftpboot=yes; run bootcommonidebootcmd=ext2load ide 0:1 0x00100000 /$kernel; ext2load ide 0:1 0x00800000 /$initrd; run bootcommonbootorder=idebootcmd=for i in $bootorder; do run ${i}bootcmd; donebootdelay=3disaMvPnp=noethaddr=00:50:43:42:06:0bethmtu=1500eth1mtu=1500mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500usb0Mode=hostnetretry=norcvrip=169.254.100.100loadaddr=0x02000000autoload=noenaAutoRecovery=y

and LS-XHLv2
I▒bootdelay=3baudrate=115200loads_echo=0ipaddr=192.168.11.150serverip=192.168.11.1rootpath=/mnt/ARM_FS/netmask=255.255.255.0eth1addr=00:24:A5:55:57:11

(the kernel does not create an /etc/fw_env.config


Here is why I believe that basically it should be possible:
configs in the git repo:
https://github.com/mibodhi/u-boot-kirkwood/blob/2017.07-kirkwood-tld-1/configs/lschlv2_defconfig
https://github.com/mibodhi/u-boot-kirkwood/blob/2017.07-kirkwood-tld-1/configs/lsxhl_defconfig
and here the README:
https://github.com/mibodhi/u-boot-kirkwood/blob/697f50bf18e71406db8fa9b4bf08344ae6640146/board/buffalo/lsxl/README
though I did not compile the u-boot.kwb file yet - I still would not know if I could flash it - since
the size of the u-boot part itself seems smaller then in this thread
all mtd parts together would have sufficient size - but I do not know how to handle the 3 different parts of mtd0-mtd2

Any help is welcome. I can provide more Information when needed.

U-Boot for Pogoplug Pogo E01 (003-SP1001) (16 replies)

$
0
0
I want to update the U-Boot. How to do it correctly for my model?
Need uboot.2017.07-tld-2.sheevaplug.bodhi.tar ?
Thanks.

U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
Seagate FreeAgent DockStar

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported

** Invalid boot device **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000020000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            475 MiB
UBI: number of good PEBs:        3787
UBI: number of bad PEBs:         13
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             3746
UBI: total number of reserved PEBs: 41
UBI: number of PEBs reserved for bad PEB handling: 37
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** Block device usb 3 not supported
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS: .......  read_nand_cached: error reading nand off 0xd80000 size 8192 bytes
.. done.
### JFFS2 load complete: 524288 bytes loaded to 0x800000
## Starting application at 0x00800200 ...


U-Boot 1.1.4 (Mar 18 2009 - 16:11:55) Cloud Engines (3.4.16)

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 00690D60

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)
CLOUD ENGINES BOARD: PP_GTI:3.0

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x100000, size 0x300000

Reading data from 0x3ff800 -- 100% complete.
 3145728 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.22.18
   Created:      2009-04-21  23:18:54 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1973904 Bytes =  1.9 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux............................................................................................................................ done, booting the kernel.
Linux version 2.6.22.18 (bdietrich@XPC) (gcc version 4.2.1) #30 Tue Apr 21 16:18:51 PDT 2009
CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053177
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists.  Total pages: 32512
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 ro
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB 0MB 0MB 0MB = 128MB total
Memory: 125824KB available (3584K code, 252K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 128MB 
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e8000000, size 128MB 
PEX0_IO ....base f2000000, size   1MB 
INTER_REGS ....base f1000000, size   1MB 
NFLASH_CS ....base fa000000, size   2MB 
SPI_CS ....base f4000000, size  16MB 
BOOT_ROM_CS ....no such
DEV_BOOTCS ....no such
CRYPT_ENG ....base f0000000, size   2MB 

  Marvell Development Board (LSP Version KW_LSP_4.2.7_patch2)-- SHEEVA PLUG  Soc: 88F6281 A0 LE

 Detected Tclk 200000000 and SysClk 400000000 
MV Buttons Device Load
Marvell USB EHCI Host controller #0: c0535600
PEX0 interface detected no Link.
PCI: bus0: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Time: kw_clocksource clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
RTC registered
Use the XOR engines (acceleration) for enhancing the following functions:
  o RAID 5 Xor calculation
  o kernel memcpy
  o kenrel memzero
Number of XOR engines to use: 4
cesadev_init(c0011668)
mvCesaInit: sessions=640, queue=64, pSram=f0000000
MV Buttons Driver Load
squashfs: version 3.3 (2007/10/31) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
Loading Marvell Ethernet Driver:
  o Cached descriptors in DRAM
  o DRAM SW cache-coherency
  o Single RX Queue support - ETH_DEF_RXQ=0
  o Single TX Queue support - ETH_DEF_TXQ=0
  o TCP segmentation offload enabled
  o Receive checksum offload enabled
  o Transmit checksum offload enabled
  o Network Fast Processing (Routing) supported
  o Driver ERROR statistics enabled
  o Driver INFO statistics enabled
  o Proc tool API enabled
  o Rx descripors: q0=128
  o Tx descripors: q0=532
  o Loading network interface(s):
    o eth0, ifindex = 1, GbE port = 0
    o eth1, ifindex = 2, GbE port = 1

mvFpRuleDb (c7eb9000): 1024 entries, 4096 bytes
Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
Copyright (c) 1999-2006 Intel Corporation.
e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation

Warning Sata is Powered Off
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 2198 at 0x112c0000
Bad eraseblock 2278 at 0x11cc0000
Bad eraseblock 2347 at 0x12560000
Bad eraseblock 2620 at 0x14780000
Bad eraseblock 2789 at 0x15ca0000
Bad eraseblock 3080 at 0x18100000
Bad eraseblock 3110 at 0x184c0000
Bad eraseblock 3311 at 0x19de0000
Bad eraseblock 3448 at 0x1af00000
Bad eraseblock 3513 at 0x1b720000
Bad eraseblock 3563 at 0x1bd60000
Bad eraseblock 3610 at 0x1c340000
Bad eraseblock 3812 at 0x1dc80000
Using static partition definition
Creating 4 MTD partitions on "nand_mtd":
0x00000000-0x00100000 : "u-boot"
0x00100000-0x00500000 : "uImage"
0x00500000-0x02500000 : "root"
0x02500000-0x20000000 : "data"
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Linux telephony interface: v1.00
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
raid6: int32x1     97 MB/s
raid6: int32x2    114 MB/s
raid6: int32x4    122 MB/s
raid6: int32x8    110 MB/s
raid6: using algorithm int32x4 (122 MB/s)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
raid5: measuring checksumming speed
   arm4regs  :  1084.000 MB/sec
   8regs     :   754.800 MB/sec
   32regs    :   899.600 MB/sec
raid5: using function: arm4regs (1084.000 MB/sec)
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
Empty flash at 0x008f431c ends at 0x008f4800
VFS: Mounted root (jffs2 filesystem) readonly.
Freeing init memory: 120K
init started: BusyBox v1.7.0 (2008-02-26 19:25:17 IST)
starting pid 264, tty '': '/etc/init.d/rcS'
eth0: started
udhcpc (v1.7.0) started
HWADDR 00 0x25 0x31 0x00 0x08 0x4b
PIP0 8
PIP1 75
cat: can't open '/etc/resolv.conf': No such file or directory
route: SIOCDELRT: No such process
grep: /etc/resolv.conf: No such file or directory
Sending discover...
Sending discover...
Sending discover...
HWADDR 00 0x25 0x31 0x00 0x08 0x4b
PIP0 8
PIP1 75
No lease, forking to background
starting pid 369, tty '': '/bin/sh'
-sh-3.2# ls

NSA320 Bad eraseblock (11 replies)

$
0
0
Hi everyone,

first of all thx for all your work, you are doing a great job!

I'm trying to install uboot on my zyxel NSA320 device, but during the check for the bad blocks I'm getting this message:

Scanning device for bad blocks
Bad eraseblock 4 at 0x000000080000

Could you please advice me, what I have to do now?

openwrt using Bodhi's uboot (2 replies)

$
0
0
Hi,

I have dockstar and Goflex home with Bodhi's u-boot. Can I boot openwrt with OS on external usb without writing it on local flash? If yes, how?

NAS326 how to boot with UART? (1 reply)

$
0
0
Hello, I'm new to the forum.

I have a Zyxel NAS326 with a physically damaged NAND memory - it does not save the configuration. I want to buy a new memory, unfortunately I do not have a programmer to program it. That's why I am trying to boot the device via UART.
I'm trying a modified version of kwboot, which should work with the Armada 38x processor: https://forum.armbian.com/topic/4444-solved-kwboot-on-armada-38x/
and the uboot file from this forum: https://forum.doozan.com/read.php?2,27108,31893#msg-31893
I tried UART converters on FTDI, PL2303 and CP2102 chips. Each time loading is interrupted after a few percent, and the device resets.

I attach a screen from the terminal.

Please help. Thank you.

NSA325 flashing questions (no replies)

$
0
0
Hello,

I bought a couple of 4TB WD disks for my NSA325, which I want to use in RAID 1 and decided that it's a good time to make the box more configurable by either installing a proper Linux distribution or something like Open Media Vault / OpenWRT. Essentially I'd like to have a web interface for common setup + SSH console and access to package repository for fine tuning. Recommendations about such interface are welcome.

As I understand, the first step for that is to upgrade U-Boot. I have some questions about this process.

  1. If I upgrade U-Boot according to instruction, will it be possible to use manufacturer's system / interface as a backup option?
  2. Where should new system be installed - USB flash drive or some HDD partition?
  3. I have a bad block at NAND (Bad eraseblock 162 at 0x000001440000) - how problematic is it?
  4. Considering the note from instruction:
    Quote
    bodhi
    Note: for boxes such as Pogo V4 and Zyxel NSA3xx, the mtd partition definition are kept the same as stock definition, therefore is different from the one above.
    - should I type "mtd1" everywhere instead of "mtd0"? The output of the appropriate commands from step 1 is below.

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

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"

Thanks in advance!

New uBoot for PogoPlug V3 question (1 reply)

$
0
0
Hi,

i was playing around with the pogoplug V4 in uboot and found the nice sntp (and other) commands to setup time during boot. I tried that on the Pogoplug V3, but the exisiting SATA uboot version does not support these commands.

I looked at https://forum.doozan.com/read.php?3,16017,page=1 for creating a new uboot to boot from SATA (not for flashing), but it is not very straight forward for me and i have a few question:

1. Can i compile the uBoot from https://github.com/mibodhi/u-boot-oxnas on any computer or it has to happen on an arm device?
2. Is there any base config where i can start from? If not what should i set in the menu config to compile it for oxnas?
3. As i know by default it creates a flashable image. What do i need to change to get a image usable for SATA boot?

I am pretty new for uBoot maybe there is a good guide for it but i did not find it so far.

Thanks

Bad eraseblock - Save to flash U-Boot (no replies)

$
0
0
Hi all,

I am looking at upgrading the ootb U-Boot of my NSA325 to the latest release from this forum. Howver when I check for bad eraseblocks in dmesg, I get following result:
[    2.047146] nand: Samsung NAND 128MiB 3,3V 8-bit
[    2.052016] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.059648] Scanning device for bad blocks
[    2.110339] Bad eraseblock 454 at 0x0000038c0000
[    2.173313] 9 fixed-partitions partitions found on MTD device orion_nand
[    2.180054] Creating 9 MTD partitions on "orion_nand":
[    2.185215] 0x000000000000-0x000000100000 : "uboot"
[    2.190423] 0x000000100000-0x000000180000 : "uboot_env"
[    2.195919] 0x000000180000-0x000000200000 : "key_store"
[    2.201438] 0x000000200000-0x000000280000 : "info"
[    2.206496] 0x000000280000-0x000000c80000 : "etc"
[    2.211516] 0x000000c80000-0x000001680000 : "kernel_1"
[    2.216941] 0x000001680000-0x000004640000 : "rootfs1"
[    2.222481] 0x000004640000-0x000005040000 : "kernel_2"
[    2.227914] 0x000005040000-0x000008000000 : "rootfs2"

I would read it that way, that the bad eraseblock is in 'kernel_1'. Am I correct and is it save to flash the U-Boot?

Regards
Ruediger

Pogoplug Mobile with ArchLinux, MMC uBoot, and Rescue (2 replies)

$
0
0
I recently picked up the Pogoplug Mobile I had laying around that had ArchLinuxArm booting up via the MMC enable uboot from here:

https://forum.doozan.com/read.php?3,7477,7553

and the NAND rescue system here:

https://archlinuxarm.org/forum/viewtopic.php?t=8383

I followed the instructions here:

https://forum.doozan.com/read.php?3,12381

to upgrade to the newest version of Bodhi's uboot, and I got all of the expected output, but now I can no longer ssh into the box. The green light is steady on the front, though after the first reboot it was blinking red rapidly. What exactly did I screw up? I basically am trying to move to Debian (booting from the SD card) as it's more supported, and having some way to get into a rescue system would be nice in case the OS gets corrupted somehow. Thanks in advance for any input!

-Chris

P.S. - I still have a Pogoplug v4 that was setup the same way as the mobile, so that currently still works in case the Mobile is now a lost cause.

Can't write uboot env after upgrade to Debian Buster (1 reply)

$
0
0
I have a strange issue since upgrading to Debian Buster... The MTD setup by the kernel is messed up. It doesn't match the definition passed by uboot from the command line. And the partitions are set as RO. Therefore, it's impossible to use fw_printenv anymore to configure the bootloader form the OS.

I confirmed the discrepency going from Debian Stretch (9) with the official debian kernel package "linux-image-marvell" to Debian Buster (10) with the same updated official kernel package.

I have the same issue both with my dockstars and goflexnets (of course loaded with the corresponding dtb file).


Here's the initial uboot output which is identical wether I boot to Stretch or to Buster:

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:17:19 -0700)
Seagate GoFlex Net

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
*** Unhandled DHCP Option in OFFER/ACK: 42
*** Unhandled DHCP Option in OFFER/ACK: 42
DHCP client bound to address 192.168.1.14 (3921 ms)

** Getting IP Settings by DHCP (net_dhcp_c = 1):
** IP Address: 192.168.1.14
** Subnet Mask: 255.255.255.0
** Def Gateway: 192.168.1.254

** Getting NFS Boot Server by DHCP (net_dhcp_s and net_dhcp_c = 1):
** NFS Boot Server: 192.168.1.1

** Kernel Boot Arguments:
** console=ttyS0,115200 root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=192.168.1.1:/srv/nfs/hosts/goflex-263BA8/,rsize=32768,wsize=32768,hard,intr,udp,v3 ip=192.168.1.14:192.168.1.1:192.168.1.254:255.255.255.0:dockstar:eth0:off mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)

NFS loading uImage :192.168.1.1:/srv/nfs/hosts/goflex-263BA8/boot/uImage ...
done
Bytes transferred = 2043544 (1f2e98 hex)

NFS loading uInitrd :192.168.1.1:/srv/nfs/hosts/goflex-263BA8/boot/uInitrd ...
done
Bytes transferred = 14739343 (e0e78f hex)

NFS loading DTB :192.168.1.1:/srv/nfs/hosts/goflex-263BA8/boot/dts/kirkwood-goflexnet.dtb ...
###
done
Bytes transferred = 11397 (2c85 hex)

## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.19.0-5-marvell
   Created:      2019-07-27  19:14:38 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2043480 Bytes = 1.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.19.0-5-marvell
   Created:      2019-07-27  19:14:38 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    14739279 Bytes = 14.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
   Booting using the fdt blob at 0x2000000
   Loading Kernel Image ... OK
   Loading Ramdisk to 06cff000, end 07b0d74f ... OK
   Loading Device Tree to 06cf9000, end 06cfec84 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-5-marvell (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-7)) #1 Debian 4.19.37-5 (2019-06-19)

uboot config and kernel cmdline (Debian version independant) :
# fw_printenv
arcNumber=3089
autoload=no
bootargs=console=ttyS0,115200 root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=192.168.1.1:/srv/nfs/hosts/dockstar/,rsize=32768,wsize=32768,hard,intr,udp,v3 ip=192.168.1.14:192.168.1.1:192.168.1.254:255.255.255.0:dockstar:eth0:off mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
bootcmd=run net_bootcmd
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
bootdev=usb
bootfile=gpxelinux.0
console=ttyS0,115200
def_bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dnsip=192.168.1.254
dtb_file=/boot/dts/kirkwood-goflexnet.dtb
ethact=egiga0
ethaddr=00:10:75:26:3B:A8
gatewayip=192.168.1.254
hostname=Goflex-Test
if_netconsole=ping $serverip
ipaddr=192.168.1.14
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x02000000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
net_bootcmd=run net_check_dhcp_c; run net_check_dhcp_s; run net_set_bootargs; run net_bootcmd_exec
net_bootcmd_exec=run net_load_uimage; if run net_load_initrd; then if run net_load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
net_check_dhcp_c=if test $net_dhcp_c -eq 1 ; then run net_set_c_ip_dhcp; else run net_set_c_ip_stat; fi;echo ** IP Address:  $ipaddr; echo ** Subnet Mask: $netmask; echo ** Def Gateway: $gatewayip
net_check_dhcp_s=if test $net_dhcp_s -eq 1 && test $net_dhcp_c -eq 1 ; then run net_set_s_ip_dhcp; else run net_set_s_ip_stat; fi; echo ** NFS Boot Server: $net_nfs_server; echo
net_dhcp_c=1
net_dhcp_s=1
net_load_dtb=echo NFS loading DTB     :$net_nfs_server:$net_nfs_path/$net_nfs_dtb ...   ; nfs $load_dtb_addr    $net_nfs_server:$net_nfs_path/$net_nfs_dtb; echo
net_load_initrd=echo NFS loading uInitrd :$net_nfs_server:$net_nfs_path/$net_nfs_initrd ...; nfs $load_initrd_addr $net_nfs_server:$net_nfs_path/$net_nfs_initrd; echo
net_load_uimage=echo NFS loading uImage  :$net_nfs_server:$net_nfs_path/$net_nfs_kernel ...; nfs $load_uimage_addr $net_nfs_server:$net_nfs_path/$net_nfs_kernel; echo
net_nfs_dtb=boot/dts/kirkwood-goflexnet.dtb
net_nfs_initrd=boot/uInitrd
net_nfs_kernel=boot/uImage
net_nfs_path=/srv/nfs/hosts/goflex-263BA8
net_nfs_server=192.168.1.1
net_set_bootargs=setenv serverip $net_nfs_server; setenv bootargs console=$console root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=$net_nfs_server:$net_nfs_path/,rsize=32768,wsize=32768,hard,intr,udp,v3 ip=$ipaddr:$net_nfs_server:$gatewayip:$netmask:dockstar:eth0:off $mtdparts $custom_params; echo ** Kernel Boot Arguments:; echo ** $bootargs; echo
net_set_c_ip_dhcp=dhcp; echo; echo ** Getting IP Settings by DHCP (net_dhcp_c = 1):
net_set_c_ip_stat=setenv ipaddr $net_c_ipaddr; setenv netmask $net_c_netmask; setenv gatewayip $net_c_gatewayip; echo; echo ** Using static IP Settings (net_dhcp_c = 0):
net_set_s_ip_dhcp=setenv net_nfs_server $serverip;echo; echo ** Getting NFS Boot Server by DHCP (net_dhcp_s and net_dhcp_c = 1):
net_set_s_ip_stat=echo; echo ** Using static NFS Boot Server (net_dhcp_s or net_dhcp_c = 0) :
netmask=255.255.255.0
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.1
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
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_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
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_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=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /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_ready_retry=15

# cat /proc/cmdline
console=ttyS0,115200 root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=192.168.1.1:/srv/nfs/hosts/goflex-263BA8/,rsize=32768,wsize=32768,hard,intr,udp,v3 ip=192.168.1.14:192.168.1.1:192.168.1.254:255.255.255.0:dockstar:eth0:off mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)

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

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0               0xc0000         0x20000         0x20000

Expected behavior as visible in Debian Stetch:

# cat /etc/debian_version
9.9

# uname -a
Linux dockstar 4.9.0-9-marvell #1 Debian 4.9.168-1 (2019-04-12) armv5tel GNU/Linux

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 0db00000 00020000 "data"

# dmesg | grep -e mtd -e boot -e 0x000
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=192.168.1.1:/srv/nfs/hosts/goflex-263BA8/,rsize=32768,wsize=32768,hard,intr,udp,v3 ip=192.168.1.14:192.168.1.1:192.168.1.254:255.255.255.0:dockstar:eth0:off mtdparts=orion_nand:1M(u-boo ),4M(uImage),32M(rootfs),-(data)
[    1.914595] 0x000000000000-0x000000100000 : "u-boot"
[    1.920794] 0x000000100000-0x000000500000 : "uImage"
[    1.926926] 0x000000500000-0x000002500000 : "rootfs"
[    1.933162] 0x000002500000-0x000010000000 : "data"

# ls -l /dev/mtd*
crw------- 1 root root 90, 0 2019-08-03 18:30 /dev/mtd0
crw------- 1 root root 90, 1 2019-08-03 18:30 /dev/mtd0ro
crw------- 1 root root 90, 2 2019-08-03 18:30 /dev/mtd1
crw------- 1 root root 90, 3 2019-08-03 18:30 /dev/mtd1ro
crw------- 1 root root 90, 4 2019-08-03 18:30 /dev/mtd2
crw------- 1 root root 90, 5 2019-08-03 18:30 /dev/mtd2ro
crw------- 1 root root 90, 6 2019-08-03 18:30 /dev/mtd3
crw------- 1 root root 90, 7 2019-08-03 18:30 /dev/mtd3ro
brw-rw---- 1 root disk 31, 0 2019-08-03 18:30 /dev/mtdblock0
brw-rw---- 1 root disk 31, 1 2019-08-03 18:30 /dev/mtdblock1
brw-rw---- 1 root disk 31, 2 2019-08-03 18:30 /dev/mtdblock2
brw-rw---- 1 root disk 31, 3 2019-08-03 18:30 /dev/mtdblock3


# fw_setenv test 1

# fw_printenv | grep test=
test=1

#


Observed issue in Debian Buster:
# cat /etc/debian_version
10.0

# uname -a
Linux goflexnet 4.19.0-5-marvell #1 Debian 4.19.37-5 (2019-06-19) armv5tel GNU/Linux

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "pogoplug"
mtd3: 0d800000 00020000 "root"

# dmesg | grep -e mtd -e boot -e 0x000
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=192.168.1.1:/srv/nfs/hosts/goflex-263BA8/,rsize=32768,wsize=32768,hard,intr,udp,v3 ip=192.168.1.14:192.168.1.1:192.168.1.254:255.255.255.0:dockstar:eth0:off mtdparts=orion_nand:1M(u-boo ),4M(uImage),32M(rootfs),-(data)
[   20.049178] 0x000000000000-0x000000100000 : "u-boot"
[   20.070147] 0x000000100000-0x000000500000 : "uImage"
[   20.104547] 0x000000500000-0x000002500000 : "pogoplug"
[   20.138798] 0x000002500000-0x00000fd00000 : "root"

# ls -l /dev/mtd*
crw------- 1 root root 90, 0 2019-08-03 16:10 /dev/mtd0
crw------- 1 root root 90, 1 2019-08-03 16:10 /dev/mtd0ro
crw------- 1 root root 90, 2 2019-08-03 16:10 /dev/mtd1
crw------- 1 root root 90, 3 2019-08-03 16:10 /dev/mtd1ro
crw------- 1 root root 90, 4 2019-08-03 16:10 /dev/mtd2
crw------- 1 root root 90, 5 2019-08-03 16:10 /dev/mtd2ro
crw------- 1 root root 90, 6 2019-08-03 16:10 /dev/mtd3
crw------- 1 root root 90, 7 2019-08-03 16:10 /dev/mtd3ro

# fw_setenv test 2
Can't open /dev/mtd0: Permission denied
Error: can't write fw_env to flash

# fw_printenv | grep test=
test=1

#

I can't help but think it's a bug in the official kernel package... but I'd like a second opinion on this :)

Configure uboot to leave serial console ttyS0 to Linux (3 replies)

$
0
0
Hi,

I have been a regular reader on this forum for many years and might even have posted something here some years ago. But I don't remeber clearly. Anyway: Big thanks to Bodhi and other active members of this board to keep up the good work and provide constant updates for uboot, kernel and rootfs! Very much appreciated!

Back around 2010/2011 I was able to get a couple of different kirkwood devices and as far as I know I haven't bricked a single one of them yet... Fingers crossed and they will live another couple of years.

My question of this thread is: Can Linux take over the serial console that is built into the PCB of a Dockstar?

Normally, uboot grabs the serial console and does not release it. This is the result when trying to access the serial console from the Debian on the Dockstar:

#cu -l /dev/ttyS0 -s 115200
cu: open (/dev/ttyS0): Permission denied
cu: /dev/ttyS0: Line in use


Of course people can say: Why don't you grab an USB-FTDI-Adapter and plug it into the Dockstar if you want to create a serial connection? Of course I could, but I would prefer to use the built-in.

To avoid total brickage of my Dockstar I still could have netconsole enabled when I disable the classic serial console for uboot - that's what I assume at the moment.

I googled a bit and only found this: https://stackoverflow.com/questions/34356844/how-to-disable-serial-consolenon-kernel-in-u-boot

I tried to set bootdelay to value -2 and this was only possible for me using this trick:
fw_setenv --script myFile.txt
But I realized that the bootdelay parameter is also used within the netconsole scripts.

Then I played with some values on a Dockstar where I have the netconsole enabled but wasn't really successful. So I would like to ask you for help. Was my question maybe discussed at some point in the past and I just didn't find it here on the forum?

I don't need the serial console untouched by uboot - I only need uboot to release it at some point so that it is available later when Linux is booted. Anyone? Thanks in advance!

fw_setenv not storing parameters (3 replies)

$
0
0
Hi.
I use uboot 2011.5 (or 2012? I have to double check later). I'm booting Debian via USB stick, everything is working fine so far. But there seems to be a problem with UBootEnvVariables: some parameters are ignored, i.e. if I enter /usr/sbin/fw_setenv serverip=172.17.0.3, it's not listed in output of fw_printenv. Thus netconsole is not working. It's weird, because it has been working before I was reflashing uboot during setup of a new USB stick. Furthermore some parameters are accepted and stored, like "/usr/sbin/fw_setenv if_netconsole=ping $serverip" after I entered serverip=172.17.0.3, so it's not a general issue. Is my env flash memory faulty?

Pogoplug v4 not starting (1 reply)

$
0
0
I haven't used my pogoplug with Debian for almost an year. I have tried to switch on today and found the green light glowing, but can't find in network. I found the below log from netcat. The OS stalled at 'Starting kernel...' for long time. Any clue how to fix it?
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:41:47 -0700)
Pogoplug V4
gcc (Debian 4.9.2-10) 4.9.2
GNU ld (GNU Binutils for Debian) 2.25
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: ide_preinit failed

MMC rescan: current device # 0 initialized OK

no USB devices available

no IDE devices available

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            15517696        00013210-01     83
loading envs from mmc 0 ...
98 bytes read in 948 ms (0 Bytes/s)
importing envs ...
running scan_disk ...
Scan device mmc

MMC rescan: current device # 0 initialized OK
device mmc 0:1
1 bytes read in 515 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
3232368 bytes read in 875 ms (3.5 MiB/s)
loading uInitrd ...
6838053 bytes read in 1413 ms (4.6 MiB/s)
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
10266 bytes read in 4532 ms (2 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.8.3-kirkwood-tld-1
   Created:      2016-12-07  15:25:08 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3232304 Bytes = 3.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.8.3-kirkwood-tld-1
   Created:      2016-12-07  15:25:48 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6837989 Bytes = 6.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...

Viewing all 902 articles
Browse latest View live