Skip to content

Yocto meta-layer for LicheePi Zero module

License

Notifications You must be signed in to change notification settings

mahdi2001h/meta-sinux

 
 

Repository files navigation

meta-sinux

Instruction how to build an image for Sinux V3 in Yocto

Products:


sinux v3

General Note:

Assumed that Linux Ubuntu is installed

List of tested elements

WiFi
Ethernet
Lcd
Touchscreen
Led
Backlight for Lcd
Microphone
Headphone

List of not tested elements

Bluetooth - appears during system boot up

How to build an images

  1. First make sure to following packages are installed in system
sudo apt-get install gawk wget git-core diffstat unzip texinfogcc-multilib build-essential chrpath socat libsdl1.2-dev xtermlibmpc-dev libgmp3-dev
  1. Download necessary Yocto packaged listed below. Be sure to be in root of home folder.
mkdir yocto
cd yocto
mkdir build 
git clone git://git.yoctoproject.org/poky --depth 1 -b dunfell
cd poky
git clone git://git.openembedded.org/meta-openembedded --depth 1 -b dunfell
git clone https://github.com/meta-qt5/meta-qt5.git --depth 1 -b dunfell
git clone https://github.com/mahdi2001h/meta-sinux --depth 1 -b dunfell
  1. Select directory to build Linux
source oe-init-build-env ~/yocto/build/sinux_v3
  1. Modify bblayers.conf (located in ~/yocto/build/sinux_v3/conf/)
BBLAYERS ?= " \
  ${HOME}/yocto/poky/meta \
  ${HOME}/yocto/poky/meta-poky \
  ${HOME}/yocto/poky/meta-openembedded/meta-oe \
  ${HOME}/yocto/poky/meta-openembedded/meta-networking \
  ${HOME}/yocto/poky/meta-openembedded/meta-python \
  ${HOME}/yocto/poky/meta-qt5 \
  ${HOME}/yocto/poky/meta-sinux \
  "

Note: Please adapt PATH of conf/bblayers.conf if necessary.

  1. Modify local.conf (located in ~/yocto/build/sinux_v3/conf) file

    • modify line with "MACHINE ??" to add "sinux_v3"

    • align DL_DIR = "${HOME}/yocto/downloads"

    • align SSTATE_DIR = "${HOME}/yocto/sstate-cache"

    • align TMPDIR = "${HOME}/yocto/tmp"

    • add at the end following records
      RM_OLD_IMAGE = "1"
      INHERIT += "rm_work"

Note: Please adapt rest of conf/local.conf parameters if necessary.

  1. Build objects
#console image
bitbake console-image

#qt5 image
bitbake qt5-image

#qt5 toolchain sdk
bitbake meta-toolchain-qt5
  1. After compilation images appears in

    ~/yocto/tmp/deploy/images/sinux_v3

  2. Insert SD CARD into dedicated CARD slot and issue following command to write an image

    Note:
    Be 100% sure to provide a valid device name (of=/dev/sde). Wrong name "/dev/sde" dameage Your system file !

      sudo dd if=~/yocto/tmp/deploy/images/sinux_v3/qt5-image-sinux_v3.sunxi-sdimg    of=/dev/sde bs=1024

Audio

audio commands

#To play mp3 or ogg files type
mpv ogg-file-name.ogg
mpv mp3-file-name.mp3
cvlc mp3-file-name.mp3

#To change volume
amixer set Headphone 10%+
amixer set Headphone 10%-
#or just
amixer set Headphone 10%

#Amixer available options
amixer scontrols

#Microphone on
amixer -c 0 cset numid=12 2

#Record some voice from microphone
arecord -D hw:0,0 -d 3 -f S16_LE -r 16000 tmp.wav

#To get sound device info
ls /dev/snd

Limitation

  • sunxi_mali is probably not working
  • rootfs-resize not working (SD CARD size can be resized manualy)
  • no wiringpi or similar library to driver GPIO in C code
  • discover problem when WiFi connected to access point (probably somedrivers issues), nevertheless WiFi works

About

Yocto meta-layer for LicheePi Zero module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • BitBake 59.3%
  • C++ 20.0%
  • Shell 9.4%
  • NASL 5.8%
  • PHP 3.9%
  • Batchfile 1.0%
  • Assembly 0.6%