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

howto: easy startover with a fresh debian (1 reply)

$
0
0
Hello,
I am learning to use ansible, to automatize linux installation of server farms for my job, and i need A LOT of fresh untampered debian installs to play with.

I have come to use one of my NSA320 to boot form different partitions(on same or different hard disks), depending on environment settings.
Thus i can just mount and erase a broken installation of a debian server, say on /dev/sdb1, while safely booting from /dev/sda1.

Prerequisites:
  • 2 or more ext2/3/4 Partitions. I suggest naming them differently, like rootfs1, rootfs2 etc. I used 2 partitions both labeled "rootfs" on /dev/sda1 and /dev/sdb1. One of the partitions could be your "master" for daily use, while the other(s)are for experimenting only.
  • some script(s) on the "master" to change the boot-device related env variables
  • a recent debian install tarball ( i use Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2) on the master part.
  • a working serial or nc boot control (only necessary if you play with the ssh daemon or lock yourself out some other way).

First i install a debian linux on /dev/sda1(partition named "rootfs"), together with all my stuff i like or need. 4 GB space should be enough for that. This will be my "master" partition that wil not be affected by ansible.
Then i create a like-sized, like-named partition on /dev/sdb1, mount it somewhere and untar a fresh debian tarball there.

Finally i create two text files, i named them boot01 and boot11. 01 stands for disk0, partition1, and 11 for disk1, part.1
root@publik2:/home/dirk# cat boot01
# This file sets the bootdevice to the 1st partition of the first (left) drive
device 0:1
load_uimage ext2load ide 0:1 0x800000 /boot/uImage
load_initrd ext2load ide 0:1 0x1100000 /boot/uInitrd
load_dtb ext2load ide 0:1 0x1c00000 /boot/dts/kirkwood-nsa320.dtb
and
root@publik2:/home/dirk# cat boot11
# This file sets the bootdevice to the 1st partition of the second (right) drive
device 1:1
load_uimage ext2load ide 1:1 0x800000 /boot/uImage
load_initrd ext2load ide 1:1 0x1100000 /boot/uInitrd
load_dtb ext2load ide 1:1 0x1c00000 /boot/dts/kirkwood-nsa320.dtb
when i want to practice ansible, i do
sudo fw_setenv --script /home/dirk/boot11
sudo reboot
and after reboot i have a fresh debian installation.
So i if i mess up an ansible playbook(thats what the ansible scripts are called), i start over by going back to my master partition
sudo fw_setenv --script /home/dirk/boot01
sudo reboot
and after reboot, i can mount the testing partition and delete all the broken stuff, and untar a fresh debian.
To find out which disk you booted from you can always use mount without options.
I use a ssh-banner to remind me that i have booted the system i shouldnt mess with.
Of course you can also set a warning in the shell prompt.

If you decide to give your root partitions different volume names, you must change the root=LABEL=YourName in the env line
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 orion_nand:1M(u-boot),512K(uboot_env),512K(key_store),512K(info),10M(etc),10M(kernel_1),48896K(rootfs1),10M(kernel_2),-(rootfs2)
to represent your Volume Label name.
To be done:
The process of mounting the broken installation, deleting it, untarring a fresh debian, changing the boot drive and rebooting could use a nice shell script

complete List of possible environment keys? (no replies)

$
0
0
Hello,
i understand that most Key=Value pairs in the environment are either
u-boot commands, that are passed directly to uboot, or
script commands, that populate env variables, run other commands etc.

I found a list of uboot commands here, and an explanation on u-boot here. This got me deep into understanding the boot process.

But there are also other things like the LED section
led_error=orange
led_exit=green off
led_init=green blinking
and the "preboot_nc" thing, that leave me clueless.

Also the "device=0:1" line isnt referenced in any other scripts, nor is it understood by u-boot itself.
Which part of the system understands these commands?
Like in case of "preboot_nc", it cannot be the linux kernel, since then the name wouldnt make sense...
Are there more commands?
Is there an (possibly complete) list of all keys , their values and meanings?
where can i dig for those myself?

Everything gone wrong Cannot boot anything on GoFlex Net (2 replies)

$
0
0
Hello, Bodhi!

I just tried using an old GoFlex NET that laid here for some years. It once worked with a recent UBoot and Debian in NAND.
But when I tried it, it wouldn't boot like usually anymore. It would boot neither from SATA, nor from USB, only the NAND boot was working.
I couldn't ssh to the device and also net console wasn't working. Thus I'm using serial atm.
I tried updating UBoot using the script.
But after this things even became worse.

U-Boot 2011.12 (Apr 18 2012 - 23:08:20)
Seagate GoFlexNet

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


The script seems to have installed a very old version of UBoot and it won't even boot from NAND anymore.
I tried kwboot for booting to the NAND using a recent UBoot, but this won't work either.

sudo kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2015.10-tld-1.goflexnet.mtd0.kwb -p


 97 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]
?


The device just shuts down after 100% of uboot have been transferred using kwboot. I think everything is crippled, from the MTD to the env.

GoFlexNet> printenv
baudrate=115200
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run sata_bootcmd; run rescue_bootcmd; run pogo_bootcmd; reset
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=00:50:43:00:02:02
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ipaddr=192.168.1.15
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
serverip=192.168.1.35
stderr=serial
stdin=serial
stdout=serial
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_device=0:1
usb_init=run usb_scan
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext2
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found booe
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_scan_list=1 2 3 4
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params

Environment size: 2389/131068 bytes

When trying to boot from USB I get:
Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x07fa825c).

Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.


When trying to boot from NAND I get:
GoFlexNet> nboot

** No boot device **


Also I tried tftp from UBoot console to transfer and boot uboot.2015.10-tld-1.goflexnet.mtd0.kwb, but it will just hang, also.

I don't know where to continue now.

Do I need to update Uboot (no replies)

$
0
0
I've got 4 pogo-plug mobiles. Getting ready to use them in a project. All have

U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:59:45)

Linux-3.14.0-kirkwood-tld-1

installed. The installations are on very old, very slow 2GB SD cards & I want to move to larger, faster cards I made copy of the working good SD card with dd, then tried to "upgrade" the OS, found out the hard way not to do dist-upgrade.

No worries, it was copy. So now I'm dd'ing again. Understand that I want to avoid the dist-upgrade, just update my sources in apt, run "upgrade" (not dist-upgrade). Correct? & then if I want a newer kernel, download that here.

Questions:

instructions for a kernel upgrade are where?

Do I need to (should I) update uboot? I know it's an old version. If I don't really need to, then I won't since I don't anticipate using these things much longer (as RasbPi s are so cheap). But if I really should update uboot before spending the time to patch up the OS, this is the time to do it.

NSA310S u-boot installation - cannot boot (1 reply)

$
0
0
Dear bodhi,

thank you very much for offering these pieces of software combined with a nice little manual how to install it.
Since my Laptop died on Sunday and yesterday my desktops data-HDD crashed I needed a cheap and quick solution for all my data and got an old zyxel NSA310s.
Unfortunately, beeing kind of a novice to linux and especially to flashing hardware via UART, I seem to have inadvertently bricked my zyxel. :-(
My goal was to flash the uboot to nand but after rebooting between section A and B of your instructions the device is stucked in a bootloop. I'm monitoring it via UART.

Before rebooting I backed up the settings as follows:

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

/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"

fw_printenv did not change at all
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=AD03
PRODUCT_NAME=STG-315
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=5C:F4:AB:2F:FB:F0

Bad blocks as of / # dmesg | grep -i 'bad' were:
Scanning device for bad blocks
Bad eraseblock 100 at 0x000000c80000
Bad eraseblock 200 at 0x000001900000

After rebooting i got the following messages repeatingly:
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:55:45 -0700)
ZyXEL NSA310S/320S 1/2-Bay Power Media Server

SoC:   Kirkwood 88F6702_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            15644672        00000000-01     83 Boot
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **
** File not found /boot/uImage **
** File not found /boot/uInitrd **
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
stopping USB..

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ST8000AS0002-1NA17Z  Firm: AR13 Ser#: Z84048X9
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 7630885.3 MB = 7452.0 GB (15628053168 x 512)
** File not found /boot/uImage **
** File not found /boot/uInitrd **
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
resetting ...

what was my mistake (aside from touching the firmware in the first place...) and what can i do now?
Help is much appreciated!

-Hendrik

TFTP status 2016.05 U-Boot Kirkwood - GoFlexNet (8 replies)

$
0
0
I've been loading env variables via dhcp / tftp from an OpenWrt router:

setenv preboot 'dhcp $uenv_addr boot/preboot.u-boot && env import -t $fileaddr $filesize && run uenv_run'

This has the nice combination of getting ip addresses, netconsole setup and other variables all from a common server. Unfortunately, the return status of the dhcp or tftp command doesn't reflect the case where dhcp succeeded, but the file was not loaded. This happens for example, when the flash drive is unplugged from the router. This leads to unexpected behaviour.

On success, status is true:

GoFlexNet> if dhcp $uenv_addr loadthis; then echo loaded ok; else echo loaded bad; fi
DHCP client bound to address 192.168.1.3 (3 ms)
Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.3
Filename 'loadthis'.
Load address: 0x810000
Loading: #
	 10.7 KiB/s
done
Bytes transferred = 11 (b hex)
loaded ok

On dhcp failure, status is false:

GoFlexNet> if dhcp $uenv_addr loadthis; then echo loaded ok; else echo loaded bad; fi
No link on egiga0
loaded bad

On tftp failure, status is true!

GoFlexNet> if dhcp $uenv_addr loadthis; then echo loaded ok; else echo loaded bad; fi
DHCP client bound to address 192.168.1.3 (5 ms)
Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.3
Filename 'loadthis'.
Load address: 0x810000
Loading: *
TFTP error: 'file /mnt/horou/loadthis not found' (1)
Not retrying...
loaded ok

Workaround on success, status is true:

GoFlexNet> setenv filesize; if dhcp $uenv_addr loadthis && printenv filesize; then echo loaded ok; else echo loaded bad; fi
BOOTP broadcast 1
DHCP client bound to address 192.168.1.3 (4 ms)
Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.3
Filename 'loadthis'.
Load address: 0x810000
Loading: #
	 10.7 KiB/s
done
Bytes transferred = 11 (b hex)
filesize=b
loaded ok

Workaround on dhcp failure, status is false:

GoFlexNet> setenv filesize; if dhcp $uenv_addr loadthis && printenv filesize; then echo loaded ok; else echo loaded bad; fi
No link on egiga0
loaded bad

Workaround on tftp failure, status is false:

GoFlexNet> setenv filesize; if dhcp $uenv_addr loadthis && printenv filesize; then echo loaded ok; else echo loaded bad; fi
BOOTP broadcast 1
DHCP client bound to address 192.168.1.3 (5 ms)
Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.3
Filename 'loadthis'.
Load address: 0x810000
Loading: *
TFTP error: 'file /mnt/horou/loadthis not found' (1)
Not retrying...
loaded bad

The results are similar for the TFTP command instead of the DHCP command. This is not what I expected, but the workaround seems to be fine.

As a related question, is there anything that prevents tftp from loading a file that is too large? I don't think that should be an issue, I just thought about it while I was working on this.

edit: I found another workaround is to clear fileaddr and filesize before calling tftp. This makes the subsequent env import fail and prevents it from reloading variables from a previous tftp call. It's important to clear both fileaddr and filesize otherwise env import doesn't return false.

On success, status is true:

GoFlexNet> setenv fileaddr; setenv filesize; if dhcp $uenv_addr loadthis && env import -t $fileaddr $filesize; then echo loaded ok; else echo loaded bad; fi
BOOTP broadcast 1
DHCP client bound to address 192.168.1.3 (4 ms)
Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.3
Filename 'loadthis'.
Load address: 0x810000
Loading: #
	 11.7 KiB/s
done
Bytes transferred = 12 (c hex)
loaded ok

On dhcp failure, status is false:

GoFlexNet> setenv fileaddr; setenv filesize; if dhcp $uenv_addr loadthis && env import -t $fileaddr $filesize; then echo loaded ok; else echo loaded bad; fi
No link on egiga0
loaded bad

On tftp failure, status is false!

GoFlexNet> setenv fileaddr; setenv filesize; if dhcp $uenv_addr loadthis && env import -t $fileaddr $filesize; then echo loaded ok; else echo loaded bad; fi
BOOTP broadcast 1
DHCP client bound to address 192.168.1.3 (4 ms)
Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.3
Filename 'loadthis'.
Load address: 0x810000
Loading: *
TFTP error: 'file /mnt/horou/loadthis not found' (1)
Not retrying...
loaded bad

Eureaka! I realized that clearing both fileaddr and filesize makes dhcp return the correct status:

GoFlexNet> setenv fileaddr; setenv filesize; if dhcp $uenv_addr loadthis; then echo loaded ok; else echo loaded bad; fi
BOOTP broadcast 1
DHCP client bound to address 192.168.1.3 (3 ms)
Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.3
Filename 'loadthis'.
Load address: 0x810000
Loading: *
TFTP error: 'file /mnt/horou/loadthis not found' (1)
Not retrying...
loaded bad

I tested this on the other cases as well, and I believe this is the winner!

Zyxel NSA325 Newbie question for update uBoot (3 replies)

$
0
0
First of all, sorry for the question but I don't understand the tutorial.

I have an old Zyxel NAS325v2 and want to use a new Debian on it. I have installed the latest original firmware from Zyxel.
I detached the NAS and only have the mainboard in front of me with the power cable, the network cable and the serial cable connected to the board.

From my PC (Linux) I have a serial connection via "screen" to the Zyxel mainboard. I interruppted the autostart an the command "version" gave me the following output:

U-Boot 1.1.4 (Jul 18 2013 - 10:47:29) Marvell version: 3.5.9

That is the uBoot version of the original firmware from Zyxel. I read the uBoot tutorial many times but I didn't know how to start.

I have downloaded the uboot.2016.05-tld-1.nsa325.bodhi.tar file. But what is the next step the commands described in the tutorial are not known in the serial connection.

I think I need a Linux on the NAS but that is the goal, I haven't had this for now.
Do I need a working Linux on an USB-Stick to update uBoot or has the original firmware from Zyxel the possibility to run the described commands for updating uBoot on the NAS?

Iomega ix4-200d wont pass 'Toggle power status' (1 reply)

$
0
0
Hello all,

i own an ix4-200d without the original disks, so I tried to recover using the USB + serial port.
Everything goes well until the restart. After restart, with the serial port connect, i got the following result from putty.

| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__| ** uboot_ver:v1.1.0 **

** MARVELL BOARD: IX4-110 LE

U-Boot 1.1.4 (Oct 15 2009 - 17:28:22) Marvell version: 3.4.18

U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CF600

Soc: 88F6281 A1 (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 256MB
DRAM CS[1] base 0x10000000 size 256MB
DRAM Total size 512MB 16bit width
Found 0x20 i2c device
Toggle power status

after that, the device just turn off.

Someone know what can I do to recover it?

thanks in advance,

Updating Pogoplug V4 u-boot from Arch u-boot (1 reply)

$
0
0
Hello,

I have pogo plug v4 a3-01. Some time ago I used information from https://archlinuxarm.org/platforms/armv5/pogoplug-series-4 and installed arch linux on this device. Recently I downloaded latest debian image from https://forum.doozan.com/read.php?2,12096 and was able to successfuly boot it with old u-boot. Now I want to update u-boot and I see that output of cat /proc/mtd differes from what is shown in guidelines:

dev:    size   erasesize  name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00300000 00020000 "uImage"
mtd2: 00300000 00020000 "uImage2"
mtd3: 00800000 00020000 "failsafe"
mtd4: 07000000 00020000 "root"


Please let me know if I can proceed with installation per guidelines or I need to do something additionally.

Thanks,
Kirill.

PS I read this thread: https://forum.doozan.com/read.php?3,29504,29578 but it is year old so I'm not sure if it is still applicable.

help scream from a Noob. PogoE02 doesn't boot. (no replies)

$
0
0
This is what I saw on serial connection with my Pogoplug E02
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:23:43 -0700)
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
## Error: flags type check failure for "ipaddr" <= "192.168.0.xxx" (type: i)
himport_r: can't insert "ipaddr=192.168.0.xxx" into hash table
## Error: flags type check failure for "serverip" <= "192.168.0.yyy" (type: i)
himport_r: can't insert "serverip=192.168.0.yyy" into hash table
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Error: egiga0 address not set.

## Error: "if_netconsole" not defined
## Error: "if_netconsole" not defined
## Error: "if_netconsole" not defined
## Error: "if_netconsole" not defined
## Error: "if_netconsole" not defined
Hit any key to stop autoboot:  0
No link on egiga0
Wrong Image Format for bootm command
ERROR: can't get kernel image!
PogoE02>

and this is printenv
PogoE02>printenv
baudrate=115200
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
ethact=egiga0
nc_ready=0
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
stderr=serial
stdin=serial
stdout=serial
Environment size: 469/131068 bytes

So I'm new in uboot and also new in linux etc.

I just want to setup arch linux or debian into my pogo plug to use it as NAS, torrent client and DLNA server.
Can you help me ?

Help with installing 2016.05 U-Boot Kirkwood for NSA310 (1 reply)

$
0
0
I am trying to get the latest u-boot running on my NSA 310 (old version). My intention is to move to Debian, but I want to take things one step at a time:

    [1] Get serial console and kwboot working
    [2] kwbooot latest uboot
    [3] ensure kwbooted uboot can boot stock kernel
    [4] flash latest uboot
    [5] ensure new uboot can still boot stock kernel
    [6] set-up partition Debian on GPT hard drive
    [7] Get uboot to boot Debian from hard-drive

I have managed 1 and 2. However, no matter what env vars I set in u-boot, my kernel gets stuck at 'done, booting the kernel'. Console parameters seem ok, I've tried different machid and arcNumber parameters; they seem to be useless.

Please help!

Pogo V4 u-boot - Cannot fw_setenv in Debian (1 reply)

$
0
0
Hi Bodi

Finally i got my pogoplug v4 running again! I'm now trying to setup netconsole.

The thing is only that the commands fw_setenv dont work. Its just setenv. I can boot in debian now and adjusted the /etc/fw_config but it seems its not read during booting. Im missing something (essential knowledge) but dont know what.

Here is the output of my printenv.

Pogov4> printenv
arcNumber=3960
baudrate=115200
bootargs_usb=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial
bootcmd=run bootcmd_uenv; run bootcmd_usb; reset
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=00:25:31:05:23:6c
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=f78
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
nc_ready=0
partition=nand0,2
rootdelay=10
rootfstype=ext2
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; mmc rescan; ide reset; setenv uenv_loaded 0; for devtype in usb mmc ide; do for disknum in 0; do run uenv_read_disk; done; done
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_boot=mw 0x800000 0 1; run usb_load_uimage; run usb_load_uinitrd; run usb_load_dtb; bootm 0x800000 0x1100000 0x1c00000
usb_init=usb start
usb_load_dtb=ext2load usb $device 0x1c00000 /boot/dts/kirkwood-pogoplug_v4.dtb
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1


and my /etc/fw_config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

/dev/mtd0 0xc0000 0x20000 0x20000

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


fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr    '192.168.0.25'
fw_setenv serverip '192.168.0.40'


Snarky

-------
mod edit: use code tags

U-Boot with included bootelf (no replies)

$
0
0
Is there a U-Boot which includes bootelf?

fw_printenv and fw_setenv (3 replies)

$
0
0
According to http://projects.doozan.com/uboot/ two new command line tools for configuring the environment: fw_printenv and fw_setenv, which work exactly like their internal printenv and setenv commands.

How do I get them into my uboot if I am booting from a USB stick?

Possible to flash a Medion NAS P89654? (no replies)

$
0
0
Hello,
I own a Medion NAS with 2x4TB WD Harddisk Model WDC WD40EZRX-22SPEB0.
I studied the forum about flashing several NAS to use Debian on it, but I'm unsure if my NAS has the possibility to do it.
I have root access to my box and was able to install ipkg and other (so it can be used like an open stora.)
The kernel is based on HipServ Axentra, version 2.6.31.8 (so very old...:-/)

Processor	: Feroceon 88FR131 rev 1 (v5l)
BogoMIPS	: 999.42
Features	: swp half thumb fastmult edsp
CPU implementer	: 0x56
CPU architecture: 5TE
CPU variant	: 0x2
CPU part	: 0x131
CPU revision	: 1

Hardware	: Feroceon-KW
Revision	: 0000
Serial		: 0000000000000000

The mtd partition is
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00600000 00020000 "uImage"
mtd2: 0f900000 00020000 "rootfs"

If you need more informations, do not hesitate to contact me and I will post more infos.
Regards from Germany
Saschbaer

uboot.kwb (1 reply)

$
0
0
I was reading this thread:- https://forum.doozan.com/read.php?3,7852 where it mentions how to boot certain Kirkwood machines via UART/serial connection... and it mentions uboot.kwb which is a regular image built for flashing NAND. Where would I get such a file for a GoFlex Home?

Installing new U-Boot for Pogoplug V3 - from Arch u-boot (1 reply)

$
0
0
I hope this is the right place to post this - I'm mostly concerned about U-Boot issues...

I have an old Pogo-Classic (B01) running ArchLinux that I installed years ago. It was my first Pogoplug (almost my first linux experience) - I installed Samba, got it booting from a 3TB SATA drive, and used the rest of the drive as a server for my home network (mostly without problems, kind of miraculous given all the hoops I had to stumble through with all the Oxnas/Arch/Deprecated stuff). I pretty much never touched it out of fear it would break down on me, hence:

[root@alarm hd-sda4]# uname -a
Linux alarm 2.6.31.6_SMP_820 #6 SMP Thu Jun 14 19:49:57 CDT 2012 armv6l GNU/Linux

(No idea what version of U-Boot it's running)

Now I have a Pogo V4 running Debian and serving my network and am in the process of getting 4(!) other Pogos up and running, and I thought it might be time to update the old Pogo Classic and switch it to Debian. I don't currently have either Serial access or Netconsole running, so I want to be careful about how I do things so that I don't reboot and immediately end up with a brick.

Is this the right order in which I should proceed?:

1. Try to get NetConsole working (I've started working on this - is there any way to test nc without rebooting?)

2. Update U-boot as instructed in this thread, maintaining boot-from-SATA

3. Install the Debian rootfs & kernel onto the SATA drive boot partition (same version and process as with a Mobile or V4 or E02, right?)

Thanks for any guidance...

kwboot not working (1 reply)

$
0
0
I've used kwboot in the past but recently it won't access my serial port. cu works but kwboot doesn't.

Is there any alternative to kwboot that I can try?

Could the problem be due to my usb serial connector breaking in some way?

Can't interrupt U-boot loading - goflex net (2 replies)

$
0
0
First of all, thanks ,Bodhi , for your great work on providing regular update for our aging Kirkwood devices. I've been using this forum for years as a main knowledge source for tweaking my pogoplugs.
I recently acquired goflexnet with a locked ssh access and currently I am facing serious difficulties trying to flash tld u-boot over serial console.
The problem is that I can not interrupt u-boot no matter what I do. I use the latest debian rootfs on sd card plugged in device with uEnv.txt in boot directory.
I tried pretty much everything that I can think of - different usb2serial converters, switching tx – rx , different wires, tried over 3 platforms – linux, win10, winXP – same story over and over. The device boots , I see the messages, when the part comes – press any key to stop u-boot appears – I cant interrupt and get access to console to “GoFlexNet>” prompt.
The kwboot method doesn’t seem to work either.
Since I am out of ideas – any help is highly appreciated.
Thanks in advance!

errors on new uBoot "Card did not respond to voltage select", "Bad device usb 0" (6 replies)

$
0
0
I'm trying to upgrade to the new uBoot (and rootfs) on my Pogoplug V4, previously on an older Debian kernel/rootfs & older uBoot. This is the first time I've been upgrading uBoot from something older than the 2016 release, so I had to go through the extra "step 8" nandwrite. I'm hoping that's the source of my (hopefully simple) problem.

I have been booting from a Sandisk SD card, but I installed the latest rootfs on a USB stick and then went through the uBoot-install steps on the V4 before shutdown, eject SD card & power-up with only USB stick installed. [And I tried a second USB stick in case the first one was bad] I have netconsole set up but not serial. Here are my log from boot attempt and then my printenv output.


boot log:
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
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
Card did not respond to voltage select!
mmc_init: -95, time 11
## 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

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

no IDE devices available
Card did not respond to voltage select!
mmc_init: -95, time 10
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
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: ide_preinit failed
device ide 0:1
** Bad device ide 0 **
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
Card did not respond to voltage select!
mmc_init: -95, time 11
device mmc 0:1
Card did not respond to voltage select!
mmc_init: -95, time 10
Card did not respond to voltage select!
mmc_init: -95, time 11
** Bad device mmc 0 **
device mmc 1:1
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
device mmc 2:1
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
device mmc 3:1
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!



and printenv...
Pogov4> printenv
printenv
arcNumber=3960
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
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=10
bootdev=usb
device=0:1
devices=usb mmc ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
ethact=egiga0
ethaddr=00:25:31:05:EA:F4
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=192.168.222.164
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=0x1c00000
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
machid=f78
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
nc_ready=1
ncip=192.168.222.165
partition=nand0,2
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
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
scan_ide=ide reset
scan_mmc=mmc rescan
scan_usb=usb start
serverip=192.168.222.165
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=nc
stdin=nc
stdout=nc
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_loaded=0
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

Environment size: 3310/131068 bytes
Pogov4>


Just to make sure it wasn't choking on mmc/SD or IDE/SATA attempts, I reset devices to just usb & tried again... Fewer errors but same result:
Pogov4> printenv devices
printenv devices
devices=usb ide mmc
Pogov4> setenv devices usb
setenv devices usb
Pogov4> saveenv
saveenv
Saving Environment to NAND...
Erasing NAND...
Erasing at 0xc0000 -- 100% complete.
Writing to NAND... OK
Pogov4> boot
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

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!



Side question - on the V4 does it matter whether I plug a USB stick into the top or bottom slot for booting? I've been trying both, but does it make a difference (as with the E02)?
Viewing all 902 articles
Browse latest View live