当前位置: 动力学知识库 > 问答 > 编程问答 >

c - Porting eCos to i386

问题描述:

I am trying to port eCos on an i386 PC.

I have downloaded prebuilt redboot.bin from

http://ecos.sourceware.org/ecos/boards/redbootbins/x86pc/

I boot it onto usb disk, using

dd conv=sync if/redboot.bin of=/dev/sdb1

After booting target from usb, I get "IA2!" string on the target monitor always, and on serial port on 38400 8n1 configurations, I receive nothing.

I tried using i386-elf-gdb, but it is not able to connect to the target and starts printing "Ignoring error packet, Continuing..."

I also tried to build redboot using configtool for i386, but it is only able to build library, when I try Tests, It gives ERROR: multiple definition of cyg_start()

I am very new to eCos, and I don't know what I am doing wrong!!.

网友答案:

Ok, I figured out how to boot Redboot on a target i386 pc with RealteK RTL8139 ehternet card.

  1. install grub on usb stick,

    mkdir /mnt/USB && mount /dev/sdx1 /mnt/USB

    grub-install --force --no-floppy --boot-directory=/mnt/USB/boot /dev/sdx

  2. Build Redboot using ecosconfig, make sure the number of pci bus are less than 8 or more, if more, then need to increase the pci bus range from from 8 inside pci.h, I had my realtek ethernet card on bus 10 dev 10, I had to increase the bus to 11, so that redboot finds realtek card on bootup.

    ecosconfig new pc redboot

    configtool ecos.ecc

    add common ethernet support

    Build Library

  3. copy redboot.elf on usb.

  4. on grub startup menu,

    insmod multiboot

    multiboot /redboot.elf

    boot

Thats it, redboot will use BOOTP and provide IP Address, then I can test redboot commands like ip_address, reset, ping, version etc.

分享给朋友:
您可能感兴趣的文章:
随机阅读: