Installing openwrt-18.06 on espressobin

I also discovered this page with suggestions on stopping the autoboot and entering commands:

http://wiki.espressobin.net/tiki-index.php?page=Boot+from+removable+storage+-+OpenWrt#Setting_U-Boot_parameters

Which gave me the following:

TIM-1.0
WTMI-armada-17.10.5-bb8f823
WTMI: system early-init
SVC REV: 5, CPU VDD voltage: 1.155V

Fill memory before self refresh...done

Fill memory before self refresh...done

Now in Self-refresh Mode
Restore termination values to original values
Exited self-refresh ...


Self refresh Pass.
DDR self test mode test done!!

Self refresh Pass.
DDR self test mode test done!!

QS GATING
=============
Calibration done: cycle = 0x00 tap =0x5F
CH0_PHY_RL_Control_CS0_B0[0xC0001180]: 0x0000005F
CH0_PHY_RL_Control_CS0_B1[0xC0001184]: 0x0000005F


QS GATING
=============
Calibration done: cycle = 0x00 tap =0x5D
CH0_PHY_RL_Control_CS1_B0[0xC00011A4]: 0x0000005D
CH0_PHY_RL_Control_CS1_B1[0xC00011A8]: 0x0000005D

DLL TUNING
==============
   DLL 0xc0001050[21:16]: [0,2e,17]
   DLL 0xc0001050[29:24]: [5,33,1c]
   DLL 0xc0001054[21:16]: [0,2c,16]
   DLL 0xc0001054[29:24]: [8,34,1e]
   DLL 0xc0001074[21:16]: [0,3f,1f]
   DLL 0xc0001074NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.3(release):armada-17.10.3:39a62a1
NOTICE:  BL1: Built : 15:39:52, Jun  1 2NOTICE:  BL2: v1.3(release):armada-17.10.3:39a62a1
NOTICE:  BL2: Built : 15:39:54, Jun  1 2018NOTICE:  BL31: v1.3(release):armada-17.10.3:39a62a1
NOTICE:  BL31:

U-Boot 2017.03-armada-17.10.2-g14aeedc (Jun 01 2018 - 15:39:10 +0800)

Model: Marvell Armada 3720 Community Board ESPRESSOBin
       CPU    @ 1000 [MHz]
       L2     @ 800 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 800 [MHz]
DRAM:  1 GiB
U-Boot DT blob at : 000000003f7161b8
Comphy-0: USB3          5 Gbps
Comphy-1: PEX0          2.5 Gbps
Comphy-2: SATA0         6 Gbps
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq led only pmp fbss pio slum part sxs
PCIE-0: Link down
MMC:   sdhci@d0000: 0, sdhci@d8000: 1
SF: Detected mx25u3235f with page size 256 Bytes, erase size 64 KiB, total 4 MiB
Net:   eth0: neta@30000 [PRIME]
Hit any key to stop autoboot:  0
Marvell>> setenv fdt_name 'boot/armada-3720-community.dtb'
Marvell>> setenv image_name 'boot/openwrt-armada-ESPRESSObin-Image'
Marvell>> setenv ethact 'neta0'
Marvell>> setenv set_bootargs 'setenv bootargs $console'
Marvell>> setenv bootmmc 'mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr'
Marvell>> setenv bootcmd 'mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr'
Marvell>> saveenv
Saving Environment to SPI Flash...
SF: Detected mx25u3235f with page size 256 Bytes, erase size 64 KiB, total 4 MiB
Erasing SPI flash...Writing to SPI flash...done
Marvell>> run bootmmc
switch to partitions #0, OK
mmc0 is current device
** File not found boot/openwrt-armada-ESPRESSObin-Image **
** File not found boot/armada-3720-community.dtb **
Bad Linux ARM64 Image magic!
Marvell>>

+++++++++++++++++++++++++++++++++++++++++
**************** UPDATE: I tried this again
+++++++++++++++++++++++++++++++++++++++++

OK, I reflashed the SD card and reset the EspressoBIN box and tried it again after forgetting the initial command:

 ext4ls mmc 0:1 

And I tried the process again:  

Marvell>> TIM-1.0
WTMI-armada-17.10.5-bb8f823
WTMI: system early-init

(repeating data removed)

Hit any key to stop autoboot:  0
Marvell>> ext4ls mmc 0:1
<DIR>       4096 .
<DIR>       4096 ..
<DIR>       4096 lost+found
         7391240 Image
            7885 armada-3720-espressobin.dtb
             328 boot.scr
Marvell>> setenv fdt_name 'boot/armada-3720-community.dtb'
Marvell>> setenv image_name 'boot/openwrt-armada-ESPRESSObin-Image'
Marvell>> setenv ethact 'neta0'
Marvell>> setenv set_bootargs 'setenv bootargs $console'
Marvell>> setenv bootmmc 'mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr'
Marvell>> setenv bootcmd 'mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr'
Marvell>> saveenv
Saving Environment to SPI Flash...
SF: Detected mx25u3235f with page size 256 Bytes, erase size 64 KiB, total 4 MiB
Erasing SPI flash...Writing to SPI flash...done
Marvell>> run bootmmc
switch to partitions #0, OK
mmc0 is current device
** File not found boot/openwrt-armada-ESPRESSObin-Image **
** File not found boot/armada-3720-community.dtb **
Bad Linux ARM64 Image magic!
Marvell>>

Starting from scratch:

Using Etcher select and burn your:
"openwrt-18.06.2-mvebu-cortexa53-globalscale-espressobin-ext4-sdcard.img.gz" image without unzipping it to your SD card.

Reset your ESPRESSOBin to defaults.

Install SD card.

Boot and interrupt autoboot.

Set the following u-boot param:

setenv bootcmd 'load mmc 0:1 0x4d00000 boot.scr; source 0x4d00000'

Then save with:

saveenv

Then reboot and it should work. This will not work IF you use a utility to expand the filesystem.

Hope this helps.

Hit any key to stop autoboot: 0
Marvell>> setenv bootcmd 'load mmc 0:1 0x4d00000 boot.scr; source 0x4d00000'
Marvell>> saveenv
Saving Environment to SPI Flash...
SF: Detected mx25u3235f with page size 256 Bytes, erase size 64 KiB, total 4 MiB
Erasing SPI flash...Writing to SPI flash...done
Marvell>> run bootmmc
switch to partitions #0, OK
mmc0 is current device
** File not found boot/openwrt-armada-ESPRESSObin-Image **
** File not found boot/armada-3720-community.dtb **
Bad Linux ARM64 Image magic!
Marvell>>

I am not really sure what is going on. After I received the above error, I took the card out of the device and flashed it again (positive I did). Then I held down on the reset button while I plugged in the 12v supply and while I watched the console I saw this appear:

BusyBox v1.28.4 () built-in shell (ash)


| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -| || | | || || |
|
_____|| |
||||___||| |____|
|
| W I R E L E S S F R E E D O M

OpenWrt 18.06.2, r7676-cddd7b4c77

=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.

root@OpenWrt:/#

QUESTIONS:
Outside of "how did the above happen" I would like to know

  • I plan to make this a network server, media server and router, so will this SD card suffice or do I need to add an onboard drive in addition to a USB drive

  • is there a guide to get Luci and packages on this with it looking like a router or do I need to try get an image of the 16G SD card I am using so I can utilize the whole card and not just what I am utilizing now?

Thanks!

where is the guide now for getting Luci up on this and package

@DonJuane
Please use "Preformatted text </>" for logs, scripts, configs and general console output.
grafik

Please edit your posting accordingly.

I'm not clear on whether it's trying to boot from sdcard or not, is mmc0 maybe an internal flash memory?

It's clear that it isn't finding anything to boot from. my guess is that this is because it is trying to boot the wrong device.

see this page for some commands you can use to set up the uboot so it boots correctly:

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=584d7c53bd2d286a71fe5e8244624f59c529cb26

I see while I was looking up the info, you had already tried some of this stuff.

after saving the uboot stuff, you should be able to boot now reliably. Just power off and power on and make sure it does boot ok, then set the password and move to the next phase.

also,

For a network file server I'd add a separate HD, maybe a laptop sized spinning disk, or a SATA SSD

Thank you - OK, I am lost somewhere between what I know and I don't. I started by creating a SD card from an image and from reading other's complaints here I also have a concern or at least a lack of understanding that all of my SD card may not be available for use. As a standard OpenWRT router user prior to this, I never had the option of changing any of the storage, so am I puzzled about this SD card and is the SD card not needed to be accessed as long as the device boots from it and would I have any reason to ever make more of it exposed to this system? Again, the size is 16G. Also I don't want to dive into customization, installing LUCI, etc and then end up having to potentially erase everything I have done.

ALso when I list out the files I see with ls -l where are these files, are they on the SD card or are they in the boards memory somewhere?

And as far as the NFS function, I have not yet discovered if it would be best to attach my file storage hard drive directly to the board SATA or via USB3. I am assuming via the board attachment will be the best performance.

I would plan to do a backup of your configs and just reflash when you upgrade, then restore your config. You don't really care about getting more space unless you can't install some packages.

Put your files on a separate drive, I don't think USB3 vs SATA makes a big difference.

So I have located an IDE to SATA power jumper for my V5 board as well as a 1TB drive to start with. It is formatted NTFS now so I would like to change it to something more Linux friendly. Is adding this drive to this system unique to this board or is it the same for all of OpenWRT? Assume I know nothing. How can I add this drive to this board as a potential NFS?

Also can I add a USB drive? I am assuming that I would do that hopefully by using the USB packages that most routers use, correct?

I also assume that after I get thist configured that I can use Samba which is the NFS system or should I look for something else?

NOTICE:

I just found out from experimenting that the WAN interface on the V5 board is next to the blue USB3 port and it is "hot" so it looks like I've got service to my board. I am going to start with installing some OPKG and see where I go from here.

I still would like to know the answer to the above questions if possible. THANKS!
Thank you!

I'd recommend install the btrfs tools and format the drive as btrfs

I have purchased the Alfa AWUS036ACM and I inserted it, and likely as expected, no WIFI entry appears in the LUCI menu under the category of NETWORK. Nothing appears under the Network here for "wi-fi".

Additionally I installed all the packaged for USB support that I could find listed online. There appears not to be a Luci entry for USB configuration and I am uncertain how to configure USB from a fresh start.

So I then tried downloading a package named kmod-mt7603 for the Alfa adapter and still I see no entry in LUCI for either WIRELESS or USB.

Thank you.

Install wpad and see if that helps with wireless.

Still no wireless option under the Network tab.

Also from this link all I can guess is that the mt76x driver is supposed to work with this USB wifi card?

https://github.com/openwrt/mt76/blob/master/mt76x2/usb.c#L23

Did you try installing the following driver:

kmod-mt76x2u

I installed this:

mkf2fs 1.10.0-1
mt7601u-firmware 2017-09-06-a61ac5cf-1

UPDATE:
after simply adding that kmod-mt76..... like magic the wifi option under Network popped up. YOU ARE A GENIUS!!! Thanks. No get ready to help me configure my hard drive and then maybe you will be rid of me for a few days LOL

[ 132.325938] usb 1-1: new high-speed USB device number 2 using orion-ehci
[ 132.695934] usb 1-1: reset high-speed USB device number 2 using orion-ehci
[ 132.897788] mt76x2u 1-1:1.0: ASIC revision: 76120044
[ 132.946688] mt76x2u 1-1:1.0: ROM patch build: 20141115060606a
[ 133.111155] mt76x2u 1-1:1.0: Firmware Version: 0.0.00
[ 133.116423] mt76x2u 1-1:1.0: Build: 1
[ 133.120242] mt76x2u 1-1:1.0: Build Time: 201507311614____
[ 161.164364] random: crng init done
[ 161.167918] random: 2 urandom warning(s) missed due to ratelimiting

Glad that worked for you. What are the specifics of the hard drive you wish to install?

I'd be wary of f2fs just because how many people really use it? Also not a good choice for a spinning disk.

btrfs is well supported these days I've used it for several years, and it takes flash into account. Install the kmod and progs.

Thanks I have to step back a moment. I can run a scan using the adapter and see all the area wifi and the signal strengths. However, down on the second line where I have

 radio0     Generic MAC80211 802.11bgnac
Channel: ? (? GHz) | Bitrate: ? Mbit/s

0%     SSID: OpenWrt | Mode: Master
Wireless is not associated

I deleted the single line with SSID OpenWrt Mode Master and I re-added. Both times I checked the box to associate this with my LAN and what I find that there is no signal transmitted. If I open edit of the 0% line, it says it is an access point.

**** I still have the console displaying via COM4 serial of PuTTY if any info there would be of benefit.

Until someone connects as a client it will say not associated, normal.

The issue is that while the device showed as available after installing the mt76 drivers and responded to scans by displaying all the area wifi's, the device when set to access point would not transmit and I checked with two laptops, there was no signal out.

So I decided last night to install the mt76 driver on my GLInet 300M because it has a lot of memory on it and I had recently added another alpha device to it what required a realtek driver. Since I had that device repeating, I though I would try this mt76 device on the 300M but that driver took down the whole router. So now I'm two failures down.

Otherwise I have to go back to work until I can get more free time. I'll have to postpone this until later. Thanks everyone for the help but I think the Espressobin is not a viable solution for NFS for anyone but formerly or long-term trained Linux professionals of a highly inclined experimental nature.