Welcome! Log In Create A New Profile

Advanced

Stora2100: Debian start from HDD

Posted by HighTower 
Stora2100: Debian start from HDD
May 15, 2014 05:51AM
Hello everyone,

I want to give a second life of my stora with debian. But I'd like to make booting from HDD itself (in raid1) but not from USB drive as I need usb.
I found instruction how to it (but to tried). It will install "linux-image-2.6.33-2-kirkwood_kirkwood.1.1"
Also I'd like to install the latest kernel, as I understand it is 3.14.x

So, I will appreciate if you help me...

my questions are:

1) do I need to update uBoot? (not it is U-Boot 1.1.4 (Sep 4 2009 - 09:36:11) Marvell version: 3.4.14, md ff00003c shows 00000121)
2) where to get kernel image and initrd image for initial booting and for system setup?
3) or I can follow instructions fro 2.6.33-2-kirkwood and later update it to 3.14.x?
Re: Stora2100: Debian start from HDD
May 15, 2014 03:46PM
HighTower,

See this thread for new u-boot:
http://forum.doozan.com/read.php?3,12381

This thread for latest kernel and rootfs:
http://forum.doozan.com/read.php?2,12096

And this was the Stora u-boot working thread:
http://forum.doozan.com/read.php?3,14931

If you decide to install u-boot, make sure that you can boot with UART first. Your boot ROM version is 00000121, so it shoud be able to boot with UART.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Stora2100: Debian start from HDD
May 16, 2014 01:17AM
Hello bodhi,

I've read thread about u-boot and I can't understand how to try uart boot... there is tool called "kwboot" which should be involved, but as I see it has to be run under separate linux pc... I have only windows and mac, so I can't try it... And this is first place I stacked..
Re: Stora2100: Debian start from HDD
May 16, 2014 02:08AM
HighTower,

Sorry you're out of luck here! I don't know if there is any kwboot that was built for Intel boxes. You could try to search for that. It's important because this is the recovery path when and if anything goes wrong. I don't know if the Stora can be recovered using JTAG (since I don't own one).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Stora2100: Debian start from HDD
May 16, 2014 03:55AM
ok, I compiled kwboot under debian virtual machine, but smth is wrong:

root@debian:/home/debian/u-boot-kirkwood/tools# ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2014.01-tld-1.netgear_ms2110.mtd0.kwb
Sending boot message. Please reboot the target...-
Sending boot image...
xmodem: Protocol error



Edited 1 time(s). Last edit at 05/16/2014 06:40AM by HighTower.
Re: Stora2100: Debian start from HDD
May 16, 2014 03:16PM
Try this
./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2014.01-tld-1.netgear_ms2110.mtd0.kwb  -p

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Stora2100: Debian start from HDD
May 19, 2014 12:57AM
With "-p" situation is better
Quote

# ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2014.01-tld-1.netgear_ms2110.mtd0.kwb -p
Sending boot message. Please reboot the target...-
Sending boot image...
0 % [......................................................................]
...
99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2014.01-tld-1 (Mar 17 2014 - 22:25:07)
Netgear-MS2110

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

In: serial
Out: serial
Err: serial
Net: egiga0
Warning: failed to set MAC address

PHY reset timed out
88E1116 Initialized on egiga0
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x100000, size 0x400000
4194304 bytes read: OK
(Re)start 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
## Booting kernel from Legacy Image at 00080000 ...
Image Name: Linux-2.6.22.18-Netgear
Created: 2010-06-13 23:54:53 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2788728 Bytes = 2.7 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux............................................................................................................................................................ done, booting the kernel.

and it stacked booting build on store linux...
Re: Stora2100: Debian start from HDD
May 19, 2014 01:33AM
Nice! you can see the links I posted previously for how heychrist set u-boot envs and the new 3.14 kernel I've uploaded.

This U-boot set the envs at 0xC0000 which is the same as other Kirkwood boxes, but the Stora uses a different location, so you need to set them manually and save at least once to get rid of the error message:
*** Warning - bad CRC, using default environment

BTW, I could create the Stora envs image to flash to NAND if I have a clean set of envs to boot with USB for the Stora. It would be good for other who install this U-boot the first time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Stora2100: Debian start from HDD
May 19, 2014 04:00AM
bodhi, I agree, some tool for beginners and newb like me will be good...

there is big amount of information I just lost ((
for example, some commands like "fw_printenv" are used, but they can't be found in defaul store linux and this is non u-boot commands...
Re: Stora2100: Debian start from HDD
May 19, 2014 03:28PM
HighTower,

To use fw_setenv and fw_printenv, you must install u-boot-tools package first.
apt-get install u-boot-tools

And make sure your Debian env config file is consistent with this u-boot:

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

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Stora2100: Debian start from HDD
May 20, 2014 02:03AM
apt-get is not available under stora linux
there is no u-boot-tools packed in ipkg repository...

so, I'm still wonder what to do next.. i checked via uart that new uboot can be used.

but how to update it I don't know...
if I understood correctly first I need to erase mtd0, and need to use flash_erase, but build in stora linus doesn't have, it has only
# flash_eraseall --help
Usage: flash_eraseall [OPTION] MTD_DEVICE
Erases all of the specified MTD device.

-j, --jffs2 format the device for jffs2
-q, --quiet don't display progress messages
--silent same as --quiet
--help display this help and exit
--version output version information and exit

nandwrite exists
# nandwrite --help
Usage: nandwrite [OPTION] MTD_DEVICE [INPUTFILE|-]
Writes to the specified MTD device.

-a, --autoplace Use auto oob layout
-j, --jffs2 Force jffs2 oob layout (legacy support)
-y, --yaffs Force yaffs oob layout (legacy support)
-f, --forcelegacy Force legacy support on autoplacement-enabled mtd
device
-m, --markbad Mark blocks bad if write fails
-n, --noecc Write without ecc
-o, --oob Image contains oob data
-s addr, --start=addr Set start address (default is 0)
-p, --pad Pad to page size
-b, --blockalign=1|2|4 Set multiple of eraseblocks to align to
-q, --quiet Don't display progress messages
--help Display this help and exit
--version Output version information and exit


next step is to restore envvars... to do it from stora linux is not possible as there is no u-boot-tools
to do it manually from uboot itself?
if yes, what parameters are important, because there are a lot of params...
Re: Stora2100: Debian start from HDD
May 20, 2014 02:59AM
HighTower,

> so, I'm still wonder what to do next.. i checked
> via uart that new uboot can be used.
>
You could flash u-boot in serial console. However, running new U-boot with old kernel is really overkilled, there is no point in doing that, IMO. So it is best to stay with UART booting, try to get the new Debian rootfs running first. After that, the rest is pretty easy.

But if you insist in doing U-Boot first, you could download the tools from here:
http://forum.doozan.com/read.php?2,11663,11713#msg-11713

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 05/20/2014 03:11AM by bodhi.
Re: Stora2100: Debian start from HDD
May 20, 2014 04:41AM
I do not insist on updating boot, but as I get it is needed to update it to run new kernel/rootfs

if is it is not needed, I'd like to try to install rootfs into internal hdd and boot from it, non from nand...
is it possible?
Re: Stora2100: Debian start from HDD
May 20, 2014 05:46AM
I don't know what happened, but now uart doesn't work... RX is on all the time and time to time I receive dots...
I found fw_printenv binary which works under stora linux - env looks ok...
Re: Stora2100: Debian start from HDD
May 20, 2014 03:26PM
HighTower,

To run new kernel/rootfs on HDD, you will need to install new U-Boot and install new kernel on your current rootfs, or get the new rootfs that I uploaded and use that.

Running new U-Boot using UART is the same as running U-Boot from NAND. There is no difference after U-Boot is loaded. So there is no need to install U-Boot first. Just boot the box with new U-Boot using UART, and install new kernel. After you satisfied that it is working the way you want, then install U-Boot. I know it sounds backward, but it is the easiest approach.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Stora2100: Debian start from HDD
May 21, 2014 06:33AM
after all experiments my stora become dead... after plugging power, fan start sponging as well as hdd, but no led activity and it looks like system is not booting ((((
Re: Stora2100: Debian start from HDD
May 21, 2014 04:13PM
Check your serial cable, keep trying UART booting. Even if you destroyed your NAND, it should boot with UART.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Stora2100: Debian start from HDD
May 22, 2014 02:18AM
looks like it burned...
I used usb-ttl board (PL2303) and now it doesn't work, then I plug it into pc com port appears, but no data can be send/receive
Try another cable TTL232R-3V3, it works itself, but nothing is received then connect to stora...
Re: Stora2100: Debian start from HDD
May 23, 2014 02:59AM
HighTower Wrote:
-------------------------------------------------------
> looks like it burned...
> I used usb-ttl board (PL2303) and now it doesn't
> work, then I plug it into pc com port appears, but
> no data can be send/receive
> Try another cable TTL232R-3V3, it works itself,
> but nothing is received then connect to stora...

If you don't take precaution, it might have. Try another CP2102 or PL2303?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: