Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze the startup mode of PowerPC P2010 SylixOS

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is to share with you about how to start PowerPC P2010 SylixOS analysis, the editor feels very practical, so share with you to learn, I hope you can get something after reading this article, say no more, follow the editor to have a look.

1. Brief introduction of QorIQ P series processors

QorIQ P-series processors are based on Power Architecture E500 series cores. Among them, P10xx series, P2010 and P2020 are based on e500v2 kernel, P204x, P30xx and P40xx are based on e500mc kernel, and P50xx is based on e5500 kernel.

Among them, the P2 series is designed to provide high-quality components for the network, telecommunications, military and other markets. P2010 includes a 1.2GHz kernel, 512KB secondary cache, and so on.

2. Introduction to mkimage tools

The mkimage tool can be used to make a variety of bootable images that are not compressed or compressed.

When making an image file, mkimage adds a 64-byte header in front of the original executable image file and records the information specified by the parameters, so that uboot can identify which CPU architecture, which OS, which type, which location in the loading memory, where the entry point is located and what the image name is and so on.

The mkimage tool is used as follows:

-A: set the schema type

-O: set the operating system type

-T: mirror type

-a: specify the load address of the image in memory

-e: specify the address of the entry point where the image runs

-C: specify the compression method

-n: specify the image name

-d: specify the source file to make the image.

In the BSP source code of P2010, use the command

$(TOOLCHAIN_PREFIX) mkimage-A PowerPC-O linux-a 0x1000000-e 0x1000000-d $(OUTDIR) / bspp2010.bin-T kernel-C none-n "SylixOS" $(OUTDIR) / uImage

To make the image file uImage.

Specify the architecture type as PowerPC, the operating system type as linux, the memory load address as 0x1000000, the image running address as 0x1000000, the image type as kernel, the image name as SylixOS, and the resulting file name as uImage.

3. Uboot uses bootm to boot the kernel

Because P2010 uses Linux's fdt, you need to use the bootm command to load kernel and fdt.

P2010 uses the command tftp 0x2000000 uImage;bootm 0x2000000-0xefe80000 to boot the kernel. Load the image file uImage created by the mkimage command through tftp to the memory 0x2000000 address, and then start the system with the bootm command. Where 0x2000000 is the address of the image downloaded by tftp to memory,-indicates that the memory address where ramdisk,0xefe80000 is fdt is not read.

The bootm command parses the image file format, starts the system in Linux mode, and obtains the fdt memory address. The fdt address it acquired is then passed into the SylixOS.

4. Start SylixOS

In the file startup.s, the dts memory address is temporarily stored from the FDT_REGISTER register before SylixOS enters the halPrimaryCpuMain function, as shown in figure 4.1.

Figure 4.1 temporary FDT

The temporary dts memory address is then passed into the startup function, the halPrimaryCpuMain function, as shown in figure 4.2, thus passing the fdt parameter from uboot to SylixOS.

Figure 4.2 read FDT

The halPrimaryCpuMain function acquires the device information and completes the device-related initialization work according to the obtained fdt address.

The above is how to analyze the startup mode of PowerPC P2010 SylixOS. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report