Welcome! Log In Create A New Profile

Advanced

Linux Kernel 6.7.5 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 12:16AM
Buttzy,

Do you have serial console connected? it's best to do that before you play with uBoot envs. The stock uBoot does not have netconsole.

That loadaddr I believe is where stock uBoot load the kernel uImage (that's how I understood WarheadsSE set it up so users can restore to stock easily). I don't have the NSA325, so I can help you but it must be done with serial console. So if you can connect serial console, and dump stock uBoot mtd0 image, try UART booting with it successfully, then everything is much easier. No worry about bricking.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 04:59AM
Bodhi,

I do have a serial console its the first thing i did before even turning the box on.

Whats the best way to dump the uBoot? and how do i dump it to a usb stick?

I havent tried dumping uboot and such before.

And the loadaddr arch linux uses it for the uImage aswel so i will leave that as is and just add an entry for the uInitrd and see how it goes aswel.

these are the mtd partitions acording to arch linux:

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"

update 3:

I dumped the uboot using this command (no idea if its correct):
nanddump -nof uboot.mtd0.bak -l 0x100000 /dev/mtd0

then i tried uart booting it using the instructions on this site found in this thread:
http://forum.doozan.com/read.php?3,7852

using the first kwboot command i get :
sudo ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.mtd0.bak

Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [++xmodem: Protocol error

and using the second kwboot command i get:
sudo ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.mtd0.bak -p

Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [+xmodem: Bad message



Edited 5 time(s). Last edit at 12/14/2013 05:41AM by Buttzy10169.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 02:51PM
Buttzy,

Did you check to see if the NSA has UART booting (bootROM v 1.21):
http://forum.doozan.com/read.php?3,7852

The nanddump could just be:
nanddump -nof uboot.mtd0.bak /dev/mtd0


Or you could use Davygravy's image, too in this thread
http://forum.doozan.com/read.php?2,7806

This command is correct (if the image is ready-for-NAND format, then -p must be used for kwboot to strip the header)
sudo ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.mtd0.bak -p

When you see:
xmodem: Bad message
Keep executing the kwboot command, again and again many times. On the Pogo V4/Mobile, sometime I needed to execute it 15,20 times before the handshake works.

The uInitrd could be loaded somewhere in memory that leaves enough room for uBoot to load. Please post your output of fw_printenv.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 03:05PM
Rootfs Debian-3.12.0-kirkwood-tld-3 was uploaded. Please see 1st post for download link.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 03:13PM
The output of the command to check for uart booting gives me this output:
ff00003c: 00000000 00000000 00000000 00000000    ................
ff00004c: 00000000 00000000 00000000 00000000    ................
ff00005c: 00000000 00000000 00000000 00000000    ................
ff00006c: 00000000 00000000 00000000 00000000    ................
ff00007c: 00000000 00000000 00000000 00000000    ................
ff00008c: 00000000 00000000 00000000 00000000    ................
ff00009c: 00000000 00000000 00000000 00000000    ................
ff0000ac: 00000000 00000000 00000000 00000000    ................
ff0000bc: 00000000 00000000 00000000 00000000    ................
ff0000cc: 00000000 00000000 00000000 00000000    ................
ff0000dc: 00000000 00000000 00000000 00000000    ................
ff0000ec: 00000000 00000000 00000000 00000000    ................
ff0000fc: 00000000 00000000 00000000 00000000    ................
ff00010c: 00000000 00000000 00000000 00000000    ................
ff00011c: 00000000 00000000 00000000 00000000    ................
ff00012c: 00000000 00000000 00000000 00000000    ................

fw_printenv in arch doesnt print the entire environment

printenv in uboot gives me:
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
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
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=28:28:5D:13:F4:4F
arcNumber=4495
bootargs_stock=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
bootargs_linux=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/sda2 rw rootwait loglevel=8
bootcmd_linux=setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)
bootcmd_stock=setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)
to_stock=setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset
to_linux=setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux\'; saveenv; reset
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::orion:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
bootcmd='run bootcmd_linux'
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
enaAutoRecovery=yes
kernel_addr=0x4640000
pcieTune=no
pcieTune1=no

and the attempt of uart booting seems to be almost working i got the following:
1st try:
sudo ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.mtd0.bak -p
 
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [.....................................+............................+xmodem: Protocol error

2nd try:
sudo ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.mtd0.bak -p

Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [....+xmodem: Protocol error

3rd try:
sudo ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.mtd0.bak -p

Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [.....................................+xmodem: Protocol error

so it looks like its trying to load something.

update3:

Haha SUCCESS!!! Not with UART booting tried about 20 times still the same errors and attempted loading.

But thanks to BODHI's new rootfs I have the NSA325 V2 booting to Debian from usb at the moment i set the following commands in uBoot (modified from arch's boot commands and not set permanent yet):

so usb will power on:
mw.l f1010100 0020c000

The bootargs line:
setenv bootargs_linux 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8'

The bootcmd_linux line:
setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000'

And of course mainlinelinux set to yes



Edited 1 time(s). Last edit at 12/14/2013 03:52PM by Buttzy10169.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 04:08PM
You're the first to get the NSA325 to boot on Debian 3.12.x that I knew of :) Awesome!

The key point is
setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000'

So you can adjust this address if uBoot ever have problem loading the kernel and initrd.

Please let us know if you can control the LED the same way that the NSA320 does. And do you see 2 ide_disk trigger in /sys/class/leds/...

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 04:15PM
Ha Yay me then :) . I actualy just used the uInitrd address that i used on my old ix2-200.

And the result of cat /sys/class/leds/nsa325:green:hdd1/trigger is:
[none] nand-disk timer oneshot ide-disk1 ide-disk2 heartbeat gpio default-on

so they are there :) and its the V2 nsa325 so the nsa325 v1 should be fine aswel.

What toolchain / process do you use for building kernels? As i used to build my own for the ix2-200 but am a bit out of date on the toolchains and such. And so i wont have to keep hassleing you for the latest haha.

update1:

Oh and just incase anyone was / is wondering you need an ext2 partition for the uImage and uInitrd.



Edited 1 time(s). Last edit at 12/14/2013 04:29PM by Buttzy10169.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 04:39PM
Buttzy,

It's great to break new ground :)

What about the system LEDS constrol? (not hdd1 or hdd2). See pbg4 posts in this thread. It should show ide-disk1 and 2 also.

I build kernels natively using a mini-farm (1 GoFlex Net and 3 Pogoplug E02 nfs cluster). Just the standard commands (make-kpkg, and the rest) to build and use distcc to distribute the load.

Another note:

I still would like you to try UART booting see if you can get it to work. It is strange that the bootROM did not show version in your NSA325 when you dump the memory.

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



Edited 1 time(s). Last edit at 12/14/2013 04:50PM by bodhi.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 04:57PM
Yeah breaking new ground is good almot feels as good as when my device tree patch for ix2-200 was accepted to mainline lol.

i tried echoeing heartbeat into a few of the leds to see if it worked and these ones i tried and they worked:
green:sys    worked
orange:sys  worked
red:copy     worked
green:copy  worked
green:usb    worked

and also:
cat /sys/class/leds/nsa325:green:copy/trigger

showed:

[none] nand-disk timer oneshot ide-disk1 ide-disk2 heartbeat gpio default-on

Was that what you wanted checked?
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 05:02PM
It also has /sys/class/leds/nsa320:green:sys/trigger, see this post: http://forum.doozan.com/read.php?2,12096,13642#msg-13642

And that's where I think we should use echo to control the LEDs for individual HDDs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 05:09PM
Oh no no the 325 (or at least my V2) controls for each of those leds seperatly this is the list
from the /sys/class/leds directory:

nsa325:green:copy -> ../../devices/platform/leds-gpio/leds/nsa325:green:copy
nsa325:green:hdd1 -> ../../devices/platform/leds-gpio/leds/nsa325:green:hdd1
nsa325:green:hdd2 -> ../../devices/platform/leds-gpio/leds/nsa325:green:hdd2
nsa325:green:sys -> ../../devices/platform/leds-gpio/leds/nsa325:green:sys
nsa325:green:usb -> ../../devices/platform/leds-gpio/leds/nsa325:green:usb
nsa325:orange:sys -> ../../devices/platform/leds-gpio/leds/nsa325:orange:sys
nsa325:red:copy -> ../../devices/platform/leds-gpio/leds/nsa325:red:copy
nsa325:red:hdd1 -> ../../devices/platform/leds-gpio/leds/nsa325:red:hdd1
nsa325:red:hdd2 -> ../../devices/platform/leds-gpio/leds/nsa325:red:hdd2

The sys led controls an led like the small orange / green led on the front of the goflex net. Its solid orange when the device boots up at the minute. It has a green and red light for each hdd.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 05:27PM
Ah! of course you're right :) yes.

BTW, some people reported that the ide-disk1 and 2 did not work for them (I think gaogao). So, it'd be good to see the actual HDDs triggers in action, when you have the 2 disks connectecd.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 14, 2013 05:47PM
I only have 1 spare disk at the minute but i tried it and set ide-disk1 as trigger for all 4 leds hdd1 and hdd2 both green and red and they all seem to work fine.

Another note if you have both green and red hdd led triggered at the same time (like with ide-disk1 trigger) it becomes an orange led. Did not realise that would happen.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 15, 2013 03:39PM
Buttzy,

What gaogao found was only LED trigger ide-disk1 or ide-disk2 works for both drives. I don't know if the NSA3xx SATA port numbers have anything to do with it. On the GoFlex Net it works correctly.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 15, 2013 04:01PM
Im not sure i just used ide-disk1 in all 4 just to see if they worked and since i only have the 1 drive at the moment i cant test if both work seperatly.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 15, 2013 08:22PM
When I prepare my usb drive to I need to create 2 partitions (1boot and 1 for /)? This woild be for my nsa325?
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 15, 2013 08:26PM
yeah the boot partition needs to be ext2 then whatever you want for rootfs as long as the kernel supports it mine is ext4.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 15, 2013 11:46PM
Just use one Ext2 partition, make it simple. Get it working first, then worry about other things.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 02:22AM
I'm having a hell of a time getting it to boot to my prepaired usb drive. Usb drive doesnt stay powered on after a reboot so that ot can be booted off of. What would the bootarg and bootcmd_linux be if I was to have it boot to a prepared sata drive rather than a usb drive?

when it tried to boot off of usb it says the below. I have 2 sata drives in the nsa325 and 1 320gb external usb drive with 1 ext2 partition with rootfs on it. If I boot to uboot env and type in "mw.l f1010100 0020c000" the drive powers on and the unit resets/reboots. it basically reboots every maybe 15-30secs or so. but personally unless its the only option I have I was hoping to simply have debian installed onto 1 of the 2 sata drives rather than a usb drive. but was thinking that the uboot bootcmd_linux needed to be changed or something.

Hit any key to stop autoboot:  0
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
## Booting image at 02000000 ...
Bad Magic Number
Marvell>>

~Sol



Edited 2 time(s). Last edit at 12/16/2013 02:31AM by SomeoneOnLine.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 02:43AM
What is your output of printenv?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 03:13AM
bodhi Wrote:
-------------------------------------------------------
> What is your output of printenv?

well at, its what I have below. Otherwise I have been only really changing 2 lines bootcmd_linux and bootargs_linux to the ones I found a few posts back. The below printenv is what I have it set to now so that I can still boot up archarm and manipulate my disk and partitions while I mess with getting debian booted.

The more I gave it thought I probably should have it booting to usb so that I can create a raid1 with the 2 physical drives that are in the left and right bay for the data I put on the nsa325. But either way I can work it.

Power on USB
mw.l f1010100 0020c000


Bootargs
setenv bootargs_linux 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8'

Bootcmd_linux
setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000'

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
MODEL_ID=AA03
PRODUCT_NAME=NSA-325
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=FC:F5:28:0D:38:90
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::orion:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
arcNumber=4495
bootargs_stock=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_stock=setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)
to_stock=setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset
to_linux=setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux\'; saveenv; reset
bootcmd='run bootcmd_linux'
mw.l=f1010100 0020c000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
enaAutoRecovery=yes
kernel_addr=0x4640000
pcieTune=no
pcieTune1=no
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=LABEL=rootfs loglevel=8
bootargs_linux=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/sda2 rw rootwait loglevel=8
bootcmd_linux=setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)

Thanks,

~Sol
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 03:24AM
SoL,

I forgot! execute these commands in uBoot also to list which uBoot version, and what command it provides:

version
help

- Does it have usb start?
- Why is your root set to /dev/sda2 ?

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



Edited 2 time(s). Last edit at 12/16/2013 03:28AM by bodhi.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 03:28AM
Can I use Jeffs uboot? Or should I not go there yet? :)

Version
U-Boot 1.1.4 (Sep 16 2011 - 17:51:53) Marvell version: 3.5.9

Help
Marvell>> help
?       - alias for 'help'
SatR - sample at reset sub-system, relevent for DB only
base    - print or set address offset
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootext2    dev:boot_part1,boot_part2 addr boot_image linux_dev_name
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
bubt    - Burn an image on the Boot Nand Flash.
chpart  - change active partition
cmp     - memory compare
cmpm    - Compare Memory
cp      - memory copy
cpumap - Display CPU memory mapping settings.
crc32   - checksum calculation
date    - get/set/reset date & time
dclk    - Display the MV device CLKs.
dhcp    - invoke DHCP client to obtain IP/boot params
diskboot- boot from IDE device
echo    - echo args to console
eeprom  - EEPROM sub-system
erase   - erase FLASH memory
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fi      - Find value in the memory.
flinfo  - print FLASH memory information
fsinfo  - print information about filesystems
fsload  - load binary file from a filesystem image
g       - start application at cached address 'addr'(default addr 0x40000)
go      - start application at address 'addr'
help    - print online help
icrc32  - checksum calculation
ide     - IDE sub-system
iloop   - infinite loop on address range
imd     - i2c memory display
iminfo  - print header information for application image
imm[.b, .s, .w, .l]     - i2c memory modify (auto-incrementing)
imw     - memory write (fill)
inm     - memory modify (constant address)
iprobe  - probe to discover valid I2C chip addresses
ir      - reading and changing MV internal register values.
loop    - infinite loop on address range
ls      - list files in a directory (default /)
map     - Diasplay address decode windows
md      - memory display
me      - PCI master enable
mm      - memory modify (auto-incrementing)
mmcinit - init mmc card
mp      - map PCI BAR
mtdparts- define flash/nand partitions
mtest   - simple RAM test
mw      - memory write (fill)
nand                   - NAND sub-system
nboot   - boot from NAND device
nbubt   - Burn a boot loader image on the Boot Nand Flash.
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
phyRead - Read PCI-E Phy register
pciePhyWrite    - Write PCI-E Phy register
phyRead - Read Phy register
phyWrite        - Write Phy register
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
printinfo- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
rcvr    - Satrt recovery process (Distress Beacon with TFTP server)
reset   - Perform RESET of the CPU
resetenv        - Return all environment variable to default.
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
saveinfo - save environment variables to persistent storage
se      - PCI Slave enable
setenv  - set environment variables
setinfo  - set environment variables
sflash  - read, write or erase the external SPI Flash.
sg      - scanning the PHYs status
sp      - Scan PCI bus.
switchRegRead   - Read switch register
switchRegWrite  - Write switch register
Temp    - read chip Tj temp
tftpboot- boot image via network using TFTP protocol
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor version



Edited 1 time(s). Last edit at 12/16/2013 03:29AM by SomeoneOnLine.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 03:33AM
bodhi Wrote:
-------------------------------------------------------
> SoL,
>
> I forgot! execute these commands in uBoot also to
> list which uBoot version, and what command it
> provides:
>
> version
> help
>
> - Does it have usb start?
> - Why is your root set to /dev/sda2 ?

Also, if you want to boot SATA then just use what Buttzy has for those 2 envs. Extract the rootfs on Ext3 HDD, and try it. If it does not boot then try Ext2.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 03:44AM
bodhi Wrote:

> > - Does it have usb start?
> > - Why is your root set to /dev/sda2 ?
1.) if I type usb strat from inside uboot it does scan and looks like it finds 1 storage device.
2.) ummmm. I dont recall ever manually changing that so im guessing that the orignal arch install script put that there.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 04:07AM
Ah! OK.

1. Arch installation is 2 partitions, partition 1 is Ext2, partition 2 is Ext3. So it assumes that you use the rootfs HDD at a certain slot that would make it sda. Therefore, the first partition is sda1 and second is sda2. If you are going to boot with HDD then:

- extract Debian rootfs to the 2nd partition
- copy Debian rootfs /boot directory (entire directory) from second partition to the first.

So if the HDD is assigned as sdb on another box and those 2 partitions are formatted as etx2 and ext3, mount them on /media. Then,

cd /media/sdb2
tar -xjf Debian-3.12.0-kirkwood-tld-3-rootfs-bodhi.tar.bz2
cd /media/sdb1
cp -aR /media/sdb2/boot .
ls -lR /media/sdb1 (to double check the content of boot)
sync


umount and take this HDD to the NSA325 and boot with it.

2. To boot with USB, you can try to boot it manually in uBoot command line (you should create 2 new uBoot envs). I'll be back and write it out for you.

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



Edited 2 time(s). Last edit at 12/16/2013 04:11AM by bodhi.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 04:34AM
ok. Thats basically what the archlinux install script was doing for the most part. this is the install script I have modified and am running. But the problem is that its starts the boot then hangs at "[ 14.613752] Waiting for root device /dev/sda2..." Below is the full boot output

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
  Device 0 @ 0 0:
Model: ST3500514NS                              Firm: SN12     Ser#:             9WJ0JH9J
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)


2319128 bytes read
## Booting image at 02000000 ...
   Image Name:   Linux-3.12.0-kirkwood-tld-3
   Created:      2013-12-14   6:18:48 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2319064 Bytes =  2.2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.12.0-kirkwood-tld-3 (root@tldDebian) (gcc version 4.6.3 (Debian 4.6.3-14) ) #3 PREEMPT Wed Nov 27 16:10:                                 53 PST 2013
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: ZyXEL NSA325 2-Bay Power Media Server
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 131072
[    0.000000] free_area_init_node: node 0, pgdat c0659a20, node_mem_map c06c7000
[    0.000000]   Normal zone: 1024 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 131072 pages, LIFO batch:31
[    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: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x8000                                 0(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda2 rw rootwait loglevel=8
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512808K/524288K available (4398K kernel code, 333K rwdata, 1540K rodata, 206K init, 420K bss, 11480K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05d4ce0   (5940 kB)
[    0.000000]       .init : 0xc05d5000 - 0xc0608ac4   ( 207 kB)
[    0.000000]       .data : 0xc060a000 - 0xc065d574   ( 334 kB)
[    0.000000]        .bss : 0xc065d574 - 0xc06c680c   ( 421 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:114
[    0.000000] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474ms
[    0.000000] Console: colour dummy device 80x30
[   12.359357] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[   12.399173] pid_max: default: 32768 minimum: 301
[   12.399256] Security Framework initialized
[   12.399309] Mount-cache hash table entries: 512
[   12.399797] Initializing cgroup subsys devices
[   12.399815] Initializing cgroup subsys freezer
[   12.399826] Initializing cgroup subsys net_cls
[   12.399834] Initializing cgroup subsys blkio
[   12.399888] CPU: Testing write buffer coherency: ok
[   12.400174] Setting up static identity map for 0xc0428fd0 - 0xc042900c
[   12.401625] devtmpfs: initialized
[   12.403439] pinctrl core: initialized pinctrl subsystem
[   12.403695] regulator-dummy: no parameters
[   12.403944] NET: Registered protocol family 16
[   12.404255] DMA: preallocated 256 KiB pool for atomic coherent allocations
[   12.404748] cpuidle: using governor ladder
[   12.404761] cpuidle: using governor menu
[   12.404850] Kirkwood: MV88F6282-Rev-A1, TCLK=200000000.
[   12.404866] Feroceon L2: Enabling L2
[   12.404891] Feroceon L2: Cache support initialised.
[   12.405135] initial MPP regs: 21111111 01103311 00051100 00000000 00000000 00000000 00000000
[   12.405156]   final MPP regs: 21111111 00003311 00051100 00000000 00000000 00000000 00000000
[   12.405600] Kirkwood PCIe port 0: link up
[   12.405607] PCI: bus0 uses PCIe port 0
[   12.405690] PCI host bridge to bus 0000:00
[   12.405704] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[   12.405713] pci_bus 0000:00: root bus resource [io  0x1000-0xffff]
[   12.405721] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[   12.405750] pci 0000:00:00.0: [11ab:6282] type 00 class 0x058000
[   12.405770] pci 0000:00:00.0: reg 0x10: [mem 0xf1000000-0xf10fffff 64bit pref]
[   12.405782] pci 0000:00:00.0: reg 0x18: [mem 0x00000000-0x1fffffff]
[   12.405815] pci 0000:00:00.0: supports D1 D2
[   12.405912] pci 0000:00:01.0: [1033:0194] type 00 class 0x0c0330
[   12.405942] pci 0000:00:01.0: reg 0x10: [mem 0x90000000-0x90001fff 64bit]
[   12.406041] pci 0000:00:01.0: PME# supported from D0 D3hot
[   12.406148] PCI: bus0: Fast back to back transfers disabled
[   12.406159] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[   12.406184] pci 0000:00:01.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[   12.408415] bio: create slab <bio-0> at 0
[   12.408718] vgaarb: loaded
[   12.408866] usbcore: registered new interface driver usbfs
[   12.408909] usbcore: registered new interface driver hub
[   12.408982] usbcore: registered new device driver usb
[   12.409484] Switched to clocksource orion_clocksource
[   12.423426] NET: Registered protocol family 2
[   12.423928] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[   12.424025] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[   12.424075] TCP: Hash tables configured (established 4096 bind 4096)
[   12.424123] TCP: reno registered
[   12.424133] UDP hash table entries: 256 (order: 0, 4096 bytes)
[   12.424152] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[   12.424304] NET: Registered protocol family 1
[   12.424529] RPC: Registered named UNIX socket transport module.
[   12.424537] RPC: Registered udp transport module.
[   12.424542] RPC: Registered tcp transport module.
[   12.424547] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   12.424624] PCI: CLS 32 bytes, default 32
[   12.424850] NetWinder Floating Point Emulator V0.97 (double precision)
[   12.425273] audit: initializing netlink socket (disabled)
[   12.425303] type=2000 audit(0.050:1): initialized
[   12.425856] zbud: loaded
[   12.425953] VFS: Disk quotas dquot_6.5.2
[   12.425991] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[   12.426258] NFS: Registering the id_resolver key type
[   12.426298] Key type id_resolver registered
[   12.426304] Key type id_legacy registered
[   12.426316] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   12.426427] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[   12.426623] msgmni has been set to 1001
[   12.427941] alg: No test for stdrng (krng)
[   12.428005] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[   12.428014] io scheduler noop registered
[   12.428019] io scheduler deadline registered
[   12.428036] io scheduler cfq registered (default)
[   12.428211] mv_xor mv_xor.0: Marvell shared XOR driver
[   12.459546] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[   12.499520] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[   12.499592] mv_xor mv_xor.1: Marvell shared XOR driver
[   12.539521] mv_xor mv_xor.1: Marvell XOR: ( xor cpy )
[   12.579519] mv_xor mv_xor.1: Marvell XOR: ( xor cpy )
[   12.579707] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   12.600072] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33, base_baud = 12500000) is a 16550A
[   13.261624] console [ttyS0] enabled
[   13.265856] NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 6                                 4
[   13.277926] Scanning device for bad blocks
[   13.370597] Bad eraseblock 796 at 0x000006380000
[   13.380077] Bad eraseblock 840 at 0x000006900000
[   13.405380] Creating 9 MTD partitions on "orion_nand":
[   13.410575] 0x000000000000-0x000000100000 : "uboot"
[   13.415642] 0x000000100000-0x000000180000 : "uboot_env"
[   13.421066] 0x000000180000-0x000000200000 : "key_store"
[   13.426467] 0x000000200000-0x000000280000 : "info"
[   13.431458] 0x000000280000-0x000000c80000 : "etc"
[   13.436326] 0x000000c80000-0x000001680000 : "kernel_1"
[   13.441665] 0x000001680000-0x000004640000 : "rootfs1"
[   13.446917] 0x000004640000-0x000005040000 : "kernel_2"
[   13.452257] 0x000005040000-0x000008000000 : "rootfs2"
[   13.457880] libphy: Fixed MDIO Bus: probed
[   13.462021] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   13.468573] ehci-pci: EHCI PCI platform driver
[   13.473089] ehci-orion: EHCI orion driver
[   13.477156] orion-ehci orion-ehci.0: EHCI Host Controller
[   13.482610] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   13.490304] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[   13.509509] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   13.515563] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   13.522393] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   13.529652] usb usb1: Product: EHCI Host Controller
[   13.534551] usb usb1: Manufacturer: Linux 3.12.0-kirkwood-tld-3 ehci_hcd
[   13.541292] usb usb1: SerialNumber: orion-ehci.0
[   13.546249] hub 1-0:1.0: USB hub found
[   13.550051] hub 1-0:1.0: 1 port detected
[   13.554312] mousedev: PS/2 mouse device common for all mice
[   13.869520] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   14.020934] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[   14.027675] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   14.034855] usb 1-1: Product: USB2.0 Hub
[   14.039257] hub 1-1:1.0: USB hub found
[   14.043307] hub 1-1:1.0: 4 ports detected
[   14.569502] rtc-mv rtc-mv: internal RTC not ticking
[   14.574470] i2c /dev entries driver
[   14.578373] orion_gpio_is_valid: invalid GPIO 12
[   14.583502] drop_monitor: Initializing network drop monitor service
[   14.590022] TCP: cubic registered
[   14.593350] NET: Registered protocol family 17
[   14.597869] Key type dns_resolver registered
[   14.602496] registered taskstats version 1
[   14.607160] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[   14.613752] Waiting for root device /dev/sda2...


#!/bin/sh

#####
#  Created By: Jason Plum <jplum@archlinuxarm.org>
#  Prepared for: Arch Linux ARM
#  ----------
#  Automation to convert NSA-325 to Arch Linux ARM on /dev/sda
#  : /dev/sda is sata port 1, left side of enclosure.
#####
echo "Automatic Installation of Arch Linux ARM"

###
#  setup u-boot environment
echo "- set bootloader"
fw_setenv arcNumber 4495
fw_setenv mainlineLinux yes
fw_setenv bootargs_stock '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'
fw_setenv bootcmd_stock 'setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)'
fw_setenv bootargs_linux '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/sda2 rw rootwait loglevel=8'
fw_setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)'
#ArchLinuxArmBoot#fw_setenv bootargs_linux 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8'
#ArchLinuxArmBoot#fw_setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000'
fw_setenv to_stock "setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset"
fw_setenv to_linux "setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux\'; saveenv; reset"

###
#  setup the partitions on the disk (sdb)
#  : 16M 1st partition, ext2/3
echo "- parition sdb"
fdisk /dev/sdb <<EOF
o
n
p
1

+100M

n
p
2


p
w

EOF
echo " * pause for ioctl to re-sync partitions"
sleep 5
###
#  make filesystems
echo "- make filesystems"
#  ext2 makes u-boot happy.
mkfs.ext2 -L "boot" /dev/sdb1
#  stock does not know how to make ext4!
mkfs.ext3 -L "rootfs" /dev/sdb2

###
#  make dirs & mount
echo "- mount destination"
mkdir -p /tmp/boot
mount -t ext2 /dev/sdb1 /tmp/boot
mkdir -p /tmp/rootfs
mount -t ext3 /dev/sdb2 /tmp/rootfs

###
#  prepare the system
#  extract the rootfs
echo "- extract rootfs"
tar xzf /Stuff/debian/Debian-3.12.0-kirkwood-tld-3-rootfs-bodhi.tgz -C /tmp/rootfs/

#  copy the uImage to the boot partition
echo "- prepare boot partition"
cp -aR /tmp/rootfs/boot/* /tmp/boot/

#  always make sure you're sync'd!
sync

###
#  prepare for first boot
#  set the bootcmd to run the steps to convert.
fw_setenv bootcmd 'run to_linux'
###
#  we're done here
echo "Please reboot system"
sync
# reboot



Edited 2 time(s). Last edit at 12/16/2013 04:43AM by SomeoneOnLine.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 05:04AM
This command allows the usb to turn on it should not be rebooting your device:

mw.l f1010100 0020c000

This command assumes you have labled your usb partition rootfs (at least for the root partition):
setenv bootargs_linux 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8'

you might need to change the part that is in bold in the command above.

This command assumes you are booting from a usb stick where you have a boot directory on the first partition:
setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000'

to boot from a sata you would change usb reset to ide reset and the ext2load usb entries to ext2load ide

And i think i tried ext3 it would not work the boot files MUST be on an ext2 partition i had the same trouble with my previous nas and got around it by keeping the boot files in flash which led to me bricking it.

If it is stopping or hanging at the waiting for root device that means you have the root= statement in the bootrgs linux wrong. and i dont see it loading the uInitrd in that lst message?
Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
  Device 0 @ 0 0:
Model: ST3500514NS                              Firm: SN12     Ser#:             9WJ0JH9J
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)


2319128 bytes read
## Booting image at 02000000 ...
   Image Name:   Linux-3.12.0-kirkwood-tld-3
   Created:      2013-12-14   6:18:48 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2319064 Bytes =  2.2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 05:21AM
Buttzy10169 Wrote:
-------------------------------------------------------
> This command allows the usb to turn on it should
> not be rebooting your device:
>
>
> mw.l f1010100 0020c000
>
>
It does power it on its just not persistent after a reboot. I thought I read that WarheadSE said USB booting was not yet supported? could that be why its not persistent? If I boot into uboot then type 'mw.l f1010100 0020c000' the drive spins up and it looks good until it hangs at waiting for rootfs. not sure why its not finding it. If I look at the drive offline I see both partitions SDA1 (ext2) is /Boot with uimage and stuff on it and in the /boot folder and SDA2 (ext3) has the rootfs. Im at a loss and its getting late and I got work in a few hours. Ima call it a night and mess with it tomorrow some more. But I am determined to get this working. :) When I boot archlinux it doesn't power up the usb drives until after the kernel has loaded which kinda goes with what WarheadSE was saying unless im misunderstanding something which is totally possible.

Thanks for all the help and sorry for bugging. Once I get a usb drive or hdd booting debian ima image the drive so I have a backup of basic debian I can play with.

Does my uboot need to be updated or something. I would like to be able to use that netconsole rather than using this rs323 cable anyways. but not sure how to upgrade uboot without bricking my box. :(

~SOL



Edited 1 time(s). Last edit at 12/16/2013 05:23AM by SomeoneOnLine.
Re: Linux Kernel 3.12.0 Kirkwood package and rootfs (Non Flattened Device Tree)
December 16, 2013 05:47AM
try using this as the bootcmd_linux line:

setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /uImage; ext2load usb 0:1 0x01100000 /uInitrd; bootm $(loadaddr) 0x01100000'



Edited 1 time(s). Last edit at 12/16/2013 05:49AM by Buttzy10169.
Sorry, you can't reply to this topic. It has been closed.