Debian on Mirabox (Armada 370)
November 11, 2017 10:01AM
It's been a while since I have posted, lurked mostly with nothing new to add. Picked up a Globalscale Mirabox cheaply and have tried to load bodhi Debian on it. Not sure what env's to use on the stock u-boot to get Debian-4.12.4-mvebu-tld-1 to boot from the external micro sd slot (mmcblk0).

Globalscale Mirabox specs:
1.2Ghz Marvell Armada CPU ARMADA 370 ARM v7 compliant
802.11b/g/n Wifi with Marvell 88W8787 and Bluetooth 3.0
1GB DDR3
1 GB NAND Flash
2 each 10/100/1000 Ethernet Ports
2 each USB 3.0 host
1 microsd card slot/reader, 1 additional Mini PCIe slot for expansion (internal)
For additional 2x2, 3x3, 4x4 WiFi Radios, or 3G modules
3 LED controlled by GPIO, reset button
external power supply
Port for JTAG and Debugging options

Stock uEnv's:


BootROM 1.08
Booting from SPI flash
DDR3 Training Sequence - Ver 4.4.0
DDR3 Training Sequence - Ended Successfully
Status = MV_OK
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_
        | | | |___|  _ \ / _ \ / _ \| __|
        | |_| |___| |_) | (_) | (_) | |_
         \___/    |____/ \___/ \___/ \__|
 ** LOADER **


U-Boot 2009.08 (Jul 15 2015 - 21:57:33)Marvell version: 1.1.2 NQ
U-Boot Addressing:
       Code:            00600000:006AFFF0
       BSS:             006F7240
       Stack:           0x5fff70
       PageTable:       0x8e0000
       Heap address:    0x900000:0xe00000
Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU @ 1200Mhz, L2 @ 600Mhz
       DDR @ 600Mhz, TClock @ 200Mhz
       DDR 16Bit Width, FastPath Memory Access
PEX 0: Detected No Link.
PEX 1: Root Complex Interface, Detected Link X1
DRAM:   1 GB
       CS 0: base 0x00000000 size 512 MB
       CS 1: base 0x20000000 size 512 MB
       Addresses 14M - 0M are saved for the U-Boot usage.
SF: Detected MX25L1605D with page size 256, total 2097152 bytes
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Modules/Interfaces Detected:
       RGMII0 Phy
       RGMII1 Phy
       PEX0 (Lane 0)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
MMC:   MRVL_MMC: 0
Net:   egiga0 [PRIME], egiga1
flag =  ff
Hit any key to stop autoboot:  0


Marvell>> printenv
bootdelay=3
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=console=ttyS0,115200
sata_delay_reset=0
enaExtDisk=no
MALLOC_len=5
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:10.4.50.254:255.255.255.0:KW40:eth0:none
image_name=uImage
load_addr=0x02000000
standalone=fsload $load_addr $image_name;setenv bootargs $console $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm $load_addr;
ethmtu=1500
eth1mtu=1500
mvNetConfig=mv_net_config=1,(XX:XX:XX:XX:XX:XX,0:1:2:3:4),mtu=1500
usb0Mode=host
usb1Mode=host
usbActive=2
yuk_ethaddr=XX:XX:XX:XX:XX:XX
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
eeeEnable=no
ethact=egiga0
bootcmd=usb start; fatload usb 0 0x6400000 uimage_3.2.36.v9; bootm 0x6400000
ethaddr=XX:XX:XX:XX:XX:XX
eth1addr=XX:XX:XX:XX:XX:XX
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
pexMode=RC
setL2CacheWT=no
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
realboot=mmcinfo;fatload mmc 0 0x6400000 uImage; bootm 0x6400000
realboot1=run realboot
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
bootargs=console=ttyS0,115200 root=/dev/mtdblock0 rw ip=10.4.50.165:10.4.50.5:10.4.50.254:255.255.255.0:KW40:eth0:none

Environment size: 1255/65532 bytes

The device successfully boots on the stock 3.2.36 Debian Wheezy 4 Gb rootfs which is on a micro-sd card internal on the motherboard and is considered a USB drive (not sure why internal is USB and external is MMC).

Am assuming because of stock u-boot being so old, it does not support separate dtb. Regardless of separate embedded dtb vs separate, not sure what memory areas to load uImage, uInitrd into during boot.

Can anybody provide some guidance as to uEnv's to try? Any help would be appreciated.

LME

--------------------------
Moderator edit: modified thread subject to make it easier to find.



Edited 3 time(s). Last edit at 03/21/2019 04:28AM by bodhi.
Re: Bodhi Debian on Mirabox
November 11, 2017 04:16PM
LeggoMyEggo,

Good to see you posting again!


> The device successfully boots on the stock 3.2.36
> Debian Wheezy 4 Gb rootfs which is on a micro-sd
> card internal on the motherboard and is considered
> a USB drive (not sure why internal is USB and
> external is MMC).

It is an internal USB card reader.

>
> Am assuming because of stock u-boot being so old,
> it does not support separate dtb. Regardless of
> separate embedded dtb vs separate, not sure what
> memory areas to load uImage, uInitrd into during
> boot.
>

You can boot with Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 on that SD card. And most likely you need to embed the DTB in uImage (/boot/dts/armada-370-mirabox.dtb).

However, first verify whether they have ported the FDT. At serial consle prompt:

help
fdt

If no FDT capability, try booting with our usual Kirkwood addresses:

load_initrd_addr=0x1100000
load_uimage_addr=0x800000

But looking at the envs. If 0x6400000 is the stock address, there might be a reason, so if the standard addresses above fail to boot, we want to use 0x6400000 as the next try. This box has so much RAM that these addresses could be anywehere :) except for some stock u-boot quirks that we'll see in the boot log when you attempt.
Quote

bootm 0x6400000

The stock bootargs and bootcmd need to be adjusted,

setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
setenv bootcmd 'usb start; ext2load usb 0:1 0x800000 /boot/uImage;  ext2load usb 0:1 0x1100000 /boot/uInitrd; bootm 0x800000 0x1100000'

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



Edited 3 time(s). Last edit at 11/12/2017 05:23AM by bodhi.
Re: Bodhi Debian on Mirabox
November 12, 2017 04:19AM
bodhi Wrote:
-------------------------------------------------------

> However, first verify whether they have ported
> the FDT. At serial consle prompt:
>
>
> help
> fdt
>

I typed 'fdt' at the Marvell>> command prompt and it said the command does not exist.

Marvell>> help
?       - alias for 'help'
SatR    - Sample At Reset sub-system

autoscr - DEPRECATED - use "source" command instead
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
bootvx  - Boot vxWorks from an ELF image
bubt    - bubt  - Burn an image on the Boot SPI Flash.

chpart  - change active partition
cmp     - memory compare
cmpm    - cmpm  - Compare Memory

coninfo - print console devices and information
cp      - memory copy
cpumap  - cpumap - Display CPU memory mapping settings.

crc32   - checksum calculation
date    - get/set/reset date & time
ddrPhyRead- ddrPhyRead - Read DDR PHY register

ddrPhyWrite- ddrPhyWrite - Write DDR PHY register

dhcp    - boot image via network using DHCP/TFTP protocol
diskboot- diskboot- boot from IDE device

dma     - dma   - Perform DMA using the XOR engine

echo    - echo args to console
eeprom  - EEPROM sub-system
exit    - exit script
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      - fi    - Find value in the memory.

fsinfo  - print information about filesystems
fsload  - load binary file from a filesystem image
g       - g     - start application at cached address 'addr'(default addr 0x40000)

go      - start application at address 'addr'
help    - print online help
i2c     - I2C sub-system
ide     - ide     - IDE sub-system

iminfo  - print header information for application image
imxtract- extract a part of a multi-image
ir      - ir    - reading and changing MV internal register values.

itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
ls      - list files in a directory (default /)
map     - map   - Diasplay address decode windows

md      - memory display
me      - me    - PCI master enable

mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - display MMC info
mp      - mp    - map PCI BAR

mtdparts- define flash/nand partitions
mtest   - simple RAM read/write test
mw      - memory write (fill)
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
pciePhyRead- phyRead    - Read PCI-E Phy register

pciePhyWrite- pciePhyWrite      - Write PCI-E Phy register

phyRead - phyRead       - Read Phy register

phyWrite- phyWrite      - Write Phy register

ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
rcvr    - rcvr  - Satrt recovery process (Distress Beacon with TFTP server)

reset   - Perform RESET of the CPU
resetenv- resetenv      - earse environment sector to reset all variables to default.

run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
se      - se    - PCI Slave enable

setenv  - set environment variables
sf      - SPI flash sub-system
sg      - sg    - scanning the PHYs status

showvar - print local hushshell variables
sleep   - delay execution for some time
source  - run script from memory
sp      - sp    - Scan PCI bus.

sspi    - SPI utility commands
switchCountersRead- switchCntPrint      - Read switch port counters.

switchPhyRegRead- - Read switch register

switchPhyRegWrite- - Write switch register

switchRegRead- switchRegRead    - Read switch register

switchRegWrite- switchRegWrite  - Write switch register

temp    - temp  - Display the device temprature.

test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
training- training      - prints the results of the DDR3 Training.

ts_report- ts_report    - report touch screen cooridate

ts_test - ts_test       - test touch screen

ubi     - ubi commands
ubifsload- load file from an UBIFS filesystem
ubifsls - list files in a directory
ubifsmount- mount UBIFS volume
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor version
whoAmI  - - reading CPU ID

> And most likely you need to embedded the DTB in uImage (/boot/dts/armada-370-mirabox.dtb).

One small issue with embedding the armada-370-mirabox.dtb in uImage, the Linux-4.12.4-mvebu-tld-1 file does not exist in the boot directory of the premade Debian rootfs ('Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2') nor is it in the linux update ('linux-4.12.4-mvebu-tld-1-bodhi.tar.bz2'). How do I embed dtb using mkimage without that file?

Good to be back BTW.



Edited 1 time(s). Last edit at 11/12/2017 04:30AM by LeggoMyEggo.
Re: Bodhi Debian on Mirabox
November 12, 2017 05:01AM
LeggoMyEggo,

> One small issue with embedding the
> armada-370-mirabox.dtb in uImage, the
> Linux-4.12.4-mvebu-tld-1 file does not exist in
> the boot directory of the premade Debian rootfs
> ('Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2')
> nor is it in the linux update
> ('linux-4.12.4-mvebu-tld-1-bodhi.tar.bz2'). How
> do I embed dtb using mkimage without that file?

Yes it is in both.

In 'Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2', after you extract it to a USB drive, it is in

cd <USB rootfs drive mountpoint>
ls -l  boot/dts/*mira*

-rw-r--r-- 1 root root 13202 Jul 29 22:47 boot/dts/armada-370-mirabox.dtb


Or in the kernel tarball, after you have extracted it:

tar -xjf linux-4.10.9-mvebu-tld-1-bodhi.tar.bz2
tar tf linux-dtb-4.12.4-mvebu-tld-1.tar | grep mira

dts/armada-370-mirabox.dtb

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



Edited 1 time(s). Last edit at 11/12/2017 05:21AM by bodhi.
Re: Bodhi Debian on Mirabox
November 12, 2017 09:54AM
Yes, the proper dtb file is most definitely in both bz2 files.

BUT, in order to use this command "mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.12.4-mvebu-tld-1 -d zImage.fdt uImage" to embed dtb in uImage, I need the 'Linux-4.12.4-mvebu-tld-1' file which I cannot find anywhere. Have I overlooked it?
Re: Bodhi Debian on Mirabox
November 12, 2017 01:44PM
That's not a file, it's the name that will be given to the image:
Usage: mkimage -l image
          -l ==> list image header information
       mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
          -A ==> set architecture to 'arch'
          -O ==> set operating system to 'os'
          -T ==> set image type to 'type'
          -C ==> set compression type 'comp'
          -a ==> set load address to 'addr' (hex)
          -e ==> set entry point to 'ep' (hex)
          -n ==> set image name to 'name'        <-----------------------
          -d ==> use image data from 'datafile'
          -x ==> set XIP (execute in place)
       mkimage [-D dtc_options] [-f fit-image.its|-F] fit-image
          -D => set options for device tree compiler
          -f => input filename for FIT source
Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)
       mkimage -V ==> print version information and exit

root@debian:/boot# strings uImage | grep tld
Linux-4.8.3-kirkwood-tld-1

-JT
Re: Bodhi Debian on Mirabox
November 12, 2017 04:26PM
LeggoMyEggo,

The commands are the same for Kirkwood box
Generate the uImage with DTB embedded inside: 
cd /media/sdb1/boot
cp -a zImage-4.12.1-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.12.1-kirkwood-tld-1 -d zImage.fdt  uImage
sync

So substitute 4.12.1-kirkwood-tld-1 with 4.12.4-mvebu-tld-1, we have

cd /media/sdb1/boot
cp -a zImage-4.12.4-mvebu-tld-1  zImage.fdt
cat dts/armada-370-mirabox.dtb  >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.12.4-mvebu-tld-1 -d zImage.fdt  uImage
sync

Note: My instruction for the Zyxel NAS326 did not not mention this, because the NAS326 stock uboot is newer and supports FDT.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bodhi Debian on Mirabox
March 03, 2019 11:22PM
Hi Leggo :)

Do you have the stock mtds backup for this box? I'm trying go restore stock for this box.

https://forum.doozan.com/read.php?3,43214,79634#msg-79634

Your u-boot is much newer, so I hope it will correct/fix previous u-boot problem in one shot :)

U-Boot 2009.08 (Jul 15 2015 - 21:57:33)Marvell version: 1.1.2 NQ

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



Edited 1 time(s). Last edit at 03/03/2019 11:35PM by bodhi.
Re: Bodhi Debian on Mirabox
March 04, 2019 10:33AM
Bodhi,

I am away from my Mirabox right now so can't get the mtd's directly off of it but the links at this website should be able to get you what you need:

Reflashing Globalscale Mirabox Filesystem

Just checked and the google docs archive is still active.

LME

Edit: Globalscale still has an active archive of files for the Mirabox here: Downloads Mirabox at Globalscale FTP. Looks like if you have the v9 Mirabox (I guess that is what I have), there is the 2015 uboot version available.



Edited 2 time(s). Last edit at 03/04/2019 10:40AM by LeggoMyEggo.
Re: Bodhi Debian on Mirabox
March 04, 2019 03:41PM
Thanks Leggo! I'll let you know how it goes.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bodhi Debian on Mirabox
March 04, 2019 06:44PM
Hi Leggo,

I'm downloading the FTP files. But looks like there is no indication of where the U-Boot GPL source is on that site?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bodhi Debian on Mirabox
March 04, 2019 09:00PM
bodhi Wrote:
-------------------------------------------------------
> Hi Leggo,
>
> I'm downloading the FTP files. But looks like
> there is no indication of where the U-Boot GPL
> source is on that site?

Globalscale is so piss poor with support that your observation would not surprise me.

Read the reviews of their latest offering, the Espressobin, and lots of complaints about lack of kernel support beyond the buggy initial offering. I guess that is why many probably run Armbian.

I had to chuckle when I read the post where they were reintroducing the Sheevaplug in a 64 bit version. No SATA and USB 2.0! This isn't 2011 anymore. One would think that a company that markets to developers and hackers would be more forthright with things like source code, updated u-boot and kernels. But how Globalscale continues in it's current manner just boggles my mind.
Re: Bodhi Debian on Mirabox
March 04, 2019 09:31PM
> Read the reviews of their latest offering, the
> Espressobin, and lots of complaints about lack of
> kernel support beyond the buggy initial offering.
> I guess that is why many probably run Armbian.

They probably hope it will be somebody else like Armbian will provide free community supports :)

I've read Espressobin runs too hot and needs a heat sink.

> I had to chuckle when I read the post where they
> were reintroducing the Sheevaplug in a 64 bit
> version. No SATA and USB 2.0! This isn't 2011
> anymore.

Agree. No SATA (or eSATA if on a small plug from factor) is a big miss. Not qualified as a NAS.

> One would think that a company that
> markets to developers and hackers would be more
> forthright with things like source code, updated
> u-boot and kernels. But how Globalscale continues
> in it's current manner just boggles my mind.

All we need a GPL source file to go with whatever they build and publish. There is no excuse not to make it available :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bodhi Debian on Mirabox
March 05, 2019 12:17AM
Thanks Leggo,

This procedure works!

> Reflashing
> Globalscale Mirabox Filesystem


Apparently they reuse the dreamplug rootfs in this rescue.

root@dreamplug-debian:~# uname -a
Linux dreamplug-debian 3.4.2 #6 Wed Nov 14 09:11:34 EST 2012 armv7l GNU/Linux

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bodhi Debian on Mirabox
March 05, 2019 06:08AM
But that UBI rootfs rootfs-debian6.0-gti-mirabox-v5-0-1-120924.img probably no good!

The formatting went fine.

root@dreamplug-debian:/media/usb2# ubiformat /dev/mtd2 -f rootfs-debian6.0-gti-mirabox-v5-0-1-120924.img 
ubiformat: mtd2 (nand), size 1065353216 bytes (1016.0 MiB), 2032 eraseblocks of 524288 bytes (512.0 KiB), min. I/O size 4096 bytes
libscan: scanning eraseblock 2031 -- 100 % complete  
ubiformat: 2024 eraseblocks have valid erase counter, mean value is 12
ubiformat: bad eraseblocks: 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031
ubiformat: flashing eraseblock 727 -- 100 % complete  
ubiformat: formatting eraseblock 2031 -- 100 % complete

Reboot.

It booted until the error (dmesg showed the volume was not found).

UBI error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_init: cannot attach mtd2
0 - Base 0x00000000 , Size = 0x20000000.


Something is missing in that procedure (it also contains some syntax error in the posted commands). I'll have to refresh my memory about this UBI error.

UPDATE:

The reason:
UBI error: vtbl_check: bad CRC at record 23: 0xf185979f, not 0xffffffff
UBI error: vtbl_check: bad CRC at record 23: 0xf185979f, not 0xffffffff
UBI error: process_lvol: both volume tables are corrupted
UBI error: ubi_init: cannot attach mtd2

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



Edited 3 time(s). Last edit at 03/05/2019 06:32AM by bodhi.
Re: Bodhi Debian on Mirabox
March 05, 2019 08:07AM
bodhi Wrote:
-------------------------------------------------------
> But that UBI rootfs
> rootfs-debian6.0-gti-mirabox-v5-0-1-120924.img
> probably no good!

> It booted until the error (dmesg showed the volume
> was not found).
>
>
> UBI error: ubi_read_volume_table: the layout
> volume was not found
> UBI error: ubi_init: cannot attach mtd2
> 0 - Base 0x00000000 , Size = 0x20000000.
>
>
>
> Something is missing in that procedure (it also
> contains some syntax error in the posted
> commands). I'll have to refresh my memory about
> this UBI error.

Globalscale strikes again......Drats! :(
Re: Bodhi Debian on Mirabox
March 05, 2019 04:40PM
> Globalscale strikes again......Drats! :(

:))

I'll try again a few more times. If it does not work, I'll just install SD card in internal slot and be done with this as a rescue system for now.

If somehow we can get GPL source for u-boot, USB 3.0 booting would be possible (as in other Armada 38x boxes). Or perhaps I can look into the other Marvell a38x u-boots to see if they have a37x supports.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bodhi Debian on Mirabox
March 06, 2019 04:08AM
Leggo,

Yup. It is garbage :) try again and got the same error.

Did you do any thing extra to get the USB host for internal SD card activated? I don't see it even I have 2 SD cards plugged in both slots. I can only see the external SD.

I've noticed there is an env: usbActive. I tried a few values 0..4 and not seeing the internal card.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bodhi Debian on Mirabox
March 06, 2019 05:28AM
bodhi Wrote:
-------------------------------------------------------
> Did you do any thing extra to get the USB host for
> internal SD card activated?

I thought that the internal SD card was actually a chip embedded on the device. IIRC, it's 4GB? I hope I am not confusing devices but I think this is the one where it would only initialize once per reset cycle, that is, you could only initialize the drive once, if the boot failed for some reason or you had a wrong boot command you would need to reset the board to start over.

Yep, same observation about the Mirabox with the USB 3.0 ports, they were not usable for booting as they were not recognized by uboot. They were only recognized after the rootfs had booted and could load the USB 3.0 drivers.

I finally ended up moving the latest available Globalscale rootfs to the SD card so I could have more space. Wheezy was the last available from GS.

Board on paper has a lot of potential but software definitely limits it.



Edited 2 time(s). Last edit at 03/06/2019 05:37AM by LeggoMyEggo.
Re: Bodhi Debian on Mirabox
March 06, 2019 05:37AM
Leggo,

> I thought that the internal SD card was actually a
> chip embedded on the device. IIRC, it's 4GB? I
> hope I am not confusing devices but I think this
> is the one where it would only initialize once per
> reset cycle, that is, you could only initialize
> the drive once, if the boot failed for some reason
> or you had a wrong boot command you would need to
> reset the board to start over.

It seems we have a differrent version of this box. Mine has a real internal SD card slot. I inserted a another microSD card in it.

>
> What also sucked about the Mirabox was the USB 3.0
> ports were not usable for booting as they were not
> recognized by uboot, they were only recognized
> after the rootfs had booted and could load the USB
> 3.0 drivers.

Yes. This u-boot is so old that USB 3.0 is out of the question.

>
> I finally ended up moving the latest available
> Globalscale rootfs to the SD card so I could have
> more space. Wheezy was the last available from
> GS.
>
> Board on paper has a lot of potential but software
> definitely limits it.

If I could run a customed build uboot on it, then everything will be great just like we have for Kirkwood/OXNAS boxes.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bodhi Debian on Mirabox
March 14, 2019 03:28AM
Finally finished a new kernel for Mirabox! The old stock bootloader on this box has caused me a lot of stops and starts to figure out why it kept crashing.

Stock bootloader (2009.08 Marvell) uses a non-standard address for the device, so it needs to be configured using a few old settings in the kernel for debugging with UART. This has some commonality with a few other Armda 370 boxes in that they also use this old boot loader: U-Boot 2009.08 (Sep 16 2012 - 22:50:06)Marvell version: 1.1.2 NQ.

root@Mirabox:~# myinfo 
Mirabox
Globalscale Mirabox
Linux version 4.20.6-mvebu-mirabox-tld-12 (root@tldDebianVM) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04)) #6 SMP PREEMPT Wed Mar 13 14:43:16 PDT 2019
Debian 9.4
console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=pxa3xx_nand-0:4M(u-boot),4M(linux),-(filesystem) earlyprintk=serial
uboot_version=U-Boot 2009.08 (Sep 16 2012 - 22:50:06)Marvell version: 1.1.2 NQ
--- System Stats:
/dev/sda: Generic STORAGE DEVICE: S.M.A.R.T. not available
/dev/sdb: Generic STORAGE DEVICE: S.M.A.R.T. not available

This kernel 4.20.6-mvebu-mirabox-tld-12 is configured with some minor differences from the MVEBU kernel for other boxes. I had to move a few files system driver (F2FS, OrangeFS, JFFS2) to initrd (to make them loadable modules) to make the kernel size smaller.

This can be installed on the armhf rootfs Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2. Or even the armel rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 would work.

Will upload it with instruction for installation, and more testing by others before I release.

--------------
Moderator: edited to remove the 4MB limitation mentioned previously. This is not true. Stock u-boot does not limit the kernel image size to 4MB.

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



Edited 3 time(s). Last edit at 06/22/2019 10:58PM by bodhi.
Debian on Mirabox -- Installation
March 14, 2019 05:52PM
Please see:

https://forum.doozan.com/read.php?2,92514

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



Edited 4 time(s). Last edit at 11/06/2019 11:48PM by bodhi.
Re: Debian on Mirabox -- Installation
March 17, 2019 05:56PM
Please see the installation instruction for Mirabox in the post right above:

https://forum.doozan.com/read.php?2,41809,80659#msg-80659

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Mirabox Fix
Re: Debian on Mirabox -- Installation
June 22, 2019 09:53PM
How to fix the stock fs? I tried the to flash it under debian (Linux debian 4.20.6-mvebu-mirabox-tld-12 #6 SMP PREEMPT Wed Mar 13 14:43:16 PDT 2019 armv7l GNU/Linux )
root@debian:/mnt# ubiformat /dev/mtd2 --flash-image=rootfs-debian6.0-gti-mirabox-v5-0-1-120924.img
ubiformat: mtd2 (nand), size 1065353216 bytes (1016.0 MiB), 2032 eraseblocks of 524288 bytes (512.0 KiB), min. I/O size 4096 bytes
libscan: scanning eraseblock 2031 -- 100 % complete
ubiformat: 2024 eraseblocks are supposedly empty
ubiformat: 8 bad eraseblocks found, numbers: 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031
ubiformat: flashing eraseblock 727 -- 100 % complete
ubiformat: formatting eraseblock 2031 -- 100 % complete

I also tried

https://www.frozentux.net/2013/05/reflashing-globalscale-mirabox-filesystem/

Also failed at boot... (same kernel panic...)

I noticed bodhi also had "bad eraseblocks: 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031", I guess these are marked by the bad software...
Re: Debian on Mirabox -- Installation
June 22, 2019 10:54PM
Any instructions to install openwrt as rescue system?



Edited 1 time(s). Last edit at 06/22/2019 10:55PM by daviddyer.
Re: Debian on Mirabox -- Installation
June 22, 2019 10:54PM
Mirabox Fix,

I gave up on rootfs-debian6.0-gti-mirabox-v5-0-1-120924.img. This apparently has problem. Not worth using.

Note about what I said before

Quote

Stock bootloader (2009.08 Marvell) limits the kernel uImage size to 4 MB, and it also uses a non-standard address for the device, so it needs to be configured using a few old settings in the kernel for debugging with UART. This has some commonality with a few other Armda 370 boxes in that they also use this old boot loader: U-Boot 2009.08 (Sep 16 2012 - 22:50:06)Marvell version: 1.1.2 NQ.

I have since found out that it was not true about 4MB limitation. The kernel file can be much bigger, no problem. The real problem was "non-standard address for the device". So I had to compiled a special custom kernel for this box (with a very sighlty different configuration).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Mirabox -- Installation
June 22, 2019 11:28PM
daviddyer Wrote:
-------------------------------------------------------
> Any instructions to install openwrt as rescue
> system?

There is a Mirabox sysupgrade file for OpenWrt:

https://downloads.openwrt.org/releases/17.01.4/targets/mvebu/generic/lede-17.01.4-mvebu-globalscale-mirabox-squashfs-sysupgrade.bin

But I have not tried that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Mirabox (Armada 370)
June 27, 2019 07:41PM
Mirabox sucks... Tried one cheap HP SSD with USB3 enclosure, DD speed about 140MB/s read, 50MB/s write (maybe the enclosure sucks, too), tried samba, only about 25MB/s read, 10MB/s write. iperf is about 400-500Mbit/s.. Even worse than the GoflexHome... Will just put it aside and stick to my good old GoflexHome.
Re: Debian on Mirabox (Armada 370)
June 27, 2019 08:43PM
Somewhere in this forum, I have the Mirabox iperf test, it should be faster.

The MVEBU mvneta also default to flow control. That adds to the delay in network performance.

Samba also needs improved config (see Wiki).

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



Edited 1 time(s). Last edit at 06/27/2019 08:44PM by bodhi.
Re: Debian on Mirabox (Armada 370)
June 27, 2019 09:21PM
Found it.

https://forum.doozan.com/read.php?3,43214,80924#msg-80924

About the same. ~500 range. But kirkwood boxes can easily reach ~800 or more.

For samba, I just copied the GoflexHome's smb.conf.
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: