15 15
lanefu

Espressobin support development efforts

Recommended Posts

Fresh install via "nand-sata-install" from uSDHC card and network still doesn't work.

I'm on:

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.4 (stretch)
Release:        9.4
Codename:       stretch
cat /proc/version 
Linux version 4.17.3-mvebu64 (root@armbian) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #7 SMP PREEMPT Thu Jun 28 18:21:11 UTC 2018
systemd --v
systemd 232
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN

Armbian boots very well, no issues have been detected via starting up. Unfortunatelly, there are missing "lan0" and "lan1" devices in "ip a"

ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 1e:XX:XX:XX:XX:43 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether fe:XX:XX:XX:XX:de brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 532
    link/ether f0:XX:XX:XX:XX:f2 brd ff:ff:ff:ff:ff:ff
5: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 532
    link/ether 9a:XX:XX:XX:XX:c9 brd ff:ff:ff:ff:ff:ff
6: br0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 4e:XX:XX:XX:XX:43 brd ff:ff:ff:ff:ff:ff
/etc/systemd/network$ ls -l
total 24
-rw-r--r-- 1 root root 30 Jun 28 20:31 10-br0.netdev
-rw-r--r-- 1 root root 38 Jun 28 20:31 10-br0.network
-rw-r--r-- 1 root root 40 Jun 28 20:31 10-eth0.network
-rw-r--r-- 1 root root 40 Jun 28 20:31 10-lan0.network
-rw-r--r-- 1 root root 40 Jun 28 20:31 10-lan1.network
-rw-r--r-- 1 root root 40 Jun 28 20:31 10-wan.network

cat *
[NetDev]
Name=br0
Kind=bridge
[Match]
Name=br0

[Network]
DHCP=ipv4
[Match]
Name=eth0

[Network]
DHCP=ipv4
[Match]
Name=lan0

[Network]
Bridge=br0
[Match]
Name=lan1

[Network]
Bridge=br0
[Match]
Name=wan

[Network]
Bridge=br0

Weird is that if I boot via uSDHC card, network works without problem, but after "nand-sata-install" to SSD network doesn't work.

I've tried to use "armbian-config" to setup DHCP again = no help.

Any ideas?

 

EDIT

Problem solved.

 

I had to use all that setenv params from official wiki:

setenv load_script 'if test -e mmc 0:1 boot/boot.scr; then echo \"... booting from SD\";setenv boot_interface mmc;else echo \"... booting from USB/SATA\";usb start;setenv boot_interface usb;fi;if test -e \$boot_interface 0:1 boot/boot.scr;then ext4load \$boot_interface 0:1 0x00800000 boot/boot.scr; source; fi'
setenv bootcmd 'run get_images; run set_bootargs; run load_script;booti \$kernel_addr \$ramfs_addr \$fdt_addr'

After that network is working.

Share this post


Link to post
Share on other sites

Ok another problem :-/
I've run "update" & "upgrade" of espressoBin, it downloads 4.17.5 kernel as I remember correctly.

Then I've reboot it, but strange was, that it's booted to 4.17.3 not .5, IP adress was different from previous too. I was surprised little bit, but everything works after many restarts.

So I halted EB and then run it again.

But now, it shows me that I have "Bad Linux ARM64 Image magic!"

Maybe tomorrow, I'll try to replace that installation on SSD via uSDHC again.

Because I have correct ENV in u-boot now, so maybe that was the reason of bad patching kernel or... I don't know.. just quessing.

 

PS: just for sure my newer and saved ENV:

printenv
baudrate=115200
boot=interface scsi
boot_interface=usb
bootargs=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000 root=/dev/sdc1 rw ip=0.0.0.0:0.0.0.0:10.4.50.254:255.255.255.0:marvell:eth0:none nfsroot=0.0.0.0:/srv/nfs/
bootcmd=run get_images; run set_bootargs; run load_script;booti $kernel_addr $ramfs_addr $fdt_addr
bootdelay=2
console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
eth1addr=00:XX:XX:XX:XX:01
eth2addr=00:XX:XX:XX:XX:02
eth3addr=00:XX:XX:XX:XX:03
ethact=neta@30000
ethaddr=F0:XX:XX:XX:XX:F2
ethprime=eth0
fdt_addr=0x4f00000
fdt_high=0xffffffffffffffff
fdt_name=boot/dtb/marvell/armada-3720-db.dtb
fdt_name_a=boot/dtb/marvell/armada-3720-db.dtb
fdt_name_b=boot/dtb/marvell/armada-3720-espressobin.dtb
fdtcontroladdr=7f7182d8
gatewayip=10.4.50.254
get_images=tftpboot $kernel_addr $image_name; tftpboot $fdt_addr $fdt_name; run get_ramfs
get_ramfs=if test "${ramfs_name}" != "-"; then setenv ramfs_addr 0x8000000; tftpboot $ramfs_addr $ramfs_name; else setenv ramfs_addr -;fi
hostname=marvell
image_name=boot/Image
initrd_addr=0x1100000
initrd_image=boot/uInitrd
initrd_size=0x2000000
ipaddr=0.0.0.0
kernel_addr=0x5000000
load_script=if test -e mmc 0:1 boot/boot.scr; then echo "... booting from SD";setenv boot_interface mmc;else echo "... booting from USB/SATA";usb start;setenv boot_interface usb;fi;if test -e $boot_interface 0:1 boot/boot.scr;then ext4load $boot_interface 0:1 0x00800000 boot/boot.scr; source; fi
loadaddr=0x5000000
netdev=eth0
netmask=255.255.255.0
ramfs_addr=-
ramfs_name=-
root=root=/dev/sdc1 rw
rootdev=/dev/sdc1
rootfstype=ext4
rootpath=/srv/nfs/
serverip=0.0.0.0
set_bootargs=setenv bootargs $console $root ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:none nfsroot=$serverip:$rootpath $extra_params
stderr=serial@12000
stdin=serial@12000
stdout=serial@12000
verbosity=1

Environment size: 1933/65532 bytes

 

Share this post


Link to post
Share on other sites
14 hours ago, tom_i said:

Ok another problem :-/
I've run "update" & "upgrade" of espressoBin, it downloads 4.17.5 kernel as I remember correctly.

Then I've reboot it, but strange was, that it's booted to 4.17.3 not .5, IP adress was different from previous too. I was surprised little bit, but everything works after many restarts.

So I halted EB and then run it again.

But now, it shows me that I have "Bad Linux ARM64 Image magic!"

 

@Igor can you move this to peer-to-peer technical support please ?

 

It seems that your installation is a mess. To boot from scsi is not officially supported yet. You can make it work but you need to understand what you do.

 

After copying your working installation from SD to SSD using nand-sata-install you still need to manually copy /boot to /dev/sda1/ and to adapt the content of /dev/sda1/etc/fstab (rootdev UUID ; delete /boot entry ). You should also adapt  the content of /dev/sda1/boot/armbianEnv.txt (rootdev UUID) and the content of /dev/sda1/boot/boot.cmd (setenv rootdev "/dev/sda1") followed by ‘mkimage -C none -A arm -T script -d boot.cmd boot.scr‘ to avoid any future mess. Then change your environment settings to boot from sata via SPI:

setenv boot_interface scsi
setenv image_name boot/Image
setenv fdt_name boot/dtb/marvell/armada-3720-espressobin.dtb
setenv fdt_high "0xffffffffffffffff"
setenv rootdev "/dev/sda1"
setenv root root=/dev/sda1 rw
setenv rootfstype "ext4"
setenv verbosity "1"
setenv initrd_addr "0x1100000"
setenv initrd_image "boot/uInitrd"
setenv ethaddr "XX:XX:XX:XX:XX:XX"
setenv bootcmd 'scsi scan; scsi dev 0; ext4load scsi 0:1 $kernel_addr $image_name;ext4load scsi 0:1 $initrd_addr $initrd_image; ext4load scsi 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=$rootdev rw rootwait; booti $kernel_addr $initrd_addr $fdt_addr'

 

Share this post


Link to post
Share on other sites
On 7/23/2018 at 8:09 AM, ebin-dev said:

 

@Igor can you move this to peer-to-peer technical support please ?

 

It seems that your installation is a mess. To boot from scsi is not officially supported yet. You can make it work but you need to understand what you do.

 

After copying your working installation from SD to SSD using nand-sata-install you still need to manually copy /boot to /dev/sda1/ and to adapt the content of /dev/sda1/etc/fstab (rootdev UUID ; delete /boot entry ). You should also adapt  the content of /dev/sda1/boot/armbianEnv.txt (rootdev UUID) and the content of /dev/sda1/boot/boot.cmd (setenv rootdev "/dev/sda1") followed by ‘mkimage -C none -A arm -T script -d boot.cmd boot.scr‘ to avoid any future mess. Then change your environment settings to boot from sata via SPI:


setenv boot_interface scsi
setenv image_name boot/Image
setenv fdt_name boot/dtb/marvell/armada-3720-espressobin.dtb
setenv fdt_high "0xffffffffffffffff"
setenv rootdev "/dev/sda1"
setenv root root=/dev/sda1 rw
setenv rootfstype "ext4"
setenv verbosity "1"
setenv initrd_addr "0x1100000"
setenv initrd_image "boot/uInitrd"
setenv ethaddr "XX:XX:XX:XX:XX:XX"
setenv bootcmd 'scsi scan; scsi dev 0; ext4load scsi 0:1 $kernel_addr $image_name;ext4load scsi 0:1 $initrd_addr $initrd_image; ext4load scsi 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=$rootdev rw rootwait; booti $kernel_addr $initrd_addr $fdt_addr'

 

Thank you @ebin-dev for your support. Everything works pretty well now ;)

Share this post


Link to post
Share on other sites
On 7/14/2018 at 8:50 PM, y52 said:

I suggest modifying as follows the

/lib/systemd/system/systemd-networkd.service

 

[Service]
Type=notify
Restart=on-failure
RestartSec=0
# https://www.toradex.com/community/questions/1144/weird-behavior-when-restarting-networkd.html
ExecStartPre=/sbin/ip addr flush dev wan
ExecStartPre=/sbin/ip link set wan down
ExecStartPre=/sbin/ip link set wan up
ExecStart=!!/lib/systemd/systemd-networkd

 

Thank you for the suggestion; I'm sorry it took me so long to post a reply; my Mac lost both network ports, but now I got myself a working PCIe card for it from IOCrest.

 

I tried the above (on a clean bionic install without any updating), then rebooting and it seems I lost the network.

I also tried clean install, apt update; apt upgrade then applying the above modification, but network never came up after that.

Share this post


Link to post
Share on other sites

Don't be discouraged.

Just comment out the 2 following lines in your ""systemd-networkd.service :

ExecStartPre=/sbin/ip addr flush dev wan
#ExecStartPre=/sbin/ip link set wan down
#ExecStartPre=/sbin/ip link set wan up

 

Instead, add one line by the end of your "/etc/rc.local "

/sbin/ip link set dev wan up

 

Execute after changes:

systemctl daemon-reload

 

Reboot.

 

Share this post


Link to post
Share on other sites
On 7/14/2018 at 8:50 PM, y52 said:

 

I suggest modifying as follows the

/lib/systemd/system/systemd-networkd.service

 

 

 

I suggest doing no such thing.  Files in /lib don't belong to you and will be overwritten by the next random update of the package they belong to.

 

Instead, copy this file to /etc/systemd/system/ and edit it there. Alternately, systemd has a well-documented mechanism to override things like ExecStartPre= entries.

Share this post


Link to post
Share on other sites

I updated my EsbressoBin with flash-image-1g-2cs-1000_800_boot_sd_and_usb.bin from https://dl.armbian.com/espressobin/u-boot/ (with flash-image-1g-2cs-1200_750_boot_sd_and_usb.bin I got ext4 errors).

 

 

Marvell>> bubt flash-image-1g-2cs-1000_800_boot_sd_and_usb.bin spi usb
Burning U-BOOT image "flash-image-1g-2cs-1000_800_boot_sd_and_usb.bin" from "usb" to "spi"
USB0:   Register 2000104 NbrPorts 2
Starting the controller
USB XHCI 1.00
USB1:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
reading flash-image-1g-2cs-1000_800_boot_sd_and_usb.bin
Image checksum...OK!
SF: Detected w25q32dw with page size 256 Bytes, erase size 4 KiB, total 4 MiB
   
Updating, 3% 194180 B/s   
Updating, 28% 941578 B/s   
Updating, 65% 1551650 B/s
20480 bytes written, 798656 bytes skipped in 0.395s, speed 2118169 B/s
Done!
Marvell>> TIM-1.0
WTMI-armada-17.10.5-34ce216
WTMI: system early-init
CPU VDD voltage default value: 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 =0x5F
CH0_PHY_RL_Control_CS1_B0[0xC00011A4]: 0x0000005F
CH0_PHY_RL_Control_CS1_B1[0xC00011A8]: 0x0000005F

DLL TUNING
==============
   DLL 0xc0001050[21:16]: [0,29,14]
   DLL 0xc0001050[29:24]: [5,3a,1f]
   DLL 0xc0001054[21:16]: [1,29,15]
   DLL 0xc0001054[29:24]: [8,3b,21]
   DLL 0xc0001074[21:16]: [0,3f,1f]
   DLL 0xc0001074NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.3(release):armada-17.10.8:34247e0
NOTICE:  BL1: Built : 16:46:16, May 10 2NOTICE:  BL2: v1.3(release):armada-17.10.8:34247e0
NOTICE:  BL2: Built : 16:46:16, May 10 2018
NNOTICE:  BL31: v1.3(release):armada-17.10.8:34247e0
NOTICE:  BL31:

U-Boot 2017.03-armada-17.10.3-g06ad760-armbian (May 10 2018 - 16:45:48 +0200)

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 : 000000003f7182d8
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
SF: Detected w25q32dw with page size 256 Bytes, erase size 4 KiB, total 4 MiB
Net:   eth0: neta@30000 [PRIME]
Hit any key to stop autoboot:  2  1  0 
*** ERROR: `serverip' not set
*** ERROR: `serverip' not set
... booting from SD
1176 bytes read in 5 ms (229.5 KiB/s)
## Executing script at 00800000
221 bytes read in 2 ms (107.4 KiB/s)
14955008 bytes read in 647 ms (22 MiB/s)
4512106 bytes read in 204 ms (21.1 MiB/s)
** File not found boot/dtb/marvell/armada-3720-community.dtb **
8330 bytes read in 9 ms (903.3 KiB/s)
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    4512042 Bytes = 4.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 04f00000
   Booting using the fdt blob at 0x4f00000
   Loading Ramdisk to 3f2c8000, end 3f71592a ... OK
   Using Device Tree in place at 0000000004f00000, end 0000000004f05089

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.17.9-mvebu64 (root@nightly) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #164 SMP PREEMPT Tue Jul 24 18:15:33 UTC 2018
[    0.000000] Machine model: Globalscale Marvell ESPRESSOBin Board
[    0.000000] earlycon: ar3700_uart0 at MMIO 0x00000000d0012000 (options '')
[    0.000000] bootconsole [ar3700_uart0] enabled
Loading, please wait...
starting version 232
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/mmcblk1p1] fsck.ext4 -a -C0 /dev/mmcblk1p1 
/dev/mmcblk1p1: recovering journal
/dev/mmcblk1p1: clean, 36495/923232 files, 334257/3849616 blocks
done.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.

Welcome to Debian GNU/Linux 9 (stretch)

 

 

Quick sbc-bench test revealed that the CPU cores aren't running at 1 GHz but just 800 MHz and that thermal readouts are broken: http://ix.io/1kt2 

 

Storage performance test with a SATA connected EVO 840 and performance governor while running at 800 MHz:

                                                              random    random         
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4    29006    67436    34313    35602    33972    64807
          102400      16    94899   157206   111199   112478   112152   112260
          102400     512   355983   392732   344499   347130   346680   343875
          102400    1024   370437   386847   358432   353261   360746   365497
          102400   16384   282429   379475   434285   439253   439033   384619
         1024000    1024   401822   402875   360320   360639
         1024000   16384   388697   402818   439262   439727

 

Edit: This morning ext4 errors are back:

[32076.089783] EXT4-fs error (device mmcblk1p1): ext4_find_entry:1437: inode #3042: comm gmain: reading directory lblock 0
[32080.090124] EXT4-fs error (device mmcblk1p1): ext4_find_entry:1437: inode #3042: comm gmain: reading directory lblock 0
[32084.089476] EXT4-fs error (device mmcblk1p1): ext4_find_entry:1437: inode #3042: comm gmain: reading directory lblock 0
[32088.089836] EXT4-fs error (device mmcblk1p1): ext4_find_entry:1437: inode #3042: comm gmain: reading directory lblock 0
[32092.089191] EXT4-fs error (device mmcblk1p1): ext4_find_entry:1437: inode #3042: comm gmain: reading directory lblock 0
[32096.089549] EXT4-fs error (device mmcblk1p1): ext4_find_entry:1437: inode #3042: comm gmain: reading directory lblock 0
[32100.088931] EXT4-fs error (device mmcblk1p1): ext4_find_entry:1437: inode #3042: comm gmain: reading directory lblock 0

@Igor: Downloading Debian_stretch_next.7z from https://dl.armbian.com/espressobin/ the contents are as follows (obviously something missing?):

macbookpro-tk:~ tk$ ls -la /Users/tk/Downloads/Debian_stretch_next/
total 2261040
drwxr-xr-x  5 tk  staff         170 17 Aug 22:14 .
drwxr-xr-x  5 tk  staff         170 17 Aug 22:14 ..
-rw-r--r--@ 1 tk  staff  1157627904 24 Jul 20:24 Armbian_5.54_Espressobin_Debian_stretch_next_4.17.9.img
-rw-r--r--@ 1 tk  staff       18577 24 Jul 20:24 armbian.txt
-rw-r--r--@ 1 tk  staff         122 24 Jul 20:24 sha256sum.sha

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
15 15