Jump to content

Recommended Posts

Posted

Currently using an image based on the latest (13/12/16) in: https://github.com/igorpecovnik/lib

 

Some changes recently have resulted in emmc based clearfog-pro boards requiring the SD card to boot again.

 

There's a new variable in /boot/armbianEnv.txt to enable the emmc fix. Unfortunately that doesn't seem to help.

 

Based on the SolidRun wiki: http://wiki.solid-run.com/doku.php?id=products:a38x:software:development:u-boot

 

you can patch the sdhci to give the signal that an sd card is in the slot

diff --git a/arch/arm/boot/dts/armada-388-clearfog.dts b/arch/arm/boot/dts/armada-388-clearfog.dts
index 8fa7b27..b8b05ad 100644
--- a/arch/arm/boot/dts/armada-388-clearfog.dts
+++ b/arch/arm/boot/dts/armada-388-clearfog.dts
@@ -308,7 +308,7 @@

                        sdhci@d8000 {
                                bus-width = <4>;
-                               cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+//                             cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
                                no-1-8-v;
                                pinctrl-0 = <&clearfog_sdhci_pins
                                             &clearfog_sdhci_cd_pins>;

This patch is already included but isn't doing what it's supposed to.

 

From discussions in another thread:
 

Quote

 

But somewhere on forums I saw a different solution - replacing GPIO_ACTIVE_LOW with GPIO_ACTIVE_HIGH without removing/commenting out cd-gpios property.

 

 

Haven't been able to find anymore references to that solution.

 

Anyway looking for help in getting emmc working without an SD card.

Posted

Thanks for those links. I've read those articles before but not given them enough attention. Seems from reading these's a timing issue which is causing the write errors so I'll just research away.

 

Started figuring out how to do changes (really like the CREATE_PATCHES setting)

 

Your advice on setting the GPIO to high fixes the SD card detection nicely (thanks).

Posted

Ok well the emmc reading/writing issues seem to have been fixed in the next branch. So in the end all I needed was the GPIO line set to high and emmc turned on.

 

Thanks for all your help.

Posted

Feel like I keep going backwards.... Now can't even get past Starting Kernel ...

 

It let me boot (from the usb stick) and copy the files over the first time. Now can't even get the USB to boot.

BootROM - 1.73

Booting from MMC


General initialization - Version: 1.0.0
Detected Device ID 6828
High speed PHY - Version: 2.0

Init Customer board board SerDes lanes topology details:
 | Lane # | Speed|    Type     |
 ------------------------------|
 |   0    |  3   |  SATA0      |
 |   1    |  0   |  SGMII1     |
 |   2    |  5   |  PCIe1      |
 |   3    |  5   |  USB3 HOST1 |
 |   4    |  5   |  PCIe2      |
 |   5    |  0   |  SGMII2     |
 -------------------------------
PCIe, Idx 1: detected no link
:** Link is Gen1, check the EP capability
PCIe, Idx 2: remains Gen1
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver TIP-1.39.0
DDR3 Training Sequence - Switching XBAR Window to FastPath Window
DDR3 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

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


U-Boot 2013.01 (Dec 14 2016 - 09:31:37) Marvell version: 2015_T1.0p11

Board: A38x-Customer-Board-1
SoC:   MV88F6828 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1600 [MHz]
       L2     @ 800 [MHz]
       TClock @ 250 [MHz]
       DDR3    @ 800 [MHz]
       DDR3 32 Bit Width,FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  1 GiB
MMC:   mv_sdh: 0
sdhci_transfer_data: Error detected in status(0x408000)!
PCI-e 0: Detected No Link.
PCI-e 2 (IF 1 - bus 0) Root Complex Interface, Detected Link X1, GEN 1.1
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode

Map:   Code:                    0x3fed2000:0x3ff97f6c
       BSS:                     0x3ffef95c
       Stack:                   0x3f9c1f20
       Heap:                    0x3f9c2000:0x3fed2000
       U-Boot Environment:      0x000f0000:0x00100000 (MMC)

Board configuration detected:
Net:
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   RGMII   |     0x00     |
| egiga1 |   SGMII   |   In-Band    |
| egiga2 |   SGMII   |   In-Band    |
egiga0 [PRIME], egiga1, egiga2
Hit any key to stop autoboot:  0
Marvell>>
Marvell>>
Marvell>> setenv bootargs 'selinux=0 cgroup_disable=memory scandelay root=/dev/mmcblk0p1 rw rootfstype=ext4 console=ttyS0,115200 loglevel=${verbosity} rootwait'
Marvell>> setenv bootcmd 'ext2load mmc 0:1 ${fdtaddr} boot/dtb/armada-388-clearfog.dtb;ext2load mmc 0:1 ${loadaddr} boot/zImage;bootz ${loadaddr} - ${fdtaddr}'
Marvell>> saveenv
Saving Environment to MMC...
Writing to MMC(0)... done
Marvell>> setenv serverip 192.168.1.240
Marvell>> setenv ipaddr 192.168.1.1
Marvell>> setenv fdt_high 0x07a12000
Marvell>> setenv bootargs "selinux=0 cgroup_disable=memory scandelay root=/dev/sda1 rw rootfstype=ext4 console=ttyS0,115200 loglevel=${verbosity} rootwait"
Marvell>> tftp ${fdtaddr} armada-388-clearfog.dtb
Using egiga0 device
TFTP from server 192.168.1.240; our IP address is 192.168.1.1
Filename 'armada-388-clearfog.dtb'.
Load address: 0x1000000
Loading: ##
         1017.6 KiB/s
done
Bytes transferred = 18767 (494f hex)
Marvell>> tftp ${loadaddr} vmlinuz-4.8.14-mvebu
Using egiga0 device
TFTP from server 192.168.1.240; our IP address is 192.168.1.1
Filename 'vmlinuz-4.8.14-mvebu'.
Load address: 0x2000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################################
         2.2 MiB/s
done
Bytes transferred = 5328512 (514e80 hex)
Marvell>> bootz ${loadaddr} - ${fdtaddr}
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 07a0a000, end 07a1194e ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

Limit DDR size at 3GB due to power of 2 requirement of Address decoding

Starting kernel ...

Still scouting around trying to figure out the problem but always open to suggestion.

Posted

According to DT bindings: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/Documentation/devicetree/bindings/mmc/mmc.txt

please try using

non-removable;

instead of cd-gpios with GPIO_ACTIVE_HIGH

 

Regarding your boot problems - you are using ${verbosity} in your kernel command line, but this variable is unset by default. Please try setting loglevel=7 instead and check if kernel outputs any logs to the serial console. 

Posted

Hm. Can you please test with

setenv fdt_high 0xffffffff

instead of your value?

 

And if you still don't have any output you may want to enable earlyprintk in the kernel config (compile-time) and add earlyprintk to kernel command line in u-boot.

Posted

Hm. Can you please test with

setenv fdt_high 0xffffffff

instead of your value?

 

And if you still don't have any output you may want to enable earlyprintk in the kernel config (compile-time) and add earlyprintk to kernel command line in u-boot.

 

fdt didn't change anything unfortunately.

 

Doing earlyprintk now, hopefully gives a hint.

Posted

working off: https://blackfin.uclinux.org/doku.php?id=linux-kernel:debug:early_printk

Linux Kernel Configuration
   Kernel hacking  --->
      [*] Early printk

Easy enough

bfin> print bootargs
bootargs=root=/dev/mtdblock0 rw
bfin> set bootargs $(bootargs) earlyprintk=serial,uart0,57600
bfin> print bootargs
bootargs=root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600

Looking further I found people said just add earlyprintk to the bootargs so:

setenv bootargs "selinux=0 cgroup_disable=memory scandelay root=/dev/sda1 rw rootfstype=ext4 console=ttyS0,115200 earlyprintk loglevel=7 rootwait"

But I don't get any extra output.

 

Also the shadow console I believe is supposed to output when I break the autoboot for u-boot but I get no feedback.

Posted

So current score:

- 3.10.X   works but can't see sierra wireless drivers (even though I've turned on all the usb serial and sierra wireless settings)

- 4.4.X     Boots, can see sierra wireless, issues writing to emmc, e.g.

[  264.795541] EXT4-fs (mmcblk0p1): previous I/O error to superblock detected
usr/share/consol[  264.803940] mmcblk0: error -110 sending status command, retrying
efonts/Greek-Ter[  264.811277] mmcblk0: error -110 sending status command, retrying
minusBoldVGA14.p[  264.818761] mmcblk0: error -110 sending status command, aborting
sf.gz

- 4.8.X        Stalls at Starting Kernel... and no extra output with earlyprintk

Posted

- 3.10.X   works but can't see sierra wireless drivers (even though I've turned on all the usb serial and sierra wireless settings)

Unfortunately 3.10.x is discontinued, but prebuilt packages should be still accessible in armbian repository, and obviously sources are still there if it needs to be recompiled

 

- 4.4.X     Boots, can see sierra wireless, issues writing to emmc, e.g.

[  264.795541] EXT4-fs (mmcblk0p1): previous I/O error to superblock detected
usr/share/consol[  264.803940] mmcblk0: error -110 sending status command, retrying
efonts/Greek-Ter[  264.811277] mmcblk0: error -110 sending status command, retrying
minusBoldVGA14.p[  264.818761] mmcblk0: error -110 sending status command, aborting
sf.gz

Since this is the current kernel used in most OS images for Clearfog boards, you may try collecting more logs (i.e. full dmesg output would be nice), and maybe contact SolidRun support in case eMMC needs special treatment in the kernel configuration or in the DT

 

- 4.8.X        Stalls at Starting Kernel... and no extra output with earlyprintk

It should boot fine in theory and it worked fine last time I checked it, I'll try to check again in case something broke due to any updates

Also I noticed that you are using ${loadaddr} for the kernel and ${fdtaddr} for the DTB. Please try using ${kernel_addr_r} for the kernel and ${fdt_addr} for the DTB (combined with setting fdt_high to 0xffffffff), since no output on serial console suggests that kernel stalls very early, and there was a similar issue with initrd - it required setting initrd_high otherwise there was no output from the kernel if I remember correctly.

Posted

Trying to build an image and having troubles right at the end. When I have CREATE_PATCHES="yes" I get a few errors during the last part.

Free space:
tmpfs           1.5G  853M  648M  57% /usr/local/dev/Armbian/output/cache/sdcard-next-clearfogpro-jessie-no
[ o.k. ] Ending debootstrap process and preparing cache [ jessie ]
jessie-ng-armhf.a63...128.tar.bz2:  644MB [ 110MB/s] [=========================================================] 109%
[ o.k. ] Applying distribution specific tweaks for [ jessie ]
[ o.k. ] Applying common tweaks
[ o.k. ] Installing kernel [ linux-image-next-mvebu ]
[ o.k. ] Installing u-boot [ linux-u-boot-next-clearfogpro ]
[ o.k. ] Installing headers [ linux-headers-next-mvebu ]
[ o.k. ] Installing DTB [ linux-dtb-next-mvebu ]
[ o.k. ] Installing board support package [ clearfogpro ]
Hit http://security.debian.org jessie/updates InRelease
Hit http://security.debian.org jessie/updates/main armhf Packages
Ign http://httpredir.debian.org jessie InRelease
Hit http://apt.armbian.com jessie InRelease
Hit http://security.debian.org jessie/updates/contrib armhf Packages
Hit http://security.debian.org jessie/updates/non-free armhf Packages
Hit http://httpredir.debian.org jessie-updates InRelease
Hit http://security.debian.org jessie/updates/contrib Translation-en
Hit http://apt.armbian.com jessie/main armhf Packages
Hit http://security.debian.org jessie/updates/main Translation-en
Hit http://security.debian.org jessie/updates/non-free Translation-en
Hit http://httpredir.debian.org jessie-backports InRelease
Hit http://apt.armbian.com jessie/utils armhf Packages
Hit http://httpredir.debian.org jessie Release.gpg
Hit http://apt.armbian.com jessie/jessie-desktop armhf Packages
Get:1 http://httpredir.debian.org jessie-updates/main armhf Packages/DiffIndex [6916 B]
Hit http://httpredir.debian.org jessie-updates/contrib armhf Packages
Get:2 http://httpredir.debian.org jessie-updates/non-free armhf Packages/DiffIndex [736 B]
Hit http://httpredir.debian.org jessie-updates/contrib Translation-en
Get:3 http://httpredir.debian.org jessie-updates/main Translation-en/DiffIndex [2704 B]
Get:4 http://httpredir.debian.org jessie-updates/non-free Translation-en/DiffIndex [736 B]
Get:5 http://httpredir.debian.org jessie-backports/main armhf Packages/DiffIndex [27.8 kB]
Get:6 http://httpredir.debian.org jessie-backports/contrib armhf Packages/DiffIndex [23.1 kB]
Get:7 http://httpredir.debian.org jessie-backports/non-free armhf Packages/DiffIndex [6562 B]
Get:8 http://httpredir.debian.org jessie-backports/contrib Translation-en/DiffIndex [6484 B]
Get:9 http://httpredir.debian.org jessie-backports/main Translation-en/DiffIndex [27.8 kB]
Get:10 http://httpredir.debian.org jessie-backports/non-free Translation-en/DiffIndex [14.2 kB]
Ign http://apt.armbian.com jessie/jessie-desktop Translation-en
Ign http://apt.armbian.com jessie/main Translation-en
Hit http://httpredir.debian.org jessie Release
Ign http://apt.armbian.com jessie/utils Translation-en
Hit http://httpredir.debian.org jessie/main armhf Packages
Hit http://httpredir.debian.org jessie/contrib armhf Packages
Hit http://httpredir.debian.org jessie/non-free armhf Packages
Hit http://httpredir.debian.org jessie/contrib Translation-en
Hit http://httpredir.debian.org jessie/main Translation-en
Hit http://httpredir.debian.org jessie/non-free Translation-en
Fetched 117 kB in 18s (6318 B/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
hostapd is already the newest version.
The following NEW packages will be installed:
  sunxi-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 34.8 kB of archives.
After this operation, 88.1 kB of additional disk space will be used.
Get:1 http://apt.armbian.com/ jessie/utils sunxi-tools armhf 1.4.1-1~armbian5.24.161202+1 [34.8 kB]
Fetched 34.8 kB in 0s (936 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_AU:en",
        LC_ALL = (unset),
        LANG = "en_AU.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package sunxi-tools.
(Reading database ... 48589 files and directories currently installed.)
Preparing to unpack .../sunxi-tools_1.4.1-1~armbian5.24.161202+1_armhf.deb ...
Unpacking sunxi-tools (1.4.1-1~armbian5.24.161202+1) ...
Setting up sunxi-tools (1.4.1-1~armbian5.24.161202+1) ...
[ o.k. ] Calling image customization script [ customize-image.sh ]
[ o.k. ] Preparing image file for rootfs [ clearfogpro jessie ]
[ o.k. ] Current rootfs size [ 770 MiB ]
[ o.k. ] Creating blank image for rootfs [ 1207 MiB ]
1.18GB [ 221MB/s] [===========================================================================================>] 100%
[ o.k. ] Creating partitions [ root: ext4 ]
flock: unrecognised option '--verbose'

Usage:
 flock [-sxun][-w #] fd#
 flock [-sxon][-w #] file [-c] command...
 flock [-sxon][-w #] directory [-c] command...

Options:
 -s  --shared     Get a shared lock
 -x  --exclusive  Get an exclusive lock
 -u  --unlock     Remove a lock
 -n  --nonblock   Fail rather than wait
 -w  --timeout    Wait for a limited amount of time
 -o  --close      Close file descriptor before running command
 -c  --command    Run a single command string through the shell
 -h  --help       Display this text
 -V  --version    Display version

[ .... ] Creating rootfs [ ext4 ]
[ o.k. ] Copying files to image [ sdcard-next-clearfogpro-jessie-no.raw ]
        686.32M  99%  119.78MB/s    0:00:05 (xfr#42638, to-chk=0/53327)

sent 689.45M bytes  received 856.72K bytes  125.51M bytes/sec
total size is 690.20M  speedup is 1.00
[ o.k. ] Copying files to /boot partition [ sdcard-next-clearfogpro-jessie-no.raw ]
         14.67M  99%  208.28MB/s    0:00:00 (xfr#48, to-chk=0/53)

sent 14.67M bytes  received 946 bytes  29.35M bytes/sec
total size is 14.67M  speedup is 1.00
[ o.k. ] Free space: [ SD card ]
tmpfs           1.5G  770M  731M  52% /usr/local/dev/Armbian/output/cache/sdcard-next-clearfogpro-jessie-no
/dev/loop0p1    1.2G  798M  318M  72% /usr/local/dev/Armbian/output/cache/mount-next-clearfogpro-jessie-no
[ o.k. ] Writing U-boot bootloader [ /dev/loop0 ]
[ error ] ERROR in function write_uboot [ common.sh:447 ]
[ error ] U-boot bootloader failed to install [ @host ]
[ o.k. ] Process terminated
[ error ] ERROR in function unmount_on_exit [ debootstrap-ng.sh:525 ]
[ error ] debootstrap-ng was interrupted
[ o.k. ] Process terminated

With CREATE_PATCHES set to no it compiles fine. I've checked out the latest version.

Posted

With this board it's complicated and CREATE_PATCHES may not work as intended because u-boot building is done 3 times with different parameters. Please use CREATE_PATCHES=yes with KERNEL_ONLY=yes and then build an image or new u-boot and kernel using previously created patch.

Posted

I see that's a shame. Well just as a little extra it was working when the kernel was the 4.8.X

Posted

Are you making a patch to the u-boot or using other non-default compilation options? This error suggests that either u-boot package is not installed properly to the image or it doesn't contail the u-boot.mmc file, so it needs to be investigated further, I don't remember any recent changes that can break this.

Posted

I only have one patch to: arch/arm/boot/dts/armada-388-clearfog.dts

ext.patch
diff --git a/arch/arm/boot/dts/armada-388-clearfog.dts.rej b/arch/arm/boot/dts/armada-388-clearfog.dts.rej
new file mode 100644
index 0000000..86e945d
--- /dev/null
+++ b/arch/arm/boot/dts/armada-388-clearfog.dts.rej
@@ -0,0 +1,11 @@
+--- arch/arm/boot/dts/armada-388-clearfog.dts
++++ arch/arm/boot/dts/armada-388-clearfog.dts
+@@ -266,7 +266,7 @@
+
+                       sdhci@d8000 {
+                               bus-width = <4>;
+-                              cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
++                              non-removable;
+                               no-1-8-v;
+                               pinctrl-0 = <&clearfog_sdhci_pins
+                                            &clearfog_sdhci_cd_pins>;

I also have a line in customize-image.sh to enable emmc_fix

 

Don't touch the u-boot but it definitely doesn't create the u-boot.mmc files after I compile.

 

That said if I don't have CREATE_PATCHES it builds the image fine.

 

As a roundabout solution I put the patch in the userpatches/kernel/marvell-next/ directory

Posted

OK, I'll take a look at CREATE_PATCHES for the clearfog.

Even if it's off-topic: emmc_fix should do exactly this change (but with in-memory copy of the DT) - remove "cd-gpios" and add "non-removable" to the sdhc controller node. So DT change works for you but setting emmc_fix=on alone doesn't?

Posted

Yeah that's been my experience so far.

I'll remove the patch and do a clean build now to see if emmc_fix alone is enough.

Posted

Ok well just did a clean image, booted via USB, made sure emmc_fix flag was set to on and copied the files to the emmc.

 

Unfortunately it gets stuck at Starting kerenel ...

U-Boot 2013.01 (Jan 16 2017 - 07:11:29) Marvell version: 2015_T1.0p11

Board: A38x-Customer-Board-1
SoC:   MV88F6828 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1066 [MHz]
       L2     @ 533 [MHz]
       TClock @ 250 [MHz]
       DDR3    @ 533 [MHz]
       DDR3 32 Bit Width,FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  1 GiB
MMC:   mv_sdh: 0
sdhci_transfer_data: Error detected in status(0x408002)!
PCI-e 0: Detected No Link.
PCI-e 2 (IF 1 - bus 0) Root Complex Interface, Detected Link X1, GEN 1.1
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode

Map:   Code:                    0x3fed2000:0x3ff97fa4
       BSS:                     0x3ffefd5c
       Stack:                   0x3f9c1f20
       Heap:                    0x3f9c2000:0x3fed2000
       U-Boot Environment:      0x000f0000:0x00100000 (MMC)

Board configuration detected:
Net:
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   RGMII   |     0x00     |
| egiga1 |   SGMII   |   In-Band    |
| egiga2 |   SGMII   |   In-Band    |
egiga0 [PRIME], egiga1, egiga2
Hit any key to stop autoboot:  0
Marvell>>
Marvell>> setenv bootcmd 'ext2load mmc 0:1 ${fdtaddr} boot/dtb/armada-388-clearfog.dtb;ext2load mmc 0:1 ${loadaddr} boot/zImage;bootz ${loadaddr} - ${fdtaddr}'
Marvell>> setenv bootargs 'selinux=0 cgroup_disable=memory scandelay root=/dev/mmcblk0p1 rw rootfstype=ext4 console=ttyS0,115200 loglevel=1 rootwait'
Marvell>> saveenv
Saving Environment to MMC...
Writing to MMC(0)... done
Marvell>> boot
18864 bytes read in 18 ms (1023.4 KiB/s)
5394896 bytes read in 298 ms (17.3 MiB/s)
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff9af ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

Limit DDR size at 3GB due to power of 2 requirement of Address decoding

Starting kernel ...


If you like I'm happy to rebuild the kernel with the earlyprintk flag turned on to see if we can get any debug information because I'd like to not require a patch.

Posted

Sorry I'm still learning everything to do with compiling > installing (which is why I supply the logs like that to highlight mistakes).

 

How should I change the boot commands to use boot.cmd?

Posted

yeah legacy commands which I didn't understand when I first tried to make it work.

 

I just did:

env default bootcmd

env default bootargs

env save

 

then rebooted.

Board configuration detected:
Net:
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   RGMII   |     0x00     |
| egiga1 |   SGMII   |   In-Band    |
| egiga2 |   SGMII   |   In-Band    |
egiga0 [PRIME], egiga1, egiga2
Hit any key to stop autoboot:  0
Trying to load boot.scr from mmc
1738 bytes read in 9 ms (188.5 KiB/s)
## Executing script at 03000000
171 bytes read in 7 ms (23.4 KiB/s)
** File not found boot/dtb/armada-38x.dtb **
** File not found dtb/armada-38x.dtb **
3243207 bytes read in 184 ms (16.8 MiB/s)
5394896 bytes read in 298 ms (17.3 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC

I'll jump in via USB and take a look but I'll call that progress :)

Posted

OK, please check that "fdtfile" environment variable is not set in the u-boot environment, or try setting it manually to "armada-388-clearfog.dtb"

It should be set from the u-boot patch by default, or it should be empty before loading the boot script (you can print the whole environment with "env print" to check)

Posted

Thanks for all your help.

 

Unfortunately this board has gone through a lot of trial and error so issues like that are not surprising.

 

I've reset all the env variables

 

env default -a

saveenv

 

then rebooted but unfortunately stalled again.

BootROM - 1.73

Booting from MMC


General initialization - Version: 1.0.0
Detected Device ID 6828
High speed PHY - Version: 2.0

Init Customer board board SerDes lanes topology details:
 | Lane # | Speed|    Type     |
 ------------------------------|
 |   0    |  3   |  SATA0      |
 |   1    |  0   |  SGMII1     |
 |   2    |  5   |  PCIe1      |
 |   3    |  5   |  USB3 HOST1 |
 |   4    |  5   |  PCIe2      |
 |   5    |  0   |  SGMII2     |
 -------------------------------
PCIe, Idx 1: detected no link
:** Link is Gen1, check the EP capability
PCIe, Idx 2: remains Gen1
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver TIP-1.39.0
DDR3 Training Sequence - Switching XBAR Window to FastPath Window
DDR3 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

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


U-Boot 2013.01 (Jan 16 2017 - 07:11:29) Marvell version: 2015_T1.0p11

Board: A38x-Customer-Board-1
SoC:   MV88F6828 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1066 [MHz]
       L2     @ 533 [MHz]
       TClock @ 250 [MHz]
       DDR3    @ 533 [MHz]
       DDR3 32 Bit Width,FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  1 GiB
MMC:   mv_sdh: 0
sdhci_transfer_data: Error detected in status(0x408000)!
PCI-e 0: Detected No Link.
PCI-e 2 (IF 1 - bus 0) Root Complex Interface, Detected Link X1, GEN 1.1
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode

Map:   Code:                    0x3fed2000:0x3ff97fa4
       BSS:                     0x3ffefd5c
       Stack:                   0x3f9c1f20
       Heap:                    0x3f9c2000:0x3fed2000
       U-Boot Environment:      0x000f0000:0x00100000 (MMC)

Board configuration detected:
Net:
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   RGMII   |     0x00     |
| egiga1 |   SGMII   |   In-Band    |
| egiga2 |   SGMII   |   In-Band    |
egiga0 [PRIME], egiga1, egiga2
Hit any key to stop autoboot:  0
Trying to load boot.scr from mmc
1738 bytes read in 9 ms (188.5 KiB/s)
## Executing script at 03000000
171 bytes read in 8 ms (20.5 KiB/s)
18864 bytes read in 19 ms (968.8 KiB/s)
3243207 bytes read in 184 ms (16.8 MiB/s)
5394896 bytes read in 298 ms (17.3 MiB/s)
libfdt fdt_delprop():  FDT_ERR_NOTFOUND
fdt - flattened device tree utility commands

Usage:
fdt addr   <addr> [<length>]        - Set the fdt location to <addr>
fdt boardsetup                      - Do board-specific set up
fdt move   <fdt> <newaddr> <length> - Copy the fdt to <addr> and make it active
fdt resize                          - Resize fdt to size + padding to 4k addr
fdt print  <path> [<prop>]          - Recursive print starting at <path>
fdt list   <path> [<prop>]          - Print one level starting at <path>
fdt get value <var> <path> <prop>   - Get <property> and store in <var>
fdt get name <var> <path> <index>   - Get name of node <index> and store in <var>
fdt get addr <var> <path> <prop>    - Get start address of <property> and store in <var>
fdt get size <var> <path> [<prop>]  - Get size of [<property>] or num nodes and store in <var>
fdt set    <path> <prop> [<val>]    - Set <property> [to <val>]
fdt mknode <path> <node>            - Create a new node after <path>
fdt rm     <path> [<prop>]          - Delete the node or <property>
fdt header                          - Display header info
fdt bootcpu <id>                    - Set boot cpuid
fdt memory <addr> <size>            - Add/Update memory node
fdt rsvmem print                    - Show current mem reserves
fdt rsvmem add <addr> <size>        - Add a mem reserve
fdt rsvmem delete <index>           - Delete a mem reserves
fdt chosen [<start> <end>]          - Add/update the /chosen branch in the tree
                                        <start>/<end> - initrd start/end addr
NOTE: Dereference aliases by omiting the leading '/', e.g. fdt print ethernet0.
## Loading init Ramdisk from Legacy Image at 02880000 ...
   Image Name:   uInitrd
   Created:      2017-01-18  21:06:55 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    3243143 Bytes = 3.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
## Flattened Device Tree blob at 02040000
   Booting using the fdt blob at 0x02040000
   reserving fdt memory region: addr=2040000 size=5000
   Using Device Tree in place at 02040000, end 02047fff

   Skipping Device Tree update ('fdt_skip_update' = yes)

Limit DDR size at 3GB due to power of 2 requirement of Address decoding

Starting kernel ...

is that fdt_err_notfound an issue which would stop it booting?

Posted

fdt_err_notfound suggests that emmcfix tries to patch already patched DT.

Just a hunch - are you writing Armbian to emmc with dd as a whole image or are you creating the partition manually and copying files with rsync? Boot script uses filesystem UUID so in the latter case it won't find the rootfs.

Posted

Ok yeah it's probably already patched. I actually was building a clean image to try from scratch and to see if there's any remaining modifications.

 

Currently I'm using rsync because I'm booting from the usb device.

fdisk /dev/mmcblk0
d
n
p
1
16385
<enter>
w
mkfs.ext4 /dev/mmcblk0p1

ifconfig eth0 192.168.0.30 
ifconfig eth0 netmask 255.255.255.0
scp yocto@192.168.0.250:/home/yocto/4.9/u-boot.mmc ./
echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=u-boot.mmc of=/dev/mmcblk0boot0
echo 1 > /sys/block/mmcblk0boot0/force_ro
rm u-boot.mmc
mkdir /media/emmc
mount /dev/mmcblk0p1 /media/emmc
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /media/emmc/
cp /boot/boot.scr /media/emmc/
umount /media/emmc
sync
poweroff

I do need to find a good way to automate the whole process once I have it working, but that's another day.

 

Hmm I might copy the image to the usb stick and give dd a go

Posted

Just please make sure that /boot/armbianEnv.txt contains emmc_fix=on. Aalso we definitely will need to update the documentation, and since I recently added booting from USB support for H3, I will try to add something similar to the clearfog, so you could write a pervade standard image to the usb flash, load the u-boot and boot the image with a couple of simple commands or even by a default booted fallback

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines