Jump to content

FEX and DTS use on armbian builds?


Christos

Recommended Posts

Hi,

 

Seen some posts where mentioning that depending of the version of kernel there is either FEX or DTS usage, old ones called Legacy, using FEX to define GPIOs and Peripherals pins.

Wit Mainline Kernel, is using DTS.

 

Yet in the recent kernel (dev) armbian builds, eg armbian 5.21, kernel 4.7.6 (on H3, NEO), seen the /boot containing all the FEX stuff script.bin etc.

Is FEX still used in the mainline kernel builds?

C:\Christos>ssh christos@192.168.1.131
christos@192.168.1.131's password:
setsockopt IP_TOS 16: Invalid argument:
 _   _                   ____  _   _   _
| \ | | __ _ _ __   ___ |  _ \(_) | \ | | ___  ___
|  \| |/ _` | '_ \ / _ \| |_) | | |  \| |/ _ \/ _ \
| |\  | (_| | | | | (_) |  __/| | | |\  |  __/ (_) |
|_| \_|\__,_|_| |_|\___/|_|   |_| |_| \_|\___|\___/


Welcome to ARMBIAN Debian GNU/Linux 8 (jessie) 4.7.6-sun8i
System load:   0.00             Up time:       37 min
Memory usage:  9 % of 495Mb     IP:            192.168.1.131
CPU temp:      34Β°C
Usage of /:    8% of 15G

Last login: Sun Oct  2 13:27:36 2016 from 192.168.1.6

christos@nanopineo:~$ su root
Password:
root@nanopineo:/home/christos# cd /boot
root@nanopineo:/boot# ls -l
total 15788
drwxr-xr-x 2 root root    4096 Oct  2 08:32 bin
-rw-r--r-- 1 root root    6944 Oct  2 08:33 boot.bmp
-rw-r--r-- 1 root root    2846 Oct  2 08:27 boot.cmd
-rw-r--r-- 1 root root    2918 Oct  2 08:35 boot.scr
-rw-r--r-- 1 root root  140522 Oct  2 08:22 config-4.7.6-sun8i
lrwxrwxrwx 1 root root      15 Oct  2 08:32 dtb -> dtb-4.7.6-sun8i
drwxr-xr-x 2 root root    4096 Oct  2 08:32 dtb-4.7.6-sun8i
-rw-r--r-- 1 root root 3995879 Oct  2 08:33 initrd.img-4.7.6-sun8i
lrwxrwxrwx 1 root root      17 Oct  2 08:32 script.bin -> bin/nanopineo.bin
-rw-r--r-- 1 root root 2203811 Oct  2 08:22 System.map-4.7.6-sun8i
-rw-r--r-- 1 root root 3995943 Oct  2 08:33 uInitrd
-rwxr-xr-x 1 root root 5794016 Oct  2 08:22 vmlinuz-4.7.6-sun8i
lrwxrwxrwx 1 root root      19 Oct  2 08:28 zImage -> vmlinuz-4.7.6-sun8i
root@nanopineo:/boot#

So if I change only the script.bin with bin2fex/fex2bin do these changes be effective in armbian latest kernel builds 4.x?

 

 

Christos

 

Link to comment
Share on other sites

Is FEX still used in the mainline kernel builds?

 

No, you can do what you want with fex files, any kernel with 4.x will ignore everything here. Vanilla == device tree, Allwinner legacy == fex files. To make things worse, it seems Allwinner's most recent BSP kernel for newer Allwinner SoCs (A64 and eg. the upcoming R40) could use both at the same time).

 

But as a rule of thumb: Only if you're dealing with kernel 3.4 on an Allwinner device fex settings are used. Otherwise it's DT.

Link to comment
Share on other sites

I'm a noobie here too and believe the best you could do is to look into Thomas Petazzoni's 'Device tree for Dummies' as a start. The only important and Armbian specific information is IMO this: When you play around with the dtc tool and make changes then don't overwright the original .dtb files.

 

Create a new version and then simply use the instructions here to adjust $fdtfile as outlined here: http://docs.armbian.com/boards/bananapiplus/

 

This way you do not loose the original .dtb file and can recover from errors that prevent booting (on another Linux host of course).

Link to comment
Share on other sites

Ok thanks,

 

Just to confirm though, I've seen a few posts in armbian, eg -> http://forum.armbian.com/index.php/topic/993-ds18b20-temperature-sensor-in-lamobo-r1/

where they modify BOTH the fex and the dts in order to achieve their goal.

I guess that is redundant? only the dts needs change right?

 

Christos

 

 

 

P.S.

 

BTW, these are some real case examples found in the forum here regarding dtc, so I sum them up just in case they are useful to someone that wants to have a look, together with Thomas's hints made me get an idea of what the dtc is

http://forum.armbian.com/index.php/topic/382-armbian-on-pcduino3/?p=2444

http://forum.armbian.com/index.php/topic/993-ds18b20-temperature-sensor-in-lamobo-r1/?p=16089

http://forum.armbian.com/index.php/topic/385-banana-pi-usb-otg/?p=7773

http://forum.armbian.com/index.php/topic/82-spi-on-olinuxino-a20-micro-with-device-tree-kernel/?p=827

 

 

P.S. 2

-> http://free-electrons.com/pub/conferences/2012/elce/arm-soc-checklist/arm-soc-checklist.pdf

-> https://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf

-> The purpose of the Device Tree is to move a significant part
of the hardware description into a data structure that is no
longer part of the kernel binary itself.
-> This data structure, the Device Tree Source is compiled into
a binary Device Tree Blob
-> The Device Tree Blob is loaded into memory by the
bootloader, and passed to the kernel.
-> It replaces all the board-*.c files, and removes all the
manual registration of platform_device. Also, no longer
needed to have Kconfig options for each board.
-> Usage of the Device Tree is mandatory for all new ARM
SoCs. No way around it.

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