Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gmacario/e888be5a2b3246f66c35ff7cdb0d2f6d to your computer and use it in GitHub Desktop.
Save gmacario/e888be5a2b3246f66c35ff7cdb0d2f6d to your computer and use it in GitHub Desktop.

Torino Hacknight: Embedded con Buildroot, 2018-02-15

Speaker: Alexjan Carraturo

Plug: http://www.ledizioni.it/prodotto/a-carraturo-a-trentini-sistemi-embedded-teoria-pratica/ (disponibile anche con licenza Creative Commons, Google for it)

TODO

Preparation

Ciao,

durante la serata useremo Buildroot per costruire una immagine per un sistema embedded. Buildroot gira esclusivamente su Linux ed ha le seguenti dipendenze https://buildroot.org/downloads/manual/manual.html#requirement che vi invitiamo ad installare prima della serata. Se usate un altro sistema operativo installate Vagrant e tramite queste istruzioni https://buildroot.org/downloads/manual/manual.html#getting-buildroot arrivate con la macchina virtuale pronta.

Se avete una scheda embedded per cui volete costruire l'immagine portatela che magari riusciamo a provarla :)

A giovedì

(2018-02-14 12:22 CET)

Logged as gpmacario@hw2457, start a PowerShell and type

(new-object System.Net.WebClient).DownloadFile(
"https://buildroot.org/downloads/Vagrantfile","Vagrantfile");
vagrant up

Result: Vagrant crashed

WORKAROUND: Start Oracle VM VirtualBox, create a new VM, then boot the VM and from the shell

cd /media/gpmacario/VBox_GAs_5.2.6/
sudo ./VBoxLinuxAdditions.run 
sudo reboot
sudo sed -i 's|deb http://us.archive.ubuntu.com/ubuntu/|deb mirror://mirrors.ubuntu.com/mirrors.txt|g' /etc/apt/sources.list
sudo dpkg --add-architecture i386
sudo apt-get -q update
sudo apt-get purge -q -y snapd lxcfs lxd ubuntu-core-launcher snap-confine
sudo apt-get -q -y install build-essential libncurses5-dev git bzr cvs mercurial subversion libc6:i386 unzip bc
sudo apt-get -q -y autoremove
sudo apt-get -q -y clean
sudo update-locale LC_ALL=C
Downloads/
wget -q -c http://buildroot.org/downloads/buildroot-2017.11.tar.gz
cd
tar axf Downloads/buildroot-2017.11.2.tar.gz 
ls -la buildroot-2017.11.2/

Configure

cd ${HOME}/buildroot-2017.11.2/
make menuconfig

Look into

  • board/
  • configs/
make qemu_arm_versatile_defconfig
make menuconfig

After clicking "Exit" the configuration will be saved as .config.

make help
make source
make all

TODO

See also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment