Network Configuration in LinuxFedora of QemuMini2440

Source: Internet
Author: User
Recently, at the request of a friend, I studied the simulation of QEMUMINI2440. I thought there was nothing in this process. This research has found many problems and I will share them with you. My system environment: 1. with VMware6.5, the host machine uses the LinuxFedora83.RTEMS compiling environment 4.9 On win72.VMWare6.5. First, I obtain the source code from the following website: 1. obtain the source code of QEMU: gitclonegit: // repo recently, at the request of a friend, to study the simulation of QEMU MINI2440. I thought there was nothing in this process. This research has found many problems and I will share them with you.

My system environment:
1. Use VMware 6.5 and host machine win 7
2. The system on VMWare 6.5 is Linux Fedora 8.
3. RTEMS compilation environment 4.9

First, obtain the source code from the following website:

1. Obtain the source code of QEMU: git clone git: // repo. or. cz/qemu/mini2440.git qemu
2. Obtain the UBOOT source code git clone git: // repo. or. cz/u-boot-openmoko/mini2440.git uboot

(Note: The version of QEMU is submitted by michelpollet at 0:28:03, and the version submitted by uboot is 2010/4/26 23:47:44 michelpollet.

At the bottom, there are link resources for these two versions)

First compile QEMU:
Cd qemu
./Configure -- target-list = arm-softmmu
Make

Compile UBOOT. Note that I am using the RTEMS 4.9 ARM compilation tool.

Cd uboot

Gedit Makefile # (Change CROSS_COMPILE = arm-linux-to CROSS_COMPILE = arm-rtems4.9-In line 140 -)
Export PATH =/opt/rtems-4.9/bin: $ PATH
Make mini2440_config
Make-j16
Cp u-boot.bin ../qemu/mini2440

This process went smoothly, followed by a nightmare ......

Go to the qemu folder and enter:

./Mini2440/mini2440_start.sh

Here is a problem:
1. If it is not installed when QEMU is compiled, that is, make install, You need to enable mini2440/mini2440_start.sh and change qemu-img of Line 1 to $ base/../qemu-img.

2. If QEMU is installed during compilation, make install is enabled, regardless of this step.

Not yet. Replaced:

/Etc/qemu-ifup: cocould not launch network script
Cocould not initialize device 'tap'

As a result, we started a long journey of searching for problems. Most of the online websites were based on Ubuntu and there were very few valuable solutions for Fedora 8:
1. Some websites say that the kernel does not have the tun module, but I do. Enter the following command:
Modprobe tun; lsmod | grep tun
System display: tun 11713 0

2. If the permission for/etc/net/tun is incorrect on the internet, enter the following command:
Ls-l/dev/net/tun
Crw-rw-1 root 10,200 2011-03-16 07:05/dev/net/tun
Obviously, neither. Note that you can use the following command to solve the problem:
Mkdir/dev/net
Mknod/dev/net/tun c 10 10 200
Chmod 666/dev/net/tun

3. For the script permission of/etc/qemu-ifup, enter the following command:
Chmod 777/etc/qemu-ifup

Chmod 777/etc/qemu-ifdown

4. You need to install uml-utilies and bridge-utils:
For Fedora 8, run the following command:
Yum install bridge-utils
It is easy to install.

(Bridge-utils-1.2-2.Fedora 8. i386.rpm available for download

Install with rpm-U bridge-utils-1.2-2.Fedora 8. i386.rpm)

However, the installation of uml-utilies is not through yum install uml-utilies, and this package does not exist.
But download: uml-utilities-20040406-75.i586.rpm,
Use command rpm-U uml-utilities-20040406-75.i586.rpm
Complete the installation. The tunctl and brctl commands are available in the system after the two packages are installed.

Still:/etc/qemu-ifup: cocould not launch network script ......
This is dumb. I think it is a problem of QEMU code.
So I tracked the Code a little and found that the net. c code in qemu contains 1,023rd rows
The static int launch_script (const char * setup_script, const char * ifname, int fd) function always returns-1.
It turns out to be execv (setup_script, args) of 1,045th rows; the function failed to start the script,
When the print function is added, errno is 8, that is

ENOEXEC

The new process image file has the appropriate access permissions, but is not in the proper format.

The permission is correct, but the format is incorrect. Oh, is it because the exec function family cannot start the script directly?
Haha, BUG, absolute BUG.

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.