Embedded Linux System Development Technology Based on MPC8250
2026-04-06 07:21:09··#1
Abstract: This paper describes an embedded Linux system using a PowerPC processor MPC8250, which fully leverages Linux's powerful support for networks and devices such as the MPC8250. Compared to the traditional method of manually consulting fault diagnosis manuals, this system can communicate with the aircraft fault diagnosis system in real time, facilitating rapid fault identification and quick selection of repair solutions. Keywords: Embedded Linux system, PowerPC processor, MPC8250 I. Introduction We developed a network terminal communication platform for a certain type of aircraft field maintenance system. Its hardware core uses Motorola's embedded PowerPC processor MPC8250, and the software uses embedded Linux as the operating system, achieving secure and rapid communication between the aircraft field maintenance system and the aircraft fault diagnosis system. This system platform features small size, low power consumption, and high performance. II. MPC8250 Architecture and System Hardware Platform Introduction PowerPC is one of the earliest processors supported by Linux. The PowerPC processor chip MPC8250 is based on the PowerQUICC (Quad Integrated Communications Controller) II architecture and is a processor developed for high-performance, low-power, and small-size communication devices. Internally, it integrates a high-performance embedded G2 core, a flexible System Integration Unit (SIU), and many commonly used peripheral communication components in the control field (forming a Communication Processor Module, CPM), which can be used in many aspects, especially in communication and network systems. The G2 core frequency is between 150-200MHz, the CPM and PCI have a maximum frequency of 133MHz, and the external frequency is 66MHz, capable of simultaneously handling up to 128 full-duplex time-division multiplexed logical channels. Depending on the target system, the system hardware platform can expose the required external communication interfaces of the MPC8250. Our system provides 8M flash for storing kernel image files, file systems, applications, and backup data, 64MSDRAM for memory, 521KB flash for storing boot code, and also includes an RS232 serial port, a 10/100M Ethernet port, and JTAG support. III. Development of Embedded Linux System Based on MPC82501. Customization of Compilation Environment Usually, the CPUs of the host and target boards are different, requiring cross-compilation. Many tools are available for cross-compilation, but GNU C is commonly used. It includes the gcc and g++ compilers, C libraries such as glibc and newlib, binutils, and a range of other development tools. Different development platforms require different cross-compilation tools. Here, we choose ELDK 3.0 (Embedded Linux Development Kit), a development and compilation environment for PowerPC embedded Linux porting provided by the Denx Software Center in Germany. After installation on the host machine, modify the paths and cross-compilation environment in the bash_profile configuration file as follows: PATH=$PATH:$HOME /bin:/opt/afeu/usr/bin:/opt/afeu/bin:/usr/bin CROSS_COMPILE=ppc_82xx EXPORT PATH CROSS_COMPILE 2. Target System Resource Allocation Embedded Linux systems generally lack hard disk devices, resulting in very limited storage space. This necessitates careful allocation and full utilization of system hardware addresses before Linux porting. Based on the system hardware platform described earlier, the target device address allocation is given in Table 1. Table 1. Address Allocation of Target Device 3. Establishment of Debugging Environment Embedded systems generally lack output devices such as displays, which is not conducive to debugging on the target system. To debug the target system, we use the JTAG emulator BDI2000 to trace and debug the code on the target machine. The debugging environment is shown in Figure 1. Figure 1. System Debugging Environment Network card 1 is directly connected to the target machine and used for downloading the kernel image, NFS file sharing, etc. Network card 2 is connected to the BDI2000 and then connected to the target machine via the JTAG port. The serial port is used for command transmission, receiving return information, etc. 4. Linux System Boot Module U-Boot U-Boot is a system boot module released by the Denx Software Center under the GPL (General Publication License). It supports various processors, such as ARM series, PowerPC series, MIPS series, and X86 series. After compiling U-BOOT-1.1.0, an executable file is generated. Then, modify and edit the files under the U-BOOT package according to your target system for porting. (Note that since a support package for MPC8250 was not found, and its kernel is very similar to TQM8260, the 8260ads support package is used below for compatibility.) For example: Modify the register values, SDRAM controller parameters, serial port parameters, etc., in the target system configuration file ./include/configs/MPC8260ADS.h; Modify the I/O port definitions in the target board definition file ./board/mpc8260ads/mpc8260ads.C; Modify BCSR, etc. When U-Boot boots the Linux kernel, it passes a command line to the kernel, which then sets the system accordingly based on the parameters of this command line. A root file system must be mounted during Linux kernel boot. The root file system can be provided through either a network file system (NFS) or a local file system (LFS). (1) Booting the Linux system via LFS To boot Linux via LFS, the bootargs can be set as follows: setenv bootargs root="/dev/mtdblock1" rw ip=24.86.246.216: 24.86.246.100: 24.86.246.100: 255.255.255.0:afeu: eth1: off (2) Kernel reduction and porting (1) Linux kernel reduction: The storage units of embedded systems are very limited, so it is particularly important to simplify the kernel. Kernel reduction mainly involves removing useless modules and adding necessary modules to make it more suitable for the target system. This mainly includes the selection of platform type (platformsupport), we choose TQM8260; Memory Technology Device (MTD) selects the kernel's support for MTD and Flash; Networking options selects the kernel's support for networking; file systems selects the kernel's support for file systems; MPC8260CPMoptions is used to configure some communication devices of the target system. After the kernel is trimmed, it needs to be recompiled. The method is basically the same as that of general Linux compilation. Due to space limitations, it will not be described in detail. (2) Linux kernel porting: The kernel porting source code is mainly distributed under Linux/include/arch/ppC. Based on the target system, the parameters related to the _res variable were debugged and modified. The key code modifications are as follows: For arch/ppc/8260_io/commproc.c, the macro definition was changed to: #define BRG_INT_CLK(16 * 1000000); In arch/ppc/8260_io/uart.C, the baud rate was set: bd->bi_baudrate=9600; In arch/ppc/kernel/m8260_setup.C, the bus frequency was set: bininfo->bi_busfreq=66; The system reboot address in arch/ppc/kernel/m8260_setup.C was set to: startaddr=0xeff00100; In addition, the MTD settings also needed to be modified, mainly by modifying the partition definition (related to the target system address allocation) and the Flash configuration of the target system in the drivers/mtd/maps/tqm8260.c file to meet the requirements of the system. The partitioning of the 8M Flash will be described in the file system section. After modifying the kernel source code and debugging it repeatedly to ensure it is correct, the kernel file is imaged and downloaded to the target board via tftp using U-Boot. After rebooting, the target board Linux can be successfully started. 5. File System (1) Classification of file systems: According to physical location, file systems can generally be divided into network file system NFS and local file system LFS. NFS generally has low requirements for the target system, only requiring a network interface to transfer files; while LFS has strict requirements for the target system, generally requiring a large capacity of flash. In embedded systems, NFS is mainly used to adjust LFS, that is, to first prepare the file system on the host, mount it through NFS, and debug the user system. The methods of booting the Linux system through NFS and LFS have been introduced above and will not be repeated here. The main file system formats supported by Linux are CRAMFS (CompressedROM File System) and JFFS (Journaling Flash File System). The former is read-only and loads quickly at startup, and can be used to store dynamic link libraries, applications, initialization scripts, etc.; the latter can perform read and write operations. Its second version, JFFS2, also solves problems such as flash space, lifespan and garbage collection. (2) Flash partition: Based on the above analysis of the CRAMFS and JFFS file systems, the flash can be divided into read-only areas and read-write areas, which is beneficial to the normal startup of the Linux system and the protection of file data. Its partition is shown in Table 2. The file system provided by EDLK3.0 is large, and many of them are not used by the target system, so it needs to be further reduced. After reduction, the file system needs to be improved to conform to the target system as much as possible. Finally, the reduced and improved file system needs to be mounted as the root file system. Table 2 flash space allocation IV. Conclusion The embedded Linux system based on the PowerPC processor MPC8250 fully utilizes the powerful support functions of Linux for network and MPC8250 devices. Compared to the traditional method of manually consulting fault diagnosis manuals, this system can communicate with the aircraft fault diagnosis system in real time, which is conducive to the rapid identification of faults and the rapid selection of maintenance solutions.