Skyeye Simulation UCLinux

xiaoxiao2021-03-05  26

Introduction to Skyeye

The GDB-Armulator used directly to simulate UCLinux. For details: http://www.uclinux.org/pub/uclinux/utilities/armulator/. Feeling is: simple, convenient. However, if you want to use the network function, GDB / ARMULATOR is in powerless.

SkyEye configuration options

Skyeye simulated hardware configuration and analog execution behavior is determined by the options in the configuration file skyeye.conf. Depending on the function of the option, SkyEye.conf's option is divided into hardware configuration options and analog execution options. According to the number of parameters, the option of SkyEye.conf is mainly composed of two components:

l Single parameter option row format is: Symbol: value Symbol can be hardware definition, such as CPU, MACH, etc., or execution control definition, such as log, etc. Value is the value corresponding to Symbol, which may also be a string.

l Multi-Parameter Option Ring Format is: Symbol: OPT1 = VALUE1, OPT2 = VALUE2, ... OPT1 is the parameter name, Value1 is the value corresponding to OPT1, which may also be a string.

The configuration definition of SkyEye.conf is as follows:

l Basic CPU Nuclear Configuration Options The options currently exist include: ARM710, ARM7TDMI, ARM720T, ARM920T, SA1100, SA1110, XScale formats are CPU: cpuname Note: cpuname represents a string representing the name of the CPU name. For example: CPU: ARM7TDMI

l Specific development boards (including CPU extensions) Configuration options current options are: AT91, EP7312, ADSBITSY, PXA_LUBBOCK, LPC, S3C4510B, S3C44B0, CS89712, SA1100, AT91RM92, Sharp_LH7A400 format is: Mach: MachineName Note: CPuname indicates one Represents a string of the name of the development board based on a specific CPU. For example: Mach: AT91

l Memory Group Configuration Options One memory group is continuous, the type is divided into RAM SPACE, ROM Space, Mapped IO Space format is: MEM_BANK: MAP = M | I, TYPE = RW | R, addr = 0xxxxxxxx, size = 0xxxxxxxxx, file = imagefilename, boot = yes | no

2 MAP = m Represents RAM / ROM Space, MAP = i represents Mapped IO Space.

2 TYPE = RW, and if MAP = M represents RAM Space, Type = R, and if Map = M indicates ROM Space

2 addR = 0xxxxxx indicates the starting physical address of the memory group (32bit, 16).

2 SIZE = 0xxxxxx indicates the size of the memory group (32bit, 16).

2 File = ImageFileName File's value imageFileName is a string that actually represents a file, typically an executable program or an OS kernel file that can be executed or an OS kernel file or a root file system in a binary image format. If this file exists, SkyEye will write the contents of the file directly to the corresponding simulation memory group address space. 2 boot = yes / no, if boot = yes, SkyEye positions the address of the first instruction of the analog hardware to the corresponding memory group.

For example: MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x00000000, size = 0x00004000 MEM_BANK: MAP = M, TYPE = R, ADDR = 0x01400000, Size = 0x00400000, file =. / Boot.rom mem_bank: map = m, TYPE = RW, AddR = 0x10000000, size = 0x00000800, file =. / loader.bin, boot = yes

l Network chip 8019AS configuration format is nic: state = on / off mac = xx: xx: xx: xx: xx: xx ethmod = tuntap / vnet hostip = dd.dd.dd.dd Note: XX indicates two bits 16 into Monarch, DD represents two-digit 10

2 State means that the network chip starts working after the start of the simulation.

2 Mac indicates the MAC address of the Simulated NIC

2 Ethmod expresses the network simulation method on the host in Skyeye, there are currently two modes of TuPtap and VNET. Tuntap is a point-to-point virtual network implementation supported by Linux Kernel, and VNET is a functionality of Skyeye implementation more virtual HUB-based networks.

Hostip represents the IP address of the host side with Skyeye interaction

For example: Net: State = ON, MAC = 0: 4: 3: 2: 1: f, Ethmod = Tuntap, Hostip = 10.0.0.1

l Configuration format of LCD is LCD: state = on / off state = ON indicates that the LCD is in turn on, and State = OFF indicates that the LCD is in turn off. For example: LCD: state = on

l Skyeye UART Control Options UART Options You can control SkyEye in another terminal connected to the terminal connected to a serial port: UART: fd_in = indevname, fd_out = Outdevname

2 fd_in = indevname indevname Indicates the device file name used to enter, its value is actual serial device file / dev / ttysx

2 fd_out = OUTDEVNAME OUTDEDEVNAME indicates the device file name used to output, its value is actual serial device file / dev / ttysx

For example: UART: fd_in = / dev / ttys0, fd_out = / dev / ttys0

l Skyeye's Log Control Option Log option is used to control the execution status information of the SkyEye output hardware system, including execution command values, register values, various hardware states, etc. each time you execute instructions. Format: log: logon = 0 | 1, logfile = filename, start = Number1, end = number2, length = Number3

2 Logon = 0 | 1 | 2 | 3, if the value is equal to 0 means not being recorded, if the value is equal to 1 means the recording instruction and the instruction address flow, if the value is equal to 2 to represent the record instruction and the command address, the main register content, if the value is equal to 3 Represents the recording instructions and instruction addresses and all registers content. 2 logfile = filename The value is a string that represents the file name used to record information.

2 start = NUMBER1 The value is a decimal integer of> = 0, indicating that the system will start to record when the NUMBER1 instruction is executed.

2 End = Number2 It is a decimal integer of> = 0, indicating that the system is stopped when the NUMBER2 instruction is executed.

2 Length = Number3 The value is a decimal integer of> = 0, indicating the information when only the Number3 instructions recently executed recently.

Format: log: logon = 0, logfile = / tmp / SK1.LOG, start = 100000, end = 200000, length = 100

SkyEye Target Analog Module Simulation Hardware Logical Map is shown in Figure 0-1.

Currently, software for UCLinux is walking in front of Skyeye. You can see Skyeye's latest information from www.skyeye.org. The latest SkyEye downloaded by the latest stable version can be provided.

One: Preparation:

Still first check if there is any tun.o, or tun.lo (FC kernel) on your own machine, if you don't use the insmod command, try it, if you still don't work, then you only have the reconstruction of the kernel, or reload the system .

L The following is some preparations before the simulation:

ARM-elf-tools-20030314.sh, uclinux-dist-20041215.tar.gz. Download from the following website:

http://www.uclinux.org/pub/uclinux/dist/

Skyeye-0.8.6.tar.bz2, Skyeye-binary-testils-1.1.0.tar.tar. You can download it from the following website:

http://www.skyeye.org/download.htm

II. Install Skyeye

1. Skyeye installation

At present, Skyeye is running very well under the Linux operating system, SkyEye can run in a Windows environment via mingw or cywgin software.

Below we installed Skyeye in the Redhat 9.0 environment:

First, you need to start from unlocked skyeye-xxxsrc.tar.bz2 packages (XXX represents Skyeye's version number), follow the steps described in the SkyEye.ReadMe or ReadMe file in the package ("#" in the command below is Shell prompt, users don't enter):

(1) Unzip the source package (assuming SkyEye-xxxxsrc.tar.bz2 is placed in the "/ usr / src" directory of this machine), generates a Skyeye directory in the current directory #CD / usr / Tools # tar xjvf Skyeye -xxxsrc.tar.bz2

(2) Enter the decompression Skyeye directory, configure SkyEye #CD SkyEye if it is SkyEye 0.6.0, running the following command: # ./configure --target = arm-Elf --prefix = / usr / local - -without-gtk-prefix --without-gtk-exec-prefix --disable-gtktest If your Skyeye version is greater than 0.6.0, LCD simulation support is provided. In order to increase the support of the LCD simulation, run the following command: # ./configure --target = arm-Elf --prefix = / usr / local (3) then compile and install (correctly execute the instructions, normal After the end, the / usr / local / bin / skyeye executor in the system is installed SkyEye software.)

# make # make install

Be careful not to pay attention to the following points during the compilation and installation:

If you use Mandrake Linux, you may have some errors about Readline, NCurse, Termcap, etc. when compiling Skyeye, then you need to run the following command: ln -s / usr / include / ncurses / termcap. h/usr/local/include/termcap.h

Then recompile again. If you use Debian Linux, do not use GCC 2.2 or GCC 3.0, you want to use GCC 3.2 or later. The GCC version number used in your system should be greater than or equal to 2.96 If the SkyEye version number is greater than 0.6.0, then you need to install GTK in your system (LCD simulation to use).

2: ARM-ELF connector and UCLinux installation

Sh -ivh arm-elf-tools-20030314.sh

Tar -zxvf uclinux-dist-20041215.tar.gz

CD UClinux-dist

3: Configure UClinux

1) Vendor / Product Selection->

--Select the vendor you wish to target

(GDB) Vender

--Select the product you wish to target

(skyeye) GDB Productuers

Kernel / Llibrary / Defaults Selctionà

(Linux-2.4.x) Kernel Version

(UCLIBC) LIB VERSION

---

---

2) Network Device Supportà

- IMQNEEDS Config_Netfilter Enabled

Universal Tun / TAP Device Driver Support

Ethernet (10 or 100Mbit) à

[*] Skyeye Net2k Ethernet Support (for armulator)

---

---

3) Network Applicationà

[*] ifconfig

[*] ping

4: Skyeye.conf configuration:

Here are some examples of SkyEye.conf:

FOR AT91 (0) Special for ucosii ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -cpu: arm7tdmimach: at91mem_bank: map = M, type = RW, addr = 0x00000000, size = 0x00004000mem_bank: map = M, type = RW, addr = 0x01000000, size = 0x00400000mem_bank: map = M, type = R, addr = 0x01400000 , size = 0x00400000mem_bank: map = M, type = RW, addr = 0x02000000, size = 0x00400000mem_bank: map = M, type = RW, addr = 0x02400000, size = 0x00008000mem_bank: map = M, type = RW, addr = 0x04000000, size = 0x00400000Mem_Bank: Map = I, Type = rw, addr = 0xf0000000, Size = 0x10000000 for AT91 (1) Special for μClinux ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------- # Skyeye config file samples: ARM7TDMIMACH: AT91MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x00000000, size = 0x00004000Mem_Bank: map = m, TYPE = RW, addr = 0x01000000, size = 0x00400000mem_bank: map = M, type = R, addr = 0x01400000, size = 0x00400000, file = / boot.rommem_bank:. map = M, type = RW, addr = 0x02000000, size = 0x00400000mem_bank : map = m, type = rw, addr = 0x02400000, size = 0x00008000Mem_Bank: map = m, Type = RW, addr = 0x04000000, size = 0x00400000MEM_B Ank: Map = I, TYPE = RW, ADDR = 0xF0000000, Size = 0x10000000 # set nic info state = on / off mac = xx: xx: xx: xx: xx: xx ethmod = tuntap / vnet hostip = DD.DD. Dd.ddnet: State = on, Mac = 0: 5: 3: 2: 1: f, Ethmod = Tuntap, Hostip = 192.168.2.1 for EP7312 (1) Special for Linux ----------- ------------------------------ CPU: ARM720TMACH: EP7312MEM_BANK: MAP = I, TYPE = RW, AddR = 0x80000000, Size = 0x00010000Mem_Bank: map = m, Type = RW, addr = 0xc0000000, size = 0x00200000Mem_bank: map = m, Type =

RW, addr = 0xc0200000, size = 0x00200000, file =. / Initrd.imgmem_bank: map = m, type = rw, addr = 0xc0400000, size = 0x00c00000 for strongarm sa1100 (1) Special for Linux -------------- ---------------------------------- CPU: SA1100MACH: SA1100MEM_BANK: MAP = I, TYPE = RW, AddR = 0x80000000, size = 0x40000000mem_bank: map = M, type = RW, addr = 0xc0000000, size = 0x00800000mem_bank: map = M, type = RW, addr = 0xc0800000, size = 0x00400000, file = / initrd.imgmem_bank:. map = M , Type = RW, AddR = 0xc0C00000, size = 0x01400000Mem_Bank: map = I, Type = rw, addr = 0xE0000000, size = 0x08000000 # 0xe0000000 128M Cache Flush Memory Bank configures skyeye.conf is important, otherwise it is not a successful simulation. The following is the configuration of my SkyEye.conf for uclinux:

#Skyeye Config File Sample

CPU: ARM7TDMI

Mach: AT91

MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x00000000, size = 0x00004000

MAP = M, TYPE = RW, AddR = 0x01000000, size = 0x00400000

MAP = M, TYPE = R, ADDR = 0x01400000, size = 0x00400000, file = boot.rom

MAP = M, TYPE = RW, addr = 0x02000000, size = 0x00400000

MEM_BANK: MAP = M, TYPE = RW, ADDR = 0x02400000, size = 0x00008000

MAP = M, TYPE = RW, addr = 0x04000000, size = 0x00400000

MAP = I, TYPE = RW, addr = 0xf0000000, size = 0x10000000

#set nic info state = on / off mac = xx: xx: xx: xx: xx: xx ethmod = tuntap / vnet hostip = dd.dd.dd.dd

Net: State = ON, MAC = 0: 4: 3: 2: 1: f, Ethmod = Tuntap, Hostip = 192.168.0.172

5: Execute:

> skyeye linux

> Target SIM

> loading

> RUN

Will go in UClinux

The current problem is that UCLinux initialized IP is still 10.0.0.0.172, which can be set by IClinux, which is 10.0.0.0.172, can be set by IFCONFIG ETH0 192.168.0.172;

转载请注明原文地址:https://www.9cbs.com/read-35886.html

New Post(0)