Difference between revisions of "X86/Yocto BSP/QSG"

From ESS-WIKI
Jump to: navigation, search
Line 19: Line 19:
 
=== Install pre-built docker image ===
 
=== Install pre-built docker image ===
  
Please click [https://www.dropbox.com/sh/jjpstalwnkmh4y7/AABmDfwsatkMSphLnRZ2oZBWa?dl=0 here](password is ProvidedByAdvantech) to download pre-built docker image tarball first, then do the following command.
+
Please refer to [[X86/Yocto_BSP/downloads|this page]] to get pre-built '''docker image''' tarball(password is ProvidedByAdvantech).
 +
 
 +
Then do the following command.(Remember to replace the <span style="color:#ff0000">${DATE}</span> with the actual date code)
  
(Remember to replace the <span style="color:#ff0000">'''${DATE}'''</span> with the actual date code)
 
 
<div style="margin-left: 1em">
 
<div style="margin-left: 1em">
 
  $ docker load --input adv-x86-yocto-docker-image_<span style="color:#ff0000">${DATE}</span>.tar.gz
 
  $ docker load --input adv-x86-yocto-docker-image_<span style="color:#ff0000">${DATE}</span>.tar.gz
Line 27: Line 28:
 
== <span style="color:#0070c0">Unpack Yocto BSP</span> ==
 
== <span style="color:#0070c0">Unpack Yocto BSP</span> ==
  
You should replace the following <span style="color:#ff0000">'''${BSP_TARBALL}'''</span> with the actual tarball name.
+
You should replace the following <span style="color:#ff0000">${BSP_TARBALL}</span> with the actual tarball name.
 
<div style="margin-left: 1em">
 
<div style="margin-left: 1em">
 
  $ tar xvf <span style="color:#ff0000">${BSP_TARBALL}</span> -C ~/
 
  $ tar xvf <span style="color:#ff0000">${BSP_TARBALL}</span> -C ~/
Line 33: Line 34:
 
== <span style="color:#0070c0">Put Download Files (optional)</span> ==
 
== <span style="color:#0070c0">Put Download Files (optional)</span> ==
  
You can get the '''downloads''' tarball <span class="plainlinks">[https://www.dropbox.com/sh/72pih562nftmj3u/AAD7RfMkTr6IMuymNeOjYlPba?dl=0 here]</span>(password is ProvidedByAdvantech).
+
Please refer to [[X86/Yocto_BSP/downloads|this page]] to get '''downloads''' tarball(password is ProvidedByAdvantech).
  
Then do the following command to restore '''downloads''' to the specific directory.
+
Then do the following command to restore '''downloads''' to the specific directory.(Remember to replace the <span style="color:#ff0000">${DATE}</span> with the actual date code)
  
(Remember to replace the <span style="color:#ff0000">'''${DATE}'''</span> with the actual date code)
 
 
<div style="margin-left: 1em">
 
<div style="margin-left: 1em">
 
  $ tar xvf adv-x86-yocto-downloads_<span style="color:#ff0000">${DATE}</span>.tar -C ~/adv-x86-yocto/build/downloads
 
  $ tar xvf adv-x86-yocto-downloads_<span style="color:#ff0000">${DATE}</span>.tar -C ~/adv-x86-yocto/build/downloads

Revision as of 08:57, 28 June 2021

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 actual 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 actual 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 actual 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/.

core-image-minimal-xfce-advantech-x86.iso

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.
    RTENOTITLE
  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).
    Legacy
    07 legacy boot.png
    UEFI
    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