Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

How to build applications

How do you generate a makefile with the "Create Make Target" and "build make target"

functions?

Every time I try it I get:

make -k dhrystone

make: *** No rule to make target `dhrystone'

The reference guide is worthless in this area.

14 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Well that explains the error I was getting at home.

    Now when I insert the flash card the console displays:

    hda: 3SYSTEM SSSCF016MAA. CFA DISK drive

    ide0 at 0x80920900-0x80920907,0x80920938 on irq 5.

    So it looks like the hardware is configured properly.

    According to the reference guide (p31) I am supposed to enter the command "fdisk /dev/hda"

    but I get the response "Unable to open /dev/hda".

    Any ideas?

    John K
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi... I was able to duplicate your error by having the CF card removed while starting up fdisk. Which leaves me to believe that the CF device driver isn't properly reading your compact flash card. When the driver for the CF card detects a card in the slot, you should see something along the lines of:

    hda: SanDisk SDCFB-16, CFA DISK drive

    Using anticipatory io scheduler

    ide0 at 0x80920900-0x80920907,0x80920938 on irq 5

    hda: max request size: 128KiB

    hda: 31360 sectors (16 MB) w/1KiB Cache, CHS=490/2/32

    hda: hda1

    The last few lines of text indicate that the driver has been able to read the geometry of the CF card. It also indicates what partitions it can detect (in my case, only 1 primary partition).

    My suggestion would be to try another brand of CF card (or at the very least, another CF card) and see if that causes the same problem.

    One other issue might have to do with the romfs. Try the following command:

    ls -l /dev/hda

    It should produce the following output

    brw-------  1 root     root       3,   0  Jan  1 1970  /dev/hda
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    One other suggestion:

    As I understand it, you're trying to setup a CF card as a writable filesystem in order to upload your apps for running?

    One of my favourite methods of running one-shot apps is to upload to one of the ram filesystems that are currently mounted.

    As an example, if you're using a full filesystem setup, then there should be 2 mounted ext2 filesystems that exist on ramdisks.

    # mount
    rootfs on / type rootfs (rw)
    /dev/root on / type romfs (ro)
    /dev/ram0 on /var type ext2 (rw)
    /dev/ram1 on /tmp type ext2 (rw)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)

    Notice the /var and /tmp lines.

    I usually perform a chmod 777 on the /tmp directory, connect via FTP using the "nios" and "uClinux" username/password combo, then upload to the /tmp directory.

    It's a quick a dirty way of running apps without rebuilding and reuploading the filesystem.

    If you want more info on the above procedure, just let me know.