From Mammoth Lizard, 7 Months ago, written in Text.
Embed
  1. #system build need
  2. sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc- multilib build-
  3. essential chrpath socat libsdl1.2-dev xterm make xsltproc docbook-utils fop dblatex
  4. xmlto autoconf automake libtool libglib2.0-dev python-gtk2 bsdmainutils screen
  5.  
  6. ################################################################################################
  7. #build weston and qt for board
  8. source setup-environment build-monitor
  9. bitbake core-image-weston
  10.  
  11. ################################################################################################
  12. ##from begining
  13. MACHINE=imx6-rexbasic source setup-environment build-imx-wayland
  14. source setup-environment build_dir
  15. BBLAYERS += "${BSPDIR}/sources/meta-monitor"
  16. bitbake monitor-image
  17.  
  18. ################################################################################################
  19. #config file dts test
  20. make ARCH=arm imx_v7_defconfig
  21. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- sapa-soc-mp12.dtb
  22.  
  23. ###################################################
  24. #to remove the previously built version of the same image by adding the following to your conf/local.conf file:
  25. RM_OLD_IMAGE = "1"
  26.  
  27. ###################################################
  28. #You can test run your images on the QEMU emulator by executing this:
  29. runqemu qemuarm core-image-weston
  30.  
  31. ###################################################
  32. #As we want to remove the dependency on X11, I create an append file with the following line:
  33. MACHINE ??= 'sapa-soc'
  34. DISTRO ?= 'poky'
  35. PACKAGE_CLASSES ?= "package_ipk"
  36. EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
  37. IMAGE_FEATURES += "ssh-server-openssh"
  38. EXTRA_IMAGE_FEATURES += "tools-sdk tools-debug"
  39.  
  40. DISTRO_FEATURES_remove = "x11 3g nfc irda ppp directfb ptest nfs smbfs zeroconf"
  41. RM_OLD_IMAGE = "1"
  42. IMAGE_INSTALL_append = " qtbase-plugins \
  43.     qtbase-tools \
  44.     qtdeclarative \
  45.     qtdeclarative-plugins \
  46.     qtdeclarative-tools \
  47.     qtdeclarative-qmlplugins \
  48.     qtquick1 \
  49.     qtquickcontrols \
  50.     qtquickcontrols-qmlplugins \
  51.     qtquickcontrols2 \
  52.     qtquickcontrols2-qmlplugins \
  53.     qtsensors \
  54.     qtimageformats-plugins \
  55.     qtsystems \
  56.     qtsystems-tools \
  57.     qtsystems-qmlplugins \
  58.     qtgraphicaleffects-qmlplugins \
  59.     qtconnectivity-qmlplugins \
  60.     qtwayland \
  61.     arial-fonts \
  62.     openssh-sftp-server \
  63.     psplash"
  64.  
  65.  
  66. ###################################################
  67. #for fast compiling
  68. DL_DIR="/opt/freescale/yocto/imx/download"
  69. SSTATE_DIR="/opt/freescale/yocto/imx/sstate-cache"
  70.  
  71. ###################################################
  72. #for debuging
  73. EXTRA_IMAGE_FEATURES = "tools-sdk tools-debug"
  74.  
  75.  
  76. ###################################################
  77. KERNEL_DEVICETREE += "imx6q-rex-pro.dtb"
  78.  
  79. ###################################################
  80. #bblayer.conf
  81. ${BSPDIR}/sources/meta-qt5 \
  82.  
  83. ###################################################
  84. #bitbake commands
  85.  
  86. bitbake core-image-weston -c populate_sdk //<build sdk tools>
  87. bitbake meta-toolchain-qt5                //for qt5 sdk
  88.  
  89. bitbake -e | grep var                     //<show variable sets during build>
  90. bitbake-layers show-recipes "*-image-*"
  91. bitbake -e | grep -w DISTRO_FEATURES
  92.  
  93. ###################################################
  94. #image related commands
  95. gunzip -c tmp/deploy/images/sapa-soc/monitor-image-sapa-soc.sdcard.gz | sudo dd of=/dev/sdc bs=1M && sync
  96.  
  97. tar xjf fsl-image-qt5-validation-imx-fb-imx6qdlsolo.tar.bz2 -C | sudo dd of=/dev/sdc bs=1M && sync
  98. ###################################################
  99. ###kernel commands
  100. bitbake <component> -c cleanall -f
  101. bitbake u-boot -c deploy
  102. bitbake linux-fslc-imx -c menuconfig
  103. bitbake -c menuconfig virtual/kernel
  104. bitbake -f -c compile virtual/kernel
  105. bitbake -c devshell virtual/kernel
  106.  
  107. ###################################################
  108. #creating new config layer
  109. bitbake-layers add-layer path/to/meta-monitor-bsp
  110. yocto-layer create <layer_name> -o <dest_dir>
  111.  
  112. ################################################################################################
  113. #for executing in wayland-egl
  114. Enabling multibuffering
  115.  
  116. $ export FB_MULTI_BUFFER=2
  117. $ /etc/init.d/weston restart
  118.  
  119. How to start with gal2d compositor:
  120.  
  121. $ /etc/init.d/weston stop
  122. $ weston –tty=1 –use-gl=0 –use-gal2d=1 &
  123.  
  124. Using Multi (extended) display, make sure /dev/fb0 and /dev/fb1 has same color depth:
  125.  
  126. $ /etc/init.d/weston stop
  127. $ weston –tty=1 –use-gl=0 –use-gal2d=1 –device=”dev/fb0,/dev/fb2” &
  128.  
  129. Using QT5, need to build meta-qt5 with qtwayland package. Then run with:
  130.  
  131. $ hellogl_es2 –platform wayland-egl
  132.  
  133. export XDG_RUNTIME_DIR=/var/run/user/root
  134. openvt -s -- weston --backend=fbdev-backend.so --device=/dev/fb1,/dev/fb2 --use-gal2d=0 --use-gl=1  --idle-time=0
  135.  
  136.  
  137.  echo "PROGRESS $progress" > /mnt/.psplash/psplash_fifo
  138.  
  139.  
  140. ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
  141. ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
  142. ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa -b 521
  143. ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ''
  144.  
  145. make ARCH=arm imx6q-rex-pro.dtb
  146. git commit
  147. git diff > mypath.patch
  148. git format-patch -n HEAD^
  149.  
  150.  
  151. //find tools
  152. find / -type f -name "*.conf"
  153.  
  154.  
  155. enable hdmi
  156. echo 0 > /sys/class/graphics/fb2/blank
  157.  
  158.  
  159. repo forall -vc "git reset --hard"
  160.  
  161. cursor blinking
  162. echo 0 > /sys/class/vtconsole/vtcon1/bind
  163.  
  164.  
  165.  # set GPU freq reduction to 3/64
  166. echo 64 > /sys/bus/platform/drivers/galcore/gpu3DMinClock
  167.  
  168. echo 10000 > /proc/sys/fs/inotify/max_user_watches
  169.  
  170.  
  171. disabling loging prompt over splash screen embedded linux
  172. Open the /etc/inittab file on the target filesystem, locate the lines that look like this (some numbers might be different) 1:23:respawn:/sbin/getty 38400 tty1 and disable them, by putting a # character in front of them #1:23:respawn:/sbin/getty 38400 tty1
  173.