...
Expand |
---|
title | Build Mion for APS2556X-1T |
---|
|
Mion docs has an excellent getting started page. In this section we will emphasize how easy it is to build Mion. First, make sure you have a machine compliant to the "Build host" requirements. Install a pristine Debian 10 and you should be go to go ... Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Install Yocto software requirement (5 minutes depending on your Internet connection) |
---|
| sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa \
libsdl1.2-dev pylint3 xterm |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Get Mion softwares (1 minute) |
---|
| git clone --recursive git@github.com:NetworkGradeLinux/mion.git
cd mion
# To obtain related mion layers:
git clone git@github.com:NetworkGradeLinux/meta-mion.git
# Obtain the mion hardware layer
git clone git@github.com:NetworkGradeLinux/meta-mion-bsp.git |
Warning |
---|
| The above steps require you have a GitHub account and uploaded public key to your account. You'll also have to activate ssh-agent as the build script will fetch software from Git using SSH transport. |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Source Yocto Build environment variables (5 seconds) |
---|
| source openembedded-core/oe-init-build-env |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Launch APS bf2556x-1t ONIE build (can be very long if you have a small build host ... It is time to do something else ...) |
---|
| time ../mc_build.sh -m stordis-bf2556x-1t -h host-onie:mion-onie-image-onlpv1 |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | (EDIT) Reward after a long build process ... (~151 minutes on a 4 vCPU VM) |
---|
| Sstate summary: Wanted 1251 Found 0 Missed 1251 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
WARNING: mc:host-onie:expat-native-2.2.9-r0 do_fetch: Failed to fetch URL https://downloads.sourceforge.net/expat/expat-2.2.9.tar.bz2, attempting MIRRORS if available
NOTE: Tasks Summary: Attempted 3161 tasks of which 1 didn't need to be rerun and all succeeded.
Summary: There was 1 WARNING message shown.
real 150m43.758s
user 0m16.407s
sys 0m3.836s |
Tip |
---|
| Even if the build process can be long depending on your build host, build duration can reach 30 minutes with a 32 cores machines. Subsequent builds will take significantly less time as a cache mechanism will avoid to to redo the whole build process. Believe me, you are done ! Just wait the end of the build process and grab the freshly baked image. |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Let's relaunch the build again ... (~27 seconds on a 4 vCPU VM) Thanks sstate cache ! |
---|
| Sstate summary: Wanted 0 Found 0 Missed 0 Current 1251 (0% match, 100% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 3161 tasks of which 3161 didn't need to be rerun and all succeeded.
real 0m27.430s
user 0m1.939s
sys 0m0.585s |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Get the freshly baked Mion image ! |
---|
| p4@mion-build-host:~/mion/build$ cd tmp-glibc/deploy/images/stordis-bf2556x-1t/
p4@mion-build-host:~/mion/build/tmp-glibc/deploy/images/stordis-bf2556x-1t$ ls
bzImage
bzImage--5.4.49+git0+d626f9108d_ec485bd4af-r0-stordis-bf2556x-1t-20201216195930.bin
bzImage-stordis-bf2556x-1t.bin
grub-efi-bootx64.efi
mion-onie-image-onlpv1-stordis-bf2556x-1t-20201216195930.rootfs.ext4
mion-onie-image-onlpv1-stordis-bf2556x-1t-20201216195930.rootfs.manifest
mion-onie-image-onlpv1-stordis-bf2556x-1t-20201216195930.rootfs.tar.bz2
mion-onie-image-onlpv1-stordis-bf2556x-1t-20201216195930.rootfs.tar.xz
mion-onie-image-onlpv1-stordis-bf2556x-1t-20201216195930.rootfs.tar.xz.bmap
mion-onie-image-onlpv1-stordis-bf2556x-1t-20201216195930.testdata.json
mion-onie-image-onlpv1-stordis-bf2556x-1t.ext4
mion-onie-image-onlpv1-stordis-bf2556x-1t.manifest
mion-onie-image-onlpv1-stordis-bf2556x-1t.tar.bz2
mion-onie-image-onlpv1-stordis-bf2556x-1t.tar.xz
mion-onie-image-onlpv1-stordis-bf2556x-1t.tar.xz.bmap
mion-onie-image-onlpv1-stordis-bf2556x-1t.testdata.json
modules--5.4.49+git0+d626f9108d_ec485bd4af-r0-stordis-bf2556x-1t-20201216195930.tgz
modules-stordis-bf2556x-1t.tgz
onie-installer.bin
onie-installer-x86_64-stordis_bf2556x_1t.bin |
Of course get onie-installer-x86_64-stordis_bf2556x_1t.bin image and you are good to go for next section |
Expand |
---|
title | Mion installation on bf2556x-1t |
---|
|
- Boot bf2556x-1t via ONIE rescue session
- put you Mion image at the root of a web server
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Kickstart Mion ONIE installation (1 minutes) |
---|
| onie-nos-install http://<your_web_server>/onie-installer-x86_64-stordis_bf2556x_1t.bin |
After 1 minutes Once the installation has finished, your system reboot and you'll be rewarded by Mion Grub welcome page:
Tip |
---|
| And in just 1 minutes you minute you have installed a minimalistic OS on your bf2556x-11t. In this post we will stop here. However, in order to finalise the installation you'll to install INTEL P4 Software Development Environment as of course you'll want to run your P4 program on the bf2556x-1t. We will cover this subsequent installation in a subsequent post. |
|
...
- how to build Mion
- how to install Mion (process is the same on every ONIE based system: we tested bf2556x-1t, bf6064x wedge100bf-32x, wedge100bf-64x)
Please let us know if you want us to test your P4 platform with the RARE P4 software. We will then add it to the RARE Hardware Compatibility List (RARE HCL) !
(In that case you might have to arrange access to your P4 equipment or better ... Send us a sample ! )
Tip |
---|
|
Mion build is quite straightforward. As it share its root from Yocto, adding specificities related to your project is easy. Most probably a Bitbake recipe already exist and you'll just have to add a reference to the layer of your interest in Bitbake config file. First time build can be long and tedious if you have a small build host machine but subsequent build will be faster thanks to the sstate cache mechanism. Last but not least, we covered only the base OS installation, now that you have a minimal OS required to manage your machine, you need to add specific drivers and software needed to run P4 programs on APS or WEDGE platform. |
...