Practice and Discussion of LINUX in Embedded Systems

Source: Internet
Author: User
LINUX practices and discussions on embedded systems-general Linux technology-Linux programming and kernel information. The following is a detailed description. 1. Practical Purpose
Porting the KERNEL of KERNEL 2.6 to a mature embedded hardware platform;

In order to practice the initial development requirements of an embedded system and further application transplantation.

2. Hardware Platform
VIA company EmCore-V611V12r/E533
The platform is mainly used for thin clients, set-top boxes, query machines, Gateway firewalls, and servers. Relatively high hardware configuration and not harsh conditions, but high requirements for software expansion and upgrade.
The VEPD of VIA is an extension of the X86 architecture in the Embedded system. Therefore, the software features high scalability and short development cycle.
3. Install LINUX
A. initialize the CF card
Insert the CF card into the ID1 of the host machine. Format the CF card and create a file system. When the CF card leaves the factory, the partition is generally as follows:
0... Bootloader
1... Factory configuration
2
.
. Kernel and root file
.
.
N
Partition 0... place Bootloader
Partition 1... place Factory configuration
Partition 2 .. N for kernel and root file systems
Generally, different hardware and LINUX Bootloader are different. For example, UCLinux generally uses COLILO.
The file formats used by embedded systems are JFFS, JFFS2, and EXT2. Our current system supports EXT3.
1) fdisk/dev/sda
2) mkfs. ext3/dev/sda1
Of course, you can also use a graphical tool to complete step 1) 2.
B. create necessary CP-related documents on the CF card
1) mount the CF card
2) create/mnt/cf/boot,/mnt/cf/boot/grub, and other directories.
3) files under CP grub are stored in/mnt/cf/boot/grub, and other root system files of CP.
C. Compile the 2.6 kernel for the target machine
My source file directory is/data/linux-2.6.6, and the output directory is set to/data/cf
1) cd/data/linux-2.6.6
2) make mrproper
3) make O =/data/cf gconfig
Here, we mainly select the related hardware options for the hardware of the target machine. Select the cpu via family, FLASH Driver in MTD, Nic, USB, sound card, etc.
4) make O =/data/cf
5) cp/data/cf/arch/i386/boot vlimuz and initrid. img to/mnt/cf/boot
D. install grub

1) Modify grub. conf according to the target machine
2) Run grub to enter the grub command mode.
3) grub> root (hd1, 0)
Since the current CF card is not the current Boot hard disk, we should note that the hard disk parameter here is hd1 rather than hd0.
4) grub> setup (hd1)
As mentioned above, grub is now installed on the CF card.
5) grub> quit
OK. system placement is complete.
E. Shut down, scare the CF card, plug it into the target machine, start the machine, and boot ...... success !!!
We can enter the bash state.
Next, we can further transplant and install the GUI and other applications.

4. Compared with other Embedded System Development
Compared with other systems, we seldom use cross-compilation, cross-linking, stub debugging, planning the FLASH location allocation in the memory, and burning the FLASH Bootloader.
But a good start is the start of success.
5. Discussion
With the development of hardware, the development of embedded systems will become more mature and easy. In addition, with the development of hardware, the capacity and volume are not a problem, and the hardware configuration of embedded systems will become higher and higher. The relative software development is in the development cycle, upgrading and other aspects will require higher and higher requirements. early embedded systems, even without OS, had only simple loops and programmable logic arrays, making it difficult for programs to be reused and transplanted. Later, we had some dedicated OS. Therefore, Industrial Computer + OS is the future direction of Embedded systems. However, apart from using proprietary systems in some special military fields, most Embedded systems are transferred to open systems or other operating systems with rich software resources. for some new developers, they can focus more on application software development, instead of having to think too much about hardware, reducing the development difficulty and shortening the development cycle of embedded systems. In future information appliances, industrial computers will be greatly applied. Of course, programmable logical arrays will also develop, and a remote control can only be implemented using programmable logical arrays.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.