Forum Discussion

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

uCLinux file system...

Hi.

I'm using the Microtronix Product Starter Kit with the NIOS-II IDE and uCLinux 2.6.

Followed the steps starting on p. 13 of "Nios II Linux Quickstart Guide" to create and build the root filesystem, but /dev/sda does not appear in the built filesystem.

This is needed for the USB features.

Why is /dev/sda not being included in the root filesystem?

Thanks,

Andy

5 Replies

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

    Look at linux-2.6.x/Documents/devices.txt for the list of devices numbers.

    Use "mknod" to add the node,

    mknod /dev/sda b 8 0

    mknod /dev/sda1 b 8 1

    And add to your init script,

    mount -t usbfs none /proc/bus/usb

    By the way, I would recommand building toolschain and developing on Linux.

    It would be much faster and less trouble.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by hippo@Dec 19 2005, 04:43 PM

    look at linux-2.6.x/documents/devices.txt for the list of devices numbers.

    use "mknod" to add the node,

    mknod /dev/sda b 8 0

    mknod /dev/sda1 b 8 1

    and add to your init script,

    mount -t usbfs none /proc/bus/usb

    by the way, i would recommand building toolschain and developing on linux.

    it would be much faster and less trouble.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=11649)

    --- quote end ---

    --- Quote End ---

    Thank you, hippo.

    I tried your suggestion, and I get:

    "mknod: cannot make device /dev/sda",

    and,

    "mknod: cannot make device /dev/sda1".

    I&#39;m new to Linux, unfortunately, but that&#39;s temporary.

    What do you suppose is happening here?

    Thanks again.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    sorry, it should not be /dev/sda if you are not running on your uClinux system.

    On your PC,

    cd to your rootfs for uClinux,

    cd dev

    mknod sda b 8 0

    mknod sda1 b 8 1

    In another way, you can also add to your init script

    mknod /dev/sda b 8 0

    mknod /dev/sda1 b 8 1

    mount -t usbfs none /proc/bus/usb

    Please take a look at another thread posted from me

    "Mini howto build toolschain and initramfs on Linux"
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks again, hippo.

    Here&#39;s the thing. I&#39;m running uClinux on the target, not my PC.

    The target is the Microtronix Product Starter Kit with a USB mezzanine board. It uses the Altera NIOS-II processor and the software development is done on the PC with Altera&#39;s NIOS-II Embedded Processor Design Tools. The IDE is based on the Eclipse framework.

    The filesystem and the kernel get built on the PC, then they get uploaded to flash memory on the target, so the filesystem is already built on the PC before it gets loaded into flash. But for some reason, /dev/sda isn&#39;t generated when I build the filesystem.

    ?????

    Thanks.