RTEMS serial (3) Start the mirror file production (below)

xiaoxiao2021-03-06  41

Author ray

RTEMS copyright, reproduced please indicate: Source http://www.rtems.net, author ray@rtems.net

Summary

Describes how to make and configure grub to start the RTEMS test image.

Method 2: Install the bootloader to floppy disk image directly using the grub command

You can run the GRUB command directly under the platform installed for GRUB.

# Grub

The following interface will be displayed, and enter the following instruction below "GRUB>" command line prompt:

GRUB version 0.95 (640K lower / 3072K upper memory) [Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device / filename.] Grub> device ( FD0) / dev / loop0 (using / dev / md0c device under BSD platform) GRUB> root (fd0) GRUB> Setup (fd0)

Method 3: Use a grub-install command

This order I used to use it, once I gave the system's bootloader, everyone should be careful.

The format is:

# Grub-install --root-directory =. / fd0

(Note that the FD0 is the catalog of its own, and the floppy mirror image of GRUB is already loaded, not / dev / fd0)

Cygwin platform installation GRUB

The above operation can also be performed on the Cygwin platform. But I didn't make it. According to the experience of starting mirroring in ECOS, it is fully feasible in CygWin, which is as follows: (if some netizens have successful, but do not use the above steps, you can notify me, thank you!)

Enter Bash mode

First DD make mirror, then Mount

#mount ...

Next, use GRUBInstall

# Grub-install --root-directory = /

Then follow the steps of the LINUX platform, it is not more than the LINUX platform.

(Description, because there is no timely organizer, the time is worn out, so some chaos are written, but it is not possible to ensure the correct step 100%. If you encounter problems, you can contact me, thank you)

Copy RTEMS launch test mirror

Switch back to Linux (BSD) and return to the development environment, the Sample file generated after compiling RTEMs. Mirror files below the i386-RTEMS / PC386 / TESTS directory below the compilation directory of RTEMS or the i386-RTEMS / PC686 / TESTS directory.

Compact the file you need to test to .gz format

# TAR CZVF Hello.exe.686.gz Hello.exe

......

The compressed Hello.exe is only 57kb. So the 1.4M mirror file can be stored in many test programs. Everyone likes to test what is good. The following mirror files are provided in the downloaded image:

[Root @ localhost embedded] # mount rtems.img / mnt -o loop [root @ localhost embedded] # cd / mnt [root @ localhost mnt] # ls base_sp_386.exe.gz hello_386.exe.gz paranoia_686.exe.gz unlimited_686 .exe.gzbase_sp_686.exe.gz hello_686.exe.gz stage1 Grubmenu Lost Found Stage2grub configuration

After GRUB is installed, you need to configure the startup menu.

Readers should still remember the following commands in GRUB installation:

GRUB> Install = (fd0) / stage1 (fd0) (fd0) / stage2 0x8000 (fd0) / GRUBMENU

The gRubmenu in the command is the startup menu file of Gurb, which is equivalent to the menu.lst file under the Linux platform.

We can edit this file

# mount rtems.img / mnt -o loop # CD / MNT # vi Grubmenu

Add the following

Title = hello for pc686 kernel = (fd0) /Hello_686.exe.gz title = paraanoia_686 kernel = (fd0) /paranoia_686.exe.gz title = base bsp 686 kernel = (fd0) /BASE_SP_686.EXE.GZ Title = i386 Hello World test kernel = (fd0) / HELLO_386.EXE.GZ Title = Base BSP 386 kernel = (fd0) /base_sp_386.exe.gz title = base bsp 686 kernel = (fd0) /BASE_SP_686.EXE.GZ

Ok, now I am very good, uninstall the device, and then start with RTEMS.IMG.

Will have the following menu:

Run the first mirror file as follows:

The DEMO mirror file in this series can be downloaded in the download area

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

New Post(0)