An Introduction to Embedded Linux Development, Part 2
In Part 1 of this series, we indicated that we would use, as our SBC, the LBox with uClinux from Engineering Technologies Canada Ltd.. Recall that it features the Motorola Coldfire MCF5272 processor, Flash memory, a serial port, a fiber port and up to three 10/100 Ethernet ports. It's ready to go without needing to be built into something else--simply power it up with any suitable power supply in the 5-12 volt range. Although we are using a specific SBC for this project, the activities we undertake here correspond to similar activities on any typical SBC. That said, significant specific differences exist at the more detailed level from one SBC to another.
I purchased about 12 of these systems for our computer science department. If not purchased in quantity, the basic board goes for about $250. Then, you add whatever else you need.
Following along with this series while using an actual LBox SBC would be optimal. Nevertheless, I have organized this series of articles so a reader can glean useful information without purchasing the board. Yet another option would be to use some other SBC and parallel our activities.
To avoid putting forth too much nitty gritty detail here, I refer you to information posted in the FAQ section of the Engineering Technologies Web site.
The goals and subsequent sections for the current article are:
Power up the LBox.
Establish serial communication between LBox and workstation, including what to do if your workstation has no serial port.
Connect via Ethernet.
Install the cross compiling tool chains.
Carry out NFS mounting.
Write a program for the LBox and run it.
The last two sections are quite general and apply to most embedded Linux systems.
My particular setup consists of:
the LBox SBC (from Engtech)
a power supply (from Engtech)
a serial header-to-DB9 cable (from Engtech)
a CD with all needed software (from Engtech)
my laptop (the workstation) with Libranet 2.81, updated to the 2.4.27 kernel
a Belkin F5U409 USB-to-DB9 adapter because my laptop has no external RS-232 DB9 port but does have USB ports
I configured the laptop to use the widely available, tried and true Minicom terminal emulator for the serial connection. It comes with most Linux distributions, and for connecting to SBCs with serial ports, Minicom is a common choice. The Belkin F5U409 uses the mct_u232 driver, which is available with the kernel source. It didn't work properly for me with the 2.4.24 kernel, however, hence the update to 2.4.27.
Before applying power, I connected an Ethernet cable and the serial cable. The Ethernet ports provided on the LBox, when populated, have the expected RJ45 female sockets. The serial port header allows connection of the serial header-to-DB9 cable, which I connected to my laptop via the Belkin F5U409. At this point, everything seemed ready, so I applied power by plugging in the power adapter.
I used Minicom on my laptop to establish the serial connection to the LBox. The details can be found in this FAQ. Once Minicom was configured properly, I reset the LBox using the reset button, located near the board edge, kitty corner from the serial port header. Then, the Minicom window on my laptop spewed out the LBox startup messages. These could be useful subsequently, so I pasted them to an editor on the laptop for subsequent printout.
When the startup messages were finished, I was presented with the command prompt. I then investigated the system to determine what's available. For example, examining /bin showed both Busybox and Tinylogin were present. That suggested a small project to update Busybox to the recent 1.0 version, which has incorporated the Tinylogin functionality. Other things worth noting:
the result from uname -a was
uClinux lbox 2.4.20-uc0 #176 Mon Aug 16 11:25:42 ADT 2004 m68knommu unknown
the result from df was
Filesystem 1k-blocks Used Available Use% Mounted on rootfs 1113 1113 0 100% / /dev/root 1113 1113 0 100% / /dev/ram1 115 7 108 6% /var /dev/mtdblock3 3008 336 2672 11% /etc/config
from ls /bin, one could see that a version of Vi was present, and so on.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Home, My Backup Data Center
- A Topic for Discussion - Open Source Feature-Richness?
- Dart: a New Web Programming Experience
- Developer Poll
- What's the tweeting protocol?
- May 2013 Issue of Linux Journal: Raspberry Pi
- Reply to comment | Linux Journal
12 min 28 sec ago - great post
47 min 21 sec ago - Google Docs
1 hour 9 min ago - Reply to comment | Linux Journal
5 hours 58 min ago - Reply to comment | Linux Journal
6 hours 45 min ago - Web Hosting IQ
8 hours 18 min ago - Thanks for taking the time to
9 hours 55 min ago - Linux is good
11 hours 53 min ago - Reply to comment | Linux Journal
12 hours 10 min ago - Web Hosting IQ
12 hours 40 min ago



Comments
Replacement of classic automation system
Can this replace automation/control systems currently used in the industry (Allen Bradley/Rockwell, Schneider/Modicon, etc)?
If no, is it a long term goal? (approximatively when?)
Otherwise, what is fundamentally different?
Cheers,
classic automation system
Certainly you could replace a standard PLC, but would want a sbc that interfaced conveniently (e.g. via optically isolated relays) to the field wiring. Real-Time Linux would be a good idea, so you could truly seize control of the hardware and have a handle on latencies and the interrupt structure. The Real-Time Linux variants already perform control applications. Personally, I would concoct a control language that consisted of concurrent state machines. Such languages have been used before in the commercial sector - as an alternative to relay ladder logic.
cheaper-than-cheap SBC alternatives
Wondering: Does this series apply pretty well to the really really cheap linux appliances? I'm thinking of the LinkSys WRT54G wireless router and NSLU2 network storage, both linux boxes around $70 new (or less) with people hacking the linux installs.
ref: http://www.tomsnetworking.com/Sections-article93.php
cheaper-than-SBC
Cheap Linux appliances might be a good route to go. However, you do want the capability to reflash the OS unless you just want to work at the application level. And if you do have the capability to reflash the OS, you need to be able to reflash yet again if your first attempt was a kernel that won't boot. Further, if it is possible to accidentally blow away the boot loader, you want a way to reconstitute the bootloader. These capabilities are typical of well supported SBC's, but not necessarily of the cheap Linux appliances. The latter may have Linux developer/hacker lists where you could ask appropriate questions.