Welcome! Log In Create A New Profile

Advanced

Bootargs for a single ext3 partition

Posted by lolinger 
Bootargs for a single ext3 partition
December 25, 2017 03:50AM
Hi bodhi,

I am trying to find the correct settings for NSA325-v2 stock bootloader. I've formatted a USB-Stick with a single ext3 partition, the kernel is in the folder /boot. I managed to boot from a ext2 partition that contains only the kernel image, rootfs is on the second partition. However, this is not what I want.

However, I tried this:
https://forum.doozan.com/read.php?3,35937,35941
Kernel and initramfs get loaded but after that, nothing happens. I basically need the complete u-boot parms for booting with a single ext3 partition on stock u-boot. But I can't find it anywhere. Can you help me please. Sorry for my bad english :(



Edited 3 time(s). Last edit at 12/25/2017 03:51AM by lolinger.
Re: Bootargs for a single ext3 partition
December 25, 2017 04:14AM
lolinger Wrote:
-------------------------------------------------------
> Hi bodhi,
>
> I am trying to find the correct settings for
> NSA325-v2 stock bootloader. I've formatted a
> USB-Stick with a single ext3 partition, the kernel
> is in the folder /boot. I managed to boot from a
> ext2 partition that contains only the kernel
> image, rootfs is on the second partition. However,
> this is not what I want.
>
> However, I tried this:
> https://forum.doozan.com/read.php?3,35937,35941
> Kernel and initramfs get loaded but after that,
> nothing happens. I basically need the complete
> u-boot parms for booting with a single ext3
> partition on stock u-boot. But I can't find it
> anywhere. Can you help me please. Sorry for my bad
> english :(

Do you have serial console? if you do , then post the whole serial console boot log.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
December 25, 2017 04:25AM
Yeah, I do
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: DB-88F6282A-BP LE

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

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

Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 533Mhz
SysClock = 533Mhz , TClock = 200Mhz

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

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0x4640000.

Streaming disabled
Write allocate disabled


USB 0: host mode
        [BlueDBG] reseting SoC Pex[0]  0 ...
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
        [BlueDBG] reseting SoC Pex[1]  0 ...
        [BlueDBG] reseting SoC Pex[1]  1 ...
        [BlueDBG] reseting SoC Pex[1]  2 ...
        [BlueDBG] reseting SoC Pex[1]  3 ...
        [BlueDBG] reseting SoC Pex[1]  4 ...
        [BlueDBG] reseting SoC Pex[1]  5 ...
        [BlueDBG] reseting SoC Pex[1]  6 ...
        [BlueDBG] reseting SoC Pex[1]  7 ...
        [BlueDBG] reseting SoC Pex[1]  8 ...
        [BlueDBG] reseting SoC Pex[1]  9 ...
        [BlueDBG] reseting SoC Pex[1]  10 ...
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0
Marvell>> bootcmd_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000
Unknown command 'bootcmd_linux=setenv' - try 'help'
(Re)start USB...
USB:   scanning bus for devices... 3 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
.........................................................................................................................................................................

3836140 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
.................................................................................................................................................................................................................
.....................................................................................................................................................................................................................................................................................................

7245696 bytes read
## Booting image at 02000000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-12-25   0:23:53 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3836076 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes =  6.9 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

After this, nothing happens.
BTW: Entered boot command manually (see code).



Edited 1 time(s). Last edit at 12/25/2017 04:25AM by lolinger.
Re: Bootargs for a single ext3 partition
December 25, 2017 05:35AM
The correct command is

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

However, there might be some problem with your u-boot envs. So let's see what you have.

Power up, interrupt serial console and

printenv
Post the entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
December 25, 2017 08:24AM
Thank you. I entered and saved your command. However, now it is booting from NAND, not USB:

 ** MARVELL BOARD: DB-88F6282A-BP LE

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

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

Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 800Mhz
SysClock = 533Mhz , TClock = 200Mhz

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

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0x4640000.

Streaming disabled
Write allocate disabled


USB 0: host mode
        [BlueDBG] reseting SoC Pex[0]  0 ...
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
        [BlueDBG] reseting SoC Pex[1]  0 ...
        [BlueDBG] reseting SoC Pex[1]  1 ...
        [BlueDBG] reseting SoC Pex[1]  2 ...
        [BlueDBG] reseting SoC Pex[1]  3 ...
        [BlueDBG] reseting SoC Pex[1]  4 ...
        [BlueDBG] reseting SoC Pex[1]  5 ...
        [BlueDBG] reseting SoC Pex[1]  6 ...
        [BlueDBG] reseting SoC Pex[1]  7 ...
        [BlueDBG] reseting SoC Pex[1]  8 ...
        [BlueDBG] reseting SoC Pex[1]  9 ...
        [BlueDBG] reseting SoC Pex[1]  10 ...
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0
Marvell>> printenv
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81: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
ethaddr=00:50:43:00:02:02
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_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
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

Environment size: 1764/131068 bytes
Marvell>> boot

NAND read: device 0 offset 0x4640000, size 0xa00000

Reading data from 0x4b0c800 --  48% complete.

Re: Bootargs for a single ext3 partition
December 25, 2017 11:05AM
lolinger,

> Thank you. I entered and saved your command.
> However, now it is booting from NAND, not USB:


That's because your envs were never set up to boot both USB and stock properly. This bootcmd forces the boot process to always boot stock.

bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000

To verify the bootcmd_linux works: power up, interrupt serial console and

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

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
December 25, 2017 11:45AM
Now Kernel and Ramdisk get loaded but same problem as before: After "Uncompressing Linux... done, booting the kernel." it's stuck.
BTW: I noticed that no bootargs are specified. I guess the kernel needs further information about the rootfs.

Thank you again!

 ** MARVELL BOARD: DB-88F6282A-BP LE

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

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

Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 533Mhz
SysClock = 533Mhz , TClock = 200Mhz

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

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0xc80000.

Streaming disabled
Write allocate disabled


USB 0: host mode
        [BlueDBG] reseting SoC Pex[0]  0 ...
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
        [BlueDBG] reseting SoC Pex[1]  0 ...
        [BlueDBG] reseting SoC Pex[1]  1 ...
        [BlueDBG] reseting SoC Pex[1]  2 ...
        [BlueDBG] reseting SoC Pex[1]  3 ...
        [BlueDBG] reseting SoC Pex[1]  4 ...
        [BlueDBG] reseting SoC Pex[1]  5 ...
        [BlueDBG] reseting SoC Pex[1]  6 ...
        [BlueDBG] reseting SoC Pex[1]  7 ...
        [BlueDBG] reseting SoC Pex[1]  8 ...
        [BlueDBG] reseting SoC Pex[1]  9 ...
        [BlueDBG] reseting SoC Pex[1]  10 ...
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0
Marvell>> printenv
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81: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
ethaddr=00:50:43:00:02:02
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_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
arcNumber=11
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=0xc80000
pcieTune=no
pcieTune1=no

Environment size: 1777/131068 bytes
Marvell>> run bootcmd_linux
(Re)start USB...
USB:   scanning bus for devices... 3 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
.........................................................................................................................................................................

3836140 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
.................................................................................................................................................................................................................
.....................................................................................................................................................................................................................................................................................................

7245696 bytes read
## Booting image at 02000000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-12-25   0:23:53 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3836076 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes =  6.9 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.



Edited 2 time(s). Last edit at 12/25/2017 11:46AM by lolinger.
Re: Bootargs for a single ext3 partition
December 25, 2017 09:54PM
lolinger,

> BTW: I noticed that no bootargs are specified. I
> guess the kernel needs further information about
> the rootfs.

Yes indeed!

Try this additional env:

setenv bootargs_linux 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)'
setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000'
setenv mainlineLinux yes
run bootcmd_linux

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
December 26, 2017 03:09AM
Still, nothing happens :(
Maybe I'll have to go back to 2 partitions?

 ** MARVELL BOARD: DB-88F6282A-BP LE

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

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

Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 800Mhz
SysClock = 533Mhz , TClock = 200Mhz

DRAM (DDR3) CAS Latency = 7 tRP = 8 tRAS = 24 tRCD=8
DRAM CS[0] base 0x00000000   size 512MB
DRAM Total size 512MB  16bit width
Addresses 10M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (10M - 7M): Done
NAND:128 MB
*** Warning - bad CRC or NAND, using default environment

Erasing Nand...Writing to Nand... done
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0xc80000.

Streaming disabled
Write allocate disabled


USB 0: host mode
        [BlueDBG] reseting SoC Pex[0]  0 ...
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
        [BlueDBG] reseting SoC Pex[1]  0 ...
        [BlueDBG] reseting SoC Pex[1]  1 ...
        [BlueDBG] reseting SoC Pex[1]  2 ...
        [BlueDBG] reseting SoC Pex[1]  3 ...
        [BlueDBG] reseting SoC Pex[1]  4 ...
        [BlueDBG] reseting SoC Pex[1]  5 ...
        [BlueDBG] reseting SoC Pex[1]  6 ...
        [BlueDBG] reseting SoC Pex[1]  7 ...
        [BlueDBG] reseting SoC Pex[1]  8 ...
        [BlueDBG] reseting SoC Pex[1]  9 ...
        [BlueDBG] reseting SoC Pex[1]  10 ...
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0
Marvell>> setenv bootargs_linux 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)'
Marvell>> setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000'
Marvell>> setenv mainlineLinux yes
Marvell>> printenv
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
ethprime=egiga0
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81: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
disaMvPnp=no
ethaddr=00:50:43:00:02:02
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
enaAutoRecovery=yes
kernel_addr=0xc80000
pcieTune=no
pcieTune1=no
ethact=egiga0
bootargs_linux=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
bootcmd_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000
mainlineLinux=yes

Environment size: 2009/131068 bytes
Marvell>> run bootcmd_linux
(Re)start USB...
USB:   scanning bus for devices... 3 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
.........................................................................................................................................................................

3836140 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
.................................................................................................................................................................................................................
.....................................................................................................................................................................................................................................................................................................

7245696 bytes read
## Booting image at 02000000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-12-26  10:02:11 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3836076 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes =  6.9 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Re: Bootargs for a single ext3 partition
December 26, 2017 07:25AM
Try this:


setenv bootargs_linux 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) earlyprintk=serial'
setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm $(loadaddr) 0x02100000'
setenv mainlineLinux yes
run bootcmd_linux

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
December 26, 2017 08:31AM
Now I got a CRC error:
## Booting image at 02000000 ...
Image Name: Linux-4.12.1-kirkwood-tld-1
Created: 2017-12-26 10:02:11 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3836076 Bytes = 3.7 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... Bad Data CRC

I'll try a different device.



Edited 1 time(s). Last edit at 12/26/2017 08:42AM by lolinger.
Re: Bootargs for a single ext3 partition
December 26, 2017 09:18AM
setenv loadaddr 0x800000
setenv bootargs_linux 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) earlyprintk=serial'
setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm $(loadaddr) 0x02100000'
setenv mainlineLinux yes
run bootcmd_linux

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
December 26, 2017 10:42AM
It works!!! You're the best!
Last thing: I'd like to boot from USB by default. And maybe you want to add this to the wiki.
Re: Bootargs for a single ext3 partition
December 30, 2017 01:04PM
lolinger,

Are you OK now or is there still question?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
December 31, 2017 02:01AM
Hi bodhi,

I can confirm that using

setenv loadaddr 0x800000
setenv bootargs_linux 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) earlyprintk=serial'
setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm $(loadaddr) 0x02100000'
setenv mainlineLinux yes
run bootcmd_linux

the NSA325 successfully boots into rootfs. However, after rebooting Debian, stock OS is started again.

Is there any way to make the changes persistent so that it is always booted from USB as long as the USB storage is attached? I assume lolinger also needs to always boot from USB.

Edit: I think I just found the instructions to default to USB (https://forum.doozan.com/read.php?2,36382,36439#msg-36439):

saveenv
boot

One last question just to make sure I understood it correctly: When the USB storage is unplugged, the device will boot to stock OS although the changes to uboot were saved?

Thanks and regards



Edited 1 time(s). Last edit at 12/31/2017 02:19AM by debi.
Re: Bootargs for a single ext3 partition
January 01, 2018 11:19PM
debi Wrote:
-------------------------------------------------------
> Hi bodhi,
>
> I can confirm that using
>
>
> setenv loadaddr 0x800000
> setenv bootargs_linux 'console=ttyS0,115200
> root=LABEL=rootfs rootdelay=10
> mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
> earlyprintk=serial'
> setenv bootcmd_linux 'setenv bootargs
> $(bootargs_linux); mw.l f1010100 0020c000; usb
> reset; ext2load usb 0:1 $(loadaddr) /boot/uImage;
> ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm
> $(loadaddr) 0x02100000'
> setenv mainlineLinux yes
> run bootcmd_linux
>
>
> the NSA325 successfully boots into rootfs.
> However, after rebooting Debian, stock OS is
> started again.
>
> Is there any way to make the changes persistent so
> that it is always booted from USB as long as the
> USB storage is attached? I assume lolinger also
> needs to always boot from USB.
>
> Edit: I think I just found the instructions to
> default to USB
> (https://forum.doozan.com/read.php?2,36382,36439#msg-36439):
>
>
> saveenv
> boot
>
>
> One last question just to make sure I understood
> it correctly: When the USB storage is unplugged,
> the device will boot to stock OS although the
> changes to uboot were saved?
>
> Thanks and regards

A few more envs need to be modified to enable it to boot to USB automatically, and fallback to boot stock OS if USB drive is unplugged.

If you cannot find an example for this searching the forum, post back and I will write a few envs for you.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
January 02, 2018 08:46AM
In general, I'm okay. Debian works fine. But now I have a completely different Problem.
My OS is stored on a USB2.0 stick which has a speeds around 20 MB/s read and 8 MB/s write. I got owncloud installed.

However, I got notice that file transfers get managed by PHP here. PHP stores temporary split files (around 512k-1M) in /tmp before writing them to another temporary file on my HDD. This leads to extremely slow upload speeds of my owncloud because the temp files are written to the USB stick first and have to be read afterwards again! My HDD is far faster for this purpose. I guess that the PHP developers intended fast RAM in the tmp directory, here RAM is not available. For some reason /tmp gets written to USB. Can this be fixed? Could a partition of the NAND be used for this eventually or has this ever been tried?

I have no problems to write on my HDD via SMB, this is very fast (around 80 MB/s)



Edited 7 time(s). Last edit at 01/02/2018 08:53AM by lolinger.
Re: Bootargs for a single ext3 partition
January 02, 2018 09:49AM
lolinger,

>For some
> reason /tmp gets written to USB. Can this be
> fixed? Could a partition of the NAND be used for
> this eventually or has this ever been tried?
>

This is abnormal. /tmp should be in RAM. Check your /etc/fstab to see if it was modified incorrectly somehow. If it is mounted to USB, then put it back to RAM.

> Could a partition of the NAND be used for this eventually or has this ever been tried?

Don’t use NAND for any purpose other than storing read-only images such as u-boot or kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 2 time(s). Last edit at 01/02/2018 02:12PM by bodhi.
Re: Bootargs for a single ext3 partition
January 02, 2018 12:43PM
Hi bodhi,

Many thanks for your reply and support. I spent some time searching the forum but couldn't find any examples on how to achieve booting from USB by default and falling back to stock OS if the rootfs USB drive is unplugged. As I only have basic Linux knowledge I wasn't able to figure out the right commands myself. Maybe you could point me in the right direction one more time. Thanks in advance!

Regards
Re: Bootargs for a single ext3 partition
January 02, 2018 10:54PM
debi,

To make sure that I have your current envs

setenv loadaddr 0x800000
setenv bootargs_linux 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) earlyprintk=serial'
setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm $(loadaddr) 0x02100000'
setenv mainlineLinux yes
printenv

Please post the serial bootlog up to here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
January 03, 2018 02:57AM
Hi bodhi,

Marvell>> setenv bootargs_linux 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) earlyprintk=serial'
Marvell>> setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm $(loadaddr) 0x02100000'
Marvell>> setenv mainlineLinux yes
Marvell>> printenv

bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=5C:F4:AB:51:68:C3
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
ethprime=egiga0
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81: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
disaMvPnp=no
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
autoload=no
image_multi=yes
enaAutoRecovery=yes
kernel_addr=0x4640000
pcieTune=no
pcieTune1=no
ethact=egiga0
loadaddr=0x800000
bootargs_linux=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) earlyprintk=serial
bootcmd_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm $(loadaddr) 0x02100000
mainlineLinux=yes

Environment size: 2027/131068 bytes

Thank you once again for your help!

Best regards
Re: Bootargs for a single ext3 partition
January 04, 2018 03:24AM
debi,

With the USB rootfs plugged in. Power up, interrupt serial console and,

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'
setenv bootcmd_stock 'setenv mainlineLinux no; setenv bootargs $(bootargs_stock); nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000'
setenv bootargs_linux 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) earlyprintk=serial'
setenv bootcmd_linux 'setenv mainlineLinux yes; setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 0x800000  /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm 0x800000 0x02100000'
setenv bootcmd 'if run bootcmd_linux; then; else run bootcmd_stock; fi; reset'

And then

boot

Boot into Debian. Verify everything is OK. Shutdown.

2. With USB rootfs removed. Power up, interrupt serial console and repeat the test.

-------

After you can run these 2 tests correctly a few times, you can save the envs permanently before booting:

saveenv
boot

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
January 04, 2018 05:15PM
Hi bodhi,

After typing in the commands I get the following error and my NAS boots to stock OS:

Marvell>> 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'
Marvell>> setenv bootcmd_stock 'setenv mainlineLinux no; setenv bootargs $(bootargs_stock); nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000'
Marvell>> setenv bootargs_linux 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) earlyprintk=serial'
Marvell>> setenv bootcmd_linux 'setenv mainlineLinux yes; setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 0x800000  /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm 0x800000 0x02100000'
Marvell>> setenv bootcmd 'if run bootcmd_linux; then; else run bootcmd_stock; fi; reset'
Marvell>> boot

Unknown command 'if' - try 'help'
Unknown command 'then' - try 'help'
Unknown command 'else' - try 'help'
This command can be used only if enaMonExt is set!

Is something like
setenv enaMonExt yes

needed? I'm not quite sure what this parameter does.

Many thanks in advance!

Regards



Edited 1 time(s). Last edit at 01/04/2018 05:18PM by debi.
Re: Bootargs for a single ext3 partition
January 04, 2018 10:10PM
debi,

Don't worry about that enaMonExt. It simply means that this stock u-boot does not support the "if then else" statement. I've revised the bootcmd below


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'
setenv bootcmd_stock 'setenv mainlineLinux no; setenv bootargs $(bootargs_stock); nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000'
setenv bootargs_linux 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) earlyprintk=serial'
setenv bootcmd_linux 'setenv mainlineLinux yes; setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 0x800000  /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm 0x800000 0x02100000'
setenv bootcmd 'echo Booting Linux... ; run bootcmd_linux; echo booting from NAND... ; run bootcmd_stock; reset'

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
January 11, 2018 10:11AM
Hi bodhi,

Yes, that did the trick. I've tested it a few times before saving the modified envs. Until now I haven't noticed any issues. Many thanks once again! Maybe your instructions can be added to the Wiki if someone needs to keep stock OS functionalities and therefore does not want to update uboot?

Regards
Re: Bootargs for a single ext3 partition
January 11, 2018 10:17AM
debi Wrote:
-------------------------------------------------------
> Hi bodhi,
>
> Yes, that did the trick. I've tested it a few
> times before saving the modified envs. Until now I
> haven't noticed any issues. Many thanks once
> again! Maybe your instructions can be added to the
> Wiki if someone needs to keep stock OS
> functionalities and therefore does not want to
> update uboot?
>
> Regards

Cool! good suggestion. Will add to the Wiki.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bootargs for a single ext3 partition
October 14, 2018 06:23AM
bodhi Wrote:
-------------------------------------------------------
> debi,
>
> Don't worry about that enaMonExt. It simply means
> that this stock u-boot does not support the "if
> then else" statement. I've revised the bootcmd
> below
>
>
>
> 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'
> setenv bootcmd_stock 'setenv mainlineLinux no;
> setenv bootargs $(bootargs_stock); nand read.e
> 0x2000000 $(kernel_addr) 0xA00000; bootm
> 0x2000000'
> setenv bootargs_linux 'console=ttyS0,115200
> root=LABEL=rootfs rootdelay=10
> mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
> earlyprintk=serial'
> setenv bootcmd_linux 'setenv mainlineLinux yes;
> setenv bootargs $(bootargs_linux); mw.l f1010100
> 0020c000; usb reset; ext2load usb 0:1 0x800000 
> /boot/uImage; ext2load usb 0:1 0x02100000
> /boot/uInitrd; bootm 0x800000 0x02100000'
> setenv bootcmd 'echo Booting Linux... ; run
> bootcmd_linux; echo booting from NAND... ; run
> bootcmd_stock; reset'
>


The last line contains an error: remove the reset command from the script. Otherwise boot to NAND will fail once linux is booted from USB the first time.
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: