x86 Yocto BSP Quick Start Guide

Revision as of 04:26, 3 August 2021 by Winston.huang (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Host Machine

It is recommended to use Ubuntu 18.04 LTS (Bionic Beaver) or Ubuntu 20.04 LTS (Focal Fosa) as host system, and CPU is Intel i5 degree or higher, memory size ≥ 16GB, free disk space ≥ 500GB.

Install docker

$ sudo apt update
$ sudo apt install docker.io
$ systemctl status docker ## check if docker serivce is active
$ sudo usermod -aG docker $USER
$ sudo reboot
$ docker version ## check docker version
Please refer to Docker Installation Guide for details

Install pre-built docker image

Please refer to this page to get pre-built docker image tarball(password is ProvidedByAdvantech).

Then do the following command.(Remember to replace the ${DATE} with the exact date code)

$ docker load --input adv-x86-yocto-docker-image_${DATE}.tar.gz

Unpack Yocto BSP

You should replace the following ${BSP_TARBALL} with the exact tarball name.

$ tar xvf ${BSP_TARBALL} -C ~/

Put Download Files (optional)

Please refer to this page to get downloads tarball(password is ProvidedByAdvantech).

Then do the following command to restore downloads to the specific directory.(Remember to replace the ${DATE} with the exact date code)

$ tar xvf adv-x86-yocto-downloads_${DATE}.tar -C ~/adv-x86-yocto/build/downloads

Build Yocto Image

Start docker container

$ cd ~/adv-x86-yocto
$ ./scripts/docker_run.sh

Start building yocto image

$ cd yocto-bsp
$ source ./source/oe-init-build-env ## the directory will be changed to build
$ bitbake -k core-image-minimal-xfce
If you encounter the "bitbake failed" problem, please refer to FAQ to pick one solution.

Stop docker container

$ exit ## or logout

You can get the iso images from the directory, ~/adv-x86-yocto/build/tmp/deploy/images/intel-corei7-64/.


Create Bootable Device

on Ubuntu

Be carefully to replace the /dev/sdX with the real drive device on host Ubuntu.
$ sudo dd if=core-image-minimal-xfce-advantech-x86.iso /dev/sdX bs=1M conv=fsync status=progress

on Windows

First put the iso image to windows computer.
  1. Plug USB drive to your computer.
  2. Download Rufus from https://rufus.ie/en/.
  3. Install/Extract Rufus then execute it.
  4. Select USB drive which you plug.
    01 rufus startup.png
  5. Click “SELECT” to select the iso which you want to create bootable USB drive from this ISO then click “START”.
    02 rufus drive and iso.png
  6. If system show needs to download Syslinux 6.04/pre2, click “Yes” to download.
  7. Select “Write in DD Image mode”, click “OK”.
    04 rufus ddimage mode.png
  8. Click “OK”.
    05 rufus ok to write.png
  9. While the bootable USB Drive created, it will show “READY”, click “CLOSE” to close Rufus.
    06 rufus ready.png

Install to Target Device

This section is only applicable to the bootable device created from the iso image.

  1. Plug bootable USB drive to this system then boot from USB drive.
  2. Select “Graphics console install”(Legacy)/”Install”(UEFI).
    07 legacy boot.png
    08 efi boot.png
  3. Input the disk which you want to install(EX: sda) then press enter.
    09 select target.png
  4. While system shows “Installation successful”, remove USB dirve then press Enter to reboot.
    10 remove media.png
  5. After reboot, system boot into Yocto.
    11 xfce4 desktop.png