Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
litesom:customization [2017/02/05 17:37] filug |
litesom:customization [2017/04/30 07:49] (current) filug [Project configuration] |
===== Project description ===== | ===== Project description ===== |
| |
This project will allow you to build complete firmware image for [[liteSOM:liteboard]] and [[evm:lcd]] with resistive touchscreen. | This project will allow you to build complete firmware image for [[liteSOM:liteboard]] and [[litesom:modulelcd|LCD display extension]] with resistive touchscreen. |
| |
Main intention is to keep all customizations outside Buildroot project but still allow user to configure [[https://www.kernel.org|kernel]], [[https://www.busybox.net|BusyBox]] and [[https://buildroot.org|Buildroot]] or to modify [[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/devicetree/usage-model.txt|Device Tree]] without any problems. | Main intention is to keep all customizations outside Buildroot project but still allow user to configure [[https://www.kernel.org|kernel]], [[https://www.busybox.net|BusyBox]] and [[https://buildroot.org|Buildroot]] or to modify [[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/devicetree/usage-model.txt|Device Tree]] without any problems. |
===== Project configuration ===== | ===== Project configuration ===== |
| |
To configure Buildroot for [[:liteSOM]] + [[evm:lcd]] please use ''grinn_liteboard_lcd_res_defconfig'' configuration. | To configure Buildroot for [[:liteSOM]] with [[litesom:modulelcd|LCD sandwich]] please use ''grinn_liteboard_lcd_res_defconfig'' configuration template. |
| |
<code> | <code> |
</code> | </code> |
| |
<accordion> | ====== More details about this customization ====== |
<panel title="More details about this customization"> | |
| |
===== Buildroot configuration ===== | ===== Buildroot configuration ===== |
</code> | </code> |
| |
Complete configuration for [[https://buildroot.org|Buildroot]] is available in ''configs/grinn_liteboard_lcd_res_defconfig'' file. | Complete configuration for [[https://buildroot.org|Buildroot]] is available in [[https://github.com/grinn-pub/examples/blob/master/configs/grinn_liteboard_lcd_res_defconfig|grinn_liteboard_lcd_res_defconfig]] file. |
| |
===== Device tree ===== | ===== Device tree ===== |
| |
| <code> |
<pre> | |
. | . |
├── board | ├── board |
│ ├── imx6ul-liteboard-lcd-res.dts | │ ├── imx6ul-liteboard-lcd-res.dts |
│ ├── post-build.sh | │ ├── post-build.sh |
</pre> | </code> |
| |
Buildroot configuration for ''liteboard'' doesn't contain any configuration for LCD nor touchscreen therefore this demo will use customized device tree file ([https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/imx6ul-liteboard-lcd-res.dts imx6ul-liteboard-lcd-res.dts]). | [[https://buildroot.org|Buildroot]] configuration for ''liteboard'' doesn't contain any configuration for //LCD panel// nor //touchscreen// therefore this demo is using customized device tree file ([[https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/imx6ul-liteboard-lcd-res.dts|imx6ul-liteboard-lcd-res.dts]]). |
| |
During kernel compilation this file will be compiled and output will be stored as <code>imx6ul-liteboard-lcd-res.dtb</code>. You can find this file inside <code>output/images</code> directory. | During kernel compilation this file will be compiled and output will be stored as ''imx6ul-liteboard-lcd-res.dtb''. You can find this file inside ''output/images'' directory. |
| |
Unfortunately on the target during boot procedure U-Boot will try to load <code>imx6ul-liteboard.dtb</code> file which will be not available on uSD card. Therefore every build Buildroot via <code>post-build.sh</code> script will adjust name of the ''Device Tree Blob'' file to the expected by the U-Boot. | Unfortunately on the target during boot procedure [[http://www.denx.de/wiki/U-Boot|U-Boot]] will try to load ''imx6ul-liteboard.dtb'' file which will be not available on //SD card//. Therefore every build [[https://buildroot.org|Buildroot]] via [[https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/post-build.sh|post-build.sh]] script will adjust name of the ''Device Tree Blob'' file to the expected by the [[http://www.denx.de/wiki/U-Boot|U-Boot]]. |
| |
== Kernel configuration == | ===== Kernel configuration ===== |
| |
<pre> | <code> |
. | . |
├── board | ├── board |
│ └── liteboard-lcd-res | │ └── liteboard-lcd-res |
│ ├── linux.defconfig | │ ├── linux.defconfig |
</pre> | </code> |
| |
Customized Linux configuration is stored in <code>linux.defconfig</code> file. It will be used by the Buildroot to initialize proper kernel configuration. | Customized [[https://kernel.org|Linux]] configuration is stored in [[https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/linux.defconfig|linux.defconfig]] file. It will be used by the [[https://buildroot.org|Buildroot]] to initialize proper kernel configuration. |
| |
== Extra files == | ===== Extra files ===== |
| |
<pre> | <code> |
. | . |
├── board | ├── board |
│ └── rules.d | │ └── rules.d |
│ └── 60-touchscreen.rules | │ └── 60-touchscreen.rules |
</pre> | </code> |
| |
To simplify/unify board setup two config files should be available on running liteboard: | To simplify/unify board setup two config files should be available on running liteboard: |
| |
* [https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/rootfs/etc/profile.d/tslib.sh /etc/profile.d/tslib.h] - to configure device for [https://github.com/kergoth/tslib tslib] library, | * [[https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/rootfs/etc/profile.d/tslib.sh|/etc/profile.d/tslib.sh]] - to configure device for [[https://github.com/kergoth/tslib|tslib]] library, |
* [https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/rootfs/etc/udev/rules.d/60-touchscreen.rules /etc/rules.d/60-touchscreen.rules] - to guarantee permanent name for the touchscreen device. | * [[https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/rootfs/etc/udev/rules.d/60-touchscreen.rules|/etc/rules.d/60-touchscreen.rules]] - to guarantee permanent name for the touchscreen device. |
| |
Each time when <code>make all</code> command will be called Buildroot will automatically copy <code>rootfs</code> directory content to the target <code>root</code> directory used in the next step to generate image for the liteboard.More details about this customization | |
| |
== Buildroot configuration == | |
| |
<pre> | |
. | |
├── configs | |
│ └── grinn_liteboard_lcd_res_defconfig | |
</pre> | |
| |
Complete configuration for buildroot is available in <code>configs/grinn_liteboard_lcd_res_defconfig</code> file. | |
Each time when <code>make grinn_liteboard_lcd_res_defconfig</code> is called Buildroot is configured as defined within this file. | |
| |
== Device tree == | |
| |
<pre> | |
. | |
├── board | |
│ └── grinn | |
│ └── liteboard-lcd-res | |
│ ├── imx6ul-liteboard-lcd-res.dts | |
│ ├── post-build.sh | |
</pre> | |
| |
Buildroot configuration for ''liteboard'' doesn't contain any configuration for LCD nor touchscreen therefore this demo will use customized device tree file ([https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/imx6ul-liteboard-lcd-res.dts imx6ul-liteboard-lcd-res.dts]). | |
| |
During kernel compilation this file will be compiled and output will be stored as <code>imx6ul-liteboard-lcd-res.dtb</code>. You can find this file inside <code>output/images</code> directory. | |
| |
Unfortunately on the target during boot procedure U-Boot will try to load <code>imx6ul-liteboard.dtb</code> file which will be not available on uSD card. Therefore every build Buildroot via <code>post-build.sh</code> script will adjust name of the ''Device Tree Blob'' file to the expected by the U-Boot. | |
| |
== Kernel configuration == | |
| |
<pre> | |
. | |
├── board | |
│ └── grinn | |
│ └── liteboard-lcd-res | |
│ ├── linux.defconfig | |
</pre> | |
| |
Customized Linux configuration is stored in <code>linux.defconfig</code> file. It will be used by the Buildroot to initialize proper kernel configuration. | |
| |
== Extra files == | |
| |
<pre> | |
. | |
├── board | |
│ └── grinn | |
│ └── liteboard-lcd-res | |
│ └── rootfs | |
│ └── etc | |
│ ├── profile.d | |
│ │ └── tslib.sh | |
│ └── udev | |
│ └── rules.d | |
│ └── 60-touchscreen.rules | |
</pre> | |
| |
To simplify/unify board setup two config files should be available on running liteboard: | |
| |
* [https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/rootfs/etc/profile.d/tslib.sh /etc/profile.d/tslib.h] - to configure device for [https://github.com/kergoth/tslib tslib] library, | |
* [https://github.com/grinn-pub/examples/blob/master/board/grinn/liteboard-lcd-res/rootfs/etc/udev/rules.d/60-touchscreen.rules /etc/rules.d/60-touchscreen.rules] - to guarantee permanent name for the touchscreen device. | |
| |
Each time when <code>make all</code> command will be called Buildroot will automatically copy <code>rootfs</code> directory content to the target <code>root</code> directory used in the next step to generate image for the liteboard. | |
| |
</panel> | Each time when ''make all'' command will be called [[https://buildroot.org|Buildroot]] will automatically copy [[https://github.com/grinn-pub/examples/tree/master/board/grinn/liteboard-lcd-res/rootfs|rootfs]] directory to the ''output/target'' directory used in the next step to generate image for the [[liteSOM:liteboard]]. |
</accordion> | |