|
|
(8 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| <!-- Set release according to "release" parameter in URL and use am62-yocto-dunfell-5.10.140_08.06.00.42-v1.0 as default | | <includeonly>deleteme</includeonly> |
| --> {{INIT_RELEASE_PARAM|am62-yocto-dunfell-5.10.140_08.06.00.42-v1.0}}<!--
| |
| --> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
| |
| --> {{#vardefine:UBUNTU_COMPAT|18.04/20.04/22.04}}<!--
| |
| -->
| |
| = Introduction =
| |
| This guide walks through the process for building Variscite's reference Yocto image from source code. It is derived from TI's guide [https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/{{#var:TI_RELEASE_}}/exports/docs/linux/Overview_Building_the_SDK.html?highlight=bitbake Overview Building the SDK]
| |
| | |
| = Installing required packages =
| |
| | |
| Please make sure your host PC is running Ubuntu {{#var:UBUNTU_COMPAT}} 64-bit and is up to date:
| |
| $ sudo apt-get update && sudo apt-get dist-upgrade
| |
| | |
| Then, install the following packages:
| |
| | |
| $ sudo dpkg --add-architecture i386
| |
| $ sudo apt update && sudo apt install build-essential autoconf \
| |
| automake bison \
| |
| flex libssl-dev bc u-boot-tools \
| |
| python diffstat \
| |
| texinfo gawk chrpath dos2unix \
| |
| wget unzip socat doxygen libc6:i386 \
| |
| libncurses5:i386 libstdc++6:i386 \
| |
| libz1:i386 g++-multilib \
| |
| git python3-distutils python3-apt
| |
| | |
| By default Ubuntu uses “dash” as the default shell for /bin/sh. You must reconfigure to use bash by running the following command:
| |
| | |
| $ sudo dpkg-reconfigure dash
| |
| | |
| Be sure to select “No” when you are asked to use dash as the default system shell.
| |
| | |
| = Install Toolchains to home directory =
| |
| $ cd ~
| |
| $ wget {{#var:armv7_toolchain_url}} && \
| |
| tar -Jxvf {{#var:armv7_toolchain_archive}} -C $HOME && \
| |
| wget {{#var:armv8_toolchain_url}} && \
| |
| tar -Jxvf {{#var:armv8_toolchain_archive}} -C $HOME
| |
| | |
| = Download Yocto {{#var:YOCTO_NAME}} and setup environment =
| |
| | |
| Download the source code:
| |
| | |
| $ mkdir ~/var-ti-yocto && cd ~/var-ti-yocto
| |
| $ git clone {{#var:OE_LAYERSETUP_GIT}} tisdk
| |
| $ cd tisdk
| |
| $ ./oe-layertool-setup.sh -f {{#var:OE_LAYERSETUP_MANIFEST_PATH}}
| |
| | |
| Next, setup the environment. The above commands are only required for the very first build setup: whenever restarting a newer build session (from a different terminal or in a different time), you can skip the full setup and just run:
| |
| | |
| $ cd build
| |
| $ . conf/setenv
| |
| $ export TOOLCHAIN_PATH_ARMV7=$HOME/{{#var:armv7_toolchain}} && \
| |
| export TOOLCHAIN_PATH_ARMV8=$HOME/{{#var:armv8_toolchain}}
| |
| | |
| = Build GUI demo image =
| |
| | |
| $ MACHINE=am62x-var-som bitbake var-default-image
| |
| | |
| = Create a bootable SD card =
| |
| | |
| The wic image fully supports booting from an SD Card. Use the command below to write it to an SD Card:
| |
| | |
| $ xzcat arago-tmp-external-arm-glibc/deploy/images/am62x-var-som/var-default-image-am62x-var-som.wic.xz | sudo dd of=/dev/sdX bs=1M && sync
| |
| {{note|'''NOTE''': The wic image does not support all features booting from eMMC. For example, /etc/fw_env.config is configured for the SD Card (/dev/mmcblk1) |info}}
| |
| | |
| = Create a Recovery SD card =
| |
| | |
| As mentioned above, the wic image only supports booting from an SD card. To flash an image to eMMC, Variscite provides an image '''var-recovery-sd-image''', which inherits '''var-default-image''' and adds the following files needed for installing to eMMC:
| |
| | |
| /usr/bin/install_yocto.sh
| |
| /usr/bin/echos.sh
| |
| /opt/images/Yocto/
| |
| /opt/images/Yocto/boot
| |
| /opt/images/Yocto/boot/u-boot.img
| |
| /opt/images/Yocto/boot/tiboot3.bin
| |
| /opt/images/Yocto/boot/wificfg
| |
| /opt/images/Yocto/boot/tispl.bin
| |
| /opt/images/Yocto/boot/uEnv.txt
| |
| /opt/images/Yocto/rootfs.tar.xz
| |
| | |
| Build the image:
| |
| | |
| $ MACHINE=am62x-var-som bitbake var-recovery-sd-image
| |
| | |
| Write it to an SD Card:
| |
| | |
| $ xzcat arago-tmp-external-arm-glibc/deploy/images/am62x-var-som/var-recovery-sd-image-am62x-var-som.wic.xz | sudo dd of=/dev/sdX bs=1M && sync
| |
| | |
| Note: Some SD card duplicator machines do not support 64-bit filesystems. To build a recovery SD card image with 32-bit filesystems, add '''MKE2FS_NO_64="y"''' to '''conf/local.conf''' and rebuild the image:
| |
| | |
| $ echo 'KE2FS_NO_64="y"' >> conf/local.conf
| |