Jump to content

Recommended Posts

Posted

Yep the customize_image.sh script set emmc_fix=on fine.

Be awesome if you could only needing to plugin a usb stick would be a nice setup, that said I'm also grateful that I've been forced to learn how it works instead of trusting magic scripts :). Ideally when I get this ready for production I still would prefer to install via Ethernet but USB is still a big improvement :)

Posted

Ok well installed via dd

root@clearfogpro~# dd if=Armbian_5.24_Clearfogpro_Debian_jessie_next_4.9.4.img
2478080+0 records in
2478080+0 records out
1268776960 bytes (1.3 GB) copied, 1[  299.354823]  mmcblk0: p1
89.472 s, 6.7 MB/s
root@clearfogpro:~# sync
root@clearfogpro:~# echo 0 > /sys/block/mmcblk0boot0/force_ro
root@clearfogpro:~# ifconfig eth0 192.168.0.30
root@clearfogpro:~# ifconfig eth0 netmask 255.255.255.0
root@clearfogpro:~# scp yocto@192.168.0.250:/home/yocto/4.9/u-boot.mmc ./
yocto@192.168.0.250's password:
u-boot.mmc                                    100%  935KB 934.6KB/s   00:00
root@clearfogpro:~# dd if=u-boot.mmc of=/dev/mmcblk0boot0
1869+1 records in
1869+1 records out
957048 bytes (957 kB) copied, 0.143723 s, 6.7 MB/s
root@clearfogpro:~# echo 1 > /sys/block/mmcblk0boot0/force_ro
root@clearfogpro:~# sync
root@clearfogpro:~# mount /dev/mmcblk0p1 /media/emmc/
[  355.858748] EXT4-fs (mmcblk0p1): mounted filesystem with writeback data mode. Opts: (null)
root@clearfogpro:~# umount /media/emmc
root@clearfogpro:~# poweroff

P.S. Forgot to write bs=4M to speed it up

 

Wrote u-boot again because I didn't want to have to restore from uart if it was corrupted.

 

Had it stall again at Starting Kernel ... but I turned it off and let it cool down. Fired it up again and it started working.

 

Not sure what's happening there, need to give solidrun an e-mail.

Posted

So it worked for you in the end if I understand it correctly?

I'm not sure you need to touch emmc boot partition at all (unless solid-run instructions tell you to do so) because u-boot should be loaded from its usual place between the partition table and the first partition.

 

Also your microSOM board may contain SPI flash so you could write the u-boot to it and load it after that just by fiddling with the onboard DIP switches, but it's not enabled by default in the next kernel branch, I'll add a patch later.

Posted

Yes booting the system properly meant that setting the emmc_fix flag on worked as expected.

And yes I didn't need to touch the boot partition in the end.

 

As for the SPI flash you've got me thinking. There's a dip switch for it just need to check where the pins are on the PCB. Hope that's an option because it'll make things much easier.

 

Unfortunately I'm having even more troubles. After installing the system I do an update and install a few packages + hardware (wifi, hostapd, and a few others). I use a script I've had for a while to do the install but unfortunately when it reboots the system it fails to read from the emmc (this .scr file).

 

Hopefully solid-run get back to me with a few details as to what's going on. I've even tried slowing the CPU to 800Mhz with no luck.

Posted
  On 1/19/2017 at 10:24 AM, Valk said:

As for the SPI flash you've got me thinking. There's a dip switch for it just need to check where the pins are on the PCB. Hope that's an option because it'll make things much easier.

On my board the SPI flash is already there - on the bottom of the microSOM, so you can't see it unless you remove the heatsink and disconnect the microSOM from the carrier board, but according to Solid-Run docs it is optional.

Posted

Just added improved USB boot support

Booting from SPI flash+USB will work out of the box,

 

  Reveal hidden contents

 

 

Booting from UART+USB should work like this:

  • Write the Armbian image to the USB flash drive
  • Connect it to the USB3.0 port
  • Load the u-boot from UART (or from SD/eMMC assuming you got the latest version there)
  • Stop the default boot sequence
  • Execute in u-boot prompt:
run usbboot
  • Observe the result

 

  Reveal hidden contents

 

Posted

I was actually looking at the pcb schematic to find the SPI port. Unfortunately if I have to pull apart the heatsink then I'm better off via uart (which is fine).

Still "run usbboot" nice touch :)

 

Thanks for doing that so quick. Hopefully I can get to the bottom of the emmc issues soon.

 

Thanks for all the help.

Posted
  On 1/19/2017 at 1:21 PM, Valk said:

I was actually looking at the pcb schematic to find the SPI port. Unfortunately if I have to pull apart the heatsink then I'm better off via uart (which is fine).

Still "run usbboot" nice touch :)

Just please build an image for the Clearfog Base with default kernel, boot it (it should boot on Pro too) and check dmesg for something like this:

root@clearfogbase:~# dmesg | grep -i spi
[    0.880393] m25p80 spi1.0: w25q32 (4096 Kbytes)
[    0.880439] 3 ofpart partitions found on MTD device spi1.0
[    0.883832] Creating 3 MTD partitions on "spi1.0":

and for /dev/mtd* devices. You don't need to disassembe anything - SPI flash presence should be detected programmatically

Posted

Hmm well usb boot works wonderfully.
 
Got a feeling my problems might be to do with the resize script
 
I can:
 
- boot to USB
- dd the system image over
- boot the emmc system and do login sequence
 
if I immediately reboot the system (as the system recommends) it fails to boot from emmc with:

 

Trying to boot from MMC
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **

 

 

  Reveal hidden contents

 

Posted

Hm. FS resizing should not require the reboot in the first place (and it works without it when booting from the SD). Must be something eMMC specific that breaks the process. Please try to extract /var/log/armhwinfo.log after the first reboot (or "sudo armbianmonitor -u" should upload it and provide the link to it automatically)

 

Edit: Hm, I wonder if it counts eMMC boot partitions or device size somewhere so parted/fdisk produce unexpected output...

Posted

While I get it ready as a quick side note. Now when the system boots the leds for Ethernet ports on the switch stay on all the time.

Posted

Ok a little difficult. Do you know how I can repair the partition enough to get the file off it?

root@clearfogpro:~# ls
root@clearfogpro:~# ls /media/
root@clearfogpro:~# mkdir /media/emmc
root@clearfogpro:~# mount /dev/mmcblk0p1 /media/emmc/
[  243.366150] UDF-fs: warning (device mmcblk0p1): udf_fill_super: No partition found (2)
[  243.377055] F2FS-fs (mmcblk0p1): Magic Mismatch, valid(0xf2f52010) - read(0x1102d4b)
[  243.384864] F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 1th superblock
[  243.394112] F2FS-fs (mmcblk0p1): Magic Mismatch, valid(0xf2f52010) - read(0x6b636170)
[  243.401972] F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 2th superblock
[  243.409723] F2FS-fs (mmcblk0p1): Magic Mismatch, valid(0xf2f52010) - read(0x1102d4b)
[  243.417513] F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 1th superblock
[  243.425211] F2FS-fs (mmcblk0p1): Magic Mismatch, valid(0xf2f52010) - read(0x6b636170)
[  243.433095] F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 2th superblock
mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
Posted
  On 1/19/2017 at 11:44 PM, Valk said:

ah sorry after the first reboot, one moment :)

Sorry, not after the first reboot, but before it, so the log you provided is fine. As I suspected, looks like additional eMMC partitions cause incorrect behavior of the resize procedure, so I'll try to rework it.

Posted

Ok well that's annoying... Talking with Solidrun they insisted I try their compiled version of debian to help with resolving the issues. I haven't got back to them yet but I can't fault the solidrun image.

 

I'm at the situation now where I'm using the solidrun u-boot and trying to boot the system via tftp:

 

setenv serverip 192.168.1.240
setenv ipaddr 192.168.1.1
setenv fdt_high 0x07a12000           ( or setenv fdt_high 0xffffffff )

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

tftp ${fdtaddr} 4.9/armada-388-clearfog.dtb
tftp ${loadaddr} 4.9/vmlinuz-4.9.4-mvebu
bootz ${loadaddr} - ${fdtaddr}

 

The system will stall at Starting kernel ....

 

after I can hit the hardware reboot and let the emmc boot (solidrun official image) and it loads fine.

 

 

                https://images.solid-build.xyz/A38X/sr-a38x-debian-jessie-20161101-testing.img.xz

                https://images.solid-build.xyz/A38X/u-boot.mmc

 

Considering the system is using the solidrun u-boot that crosses it off the list (not that there's really any difference between the armbian one except it has a few nice tweaks)

 

So that leaves the an issue with the dtb file or vmlinuz image.

 

Just went through the dts between the solidrun repo: https://github.com/SolidRun/linux-stable/tree/linux-4.4.y-clearfog/arch/arm/boot/dts 

and I can't see any meaningful changes.

 

Leaves the last part the image it boots and that's a much bigger needle to solve.

 

Do you experience any issues booting the system if it has been running for say 30 minutes?

 

Going to try the 4.9.5 branch which I just compiled then try specifying the solidrun repo https://github.com/SolidRun/linux-stable/tree/linux-4.4.y-clearfog

and see how they go.

 

Really want to get it going with the current kernel stable so the system can be easily kept up to date in the future.

Posted
-- Deleted --

 

Thought SolidRun's image was faulty but I think I might have broken it so restoring their system image.

 

On a side note I used the 3.10.104 (4.9.5 wouldn't boot) armbian kernel image to get the dtb and vmlinuz files to boot and they managed to boot fine (haven't reset the device).

 

I'm thinking there's a software issue during boot.

Posted

Our default recommendation is also Debian with kernel 4.4.x (as written on download page) since it's currently most polished kernel and also supported by Solidrun too.

Posted
  On 1/22/2017 at 10:07 PM, Valk said:

Do you experience any issues booting the system if it has been running for say 30 minutes?

No, but I'm not using my board actively yet while waiting for the new wireless card to arrive. But I believe @Igor and @tkaiser used their boards enough and most likely didn't encounter anything similar.

 

  On 1/22/2017 at 10:07 PM, Valk said:

Just went through the dts between the solidrun repo: https://github.com/SolidRun/linux-stable/tree/linux-4.4.y-clearfog/arch/arm/boot/dts

and I can't see any meaningful changes.

 

Leaves the last part the image it boots and that's a much bigger needle to solve.

Current Armbian default branch is based on SolidRun's 4.4.y-marvell branch with upstream patches, and next branch is mainline with some patches from 4.4.y (mostly support for the SFP)

 

  On 1/22/2017 at 10:07 PM, Valk said:

Really want to get it going with the current kernel stable so the system can be easily kept up to date in the future.

Well, they are both stable. default branch is LTS 4.4.x, next branch is the latest stable release of the mainline kernel.

 

 

Anyway, I thought you had some progress with freshly compiled Armbian images. Are there still any issues with them so you needed to go back to the Solid-Run images?

Posted

Yeah I had improvements with the latest version in that the issue with the emmc throwing heeps of write errors seems to be fixed. Down side is now if I reboot the system it will no longer restart.

 

I'm using the SolidRun image because I'm trying to get technical support from them. Unfortunately the official image gives me emmc write issues.

 

The only one which works perfect is the 3.X kernel but that's both out of date and lacking kernel support for my 3G modem.

 

By stable I only meant working reliably with the clearfog.

 

Anyway hopefully the next batch of clearfogs arrive soon so I can test if it's these last 2 boards I have are faulty or there's an issue.

Posted

Well got some feedback from SolidRun regarding the emmc issues. Apparently there's a firmware issue currently with the 4GB emmc (8GB is fine) which they're working to get a resolution.

 

Hopefully when my next batch of boards with the 8GB emmc come the issue will be sorted.

 

Really thanks for your help, while not an Armbian issue a lot of useful changes / fixes got done for the clearfog :)

 

Oh and the resize code works fine now.

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

Important Information

Terms of Use - Privacy Policy - Guidelines