Difference between revisions of "X86/Yocto BSP/QSG"
Line 1: | Line 1: | ||
+ | |||
{{DISPLAYTITLE:x86 Yocto BSP Quick Start Guide}} | {{DISPLAYTITLE:x86 Yocto BSP Quick Start Guide}} | ||
− | <div style="float:right; | + | <div style="float:right; position:fixed; margin:0 1em 0 0; top5100px; right:10px; max-height: 350px; overflow: auto">__TOC__</div> |
== <span style="color:#0070c0">Host Machine</span> == | == <span style="color:#0070c0">Host Machine</span> == | ||
Line 12: | Line 13: | ||
$ sudo usermod -aG docker $USER | $ sudo usermod -aG docker $USER | ||
$ sudo reboot | $ sudo reboot | ||
− | </div><div style="margin-left: 1em"> | + | </div> <div style="margin-left: 1em"> |
$ docker version ## check docker version | $ docker version ## check docker version | ||
− | </div> | + | </div> |
− | :Please refer to [https://docs.docker.com/engine/installation/ Docker Installation Guide] for details | + | :Please refer to [https://docs.docker.com/engine/installation/ Docker Installation Guide] for details |
=== Install pre-built docker image === | === Install pre-built docker image === | ||
− | Please refer to [[X86/Yocto_BSP/downloads|this page]] to get '''pre-built docker image''' tarball(password is ProvidedByAdvantech). | + | Please refer to [[X86/Yocto_BSP/downloads|this page]] to get '''pre-built docker image''' tarball(password is '''<span style="background-color:#f1c40f;">ProvidedByAdvantech</span>'''). |
Then do the following command.(Remember to replace the <span style="color:#ff0000">${DATE}</span> with the exact date code) | Then do the following command.(Remember to replace the <span style="color:#ff0000">${DATE}</span> with the exact 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 | ||
− | </div> | + | </div> |
== <span style="color:#0070c0">Unpack Yocto BSP</span> == | == <span style="color:#0070c0">Unpack Yocto BSP</span> == | ||
Line 30: | Line 31: | ||
<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 ~/ | ||
− | </div> | + | </div> |
== <span style="color:#0070c0">Put Download Files (optional)</span> == | == <span style="color:#0070c0">Put Download Files (optional)</span> == | ||
− | Please refer to [[X86/Yocto_BSP/downloads|this page]] to get '''downloads''' tarball(password is ProvidedByAdvantech). | + | Please refer to [[X86/Yocto_BSP/downloads|this page]] to get '''downloads''' tarball(password is '''<span style="background-color:#f1c40f;">ProvidedByAdvantech</span>'''). |
Then do the following command to restore '''downloads''' to the specific directory.(Remember to replace the <span style="color:#ff0000">${DATE}</span> with the exact date code) | Then do the following command to restore '''downloads''' to the specific directory.(Remember to replace the <span style="color:#ff0000">${DATE}</span> with the exact 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 | ||
− | </div> | + | </div> |
== <span style="color:#0070c0">Build Yocto Image</span> == | == <span style="color:#0070c0">Build Yocto Image</span> == | ||
Line 45: | Line 46: | ||
$ cd ~/adv-x86-yocto | $ cd ~/adv-x86-yocto | ||
$ ./scripts/docker_run.sh | $ ./scripts/docker_run.sh | ||
− | </div> | + | </div> |
=== Start building yocto image === | === Start building yocto image === | ||
<div style="margin-left: 1em"> | <div style="margin-left: 1em"> | ||
Line 51: | Line 52: | ||
$ source ./source/oe-init-build-env ## the directory will be changed to build | $ source ./source/oe-init-build-env ## the directory will be changed to build | ||
$ bitbake -k core-image-minimal-xfce | $ bitbake -k core-image-minimal-xfce | ||
− | </div> | + | </div> |
− | :If you encounter the "bitbake failed" problem, please refer to [[X86/Yocto_BSP/FAQ#bitbake_failed|FAQ]] to pick one solution. | + | :If you encounter the "bitbake failed" problem, please refer to [[X86/Yocto_BSP/FAQ#bitbake_failed|FAQ]] to pick one solution. |
=== Stop docker container === | === Stop docker container === | ||
<div style="margin-left: 1em"> | <div style="margin-left: 1em"> | ||
$ exit ## or logout | $ exit ## or logout | ||
− | </div> | + | </div> |
You can get the iso images from the directory, '''~/adv-x86-yocto/build/tmp/deploy/images/intel-corei7-64/'''. | You can get the iso images from the directory, '''~/adv-x86-yocto/build/tmp/deploy/images/intel-corei7-64/'''. | ||
− | :<u>core-image-minimal-xfce-advantech-x86.iso</u> | + | :<u>core-image-minimal-xfce-advantech-x86.iso</u> |
== <span style="color:#0070c0">Create Bootable Device</span> == | == <span style="color:#0070c0">Create Bootable Device</span> == | ||
Line 66: | Line 67: | ||
=== on Ubuntu === | === on Ubuntu === | ||
− | :Be carefully to replace the <span style="color:#ff0000">'''/dev/sdX'''</span> with the '''real drive device''' on host Ubuntu. | + | :Be carefully to replace the <span style="color:#ff0000">'''/dev/sdX'''</span> with the '''real drive device''' on host Ubuntu. |
<div style="margin-left: 1em"> | <div style="margin-left: 1em"> | ||
$ sudo dd if=core-image-minimal-xfce-advantech-x86.iso <span style="color:#ff0000">'''/dev/sdX'''</span> bs=1M conv=fsync status=progress | $ sudo dd if=core-image-minimal-xfce-advantech-x86.iso <span style="color:#ff0000">'''/dev/sdX'''</span> bs=1M conv=fsync status=progress | ||
− | </div> | + | </div> |
=== on Windows === | === on Windows === | ||
− | :First put the iso image to windows computer. | + | :First put the iso image to windows computer. |
− | #Plug USB drive to your computer. | + | #Plug USB drive to your computer. |
− | #Download Rufus from [https://rufus.ie/en/ https://rufus.ie/en/]. | + | #Download Rufus from [https://rufus.ie/en/ https://rufus.ie/en/]. |
− | #Install/Extract Rufus then execute it. | + | #Install/Extract Rufus then execute it. |
− | #Select USB drive which you plug.<br/>[[File:01 rufus startup.png|360x406px|01 rufus startup.png]] | + | #Select USB drive which you plug.<br/> [[File:01 rufus startup.png|360x406px|01 rufus startup.png]] |
− | #Click “SELECT” to select the iso which you want to create bootable USB drive from this ISO then click “START”.<br/>[[File:02 rufus drive and iso.png|721x529px|02 rufus drive and iso.png]] | + | #Click “SELECT” to select the iso which you want to create bootable USB drive from this ISO then click “START”.<br/> [[File:02 rufus drive and iso.png|721x529px|02 rufus drive and iso.png]] |
− | #If system show needs to download Syslinux 6.04/pre2, click “Yes” to download.<br/>[[File:03 rufus syslinux.png|362x435px|RTENOTITLE]] | + | #If system show needs to download Syslinux 6.04/pre2, click “Yes” to download.<br/> [[File:03 rufus syslinux.png|362x435px|RTENOTITLE]] |
− | #Select “Write in DD Image mode”, click “OK”.<br/>[[File:04 rufus ddimage mode.png|408x431px|04 rufus ddimage mode.png]] | + | #Select “Write in DD Image mode”, click “OK”.<br/> [[File:04 rufus ddimage mode.png|408x431px|04 rufus ddimage mode.png]] |
− | #Click “OK”.<br/>[[File:05 rufus ok to write.png|360x439px|05 rufus ok to write.png]] | + | #Click “OK”.<br/> [[File:05 rufus ok to write.png|360x439px|05 rufus ok to write.png]] |
− | #While the bootable USB Drive created, it will show “READY”, click “CLOSE” to close Rufus.<br/>[[File:06 rufus ready.png|360x441px|06 rufus ready.png]] | + | #While the bootable USB Drive created, it will show “READY”, click “CLOSE” to close Rufus.<br/> [[File:06 rufus ready.png|360x441px|06 rufus ready.png]] |
== <span style="color:#0070c0">Install to Target Device</span> == | == <span style="color:#0070c0">Install to Target Device</span> == | ||
Line 88: | Line 89: | ||
This section is only applicable to the bootable device created from the iso image. | This section is only applicable to the bootable device created from the iso image. | ||
− | #Plug bootable USB drive to this system then boot from USB drive. | + | #Plug bootable USB drive to this system then boot from USB drive. |
− | #Select “Graphics console install”(Legacy)/”Install”(UEFI).<br/>'''Legacy'''<br/>[[File:07 legacy boot.png|501x311px|07 legacy boot.png]]<br/>'''UEFI'''<br/>[[File:08 efi boot.png|334x84px|08 efi boot.png]] | + | #Select “Graphics console install”(Legacy)/”Install”(UEFI).<br/> '''Legacy'''<br/> [[File:07 legacy boot.png|501x311px|07 legacy boot.png]]<br/> '''UEFI'''<br/> [[File:08 efi boot.png|334x84px|08 efi boot.png]] |
− | #Input the disk which you want to install(EX: sda) then press enter.<br/>[[File:09 select target.png|539x337px|09 select target.png]] | + | #Input the disk which you want to install(EX: sda) then press enter.<br/> [[File:09 select target.png|539x337px|09 select target.png]] |
− | #While system shows “Installation successful”, remove USB dirve then press Enter to reboot.<br/>[[File:10 remove media.png|540x338px|10 remove media.png]] | + | #While system shows “Installation successful”, remove USB dirve then press Enter to reboot.<br/> [[File:10 remove media.png|540x338px|10 remove media.png]] |
− | #After reboot, system boot into Yocto.<br/>[[File:11 xfce4 desktop.png|800x600px|11 xfce4 desktop.png]] | + | #After reboot, system boot into Yocto.<br/> [[File:11 xfce4 desktop.png|800x600px|11 xfce4 desktop.png]] |
Latest revision as of 01:59, 28 December 2022
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/.
- 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.
- Plug USB drive to your computer.
- Download Rufus from https://rufus.ie/en/.
- Install/Extract Rufus then execute it.
- Select USB drive which you plug.
- Click “SELECT” to select the iso which you want to create bootable USB drive from this ISO then click “START”.
- If system show needs to download Syslinux 6.04/pre2, click “Yes” to download.
- Select “Write in DD Image mode”, click “OK”.
- Click “OK”.
- While the bootable USB Drive created, it will show “READY”, click “CLOSE” to close Rufus.
Install to Target Device
This section is only applicable to the bootable device created from the iso image.
- Plug bootable USB drive to this system then boot from USB drive.
- Select “Graphics console install”(Legacy)/”Install”(UEFI).
Legacy
UEFI
- Input the disk which you want to install(EX: sda) then press enter.
- While system shows “Installation successful”, remove USB dirve then press Enter to reboot.
- After reboot, system boot into Yocto.