Tag Archive

Below you'll find a list of all posts that have been tagged as "busybox"
blogImage

How to build a super simple Linux Based Embedded System Using Buildroot

What’s an embedded system?An embedded system, in simple language, is designed for a specific requirement. It has its own operating software (or operating system), which is designed or specified by you. The coffee machine and the ID card reader at our office are examples of small embedded systems, but there are bigger ones.Have you ever thought of building an embedded system with your choice of hardware and OS modifications and software above it? Believe me; it’s not at all as arduous as it sounds. You need a little knowledge of C, Makefiles (compilation process), shell scripting, and a Linux based workstation, before you start. The process involves an open-source tool called Buildroot. You can download the latest version of Buildroot from www.buildroot.org. Consider you need a system with Linux OS running on an ARM processor with serial, Ethernet, Wi-Fi, and USB modules loaded on it. You can get these pieces of hardware assembled from a hardware vendor or an electronics shop, if you ask for evaluation boards.[Fig: Evaluation board, Lantronix]The term “embedded” is used to indicate memory size restrictions, as it will be expensive to put a lot of memory into a small device. This creates hardware constraints in embedded systems.What about the software or operating system to run on this? Let’s have a look into this in the next section.BuildrootThe executables or software you develop on your PC will usually be only for its own hardware configuration (i.e., x86-based), but our target device is different in this case (i.e., ARM). If you have only one file, we can compile it with hardware specific flags in gcc, but what if we have thousands of files? How to build all the files for a different hardware configuration? Here comes Buildroot into picture.Buildroot is a cross-compilation environment. It provides all the options to compile and build software for specified target hardware. Basically, it’s a cross-compilation platform to generate an image according to the required architecture.Buildroot ConfigurationAs I mentioned earlier, you may download Buildroot and untar it. In Command Prompt, change the directory to the untared folder and issue “make menuconfig”. (You may be asked to install a few GNU-based packages on your host system to support the GUI of Buildroot; install them.)Here it goes; you can see a graphical interface as below.[Fig: Buildroot Main Screen/ Menuconfig]Go through the options, select target hardware or processor in “Target Options” menu. A snippet to select ARM processor is shown below.[Fig: Target Selection]Linux ConfigurationOne of the most important things to remember is the target hardware is different from our host. So, the same Linux OS running on your PC won’t run on the target hardware. We have to specify the Linux kernel as shown below.[Fig: Linux Selection]Once the kernel is downloaded and untared to a directory, you can change to that directory and issue the command “make linux-menuconfig”, to build the Linux OS and select the configuration options. Usually, you can specify the path to save the configuration.Now the “make” from the top directory (i.e., Buildroot) will give you the compiled Linux kernel, which gives you a kernel image in uImage format or one of your choice. Final Linux binary comes around 2MB of size.Busybox configurationOK, we got the kernel now, but have you wondered how Linux commands will be included to the target device? Who will put them into the device? The commands like “ls”, “ifconfig” etc., come with Busybox, which is a software package that provides lite Unix commands. Like Linux, we have to download and configure Busybox. You can change into Busybox directory and configure the stuff needed. Remember, this is an embedded device, and every “bit” matters. So you cannot have all the commands installed over it.Package selectionAs I mentioned repeatedly, because of memory constraints, Busybox selects lightweight commands only—low memory size. They can provide basic functionalities. You may also require a few advanced commands, such as “tar”. The Busybox version doesn’t support “-z” option, but a full version supports that. So you have to select the full target package, not the one which comes with Busybox.Think something like a dhcpv6 server on your target device, but it doesn’t come with Busybox by default, as it’s not a basic requirement. That command may be incorporated on the device by including it on the “Package Selection” menu. You can select “wide-dhcpv6” package under Networking Application to achieve this.Like this, you can go through the entire menu and get whichever package you need for your target.Target selectionYou can select the folder structure on your target device, like /bin, /tmp/, /usr, etc.Final ImageA “make” from the top directory will build the kernel image and root file system image for you.You can get the images at the “topdir/output/build/images” path. Then, you can transfer or load images by following the process mentioned below (or the evaluation board manual). Use conventional method like “tftp” to flash images into the device.Alternatively, use serial download to load the images to the device.If the board is fresh without any loaded binaries, you can use a “flash programmer”, which loads the binary at starting location of the flash.Sounds easy, right? I am here to read your reviews and comments. Please feel free, also, to voice your doubts.

Aziro Marketing

EXPLORE ALL TAGS
2019 dockercon
Advanced analytics
Agentic AI
agile
AI
AI ML
AIOps
Amazon Aws
Amazon EC2
Analytics
Analytics tools
AndroidThings
Anomaly Detection
Anomaly monitor
Ansible Test Automation
apache
apache8
Apache Spark RDD
app containerization
application containerization
applications
Application Security
application testing
artificial intelligence
asynchronous replication
automate
automation
automation testing
Autonomous Storage
AWS Lambda
Aziro
Aziro Technologies
big data
Big Data Analytics
big data pipeline
Big Data QA
Big Data Tester
Big Data Testing
bitcoin
blockchain
blog
bluetooth
buildroot
business intelligence
busybox
chef
ci/cd
CI/CD security
cloud
Cloud Analytics
cloud computing
Cloud Cost Optimization
cloud devops
Cloud Infrastructure
Cloud Interoperability
Cloud Native Solution
Cloud Security
cloudstack
cloud storage
Cloud Storage Data
Cloud Storage Security
Codeless Automation
Cognitive analytics
Configuration Management
connected homes
container
Containers
container world 2019
container world conference
continuous-delivery
continuous deployment
continuous integration
Coronavirus
Covid-19
cryptocurrency
cyber security
data-analytics
data backup and recovery
datacenter
data protection
data replication
data-security
data-storage
deep learning
demo
Descriptive analytics
Descriptive analytics tools
development
devops
devops agile
devops automation
DEVOPS CERTIFICATION
devops monitoring
DevOps QA
DevOps Security
DevOps testing
DevSecOps
Digital Transformation
disaster recovery
DMA
docker
dockercon
dockercon 2019
dockercon 2019 san francisco
dockercon usa 2019
docker swarm
DRaaS
edge computing
Embedded AI
embedded-systems
end-to-end-test-automation
FaaS
finance
fintech
FIrebase
flash memory
flash memory summit
FMS2017
GDPR faqs
Glass-Box AI
golang
GraphQL
graphql vs rest
gui testing
habitat
hadoop
hardware-providers
healthcare
Heartfullness
High Performance Computing
Holistic Life
HPC
Hybrid-Cloud
hyper-converged
hyper-v
IaaS
IaaS Security
icinga
icinga for monitoring
Image Recognition 2024
infographic
InSpec
internet-of-things
investing
iot
iot application
iot testing
java 8 streams
javascript
jenkins
KubeCon
kubernetes
kubernetesday
kubernetesday bangalore
libstorage
linux
litecoin
log analytics
Log mining
Low-Code
Low-Code No-Code Platforms
Loyalty
machine-learning
Meditation
Microservices
migration
Mindfulness
ML
mobile-application-testing
mobile-automation-testing
monitoring tools
Mutli-Cloud
network
network file storage
new features
NFS
NVMe
NVMEof
NVMes
Online Education
opensource
openstack
opscode-2
OSS
others
Paas
PDLC
Positivty
predictive analytics
Predictive analytics tools
prescriptive analysis
private-cloud
product sustenance
programming language
public cloud
qa
qa automation
quality-assurance
Rapid Application Development
raspberry pi
RDMA
real time analytics
realtime analytics platforms
Real-time data analytics
Recovery
Recovery as a service
recovery as service
rsa
rsa 2019
rsa 2019 san francisco
rsac 2018
rsa conference
rsa conference 2019
rsa usa 2019
SaaS Security
san francisco
SDC India 2019
SDDC
security
Security Monitoring
Selenium Test Automation
selenium testng
serverless
Serverless Computing
Site Reliability Engineering
smart homes
smart mirror
SNIA
snia india 2019
SNIA SDC 2019
SNIA SDC INDIA
SNIA SDC USA
software
software defined storage
software-testing
software testing trends
software testing trends 2019
SRE
STaaS
storage
storage events
storage replication
Storage Trends 2018
storage virtualization
support
Synchronous Replication
technology
tech support
test-automation
Testing
testing automation tools
thought leadership articles
trends
tutorials
ui automation testing
ui testing
ui testing automation
vCenter Operations Manager
vCOPS
virtualization
VMware
vmworld
VMworld 2019
vmworld 2019 san francisco
VMworld 2019 US
vROM
Web Automation Testing
web test automation
WFH

LET'S ENGINEER

Your Next Product Breakthrough

Book a Free 30-minute Meeting with our technology experts.

Aziro has been a true engineering partner in our digital transformation journey. Their AI-native approach and deep technical expertise helped us modernize our infrastructure and accelerate product delivery without compromising quality. The collaboration has been seamless, efficient, and outcome-driven.

Customer Placeholder
CTO

Fortune 500 company