DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. Big Data
  4. IoT and Buildroot

IoT and Buildroot

Buildroot can help you configure embedded Linux images for multiple platform. This let's you use IoT's inherent insecurity in your favor to build images.

Christopher Lamb user avatar by
Christopher Lamb
CORE ·
Jan. 02, 17 · Tutorial
Like (2)
Save
Tweet
Share
7.29K Views

Join the DZone community and get the full member experience.

Join For Free

One of the nifty things about the Internet of Things is how spectacularly insecure it is. Let's admit it, it is, and it's not because of things we don't have control over either. Especially today, with Buildroot.

So what is this Buildroot thing, and how can you use it?

Buildroot is a system that helps you configure embedded Linux images for a variety of platforms. It uses make and makefile syntax to configure and build from a group of specified options. You specify these options via a configuration file that you can assemble from a GUI. It's stable, but complicated. That said, it's much less complicated than putting together an embedded Linux image without it.

Internally, the generated image uses busybox and a few other utilities to create a stable, usable system.

So, how to go about using this? First, let's get some preliminaries out of the way. I installed Vagrant with my VMWare Fusion provider, but this caused issues with the Buildroot Vagrantfile configuration. The stock installation, using VirtualBox, works just fine. When I use VirtualBox as the provider, I use this command line:

$ vagrant up --provider virtualbox


As I have VMWare Fusion installed. If you want to use the VMWare Fusion provider, you need to make this change to the VagrantFile:

# config.vm.box = 'ubuntu/trusty64'
  config.vm.box = 'jpease/ubuntu-trusty'


As the ubuntu/trusty64 box only supports the VirtualBox provider. The jpease/ubuntu-trusty box works fine, is 64-bit, and supports the VMWare provider. Personally, this is what I use, but like I said, the VirtualBox version is just fine if you don't have VMWare Fusion (and you don't have the VMWare Fusion provider from Vagrant, which isn't free).

Once you have Vagrant installed and configured, grab the Buildroot Vagrantfile like this:

$ curl -O https://buildroot.org/downloads/Vagrantfile


And start it up and connect to it like so:

$ vagrant up
...
$ vagrant ssh


You should see, in the vagrant user's home directory, the Buildroot installation. At this point, you can CC to the directory and you can start using Buildroot.

Now Buildroot is a pretty interesting program in that the developers leveraged pre-existing technologies in interesting ways. The .config file that you change via the various configuration editors is a makefile defining groups of possible make variables. Move to the Buildroot home directory and take a look at the .config file I mentioned. You'll see what I mean.

Next, fire up either of the command line editors, via either of these commands:

$ menu menuconfig
$ menu nconfig


The first one uses the older menuing system, the second a newer menuing system. They both use curses for the interface. More sophisticated GUIs exist using QT or X as well, but as we're running this in a Vagrant managed VM, I don't use them. Go ahead if you'd like.

As a test, try running the menu nconfig command. You should see this:

Image title

If you do, your installation is looking good! Next, we'll build and run an image using QEMU.

Buildroot IoT

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 10 Easy Steps To Start Using Git and GitHub
  • Introduction to Automation Testing Strategies for Microservices
  • How To Build an Effective CI/CD Pipeline
  • GitLab vs Jenkins: Which Is the Best CI/CD Tool?

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: