Last active
July 19, 2022 11:46
-
-
Save KunYi/a0bda7e40b82096b6cb47fd7529d4243 to your computer and use it in GitHub Desktop.
setup Yocto/NXP i.MX8 build environment on Ubuntu 18.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prepare common tools | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install git gitk build-essential vim curl wget software-properties-common apt-transport-https ca-certificates | |
# add visual studio code repository | |
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | |
# add docker repository | |
sudo apt remove docker docker-engine docker.io | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
# install visual studio code & docker-ce | |
sudo apt update | |
sudo apt install docker-ce code | |
# install build-deps | |
sudo apt install binfmt-support qemu qemu-user-static debootstrap debianutils kpartx gpart lvm2 \ | |
dosfstools binutils gawk git-core diffstat unzip texinfo chrpath socat autoconf automake xterm \ | |
sed cvs subversion coreutils texi2html bc docbook-utils help2man make gcc g++ gcc-multilib \ | |
desktop-file-utils libtool libglib2.0-dev libarchive-dev lib32ncurses5-dev libsdl1.2-dev \ | |
libegl1-mesa libgl1-mesa-dev libglu1-mesa-dev mercurial groff asciidoc u-boot-tools mtd-utils \ | |
device-tree-compiler ccrypt xz-utils cpio iputils-ping python python-git python-m2crypto \ | |
python-pysqlite2 python3 python3-pip python3-pexpect python3-git python3-jinja2 \ | |
bison flex libssl-dev kmod fakeroot lzop | |
# setting git configuration | |
git config --global user.email "<your mail>" | |
git config --global user.name "<your name>" | |
# install repo | |
mkdir -p ~/bin | |
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo | |
chmod a+x ~/bin/repo | |
PATH=${PATH}:~/bin | |
# clone default NXP BSP | |
mkdir -p ~/imx8m | |
cd ~/imx8m | |
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-sumo -m imx-4.14.98-2.2.0.xml | |
# alpha/beta bsp | |
# repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-warrior -m imx-4.19.35-1.1.0.xml | |
repo sync -j10 | |
# for customization | |
# mkdir -p ~/imx8m/src | |
# cd ~/imx8m/src | |
# pull linux kernel source code | |
# git clone git clone git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https | |
# cd linux-imx | |
# git checkout imx_4.14.98_2.2.0 | |
# cd .. | |
# pull u-boot 2018.03 source code | |
# git clone git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https | |
# cd uboot-imx | |
# git checkout imx_v2018.03_4.14.98_2.2.0 | |
# cd ~/imx8m | |
# setup yocto env, imx8m only support wayland backend | |
MACHINE=imx8mmevk DISTRO=fsl-imx-xwayland source ./fsl-setup-release.sh -b fsl-xwayland | |
# build first image and toolchain | |
bitbake fsl-image-multimedia-full | |
# core-image-minimal | |
# meta-toolchain | |
# adt-installer | |
# meta-ide-support |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment