Jump to content

Armbian customization


chradev

Recommended Posts

Thanks Zador,

 

5.20 was built with 4.7.3 as far as I see

 

The problem is that the build script downloads and builds kernel 4.7.5 but install 4.7.3.

Installed kernel do not contain my modifications. Even I do not know where it is coming from.

That is why I cannot use the right kernel with my patches.

 

BTW I have made the build the same way as have did it hundreds times till now.

And I have never had such a situation till now so I do not know how to solve the problem.

 

Best regards

Chris

Link to comment
Share on other sites

Thanks Zador,

There was an internal change and git cloning function was replaced. Now you need to specify

KERNELBRANCH="tag:v4.7.3"

for tags (and

KERNELBRANCH="branch:master"

for branches)

Your advice solve the problem to download required source from the repository.

BTW what about BOOTBRANCH - should it be used the same syntax or old one is valid:

BOOTBRANCH=v2016.05-rc3

Unfortunately, it did not solve the problem with different build and install versions of board related packages.

Even with the same version (but with different times and sizes) the installed packages are not the built once and maybe come from some external repository.

Their build time is fixed (especially dtb files dated Sep 14 19:51) like 'uname -a' shows.

 

I would like to try to build with older Armbian scripts (5.17 for example) but changing in compile.sh:

LIB_TAG="5.17"

brings an error.

 

What can I do to solve or work around the problem?

 

Best regards

Chris

Link to comment
Share on other sites

Hi to All,

 

After a night fighting I have installed clean virtual machine with Ubuntu Xenian (including host/guest file sharing).

I have made completely clean Armbian 5.20 build with default setting (U-Boot 2006.09 & Linux Kernel 4.7.5).

 

Unfortunately, the problem with installing of other than just built Kernel, modules and DTBs is still there.

 

 

[ o.k. ] Done building [ /armbian/2016-09-27/output/images/Armbian_5.20_Lime2-emmc_Debian_jessie_4.7.5.img ]
umount: /armbian/2016-09-27/output/cache/sdcard: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
rm: cannot remove '/armbian/2016-09-27/output/cache/sdcard': Device or resource busy
[ o.k. ] Runtime [ 39 min ]
root@armbian-vm:/armbian/2016-09-27# ls -la output/
cache/ debs/ debug/ .gpg/ images/
root@armbian-vm:/armbian/2016-09-27# ls -la output/debs/
total 26344
drwxr-xr-x 4 root root 4096 Ñеп 27 05:55 .
drwxr-xr-x 7 root root 4096 Ñеп 27 05:40 ..
-rw-r--r-- 1 root root 1291158 Ñеп 27 05:55 armbian-firmware_5.20_armhf.deb
-rw-r--r-- 1 root root 14942 Ñеп 27 05:55 armbian-tools-jessie_5.20_armhf.deb
drwxr-xr-x 2 root root 4096 Ñеп 27 05:21 extra
drwxr-xr-x 2 root root 4096 Ñеп 27 05:40 jessie
-rw-r--r-- 1 root root 117980 Ñеп 27 05:39 linux-dtb-next-sunxi_5.20_armhf.deb
-rw-r--r-- 1 root root 58636 Ñеп 27 05:39 linux-firmware-image-next-sunxi_5.20_armhf.deb
-rw-r--r-- 1 root root 10000942 Ñеп 27 05:39 linux-headers-next-sunxi_5.20_armhf.deb
-rw-r--r-- 1 root root 15282218 Ñеп 27 05:40 linux-image-next-sunxi_5.20_armhf.deb
-rw-r--r-- 1 root root 178218 Ñеп 27 05:27 linux-u-boot-next-lime2-emmc_5.20_armhf.deb
root@armbian-vm:/armbian/2016-09-27# ls -la output/images/
total 1142548
drwxr-xr-x 2 root root 4096 Ñеп 27 06:05 .
drwxr-xr-x 7 root root 4096 Ñеп 27 05:40 ..
-rw-r--r-- 1 root root 1650458624 Ñеп 27 06:05 Armbian_5.20_Lime2-emmc_Debian_jessie_4.7.5.img
root@armbian-vm:/armbian/2016-09-27# losetup -f
/dev/loop0
root@armbian-vm:/armbian/2016-09-27# losetup /dev/loop0 output/images/Armbian_5.20_Lime2-emmc_Debian_jessie_4.7.5.img
root@armbian-vm:/armbian/2016-09-27# mkdir -p /armbian/mnt
root@armbian-vm:/armbian/2016-09-27# mount /dev/loop0p1 /armbian/mnt
root@armbian-vm:/armbian/2016-09-27# ls /armbian/mnt/
app bin boot dev etc home jessie lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var
root@armbian-vm:/armbian/2016-09-27# ls -la /armbian/mnt/boot/
total 16504
drwxr-xr-x 4 root root 4096 Ñеп 27 05:59 .
drwxr-xr-x 23 root root 4096 Ñеп 27 06:00 ..
drwxr-xr-x 2 root root 4096 Ñеп 27 05:55 bin
-rw-r--r-- 1 root root 6944 Ñеп 27 05:55 boot.bmp
-rw-r--r-- 1 root root 1324 Ñеп 27 05:56 boot.cmd
-rw-r--r-- 1 root root 1396 Ñеп 27 06:04 boot.scr
-rw-r--r-- 1 root root 139450 Ñеп 14 20:51 config-4.7.3-sunxi
lrwxrwxrwx 1 root root 15 Ñеп 27 05:57 dtb -> dtb-4.7.3-sunxi
drwxr-xr-x 2 root root 4096 Ñеп 27 05:57 dtb-4.7.3-sunxi
lrwxrwxrwx 1 root root 15 Ñеп 27 05:55 dtb.old -> dtb-4.7.5-sunxi
-rw-r--r-- 1 root root 4039640 Ñеп 27 05:59 initrd.img-4.7.3-sunxi
-rw-r--r-- 1 root root 0 Ñеп 27 05:59 .next
lrwxrwxrwx 1 root root 18 Ñеп 27 05:55 script.bin -> bin/lime2-emmc.bin
-rw-r--r-- 1 root root 2454560 Ñеп 14 20:51 System.map-4.7.3-sunxi
-rw-r--r-- 1 root root 4039704 Ñеп 27 05:59 uInitrd
-rw-r--r-- 1 root root 0 Ñеп 27 05:55 .verbose
-rwxr-xr-x 1 root root 6180832 Ñеп 14 20:51 vmlinuz-4.7.3-sunxi
lrwxrwxrwx 1 root root 19 Ñеп 27 05:59 zImage -> vmlinuz-4.7.3-sunxi
root@armbian-vm:/armbian/2016-09-27# ls -la /armbian/mnt/lib/modules/4.7.3-sunxi/
total 1692
drwxr-xr-x 3 root root 4096 Ñеп 27 05:57 .
drwxr-xr-x 3 root root 4096 Ñеп 27 05:57 ..
lrwxrwxrwx 1 root root 34 Ñеп 14 20:51 build -> /usr/src/linux-headers-4.7.3-sunxi
drwxr-xr-x 9 root root 4096 Ñеп 27 05:57 kernel
-rw-r--r-- 1 root root 448700 Ñеп 14 20:51 modules.alias
-rw-r--r-- 1 root root 462234 Ñеп 14 20:51 modules.alias.bin
-rw-r--r-- 1 root root 8011 Ñеп 14 20:51 modules.builtin
-rw-r--r-- 1 root root 11396 Ñеп 14 20:51 modules.builtin.bin
-rw-r--r-- 1 root root 126387 Ñеп 14 20:51 modules.dep
-rw-r--r-- 1 root root 198362 Ñеп 14 20:51 modules.dep.bin
-rw-r--r-- 1 root root 207 Ñеп 14 20:51 modules.devname
-rw-r--r-- 1 root root 63768 Ñеп 14 20:51 modules.order
-rw-r--r-- 1 root root 55 Ñеп 14 20:51 modules.softdep
-rw-r--r-- 1 root root 169006 Ñеп 14 20:51 modules.symbols
-rw-r--r-- 1 root root 209775 Ñеп 14 20:51 modules.symbols.bin
root@armbian-vm:/armbian/2016-09-27# ls -la /armbian/mnt/boot/dtb/sun7i-a20-olinuxino-lime*
-rw-r--r-- 1 root root 48887 Ñеп 14 20:51 /armbian/mnt/boot/dtb/sun7i-a20-olinuxino-lime2.dtb
-rw-r--r-- 1 root root 49552 Ñеп 14 20:51 /armbian/mnt/boot/dtb/sun7i-a20-olinuxino-lime2-emmc.dtb
-rw-r--r-- 1 root root 47364 Ñеп 14 20:51 /armbian/mnt/boot/dtb/sun7i-a20-olinuxino-lime.dtb
root@armbian-vm:/armbian/2016-09-27# umount /armbian/mnt
root@armbian-vm:/armbian/2016-09-27# losetup -d /dev/loop0
root@armbian-vm:/armbian/2016-09-27#

 

 

 

BTW I have tested to disconnect VM from the network while the scripts build U-Boot, Kernel and install packages.

Unfortunately, the result was the same.

 

Please, help me because no more ideas what to do.

 

Best regards

Chris

 

Link to comment
Share on other sites

Thanks Zador,

Please try building now, I think this issue should be fixed.

The first try to rebuild freezes but the second one finishes. Both tries are without any files deletion. The problem was there.

 

For the third try I have restarted VM because output/cache/sdcard was busy and triggered error (I have seen this error for a long time).

I have also deleted  all packages in output folder except jessie-ng-armhf...tgz (because I have removed 'deb' from CLEAN_LEVEL).

 

Unfortunately, the problem is still there.

 

 

[ o.k. ] Done building [ /armbian/2016-09-27/output/images/Armbian_5.20_Lime2-emmc_Debian_jessie_4.7.5.img ]
[ o.k. ] Runtime [ 17 min ]
root@armbian-vm:/armbian/2016-09-27# losetup /dev/loop0 output/images/Armbian_5.20_Lime2-emmc_Debian_jessie_4.7.5.img
root@armbian-vm:/armbian/2016-09-27# mount /dev/loop0p1 /armbian/mnt
root@armbian-vm:/armbian/2016-09-27# ls -la /armbian/mnt/boot/
total 16504
drwxr-xr-x 4 root root 4096 Ñеп 27 15:52 .
drwxr-xr-x 23 root root 4096 Ñеп 27 15:52 ..
drwxr-xr-x 2 root root 4096 Ñеп 27 15:47 bin
-rw-r--r-- 1 root root 6944 Ñеп 27 15:47 boot.bmp
-rw-r--r-- 1 root root 1324 Ñеп 27 15:48 boot.cmd
-rw-r--r-- 1 root root 1396 Ñеп 27 15:56 boot.scr
-rw-r--r-- 1 root root 139450 Ñеп 14 20:51 config-4.7.3-sunxi
lrwxrwxrwx 1 root root 15 Ñеп 27 15:49 dtb -> dtb-4.7.3-sunxi
drwxr-xr-x 2 root root 4096 Ñеп 27 15:49 dtb-4.7.3-sunxi
lrwxrwxrwx 1 root root 15 Ñеп 27 15:47 dtb.old -> dtb-4.7.5-sunxi
-rw-r--r-- 1 root root 4039241 Ñеп 27 15:52 initrd.img-4.7.3-sunxi
-rw-r--r-- 1 root root 0 Ñеп 27 15:52 .next
lrwxrwxrwx 1 root root 18 Ñеп 27 15:47 script.bin -> bin/lime2-emmc.bin
-rw-r--r-- 1 root root 2454560 Ñеп 14 20:51 System.map-4.7.3-sunxi
-rw-r--r-- 1 root root 4039305 Ñеп 27 15:52 uInitrd
-rw-r--r-- 1 root root 0 Ñеп 27 15:47 .verbose
-rwxr-xr-x 1 root root 6180832 Ñеп 14 20:51 vmlinuz-4.7.3-sunxi
lrwxrwxrwx 1 root root 19 Ñеп 27 15:52 zImage -> vmlinuz-4.7.3-sunxi
root@armbian-vm:/armbian/2016-09-27#

 

 

Best regards

Chris

Link to comment
Share on other sites

Hi Zador,

 

Finally, I have found where the problem comes from.

In customize-image.sh I have run:

apt-get -qq -y update >/dev/null 2>$1
apt-get -qq -y upgrade >/dev/null >/dev/null 2>$1

where upgrade overwrites Kernel, DTB and Header packages.

Removing above lines solves the problem.

 

This upgrade was added by me in the very begging (months ago) to prevent immediate notifications for new updates.

Unfortunately, the problem rises after Sep 17-th (my last successful build) but the reason is unknown to me.

 

BTW after solving the problem system immediately notifies for 3 new updates and upgrade prints:

root@egpr:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  linux-dtb-next-sunxi linux-headers-next-sunxi linux-image-next-sunxi
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 25.4 MB of archives.
After this operation, 489 kB of additional disk space will be used.

In my opinion this is potential problem because running later on update/upgrade will cause the same effect.

 

Best regards

Chris

 

Link to comment
Share on other sites

Hi to All,

 

With migration to Kernel 4.7 I have changed build configuration from 'lime2' to 'lime2-emmc' but found problems with eMMC on Lime2-eMMC board at boot time:

[    6.339012] sun7i-a20-pinctrl 1c20800.pinctrl: pin PC16 already requested by 1c11000.mmc; cannot claim for pwrseq
[    6.339039] sun7i-a20-pinctrl 1c20800.pinctrl: pin-80 (pwrseq) status -22
[    6.339052] sun7i-a20-pinctrl 1c20800.pinctrl: could not request pin 80 (PC16) from group PC16  on device 1c20800.pinctrl
[    6.339063] pwrseq_emmc pwrseq: Error applying setting, reverse things back
[    6.348763] sunxi-mmc 1c11000.mmc: allocated mmc-pwrseq
[    6.385570] sunxi-mmc 1c11000.mmc: base:0xf0fc6000 irq:28
[    6.393673] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 8, RTO !!
[    6.404106] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    6.407165] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    6.408797] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    6.410611] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    6.461493] mmc1: new DDR MMC card at address 0001
[    6.474766] mmcblk1: mmc1:0001 P1XXXX 3.60 GiB
[    6.482733] mmcblk1boot0: mmc1:0001 P1XXXX partition 1 16.0 MiB
[    6.496711] sun4i-ss 1c15000.crypto-engine: no reset control found
[    6.498365] sun4i-ss 1c15000.crypto-engine: Die ID 0
[    6.498528] mmcblk1boot1: mmc1:0001 P1XXXX partition 2 16.0 MiB
[    6.499941]  mmcblk1: p1

where PC16 is used to reset eMMC.

 

Fortunately, eMMC is recognized by the system but there is something wrong in configuration.

 

Unfortunately, there is other more serious problem if the system has to be booted from eMMC when the process is stopped waiting for root fs to become ready. eMMC is not recognized till that moment and the boot is stopped.

 

At the first try with Kernel 4.7.3 I have successfully build and run a system configured for 'lime2' with my patches for eMMC without above errors and boot freezes. Of course, in my patches there is no configuration for PC16 but everything was O.K.

 

Where could be the problem in Kernel 4.7.3 for 'lime2-emmc'?

 

Best regards

Chris

 

Link to comment
Share on other sites

I'm having the same issue, try to build Kernel 4.7.5, here is some output :

losetup /dev/loop0 output/images/Armbian_5.20_Lime2_Debian_jessie_4.7.5.img
mount /dev/loop0p1 /media/

vmlinuz is still in 4.7.3 but dtb in 4.7.5

root@armbiancompiler-VirtualBox:~# ll /media/boot/
total 16504
drwxr-xr-x  4 root root    4096 sept. 29 12:07 ./
drwxr-xr-x 22 root root    4096 sept. 29 11:35 ../
drwxr-xr-x  2 root root    4096 sept. 29 11:27 bin/
-rw-r--r--  1 root root    6944 sept. 29 11:28 boot.bmp
-rw-r--r--  1 root root    2825 sept. 29 11:24 boot.cmd
-rw-r--r--  1 root root    2897 sept. 29 12:07 boot.scr
-rw-r--r--  1 root root  139450 sept. 14 19:51 config-4.7.3-sunxi
lrwxrwxrwx  1 root root      15 sept. 29 11:27 dtb -> dtb-4.7.5-sunxi/
drwxr-xr-x  2 root root    4096 sept. 29 11:27 dtb-4.7.5-sunxi/
-rw-r--r--  1 root root 4039657 sept. 29 11:35 initrd.img-4.7.3-sunxi
-rw-r--r--  1 root root       0 sept. 29 11:35 .next
lrwxrwxrwx  1 root root      13 sept. 29 11:27 script.bin -> bin/lime2.bin
-rw-r--r--  1 root root 2454560 sept. 14 19:51 System.map-4.7.3-sunxi
-rw-r--r--  1 root root 4039721 sept. 29 11:35 uInitrd
-rw-r--r--  1 root root       0 sept. 29 11:28 .verbose
-rwxr-xr-x  1 root root 6180832 sept. 14 19:51 vmlinuz-4.7.3-sunxi*
lrwxrwxrwx  1 root root      19 sept. 29 11:35 zImage -> vmlinuz-4.7.3-sunxi*
root@armbiancompiler-VirtualBox:~# ll /media/usr/src/
total 16
drwxr-xr-x  4 root root 4096 sept. 29 11:31 ./
drwxr-xr-x 10 root root 4096 sept. 29 11:09 ../
drwxr-xr-x 24 root root 4096 sept. 29 11:33 linux-headers-4.7.3-sunxi/
drwxr-xr-x  4 root root 4096 sept. 29 11:31 linux-headers-4.7.5-sunxi/

When boot on this version uname -r show me 4.7.3, how can we build for 4.7.5 ?

 

Thanks

Link to comment
Share on other sites

Hi Slite,

I'm having the same issue, try to build Kernel 4.7.5, here is some output :

losetup /dev/loop0 output/images/Armbian_5.20_Lime2_Debian_jessie_4.7.5.img
mount /dev/loop0p1 /media/

vmlinuz is still in 4.7.3 but dtb in 4.7.5

root@armbiancompiler-VirtualBox:~# ll /media/boot/
total 16504
drwxr-xr-x  4 root root    4096 sept. 29 12:07 ./
drwxr-xr-x 22 root root    4096 sept. 29 11:35 ../
drwxr-xr-x  2 root root    4096 sept. 29 11:27 bin/
-rw-r--r--  1 root root    6944 sept. 29 11:28 boot.bmp
-rw-r--r--  1 root root    2825 sept. 29 11:24 boot.cmd
-rw-r--r--  1 root root    2897 sept. 29 12:07 boot.scr
-rw-r--r--  1 root root  139450 sept. 14 19:51 config-4.7.3-sunxi
lrwxrwxrwx  1 root root      15 sept. 29 11:27 dtb -> dtb-4.7.5-sunxi/
drwxr-xr-x  2 root root    4096 sept. 29 11:27 dtb-4.7.5-sunxi/
-rw-r--r--  1 root root 4039657 sept. 29 11:35 initrd.img-4.7.3-sunxi
-rw-r--r--  1 root root       0 sept. 29 11:35 .next
lrwxrwxrwx  1 root root      13 sept. 29 11:27 script.bin -> bin/lime2.bin
-rw-r--r--  1 root root 2454560 sept. 14 19:51 System.map-4.7.3-sunxi
-rw-r--r--  1 root root 4039721 sept. 29 11:35 uInitrd
-rw-r--r--  1 root root       0 sept. 29 11:28 .verbose
-rwxr-xr-x  1 root root 6180832 sept. 14 19:51 vmlinuz-4.7.3-sunxi*
lrwxrwxrwx  1 root root      19 sept. 29 11:35 zImage -> vmlinuz-4.7.3-sunxi*
root@armbiancompiler-VirtualBox:~# ll /media/usr/src/
total 16
drwxr-xr-x  4 root root 4096 sept. 29 11:31 ./
drwxr-xr-x 10 root root 4096 sept. 29 11:09 ../
drwxr-xr-x 24 root root 4096 sept. 29 11:33 linux-headers-4.7.3-sunxi/
drwxr-xr-x  4 root root 4096 sept. 29 11:31 linux-headers-4.7.5-sunxi/

When boot on this version uname -r show me 4.7.3, how can we build for 4.7.5 ?

 

Thanks

As I wrote the problem is that 'ap-get upgrade' overwrites the kernel, dtb and header packages from Armbian binary repository.

Currently Armbian scripts build it with kernel 4.7.5 but upgrade overwrite it with 4.7.3 from the site.

 

Solutions is to not do 'apt-get upgrade' until guys from Armbian team solve the issue.

 

BTW Do you have a problem to boot from eMMC on Lime2-eMMC (as described in my last post)?

 

Best regards

Chris

Link to comment
Share on other sites

As I wrote the problem is that 'ap-get upgrade' overwrites the kernel, dtb and header packages from Armbian binary repository.

Currently Armbian scripts build it with kernel 4.7.5 but upgrade overwrite it with 4.7.3 from the site.

I believe there are issues with wrong repository priorities, it will be fixed as soon as I make enough tests to find an optimal solution.

 

BTW Do you have a problem to boot from eMMC on Lime2-eMMC (as described in my last post)?

Lime2-eMMC target was not tested "live" before since I believe neither Igor nor I don't have Lime2-eMMC board. If this is a kernel issue (and it looks like it), it may be better to report this to maintainer who actually added Lime2-eMMC device tree configuration.

Link to comment
Share on other sites

Thanks Zador,

I believe there are issues with wrong repository priorities, it will be fixed as soon as I make enough tests to find an optimal solution.

 

Lime2-eMMC target was not tested "live" before since I believe neither Igor nor I don't have Lime2-eMMC board. If this is a kernel issue (and it looks like it), it may be better to report this to maintainer who actually added Lime2-eMMC device tree configuration.

You have already put a change about that but the issue is still there.

Maybe the binary repository has to be updates as well.

 

The author of the patch for lime2-emmc is Olliver Schinagl.

 

Do you know on which forum I can meet him?

 

Best regards

Chris

Link to comment
Share on other sites

You have already put a change about that but the issue is still there.

This was only the part of the problem.

 

The author of the patch for lime2-emmc is Olliver Schinagl.

 

Do you know on which forum I can meet him?

Maintainer e-mail should be available for any part of mainline kernel (i.e. it is listed in the file header), this is the best way to contact the author.

Link to comment
Share on other sites

I believe there are issues with wrong repository priorities, it will be fixed as soon as I make enough tests to find an optimal solution.

 

Lime2-eMMC target was not tested "live" before since I believe neither Igor nor I don't have Lime2-eMMC board. If this is a kernel issue (and it looks like it), it may be better to report this to maintainer who actually added Lime2-eMMC device tree configuration.

 

 

All our Lime2-emmc boards are out in the field (and I'm about to deploy a fix to solve crashing due to DRAM settings too high), so I've been testing on a stock Lime2 (nand) board.

 

We are ordering in more Lime2-emmc boards shortly and I will help test/solve this as well.

Link to comment
Share on other sites

Hi Neomanic,

All our Lime2-emmc boards are out in the field (and I'm about to deploy a fix to solve crashing due to DRAM settings too high), so I've been testing on a stock Lime2 (nand) board.

Which Armbian build you are using for Lime2-4GB (nand option) - with legacy (3.4) or mainline (4.7) Kernel?

If you are using mainline (4.7) Kernel do you use NAND to boot from and how?

 

Best rafards

Chris

Link to comment
Share on other sites

Hi to All,

Hi to All,

 

With migration to Kernel 4.7 I have changed build configuration from 'lime2' to 'lime2-emmc' but found problems with eMMC on Lime2-eMMC board at boot time:

[    6.339012] sun7i-a20-pinctrl 1c20800.pinctrl: pin PC16 already requested by 1c11000.mmc; cannot claim for pwrseq
[    6.339039] sun7i-a20-pinctrl 1c20800.pinctrl: pin-80 (pwrseq) status -22
[    6.339052] sun7i-a20-pinctrl 1c20800.pinctrl: could not request pin 80 (PC16) from group PC16  on device 1c20800.pinctrl
[    6.339063] pwrseq_emmc pwrseq: Error applying setting, reverse things back
[    6.348763] sunxi-mmc 1c11000.mmc: allocated mmc-pwrseq
[    6.385570] sunxi-mmc 1c11000.mmc: base:0xf0fc6000 irq:28
[    6.393673] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 8, RTO !!
[    6.404106] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    6.407165] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    6.408797] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    6.410611] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    6.461493] mmc1: new DDR MMC card at address 0001
[    6.474766] mmcblk1: mmc1:0001 P1XXXX 3.60 GiB
[    6.482733] mmcblk1boot0: mmc1:0001 P1XXXX partition 1 16.0 MiB
[    6.496711] sun4i-ss 1c15000.crypto-engine: no reset control found
[    6.498365] sun4i-ss 1c15000.crypto-engine: Die ID 0
[    6.498528] mmcblk1boot1: mmc1:0001 P1XXXX partition 2 16.0 MiB
[    6.499941]  mmcblk1: p1

where PC16 is used to reset eMMC.

 

Fortunately, eMMC is recognized by the system but there is something wrong in configuration.

 

Unfortunately, there is other more serious problem if the system has to be booted from eMMC when the process is stopped waiting for root fs to become ready. eMMC is not recognized till that moment and the boot is stopped.

 

At the first try with Kernel 4.7.3 I have successfully build and run a system configured for 'lime2' with my patches for eMMC without above errors and boot freezes. Of course, in my patches there is no configuration for PC16 but everything was O.K.

 

Where could be the problem in Kernel 4.7.3 for 'lime2-emmc'?

 

Best regards

Chris

After discussion with the author of the patch for adding of lime2-emmc as a new board to Kernel 4.7 Olliver Schinagl I have tested and found that the problem can be overcome by removing of the staff around mmc2_pwrseq and PC16 using following patch:

index 5ea4915..7e6b703 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
@@ -46,22 +46,6 @@
 / {
 	model = "Olimex A20-OLinuXino-LIME2-eMMC";
 	compatible = "olimex,a20-olinuxino-lime2-emmc", "allwinner,sun7i-a20";
-
-	mmc2_pwrseq: pwrseq {
-		pinctrl-0 = <&mmc2_pins_nrst>;
-		pinctrl-names = "default";
-		compatible = "mmc-pwrseq-emmc";
-		reset-gpios = <&pio 2 16 GPIO_ACTIVE_LOW>;
-	};
-};
-
-&pio {
-	mmc2_pins_nrst: mmc2@0 {
-		allwinner,pins = "PC16";
-		allwinner,function = "gpio_out";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-	};
 };
 
 &mmc2 {
@@ -71,7 +55,6 @@
 	vqmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	non-removable;
-	mmc-pwrseq = <&mmc2_pwrseq>;
 	status = "okay";
 
 	emmc: emmc@0 {

As tested for months (with my patches for older Kernel versions and 'lime2' config) the system works fine without above staff probably because eMMC chip makes internal reset when powered.

 

If above staff is present the system makes sw reset using pin PC16 but the reset procedure takes too long and it is the reason for the observed delay and errors.

If the system is booted from eMMC delay caused by the reset sequence makes device busy at the moment when rootfs has to be mounted. That is way the boot process stops.

 

In my opinion even with observed delay the system has to continue with rootfs mounting when device become ready but this is another issue or maybe limitation.
 

Unfortunately, Oliver has no time to work on this issue at the moment but maybe somebody else experienced in that field can help.

 

Best regards

Chris

 

Link to comment
Share on other sites

Hi to All,

 

Provoked by post about non working USB OTG on Banana PI for a long time I have decided to test situation on my Lime2-eMMC board again with Kernel 4.7.

The results are that the problem exists if USB OTG is configured in 'otg' mode and USB works in host only mode as described here.

 

The try to test stability problem (USB OTG in host only mode stops working after some time at data transfer) looks fixed.

 

The test I am started is with real application in which STM32F405 based board with ChibiOS based FW connected to Lime2-eMMC via USB OTG (in host only mode) as FS CDC USB Device. The USB traffic (~40 kB/s in FS connection) has caused false interrupts system warnings and musb driver has been hanging after irregular time periods before. Now the problem do not exits for more than 16 hours testing time and the system continues working fine.

 

Of course, more tests have to be done especially with intensive data transfers for being sure in USB OTG stability at least in host only mode.

 

It will be perfect if someone having such a problem confirms my observations as well.

 

Best regards

Chris

 

Link to comment
Share on other sites

Hi to All,

Hi to All,

 

Provoked by post about non working USB OTG on Banana PI for a long time I have decided to test situation on my Lime2-eMMC board again with Kernel 4.7.

The results are that the problem exists if USB OTG is configured in 'otg' mode and USB works in host only mode as described here.

 

The try to test stability problem (USB OTG in host only mode stops working after some time at data transfer) looks fixed.

 

The test I am started is with real application in which STM32F405 based board with ChibiOS based FW connected to Lime2-eMMC via USB OTG (in host only mode) as FS CDC USB Device. The USB traffic (~40 kB/s in FS connection) has caused false interrupts system warnings and musb driver has been hanging after irregular time periods before. Now the problem do not exits for more than 16 hours testing time and the system continues working fine.

 

Of course, more tests have to be done especially with intensive data transfers for being sure in USB OTG stability at least in host only mode.

 

It will be perfect if someone having such a problem confirms my observations as well.

 

Best regards

Chris

The next step was to test my Lime2-eMMC board's USB OTG in host only mode at higher speed data transfers.

 

That is why as a first step I exchange STM32F405 board with WiFi dongle connecting it to USB OTG port in HS host only mode. Running described test with application increases data transfer speed 4 times - up to 160 kBps or ~0.3% of maximal USB throughput (480 Mbps or 60 MBps).

 

There was no one warning for a more than 4 hours. When the WiFi dongle was connected to the regular USB Host port following messages can be seen from time to time:

 

 

Oct  1 18:10:02 egpr kernel: [  914.713774] ieee80211 phy0: rt2800usb_txdone: Warning - Data pending for entry 2 in queue 2
Oct  1 18:12:14 egpr kernel: [ 1046.955224] ieee80211 phy0: rt2x00usb_watchdog_tx_dma: Warning - TX queue 2 DMA timed out, invoke forced forced reset

 

 

 

Next I have run a second application client on MacBookPro connected to the same AP (WiFi dongle) doubling data transfer speed up to 320 kBps - or 0.6% of maximal USB throughput.

 

I have also run 'iperf4 -s' on Lime2-eMMC board and 'while true; do iperf3 -c Lime2IP; done' on my MacBookPro which adds another ~5 MBps and total data transfer speed become more than 5 MBps - or more than 8% of maximal USB throughput (but more than 25% of WiFi throughput).

 

CPU load reported by RPI Monitor was 3.2 - 4.7 (4 mean) and the consumption reached 1.7 - 3.3 (3 mean) W.

 

Again no any errors for more than 16 hours and only a single warning was observed:

Oct  2 21:02:45 egpr kernel: [33711.585644] ieee80211 phy0: rt2800usb_txdone: Warning - Data pending for entry 2 in queue 2

Unfortunately, the reached data transfer rates ware not so big but much more than at real use case one in our application. I will try to find other test cases produced bigger throughput over USB OTG later on.

 

Best regards

Chris

 

Link to comment
Share on other sites

Hi Neomanic,

Which Armbian build you are using for Lime2-4GB (nand option) - with legacy (3.4) or mainline (4.7) Kernel?

If you are using mainline (4.7) Kernel do you use NAND to boot from and how?

 

Best rafards

Chris

 

I am using mainline, currently with 4.7.5 and latest Armbian 5.20. We have no need for the hardware support in legacy 3.4, so thought it best to go with mainline.

 

I only have one NAND board here, and haven't even touched the NAND, just use SD for booting. The eMMC boards were released a few days after ordering it to start , which is why I don't just have all eMMC boards. :) 

Link to comment
Share on other sites

Hi to All,

 

Trying to use overlayfs to make root fs read only and unavailability of overlayroot Debian package as described here take me to decision to build customized by me Armbian with Ubuntu Xenial instead of Debian Jessie.

 

I start clean build in new directory but process stopped with error at compiling of temper:

[ o.k. ] Applying distribution specific tweaks for [ xenial ]
sed: can't read /armbian/2016-10-06/output/cache/sdcard/etc/ssh/sshd_config: No such file or directory
[ o.k. ] Applying common tweaks 
[ o.k. ] Installing kernel [ linux-image-next-sunxi ]
[ o.k. ] Installing u-boot [ linux-u-boot-next-lime2-emmc ]
[ o.k. ] Installing headers [ linux-headers-next-sunxi ]
[ o.k. ] Installing generic firmware [ armbian-firmware ]
[ o.k. ] Installing DTB [ linux-dtb-next-sunxi ]
[ o.k. ] Installing board support package [ lime2-emmc ]
sed: can't read /armbian/2016-10-06/output/cache/sdcard/etc/lirc/hardware.conf: No such file or directory
sed: can't read /armbian/2016-10-06/output/cache/sdcard/etc/lirc/hardware.conf: No such file or directory
sed: can't read /armbian/2016-10-06/output/cache/sdcard/etc/lirc/hardware.conf: No such file or directory
sed: can't read /armbian/2016-10-06/output/cache/sdcard/etc/lirc/hardware.conf: No such file or directory
sed: can't read /armbian/2016-10-06/output/cache/sdcard/etc/lirc/hardware.conf: No such file or directory
cp: cannot create regular file '/armbian/2016-10-06/output/cache/sdcard/etc/lirc/lircd.conf': No such file or directory
[ o.k. ] Installing extra applications and drivers 
[ o.k. ] Installing linux firmware [ 5.21 ]
[ o.k. ] Building deb [ armbian-tools ]
[ o.k. ] ... downloading sources [ temper ]
[ o.k. ] ... downloading sources [ BT utils ]
[ o.k. ] ... compiling [ temper ]
[ error ] ERROR in function compiling [ tools.sh:70 ]
[ error ] Error building [ temper ]
[ o.k. ] Process terminated 
[ error ] ERROR in function unmount_on_exit [ debootstrap-ng.sh:576 ]
[ error ] debootstrap-ng was interrupted 
[ o.k. ] Process terminated 

In addition there are some error messages for missing files.

 

One more error was printed before while creating board support package:

[ o.k. ] Creating board support package [ lime2-emmc next ]
cp: cannot stat '/armbian/2016-10-06/lib/mpv_sunxi.conf': No such file or directory

What is wrong in Xenial build (server version) for Lime2-eMMC board?

 

Best regards

Chris

Link to comment
Share on other sites

One more error was printed before while creating board support package:

[ o.k. ] Creating board support package [ lime2-emmc next ]
cp: cannot stat '/armbian/2016-10-06/lib/mpv_sunxi.conf': No such file or directory

This can be ignored for now.

As for other errors - something happened during debootstrap cache creation stage, so expected packages were not installed and files are missing as a result of that. Please remove rootfs cache and try again, if errors happen, please provide build script console output and output.log from output/debug directory.

Link to comment
Share on other sites

Thanks Zador,

This can be ignored for now.

As for other errors - something happened during debootstrap cache creation stage, so expected packages were not installed and files are missing as a result of that. Please remove rootfs cache and try again, if errors happen, please provide build script console output and output.log from output/debug directory.

That was the reason.

 

There ware 2 additional packages (firmware-ralink php5-fpm) probably missing in Ubuntu or with other names. There ware errors printed for that in debootstrap stage I am neglecting. Probably this is breaking the process.

 

After removing another package (cryptsetup) was printed to be broken. This package is required by overlayroot so I have to remove it as well. Unfortunately, installation of working overlayroot is the reason to migrate to Xenial but this is another issue has to be fighting with.

 

Fortunately, the build is finished but without executing of customization tasks because I forget to change case from jessie to xenial in my customize-image.sh. Of course my customization staff has to be verified and copied to different xenial case later on.

 

Finally, customization staff has been executed with a few not so important errors for now so I am eager to test if main application staff is working.

 

Thanks again and best reagrsd

Chris

Link to comment
Share on other sites

Thanks Zador,

cryptsetup definitely exists in Ubuntu

I hope so.

 

For now the good news is that:

Ubuntu 16.04.1 LTS egpr ttyS0

egpr login: root
Password:
 _     _                  ____         __  __ __  __  ____
| |   (_)_ __ ___   ___  |___ \    ___|  \/  |  \/  |/ ___|
| |   | | '_ ` _ \ / _ \   __) |  / _ \ |\/| | |\/| | |
| |___| | | | | | |  __/  / __/  |  __/ |  | | |  | | |___
|_____|_|_| |_| |_|\___| |_____|  \___|_|  |_|_|  |_|\____|


Welcome to ARMBIAN Ubuntu 16.04.1 LTS 4.7.6-sunxi
System load:   1.81             Up time:       37 sec
Memory usage:  4 % of 1000Mb    IP:            192.168.1.100,192.168.2.1
CPU temp:      28°C             HDD temp:      40°C
Usage of /:    34% of 3.5G      storage/:      4% of 50G        Battery:       99% charging

eMMC and Ethernet have been recognized and work fine.

USB WiFi adapter is seen as USB device but 'wlan0' interface is not installed.

In boot messages can be seen following line:

rt2800usb 2-1:1.0 wlx000f60085c8e: renamed from wlan0

and cannot be seen:

ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29

probably because of firmware-ralink package lack.

 

The other good news is that all my application staff is working even RPI Monitor incl. DS18B20 temperature sensor connected as One Wire device:

Processor: ARMv7 Processor rev 4 (v7l)
Distribution: Ubuntu 16.04.1 LTS
Kernel version: Linux 4.7.6-sunxi armv7l
Firmware: #1
Package(s): 0 upgradable(s)

but with error in memory status:

Used: NaNkB (NaN%) Available: NaNkB Total: 1000.91MB

while 'top' utility print right figures:

KiB Mem :  1024928 total,   834412 free,    51852 used,   138664 buff/cache

I will continue with fixing the mentioned issues and will report the progress later on.

 

Best regards

Chris

 

Link to comment
Share on other sites

Hi to All,

 

Unfortunately, migration from Jessie to Xenial for getting overlayroot working did not finished with success 'out of the box'.

 

Procedure as described in Igor's post was done successfully but root fs was not overlay-ed as expected and 'mount' prints:

/dev/mmcblk0p1 on / type ext4 (rw,relatime)

'overlayroot-chroot' command is printing an error:

ERROR: Unable to find an overlayroot filesystem

like in Jessie build with manually installed Ubuntu Xenial overlayroot package.

 

Any ideas what is wrong?

 

Best regards

Chris

 

Link to comment
Share on other sites

Hi to All,

 

I have solved the issue with USB WiFi adapter.

 

Required rt2870.bin file is in Ubuntu Xenial package 'linux-firmware'.

Unfortunately, installing 'linux-firmware' package has conflicts with 'armbian-firmware' one:

Unpacking linux-firmware (1.157.3) ...
Replaced by files in installed package armbian-firmware (5.21) ...
Setting up linux-firmware (1.157.3) ...

The other issue is the lack of /etc/udev/rules.d/70-persistent-net.rules file. Unfortunately, its creating as empty file did not help and the following lines have to be added:

# USB device 0x:0x (rt2800usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0f:60:08:5c:8e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

In my opinion /etc/udev/rules.d/70-persistent-net.rules file has to be supplied by the build and filled automatically by udev daemon so what is wrong?

 

After manual installing and setting WiFi AP start working fine.

 

Not installed at Armbian build PHP FPM package in Ubuntu Xenial is 'php7.0-fpm' (instead of 'php5-fpm') and after its installation following changes have to be made:

sed -i 's/cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php/7.0/fpm/php.ini

in /etc/nginx/sites-enabled/default file:

                fastcgi_pass unix:/run/php/php7.0-fpm.sock;
# instead of    fastcgi_pass unix:/var/run/php5-fpm.sock;

and 'nginx' has to be restarted. After that  nginx fast cgi php extension woks fine.

 

Not solved but found issues are:

  • failing patch of /etc/rsyslog.conf file for removing messages like:
rsyslogd-2007: action 'action 9' suspended, next retry is Fri Oct  7 00:07:44 2016 [v8.16.0 try http://www.rsyslog.com/e/2007 ]
  • time zone is not set and UTC is used instead;
  • free and available memory is not reported by RPI Monitor Status page:
Used: NaNkB (NaN%) Available: NaNkB Total: 1000.91MB
  • available memory is not reported in Memory Chart of RPI Monitor Statistics page

And most important issue not working overlayroot is still there.

 

More fixes and test will be done and reported.

 

Best regards

Chris

 

Link to comment
Share on other sites

Unfortunately, installing 'linux-firmware' package has conflicts with 'armbian-firmware' one:

 

Recent armbian-firmware is a "all in one package" -> It's full linux-firmware with removed all stuff that does not possibly work here + some wierd firmware that is used on our boards and it's not present upstream.

 

Build from here + remove:

https://github.com/igorpecovnik/lib/blob/master/extras/firmware.sh

Adding our collection over:

https://github.com/igorpecovnik/lib/tree/master/bin/firmware-overlay

 

Proper rt2870.bin should be present by default.

Link to comment
Share on other sites

Thanks Igor,

Recent armbian-firmware is a "all in one package" -> It's full linux-firmware with removed all stuff that does not possibly work here + some wierd firmware that is used on our boards and it's not present upstream.

 

Build from here + remove:

https://github.com/igorpecovnik/lib/blob/master/extras/firmware.sh

Adding our collection over:

https://github.com/igorpecovnik/lib/tree/master/bin/firmware-overlay

 

Proper rt2870.bin should be present by default.

I have removed linux-firmware installed by me but  rt2870.bin disappears:

[   13.001756] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   13.012379] rt2800usb 2-1:1.0: Direct firmware load for rt2870.bin failed with error -2
[   13.012419] rt2800usb 2-1:1.0: Falling back to user helper
[   13.021501] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware
[   21.727240] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   21.727333] rt2800usb 2-1:1.0: Direct firmware load for rt2870.bin failed with error -2
[   21.727346] rt2800usb 2-1:1.0: Falling back to user helper
[   21.734321] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

The situation is the same in Jessie build that is why I have added 'firmware-ralink' in lib.config. I have reported this problem long time ago but it is still there.

 

Best regards

Chris

Link to comment
Share on other sites

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

Important Information

Terms of Use - Privacy Policy - Guidelines