Changeset 4338045 in rtems


Ignore:
Timestamp:
May 8, 2003, 2:27:21 PM (17 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
4cbb51cc
Parents:
caebcb5b
Message:

Updated the GRUB version info and how to build GRUB from source.
Added how to boot over the network with a PXE Netboot BIOS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/HOWTO

    rcaebcb5b r4338045  
    11+-----------------------------------------------------------------------------+
    2 | RTEMS 4.5.0 PC386 BSP HOWTO - 1998/04/21                                    |
     2| RTEMS 4.6.0 PC386 BSP HOWTO - 2003/05/08                                    |
    33|                                                                             |
    44+-----------------------------------------------------------------------------+
     
    1717| History:                                                                    |
    1818|  12 June 2000 - Updated to 4.5 (Joel)                                       |
     19|   8 May  2003 - PXE GRUB (Chris Johns)                                      |
    1920+-----------------------------------------------------------------------------+
    2021
     
    3132    It covers essentially the aspects of loading images, since
    3233information concerning other issues such as building the development
    33 tools and the RTEMS distribution can be found in the 'RTEMS 4.0.0
     34tools and the RTEMS distribution can be found in the 'RTEMS 4.6.0
    3435On-Line Library' under 'Getting Started with RTEMS for C/C++ Users'.
    3536
     
    4344
    4445    Obtaining, building and installing the tools for building the
    45 PC386 BSP of RTEMS is covered in detail in the 'RTEMS 4.5.0 On-Line
     46PC386 BSP of RTEMS is covered in detail in the 'RTEMS 4.6.0 On-Line
    4647Library' -> 'Getting Started with RTEMS for C/C++ Users'.  You can
    4748either use pre-built toolset executables or build your own from
     
    5556-----------------
    5657    Obtaining, building and installing the tools for building the
    57 PC386 BSP is covered in detail in the 'RTEMS 4.5.0 On-Line Library' ->
     58PC386 BSP is covered in detail in the 'RTEMS 4.6.0 On-Line Library' ->
    5859'Getting Started with RTEMS for C/C++ Users' -> 'Building RTEMS'.
    5960
     
    107108
    108109
    109 6.2 Using GRUB to load RTEMS PC386 applications
    110 -----------------------------------------------
     1106.2 Using GRUB to load RTEMS PC386 applications from Floppy
     111-----------------------------------------------------------
    111112
    112113    Using GRUB (GRand Unified Bootloader) is the simplest way to load
    113 and run your PC386 BSP samples, tests and programs.
     114and run your PC386 BSP samples, tests and programs. You will need to build GRUB
     115so you need a working GCC and friends. The online documentation for GRUB lists
     116what you need:
     117
     118    - http://www.gnu.org/manual/grub/html_node/index.html
    114119
    115120    You can get the latest release of GRUB from its homepage:
    116121
    117     - http://www.gnu.org/grub/
    118 
    119 NOTE: The former location was http://www.uruk.org/grub and ftp from
    120       ftp://ftp.uruk.org/public/grub.
    121 
    122     Once you obtain the .tar.gz archive 'grub-0.4.tar.gz', change to a
    123 temporary directory (you won't need the grub files after this and can
    124 just go ahead and delete the whole directory structure that was
    125 generated) and unarchive 'grub-0.4.tar.gz' following the instructions
    126 given above in [2. Unarchiving].
    127 
    128     After this is done change the directory to:
    129 
    130       grub-0.4/bin_std
    131 
    132 and there you'll find the two files you'll need from this archive:
    133 'stage1' and 'stage2'.
     122    - http://www.gnu.org/software/grub/
     123
     124    Once you obtain the .tar.gz archive from:
     125
     126    - ftp://alpha.gnu.org/gnu/grub/
     127
     128Download the lastest version (grub-0.93.tar.gz), change to a temporary
     129directory (you won't need the grub files after this and can just go ahead and
     130delete the whole directory structure that was generated) and unarchive
     131'grub-0.93.tar.gz' following the instructions given above in [2. Unarchiving].
     132
     133      $ cd /tmp
     134      $ mkdir grub
     135      $ cd grub
     136      $ cat grub-0.93.tar.gz | gzip -d | tar xf -
     137
     138after this is done create a build directory and decend into it:
     139
     140      $ mkdir build
     141      $ cd build
     142
     143then configure GRUB with the standard options:
     144
     145      $ ../grub-0.93/configure
     146
     147and if successful run make:
     148
     149      $ make
     150
     151    Once complete you should have the 'stage1' and 'stage2' files. They will be
     152in the directories with the same name.
    134153
    135154    You should have two (2) formatted diskettes available. One of
     
    173192FreeBSD versions and Linux just fine):
    174193
    175      dd if=stage1 of=/dev/fd0 bs=512 count=1
    176      dd if=stage2 of=/dev/fd0 bs=512 seek=1
     194     dd if=stage1/stage1 of=/dev/fd0 bs=512 count=1
     195     dd if=stage2/stage2 of=/dev/fd0 bs=512 seek=1
    177196
    178197   Under DOS/Windows/NT, courtesy of Eric Hanchrow (erich@microsoft.com):
     
    181200       stage2 files together via:
    182201
    183          copy /b stage1 stage2 grub.raw
     202         copy /b stage1\stage1 stage2\stage2 grub.raw
    184203
    185204     * Use rawrite.exe (which is available in many places on the net and
    186205       in some Linux distributions) to write grub.raw to a diskette.
     206
     207(CCJ: I am not sure about the Windows location etc)
    187208
    188209   Next stage: copy the 'stage1' and 'stage2' files to the 'GRUB FS'
     
    234255
    235256
    236 6.3  Using NetBoot to load RTEMS PC386 applications
     2576.3 Using GRUB to load RTEMS PC386 applications via PXE NetBoot
     258----------------------------------------------------------------
     259
     260PXE is the Intel Preboot Execution Environment. A number of PC
     261manufactures provide a PXE option in the BIOS. This is usually a
     262Net Boot option in a BIOS configuration screen. The simplist way to
     263load an RTEMS application via PXE is to use GRUB as a first stage
     264loader.
     265
     266You will need to determine your network card, and have a working
     267network with a DHCP (or BOOTP), and TFTP server.
     268
     269You may to find a TFTP server that does not support option
     270negotiations. A google search shows a number of PC's have a buggy
     271PXE loader. Supressing option negotiations seems to make them
     272work.
     273
     274You will need to build GRUB for your network card. Follow the
     275procedure in item 6.2 up to the configure point. At this point
     276run the following configure command:
     277
     278    $ ../grub-0.93/configure --enable-diskless --enable-eepro100
     279
     280for an Etherexpress Pro 100 network card, then run make:
     281
     282    $ make
     283
     284    Once complete you should have the 'stage2/pxegrub' file. Copy
     285this to your TFTP server's download directory. Configure your
     286DHCP server to provide an IP address and download the image. For
     287the ISC server found on operating systems such as Linux something
     288like the following should do:
     289
     290  #
     291  # PC loading RTEMS via PXE and GRUB
     292  #
     293
     294  group
     295  {
     296    filename "/tftpboot/pxeboot";
     297    host rtems-pc { hardware ethernet 00:08:c7:73:41:65; }
     298  }
     299
     300If all works your PC should boot and load GRUB over the network:
     301
     302    GRUB  version 0.93  (639K lower / 64512K upper memory)
     303
     304  Address: 10.10.10.10
     305  NetMask: 255.255.255.0
     306  Server: 10.10.10.1
     307  Gateway: 10.10.10.1
     308
     309   [ Minimal BASH-like line editing is supported.  For the first word, TAB
     310     lists possible command completions.  Anywhere else TAB lists the possible
     311     completions of a device/filename. ]
     312
     313  grub>
     314
     315Copy your RTEMS executable to the TFTP server directory then enter
     316the following GRUB commands:
     317
     318  grub> root (nd)
     319    Filesystem type is tftp, using whole disk
     320
     321  grub> kernel ticker.exe
     322     [Multiboot-elf, <0x100000:0x1e5a4:0x2b08>, shtab=0x122140, entry=0x10000c]
     323
     324  grub> boot
     325
     326The GRUB documents how to get GRUB to load a configuration file.
     327
     328
     3296.4 Using NetBoot to load RTEMS PC386 applications
    237330---------------------------------------------------
    238331
Note: See TracChangeset for help on using the changeset viewer.