Both sides previous revision
Previous revision
Next revision
|
Previous revision
Next revision
Both sides next revision
|
litesom:customization [2017/02/05 17:28] filug [Project configuration] |
litesom:customization [2017/04/29 17:59] 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]] + [[litesom:modulelcd|LCD sandwich]] please use ''grinn_liteboard_lcd_res_defconfig'' configuration. |
| |
<code> | <code> |
</code> | </code> |
| |
| ====== More details about this customization ====== |
| |
| ===== Buildroot configuration ===== |
| |
| <code> |
| . |
| ├── configs |
| │ └── grinn_liteboard_lcd_res_defconfig |
| </code> |
| |
| 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 ===== |
| |
| <code> |
| . |
| ├── board |
| │ └── grinn |
| │ └── liteboard-lcd-res |
| │ ├── imx6ul-liteboard-lcd-res.dts |
| │ ├── post-build.sh |
| </code> |
| |
| [[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 ''imx6ul-liteboard-lcd-res.dtb''. You can find this file inside ''output/images'' directory. |
| |
| 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 ===== |
| |
| <code> |
| . |
| ├── board |
| │ └── grinn |
| │ └── liteboard-lcd-res |
| │ ├── linux.defconfig |
| </code> |
| |
| 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 ===== |
| |
| <code> |
| . |
| ├── board |
| │ └── grinn |
| │ └── liteboard-lcd-res |
| │ └── rootfs |
| │ └── etc |
| │ ├── profile.d |
| │ │ └── tslib.sh |
| │ └── udev |
| │ └── rules.d |
| │ └── 60-touchscreen.rules |
| </code> |
| |
| 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.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. |
| |
| 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]]. |