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