Discussion and Analysis on the Application of Embedded Linux in PMP Consumer Electronic Products

Linux is an open source operating system suitable for embedded systems, which can efficiently handle various complex tasks. Starting from the TI DM320-based PMP solution, taking TI DM320 platform as an example, a method of applying embedded Linux on the PMP system is proposed, and the bootloader startup program and the transplantation process of the embedded Linux kernel are discussed.

Discussion and Analysis on the Application of Embedded Linux in PMP Consumer Electronic Products

1 Introduction

PMP (Portable MulTImedia Player, portable multimedia player), also known as MP4, is now a new hot spot in consumer electronic products [1]. TI’s solution is based on the company’s DM320 DSP, which processes The processor is a DSP+ARM dual-core processor architecture, which uses DSP for multimedia processing such as audio and video encoding and decoding, and image encoding and decoding. The ARM processor is responsible for system management and provides peripheral device interfaces. This solution is extremely competitive in terms of multimedia performance and overall cost. However, software programming is relatively complicated and the product development cycle is long.

2 PMP software system framework

The bottom layer of PMP software is the operating system layer, which mainly includes Bootloader and embedded Linux operating system.

Bootloader mainly completes the startup of the system from Flash, the initialization of various parts of the hardware, the display of LOGO and the boot of the OS; Embedded Linux mainly includes a customized Linux operating system suitable for running on DM320.

3 Customization of Bootloader boot program

3.1 The startup process of Bootloader under DM320

Bootloader refers to a small program that runs before the operating system kernel runs after the system is started. Different Bootloader installation media Flash, the system startup process is different.

1) When the installation medium is NOR Flash, the Bootloader can run directly in the Flash flash memory without copying the code to the system RAM. The startup mode is set to external memory, so the start address of ARM starts from 0xFFFF: 0000. Then in the Bootloader program, set the entry address to 0xFFFF: 0000.

2) When the installation medium is NAND Flash, after the system is powered on, run the startup code in the ROM, and select the startup method as:

AIM (Arm Internal Memory) ROM, the starting address of ARM is 0x0000:0000. Then the program in ROM will copy the User Bootloader in NANDFlash to the RAM inside the processor.

Once again, execute the User Bootloader program to complete a small amount of work such as initializing SDRAM and driving the read capacity of NAND Flash.

Finally, initialize the system and copy the main Bootloader in the NAND Flash to SDRAM for execution. After the copy is completed, the memory address where the main Bootloader is stored is assigned to the pc (ProgramCounter) pointer.

3.2 Customization of Bootloader startup program under DM320

The Bootloader used by this PMP is U-Boot. The open source U-Boot program is obtained from the Internet, and then the unique hardware environment of DM320 is initialized.

1) Modify Makefile and Kconfig, the purpose is to generate configuration options and target files suitable for the DM320 platform. in. /Makefile (the current directory is the root directory of the U-Boot source tree), add the following statement:

dm320_config: unconfig

@./mkconfig $(@:_config=) arm arm926ejsdm320

Among them, mkconfig is a script file, and the parameters are (Target, Architecture, CPU, Board) corresponding to the above four parameters ($(@:_config=) arm arm926ejsdm320).

2) Create a folder under the U-Boot source tree. /board/dm320. Store files related to the DM320 platform.

3) In. /board/dm320/platform.S adds the initial assignment statement for DM320 register, in. Modifications to cpu.c and start.S in /cpu/arm926ejs, the former provides functions related to cpu operations, and the latter is the initialization code when the cpu is executed.

4) ./lib_arm/board.c is the main file to complete the initialization operation. An initialization sequence is defined in the file:

init_fnc_t *init_sequence[] = {

cpu_init, /* basic cpu dependent setup */

board_init, /* basic board dependent setup */

interrupt_init, /* set up excepTIons */

env_init, /* initialize environment */

init_baudrate, /* initialize baudrate settings */

serial_init, /* serial communications setup */

console_init_f, /*init console */

display_banner, /* say that we are here */

dram_init, /*configure available RAM banks */

display_dram_config,

#if defined(CONFIG_VCMA9)

checkboard,

#endif

NULL,

};

The sequence of functions in the above array is executed sequentially. After completing the initialization sequence, there will be some specific operations.

4 Linux kernel customization

The Linux kernel version number used in this system is 2.6.5. To customize the Linux kernel, you must not only modify the kernel source tree, but also write drivers for related peripheral devices to make it an OS environment suitable for DM320 operation.

4.1 Modification of Kconfig file

The Kconfig file is used to configure the content of the kernel to be loaded. Refer to the description of the script language. \Documentation\kbuild.

First, in the kernel directory. Add DM320 configuration options in /arch/arm/Kconfig, and add DM320 framework to the kernel, so that you can see the DM320 framework when you execute make menuconfig to configure the kernel. The revised content is as follows:

choice

prompt “ARM system type”

default ARCH_DM320_20

Means: when configuring the ARM architecture system: the default is the DM320 frame.

source "arch/arm/mach-dm320-20/Kconfig"

Means: The configuration options under the DM320 frame are also introduced, and other CPU frames are removed at the same time, so that it is convenient to choose. such as:

#source “arch/arm/mach-clps711x/Kconfig”

#source "arch/arm/mach-integrator/Kconfig" ("#" means comment out the relevant content)

Finally, select the kernel configuration options useful for DM320 development. such as:

source “drivers/char/Kconfig”

if (!ARCH_DM320_20)

source “sound/Kconfig”

endif

Means: Need to develop the driver of the character device, do not need the support of the sound.

Because the CODEC needs to be incorporated into the kernel, the configuration options supported by the CODEC must also be added.

source "codecs/modules/Kconfig"

If you want to add a new peripheral device, you also need to add the corresponding content in the Kconfig file. For example, if you want to add a Samsung 4-inch TFT-LCD driver, you need to modify it. /drivers/char/Kconfig file, and add the following content:

config DM320_SAMSUNG_4_LCD

tristate "DM320 SAMSUNG 4.0 inch 16: 9TFT LCD"

depends on ARCH_DM320_20 &&BOARD_400H

default y

help

This driver provides support for SAMSUNG4.0' 16:9 TFT-LCD

for DM320 Platform.

config DM320_SAMSUNG_4_LCD: means increase

New configuration entry. Once this configuration option is selected, it will be available. /include/linux/autoconf.h contains: #defineCONFIG_DM320_SAMSUNG_4_LCD 1

In this way, CONFIG_DM320_SAMSUNG_4_LCD can be used for specific selection in the entire kernel source code.

tristate "DM320 SAMSUNG 4.0 inch 16:9TFT-LCD": The content in quotation marks is the prompt text in the configuration options. Tristate means that in addition to choosing [*], [], you can also choose [M], which means that the current content is compiled as a module.

depends on ARCH_DM320_20 && BOARD_400H: If ARCH_DM320_20 is selected when configuring the platform frame, and BOARD_400H is selected when selecting the model, you can see the Samsung 4-inch TFT-LCD configuration options.

default y: Indicates that this driver is programmed into the kernel by default.

help: The content of help is what you see when you select the help option when you configure the kernel.

4.2 Modification of Makefile

Makefile according to the configuration file. config forms a list of compiled source files. The GNU compiler tool compiles the source files and links the object codes together to form a Linux kernel binary file. Makefile is distributed in each source code directory.

In the author's PMP device development, the first is to modify the main Makefile, such as:

ARCH:= arm

CROSS_COMPILE:=arm-linux- (modify the options of the compiler to the ARM platform)

EXTRAVERSION = -our0

The value of the EXTRAVERSION variable is appended to the kernel version number and becomes the final version after the kernel is built. The kernel version number used in the project is 2.6.5. After adding the EXTRAVERSION variable, the final version is 2.6.5-our0, which means the zero kernel version during the development process.

It is relatively easy to modify Makefile files in other subdirectories. Take adding Samsung 4-inch TFT-LCD driver as an example. When you need to add this driver module to the corresponding kernel source tree, you must log in. Add the following content to the /drivers/char/Makefile file:

obj-$(CONFIG_DM320_SAMSUNG_4_LCD) +=dm320_lcd_samsung4.o

5 Summary

This article discusses the application of embedded Linux in PMP consumer electronic products, and realizes the transplantation and customization of bootloader and Linux kernel. At present, some project products have been rigorously tested and successfully launched on the market.

Right Angle D-sub Connector IP66 IP67 Rated

IP66 / IP67 waterproof d-sub connectors-Designed for IP Performance

ANTENK has developed IP66 / IP67 waterproof d-sub connectors that utilize a proprietary sealing technology, which maintains the same physical size and footprint as standard d-sub products.

Antenk's line of Waterproof d-sub connectors utilize an innovative sealing technology eliminating the need to redesign enclosures and PC boards when implementing IP67 design upgrades.These connectors are designed for applications that require protection from heavy spray or are exposed to short-term submersion. Connectors are available in vertical and right angle board mount types as well as solder cup for panel mount cable applications. Standard D-Subs are available in 9 pin, 15 pin, and 25 pin positions, and high density D-Subs are available in 15 pin, 26 pin, and 44 pin positions


Applications of Antenk waterproof d-sub connectors:
Hand held computers, scanners, and printers that are used outdoors
Remote sensors, gauges, and data loggers that are used outdoors
Industrial and Medical equipment that is routinely subject to wash down
Transmitters and emergency beacons that are subject to temporary submersion
Gas, Electric, and Water metering systems that have embedded Smart Grid electronics
Portable electric generation equipment (Gen Sets)
Consumer and Commercial boating electronics (Radios, Scanners, Radar, DC Power Ports)


IP67 D-SUB | WATERPROOF CONNECTORS FEATURES & BENEFITS
Signal / Low Power in 6 standard size
(Standard: 9 pin, 15 pin, 25 pin; High Density: 15 pin, 26 pin,44 pin)
Combo-D / High Power in a variety of configurations:
(3W3, 5W5, 7W2, 9W4, 11W1, 13W3, 13W6, 17W2, 21W1, 21WA4)
Solder Cup, Vertical Mount & Right Angle Board Mount Options
High Reliability Screw Machined Contacts
3 amp / 5 amp / 20 amp / 40 amp Power Options
-65°C to +105°C Operating Temperature Range


Right Angle D-SUB Connector IP66 IP67 Rated available in

3 industry sizes/positions:Standard Density (9 pin, 15 pin, 25 pin).
Male & Female Versions

Right Angle D-sub Connector IP66 IP67 Materials
Shell: Steel with Nickel Plating.
Insulator: Glass-filled thermoplastic. U.L. rated 94V-O
(260° process temp for board applications)
Machined Contacts:
Male Pins - Brass
Plating: Gold Flash on entire contact.
IP67 Right Angle D-Sub Seal: Proprietary Information

Right Angle D-Sub IP67 Rated,Right Angle D-Sub Waterproof,Standard Density Waterproof Right Angle D-Sub Connector, High Density Waterproof Right Angle D-Sub Connector

ShenZhen Antenk Electronics Co,Ltd , https://www.antenkconn.com