Fabio Estevam | 6d26c18 | 2017-01-29 18:10:17 -0200 | [diff] [blame] | 1 | ******************************* |
Fabio Estevam | d5935bf | 2017-09-25 08:59:43 -0300 | [diff] [blame] | 2 | Freescale i.MX6 Sabre SD boards |
Fabio Estevam | 6d26c18 | 2017-01-29 18:10:17 -0200 | [diff] [blame] | 3 | ******************************* |
| 4 | |
Fabio Estevam | d5935bf | 2017-09-25 08:59:43 -0300 | [diff] [blame] | 5 | This file documents the Buildroot support for the Freescale i.MX6 Sabre SD |
| 6 | boards based on i.MX6Q, i.MX6DL and iMX6QP. |
| 7 | |
| 8 | Thanks to the SPL support in U-Boot it is possible to run a single |
| 9 | sdcard.img in all i.MX6 Sabre SD board variants. |
Fabio Estevam | 6d26c18 | 2017-01-29 18:10:17 -0200 | [diff] [blame] | 10 | |
| 11 | This configuration uses U-Boot mainline and kernel mainline. |
| 12 | |
| 13 | Build |
| 14 | ===== |
| 15 | |
Fabio Estevam | d5935bf | 2017-09-25 08:59:43 -0300 | [diff] [blame] | 16 | First, configure Buildroot for the i.MX6 Sabre SD board: |
Fabio Estevam | 6d26c18 | 2017-01-29 18:10:17 -0200 | [diff] [blame] | 17 | |
Fabio Estevam | d5935bf | 2017-09-25 08:59:43 -0300 | [diff] [blame] | 18 | make imx6-sabresd_defconfig |
Fabio Estevam | 6d26c18 | 2017-01-29 18:10:17 -0200 | [diff] [blame] | 19 | |
| 20 | Build all components: |
| 21 | |
| 22 | make |
| 23 | |
| 24 | You will find the following files in output/images/ : |
| 25 | - imx6q-sabresd.dtb |
Fabio Estevam | d5935bf | 2017-09-25 08:59:43 -0300 | [diff] [blame] | 26 | - imx6dl-sabresd.dtb |
| 27 | - imx6qp-sabresd.dtb |
Fabio Estevam | 6d26c18 | 2017-01-29 18:10:17 -0200 | [diff] [blame] | 28 | - rootfs.ext4 |
| 29 | - rootfs.tar |
| 30 | - sdcard.img |
| 31 | - u-boot.imx |
| 32 | - zImage |
| 33 | |
| 34 | Create a bootable SD card |
| 35 | ========================= |
| 36 | |
| 37 | To determine the device associated to the SD card have a look in the |
| 38 | /proc/partitions file: |
| 39 | |
| 40 | cat /proc/partitions |
| 41 | |
| 42 | Buildroot prepares a bootable "sdcard.img" image in the output/images/ |
| 43 | directory, ready to be dumped on a SD card. Launch the following |
| 44 | command as root: |
| 45 | |
| 46 | dd if=output/images/sdcard.img of=/dev/<your-sd-device> |
| 47 | |
| 48 | *** WARNING! This will destroy all the card content. Use with care! *** |
| 49 | |
| 50 | For details about the medium image layout, see the definition in |
| 51 | board/freescale/common/imx/genimage.cfg.template. |
| 52 | |
Fabio Estevam | d5935bf | 2017-09-25 08:59:43 -0300 | [diff] [blame] | 53 | Boot the i.MX6 Sabre SD board |
| 54 | ============================= |
Fabio Estevam | 6d26c18 | 2017-01-29 18:10:17 -0200 | [diff] [blame] | 55 | |
| 56 | To boot your newly created system: |
| 57 | - insert the SD card in the SD3 slot of the board (close to the HDMI connector); |
| 58 | - put a micro USB cable into the Debug USB Port and connect using a terminal |
| 59 | emulator at 115200 bps, 8n1; |
| 60 | - power on the board. |
| 61 | |
Fabio Estevam | d5935bf | 2017-09-25 08:59:43 -0300 | [diff] [blame] | 62 | Testing graphics on the i.MX6 Sabre SD board |
| 63 | ============================================ |
Fabio Estevam | a8480e3 | 2017-06-21 17:49:47 -0300 | [diff] [blame] | 64 | |
Fabio Estevam | b15dd57 | 2017-09-25 08:59:46 -0300 | [diff] [blame] | 65 | The imx6-sabresd_qt5_defconfig allows to quickly test the graphics |
Fabio Estevam | a8480e3 | 2017-06-21 17:49:47 -0300 | [diff] [blame] | 66 | capabilities of i.MX6 using the opensource Etnaviv graphics stack |
| 67 | and kernel mainline. |
| 68 | |
| 69 | In order to build it: |
| 70 | |
Fabio Estevam | b15dd57 | 2017-09-25 08:59:46 -0300 | [diff] [blame] | 71 | make imx6-sabresd_qt5_defconfig |
Fabio Estevam | a8480e3 | 2017-06-21 17:49:47 -0300 | [diff] [blame] | 72 | make |
| 73 | |
| 74 | Then flash the SD card as explained above. |
| 75 | |
| 76 | Running kmscube application: |
| 77 | |
Fabio Estevam | e294555 | 2017-09-25 08:59:47 -0300 | [diff] [blame] | 78 | # kmscube |
Fabio Estevam | a8480e3 | 2017-06-21 17:49:47 -0300 | [diff] [blame] | 79 | |
| 80 | Running Qt5 Cinematic Demo: |
| 81 | |
| 82 | # export QT_QPA_EGLFS_KMS_CONFIG=/root/sabresd.json |
Fabio Estevam | d9ccd8f | 2019-10-09 14:00:03 -0300 | [diff] [blame] | 83 | # export QT_QPA_EGLFS_ALWAYS_SET_MODE=1 |
Fabio Estevam | a8480e3 | 2017-06-21 17:49:47 -0300 | [diff] [blame] | 84 | # /usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience |
| 85 | |
Fabio Estevam | fceb817 | 2017-09-25 08:59:48 -0300 | [diff] [blame] | 86 | Running gl2mark benchmark: |
| 87 | |
| 88 | # glmark2-es2-drm |
| 89 | |
Fabio Estevam | 444afad | 2017-10-09 17:43:41 -0300 | [diff] [blame] | 90 | Testing video playback on the i.MX6 Sabre SD board |
| 91 | ================================================== |
| 92 | |
| 93 | As the mx6sabresd has two display outputs (LVDS and HDMI), it is necessary to |
| 94 | know what is the connector that corresponds to the HDMI output. |
| 95 | |
| 96 | This information can be found by running: |
| 97 | |
| 98 | # modetest |
| 99 | |
| 100 | And search for the HDMI connector number. In our case it shows up as 37. |
| 101 | |
| 102 | In the mx6sabresd prompt run the following Gstreamer pipeline: |
| 103 | |
| 104 | # gst-launch-1.0 filesrc location=/root/trailer_1080p_h264_mp3.avi ! avidemux ! \ |
| 105 | h264parse ! v4l2video1dec capture-io-mode=dmabuf ! kmssink connector-id=37 \ |
| 106 | name=imx-drm sync=0 |
| 107 | |
| 108 | (The video used on this example was retrieved from: |
| 109 | http://linode.boundarydevices.com/videos/trailer_1080p_h264_mp3.avi) |
| 110 | |
Fabio Estevam | 6d26c18 | 2017-01-29 18:10:17 -0200 | [diff] [blame] | 111 | Enjoy! |