Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleBuild 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
languagebash
themeMidnight
titleInstall 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
languagebash
themeMidnight
titleGet 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
titleNote

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
languagebash
themeMidnight
titleSource Yocto Build environment variables (5 seconds)
source openembedded-core/oe-init-build-env


Code Block
languagebash
themeMidnight
titleLaunch 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
languagebash
themeMidnight
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
titleTip

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
languagebash
themeMidnight
titleLet'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
languagebash
themeMidnight
titleGet 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 (smile)


Expand
titleMion installation on bf2556x-1t
  • Boot bf2556x-1t via ONIE rescue session
  • put you Mion image at the root of a web server 


Code Block
languagebash
themeMidnight
titleKickstart Mion ONIE installation (1 minutes)
onie-nos-install http://<your_web_server>/onie-installer-x86_64-stordis_bf2556x_1t.bin

Once the installation has finished, your system reboot and you'll be rewarded by Mion Grub welcome page:

Tip
titleTip

And in just 1 minute (warning) you have installed a minimalistic OS on your bf2556x-1t. 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.


...