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.

Coaxial Power D-Sub Solder Cup

Coaxial Power D-Sub Solder Cup Contacts with Mixed or Full Layout
Transmit Radio Frequency Signals

The Coaxial D-Sub have like the Power D-Subr replaced the two rows in a Standard Density connector with a coaxial contact that take up about the same size as the two rows of signal contacts. The Coaxial D-Sub is exactly the same size as the Standard Density connector but instead of example 9 positions of signal pins it has 2 power contacts , or instead of 37 positions of signals it has 8 coaxial contacts.

The Impedance for the coaxial contacts are 50Ω or 75Ω


All Signals, but different Signals
The Coaxial D-Sub with Mixed Layout mixes both coaxial contacts and signal contacts in the same connector. For example the same size as a 15 position Standard Density D-Sub you can have what we call a 7W2, which means there is 7 contacts where 2 of them are coaxial contacts, which means there are 5 signal contacts, so 5 signals and 2 coaxial. See the Layout in the Tech Specs on the bottom, there are a lot of combinations of the Mixed Layout alternative.


Antenk's Coaxial D-Sub connectors are available in 5 standard shell sizes with 23 multiple contact arrangements. These reliable, robust combination d-sub connectors allow a combination of signal and coaxial contacts in cable mount, vertical board mount & right angle board mount termination type variations.


Coaxial D-SUB Mixed Contact Solder Cup
Features
Coaxial d-sub for a variety of applications in cable mount.
Signal contacts come pre-loaded. Coaxial contacts supplied - Not Pre-Loaded.

Available in 5 standard shell sizes with 23 multiple contact arrangements: 1W1/ 2V2 /2W2 /3V3/ 3W3/ 5W1/ 5W5

/ 7W2/ 8W8/ 9W4/ 11W1/ 13W3/ 13W6 /17W2/ 17W5 /21W1/ 21W4/ 24W7/ 25W3 /27W2/ 36W4/ 43W2/ 47W1

Allows combination of signal and coaxial d-sub contacts.

Materials
Shell: Steel, nickel plated
Insulator: PBT + 30% fiber-glass - Black, U.L. rated 94V-O
Contacts: Brass - Gold flash over nickel

Notes
Panel Cut-Outs
5W1 = Standard 9 Pin Shell
3W3 / 3W3K / 7W2 / 11W1 = Standard 15 Pin Shell
5W5 / 9W4 / 13W3 / 17W2 / 21W1= Standard 25 Pin Shell
8W8 / 21WA4 = Standard 37 Pin Shell
Other Contact Arrangements Available Upon Request.

Coaxial D-Sub Connector, Coaxial D-Sub with Mixed Layout, Coaxial D-Sub with Mixed with Full Layout,Coaxial D-Sub Male, Coaxial D-Sub Female

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