Linux software system solution on STB

Source: Internet
Author: User
Tags jvm download

In recent years, the huge potential market for STB in China has attracted the enthusiasm of chip manufacturers, CA vendors, middleware vendors, set-top box manufacturers, and other manufacturers. The competition for STB has been fully explored.

A set-top box is a specialized device, including software modules and hardware modules. The software module includes the system boot program, embedded operating system, and application software. The hardware modules are divided into ASIC chip groups, multimedia DSPs, and x86 based on different CPUs. Low-end set-top boxes generally use dedicated chipsets or multimedia DSPs. They only support a few Media Encoding/decoding standards, and offer poor service scalability and lower prices. Most of the high-end set-top boxes are based on x86 hardware, using wince or Linux operating systems, and even equipped with hard disks. They are very similar to PCs and have rich business functions. Of course, they are expensive.

As a matter of fact, with the rise of IPTV, the performance requirements for set-top boxes are getting higher and higher, and the use of X86 hardware to Improve the Performance of set-top boxes is the trend of the times. However, while providing richer business functions, significantly reducing the cost of the set-top box is also an inevitable direction for the development of the set-top box technology. This article describes the Linux software system solution on STB compatible with x86, and does not involve technical development details. This article mainly introduces the following aspects:

I. Introduction to hardware environment

The core components of the set-top box include: stpc CPU, 2 M Flash, 64 m Dom, and 32 m Ram.

Flash stores the bootloader code and Dom stores the embedded Linux operating system. Of course, the set-top box requires some peripheral hardware circuits, such as network interfaces and remote control interfaces.

Ii. bootloader Development

Bootloader is a software layer that is highly correlated with underlying hardware, also known as BSP. Developers need to be quite familiar with the hardware structure. Generally, it can be done by hardware personnel, or the hardware and software personnel can work together. In addition to initializing functions such as CPU, ram, and basic Serial Output, bootloader also requires some extended functions, such as network interfaces or serial port burning operating systems. U-boot is an open-source bootloader for multiple target platforms (PPC, MIPS, arm, x86). It has powerful functions and is widely used in embedded system development, as long as you make limited modifications to the hardware platform, you can achieve it smoothly. This article does not describe the specific porting process of U-boot. For more information, see porting U-boot on powerpc 860.

Iii. Cutting and porting embedded Linux

For Embedded Linux, we use peewee Linux for cutting. For introduction and basic configuration of peewee Linux, see the book "Principles and Practices of embedded systems in Embedded Linux. In peewee Linux, only some components are selected through the configuration interface. However, you must note that the X Window must be retained, and the browser must support the X Window to start the graphical browser. However, the Linux system reduced through peewee Linux is usually relatively large, and further reduction is required. In general, an embedded Linux with no x Window can be as small as 4 m, and a Linux with X Window can also be built below 30 m. In short, the Linux system after the reduction cannot be too large, otherwise, the browser program is likely to exceed 64 MB of Dom space, and additional storage space needs to be added to the cost.

On the other hand, after Linux is transplanted to STB, many hardware on STB cannot work due to lack of driver support in Linux. To this end, developing necessary drivers is an essential step. It is quite easy to develop a driver in Linux. First, the Linux driver architecture is relatively fixed, and second, there are a lot of source code for reference. The difficulty is often the debugging process, which also takes more time and requires frequent changes to some code. At the same time, the driver development process also often requires the help of the oscilloscope, logical analyzer and other equipment.

4. Select a browser program (embedded Mozilla)

There are many open-source browsers in the Linux environment, but in general, Mozilla has powerful functions, supports a lot of protocols, and rich graphic interfaces. Secondly, Mozilla has developed an embedded Mozilla project for the embedded system. If no reduction is made, the compilation result will be more than 20 MB, and users can cut it down. Generally, it is easy to cut to about 14 Mb. In addition, the project provides the source code. You can customize some functions as needed, such as the user interface.

For details, refer to the home page: http://www.mozilla.org

V. JVM porting

Many Web pages are currently characteristic of Java severlet, which makes it a general trend for browsers to support the Java language. Embedded Mozilla is easy to support Java, which is one of the reasons for choosing embedded Mozilla. As long as you register the JVM provided by sun to the STB System library path in the form of a dynamic library, and set the browser's plug in function for Java severlet in Embedded Mozilla, embedded Mozilla supports Java severlet.

JVM download reference: http://www.sun.com

Vi. Other Application Development extensions (EPG implementation and easysoap use)

This function is mainly used to expand STB to PVR/DVR. After such expansion, you need to add a large storage device to store data. EPG is an indispensable software for PVR/DVR. It provides programs to users in advance, and users place orders through reservation ", PVR/DVRs Enable Automatic Recording of programs based on the user's reservation. At present, EPG is a popular practice: Use Web service on a PC to implement the server, and implement the client on PVR/DVR, because Web Service uses SOAP protocol for interaction. To this end, easysoap emerged. with this open-source project, you can easily develop EPG clients on Linux to achieve interaction with Web Services.

VII. media playback software implementation

This function can also be considered as an extension of STB and is part of the PVR/DVR function. We use a powerful mplayer for media players. This is another outstanding open-source software in Linux. It supports a large number of formats, including many streaming media. It is also relatively easy to transplant mplayer. See website: http://www.mplayerhq.hu/

8. VOD implementation

Vod is an enhancement of the STB interaction function, because we have transplanted embedded Mozilla and mplayer. The VOD function can be smoothly implemented using these two software, all you need to do is determine in Embedded Mozilla how the current connection is a media file to determine whether to enable mplayer for playing.

9. Software Remote update Problems

Although the demand for remote software update on the STB device is not prominent, the remote software update is a powerful means to reduce maintenance costs. STB remote software updates can be active or passive. The active method is to manually download the latest software for upgrade; the passive mode is that the STB developer prompts the user to update based on the STB information, similar to the Upgrade Program of Window 2000/XP. Considering the particularity of STB, such as exceptions or disconnection during the upgrade process, we recommend that you manually download the software for upgrade.

The specific implementation method is: develop a program for software upgrade on STB, which downloads the latest application to the local through HTTP/FTP, and then implements software upgrade on Stb. Because the system is usually relatively tight, once the upgrade fails, it is very likely that the system cannot be started. The solution is to increase the memory space, first back up the previous system. If the upgrade is successful, and then delete it. If it fails, the system is restored.

10. Summary

Due to its open-source features, outstanding network functions, and support from many open-source projects, Linux is becoming one of the goals of embedded system developers. We believe that more and more embedded developers will join the Linux field.

This article only proposes solutions. In actual development, from hardware design to software development is a very long process, software and Hardware collaborative design, hardware debugging, software development, software testing, system integration testing and other processes will encounter obstacles, many unexpected problems will suddenly come out from time to time.

Therefore, in the development of the STB project, the hardware design process requires experienced hardware engineers to shorten the hardware design and debugging time as much as possible. In the development process of upper-layer applications in the software system, developers are advised to adopt the OO idea and use the design mode in development to prevent unexpected changes in the development process. In addition, it is worth mentioning that in many projects, developers think that software development is only possible after hardware development is complete. This is a misunderstanding. In fact, the process of software and hardware development can be synchronized. In the hardware development stage, upper-layer software development can be performed simultaneously, which can speed up the pace of product development to the market as much as possible.

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.