This documentation will guide you to build Yocto images for VIM4/3/3L/1S
.
Install essential dependencies. It is recommended to use Ubuntu 20.04/22.04 for compilation, or you can choose to Build in Docker.
sudo apt update && sudo apt install git ssh make gcc libssl-dev \ liblz4-tool expect expect-dev g++ patchelf chrpath gawk texinfo chrpath \ diffstat binfmt-support qemu-user-static live-build bison flex fakeroot \ cmake gcc-multilib g++-multilib unzip device-tree-compiler ncurses-dev \ libgucharmap-2-90-dev bzip2 expat gpgv2 cpp-aarch64-linux-gnu libgmp-dev \ libmpc-dev bc python-is-python3 python2 libstdc++-12-dev xz-utils repo
1. Download the base SDK packages here: khadas_vims_yocto_sdk_base.tar.gz0x
You need to download all 3 compressed files:
You can also download the md5 checksum to verify the downloaded files:
$ md5sum -c md5sum/*
khadas_vims_yocto_sdk_base.tar.gz00: OK
khadas_vims_yocto_sdk_base.tar.gz01: OK
khadas_vims_yocto_sdk_base.tar.gz02: OK
2. Create and enter the working directory:
$ mkdir -p ~/project/vims-yocto-sdk && cd ~/project/vims-yocto-sdk
3. Decompress base SDK:
$ cat path/to/sdk-base-packages/khadas_vims_yocto_sdk_base.tar.gz* | tar -zxv -C ~/project/vims-yocto-sdk
4. Then you can see .repo
derctory in ~/project/vims-yocto-sdk
directory by using ls -la
command.
$ ls -al ~/project/vims-yocto-sdk
total 12
drwxrwxr-x 3 nick nick 4096 Dec 31 14:40 .
drwxrwxr-x 3 nick nick 4096 Dec 31 14:39 ..
drwxrwxr-x 7 nick nick 4096 Dec 30 16:21 .repo
5. Sync and update code:
$ .repo/repo/repo sync -l $ .repo/repo/repo sync -c $ ls aml-comp aml-patches meta-aml-cfg meta-gplv2 meta-meson meta-openembedded meta-python2 meta-qt5 meta-security meta-selinux poky
6. Create a work branch for each repository:
$ .repo/repo/repo start khadas --all
You should setup the compile configuration before compilation.
$ cd <SDK> $ source meta-meson/aml-setenv.sh You're building on Linux Lunch menu...pick a combo: 1. mesong12b-kvim3-k5.15 2. mesongsm1-kvim3l-k5.15 3. mesons4-kvim1s-5.15 4. mesont7c-kvim4-5.15 Which would you like? [2]
mesong12b-kvim3-k5.15
- Configuration for VIM3
mesongsm1-kvim3l-k5.15
- Configuration for VIM3L
mesons4-kvim1s-5.15
- Configuration for VIM1S
mesont7c-kvim4-5.15
- Configuration for VIM4
Build:
$ bitbake amlogic-yocto
The image located in SDK/build/tmp/deploy/images/CONFIGURATION/vimx-yocto-xxxxxx.img
.
The CONFIGURATION should be:
mesong12b-kvim3-k5.15
mesongsm1-kvim3l-k5.15
mesons4-kvim1s-5.15
mesont7c-kvim4-5.15
You can also choose to build the OS image in a Docker container.
Please refer to Docker Documentation.
$ sudo usermod -aG docker $USER
You need to logout or reboot the system to take effect.
Get Docker image:
$ docker pull wesion/yocto-amlogic
Enter Docker:
$ cd ~/project/vims-yocto-sdk $ docker run --rm -it -u $(id -u):$(id -g) -v /opt:/opt -v $(pwd):/home/khadas/yocto wesion/yocto-amlogic bash
Start your build from inside the Docker container.
khadas@0126a0629f9a:~/yocto$ source meta-meson/aml-setenv.sh khadas@0126a0629f9a:~/yocto$ bitbake amlogic-yocto
Please refer to: