Godson CD Use Instructions

Source: Internet
Author: User

This paper introduces the CD-ROM content and software usage instructions of godson32i development system.

1. CD Content

2. Running the Linux system on the Development Board
2.1 Using a DOM disk
2.2 Using NFS

3. Establish a development environment
3.1 GCC tool chain installation requirements
3.2 Installation Process

-------------------------------------------------------------------------------
1. CD Content
Godson32i development system equipped with the CD-ROM, mainly contains the following content:
(1)/gs32i_datasheet-confidential.pdf Processor Data Manual
(2)/bootloader including BootLoader binary code and source code
(3)/debug-tools Software for auxiliary debugging of the underlying software
(4)/toolchain GCC tool chain
(5)/linux Linux kernel source code, and root file system release package
(6)/utils some tool software

2. Running the Linux system on the Development Board
All binaries that run the Linux operating system on the development Board are stored in the/linux directory of the CD.
http://www.linux-mips.org/The above detailed introduction Linux to the MIPS platform porting, the following introduction
is also based on the content.

Linux system startup process can be divided into two parts: the core of the boot, and the root file system startup.
The godson BIOS on the Development Board is supported from a TFTP server (via Ethernet), or an IDE device (local hard drive or
Dom disk), get Linux core image File Execution (elf format). As a result, you can compile a good Linux core
(Vmlinux, or zimage), copied to the/BLX directory of the IDE device (primary partition, EXT2 file system), or
Copy to the root directory of the TFTP server for BIOS download core execution.
The TFTP service software has a Windows version and a Linux version that can be easily acquired and installed on the web.

The Linux core executes to the end and will hook up the root file system. The location of the root file system through the start of the core of life
Specifies that the row parameter can be configured in the BIOS, such as using ROOT=/DEV/HDA1, or
Root=192.168.0.1:/home/nfsroot/godson32i.

For instructions on how to configure the godson BIOS, refer to the BIOS manual in the CD root directory.

The following describes the installation of the Linux root file system.
The root file system is compressed in the/binarycode/dist+xwindow directory of the CD and is used
Unlock to the Linux root device (local IDE or nfsroot). It contains the X Window Window System.

2.1 Using the local IDE device to store the root file system
If the development Board reads the Linux core and root file system from a local IDE device (hard disk or DOM disk), you need to meet
The following requirements:
· The first partition of the hard disk/dom disk must be formatted as a EXT2 file system, and the root file system should be stored.
· The Linux core image file must be placed in the/BLX directory of this partition before it can be found by the BIOS;
· The hard disk/dom disk is properly connected to the Development board after it is loaded into the root file system.

To make a hard drive to start Linux on the Development Board, the simple steps are as follows:
1. Connect the hard drive to a Linux PC, use Fdisk, MKE2FS, and so on to establish EXT2 in its first partition
File system;
2. Use the Mount command to hook the partition to a directory on your PC, such as: # MOUNT/DEV/HDC1/MNT/MYHD
3. Unzip the Linux root file system compression package on the CD to the root directory of the hard disk, as
# CD/MNT/MYHD
# (assuming that the compressed package has been copied from the CD to the/tmp directory)
# tar Xzvf/tmp/nc-gs32i-tvia-4m-0.6.tar.gz
# cd/tmp; Umount/mnt/myhd
4. Connect the hard disk to the Development Board, and then start Linux by making sure that the BIOS is properly configured.

Linux boot process can be seen on the serial port console or on the monitor. Detailed startup information in the serial port control
Can be seen in Taiwan.

2.2 The Linux core image provided on the NFS storage root file system
    CD supports the NFS file system, allowing it to be hooked to the root. You can also place the
Linux root file system on an NFS server, allowing NFS client to load.
    You can set up Server for NFS with the following steps:
    1. Create a root directory for the Linux release package for the development Board, typically/home/nfsroot/godson32i
    2. Extract the compressed release package (such as nc-gs32i-tvia-4m-0.6.tar.gz) into this directory using the tar command,
    3. Configure Server for NFS to export/home/nfsroot/godson32i.
   
    After the configuration is complete, restart the NFS service for use.
   
    NFS Server Software, installed under Linux nfs-utils, Portmap can be used, through the/etc/exports
File configuration export directory; Microsoft's SFU suite can be used under Windows 2003. For specific configuration please refer to the relevant
data.
   

The

3.  Build development Environment
    CD provides a set of GCC3.2 Cross compilation tool chains for compiling Linux cores, BusyBox,
XFree86, It can also be used to compile the user's own application software or even the operating system.
   
3.1 gcc tool chain installation requirements
    Install the GCC tool chain on the CD, you need to have Redhat 8.0 or 9.0 installed on the system to install the for X86 system The GCC tool for the
. The installation of the
   
3.2 installation process
    Development Board's own tool chain is very simple, just log in as root, and expand the disc by using the
Tar command under the root directory (/). File gcc-3.2.tgz.tgz in the toolchain/directory.
This way, the tool chain will be installed in the/usr/tools-trad directory, and then the/usr/tools-trad/bin directory will be added to the default path for each development user (environment variable $path) and can be used.

3.3 Using the cross-compilation tool
    such as 3.2 to establish a compilation environment, you can log on to the Linux development host with a non-root user and write the Hello World
Program test. The steps are as follows:
    1. Use the editing tools such as VI to write the following hello.c:
    #include <stdio.h>
     int main (int argc, char *argv[]) {
     printf ("Hello world./n");
     return 0;
   }
   
    2. Compile with the Mipsel-linux-gcc-wall-o Hello hello.c command to generate the target file hello.
    If you view hello with the file command at this point, you can see that it is an executable file oriented to the MIPS architecture.
   
    3. Start the Development Board, go to linux, download the hello file to run locally, you can see its running results.
   
    This development tool is used in the same way as normal gcc, except that the generated code is for the MIPS architecture processor.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.