Forum Discussion

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

UBIFS build error

I am getting the following compile error after trying to enable UBIFS:

mkfs.ubifs.h:48:23: error: uuid/uuid.h: No such file or directory

I am fairly new to uClinux. I am investigating porting our current application running under uCOSII to uCLinux due to networking issues with uCOSII and the InterNiche stack.

My development host is running Ubuntu 9.10. I have followed the examples on the nioswiki and now have uClinux running on our custom board and booting uCLinux from flash with uBoot (uBoot is in the EPCS). I decided having a flash filesystem would be really useful in our application so I started looking at using UBIFS. Before enabling UBIFS I first performed the "git pull" to be sure I had the latest source:

update git to the latest

After you have first successful boot, you may use "git pull" to update the kernel and uClinux-dist. Please refer to GitServer.

cd uClinux-dist

git pull

cd ..

cd linux-2.6

git pull

cd ..

I followed the UBIFS instructions but the first sign of trouble came when I could not find the UBIFS utilities in the configuration manager.

Next in the User apps configuration menu, go to "Flash Tools" --->

[*] "mtd-utils" -->

[*] " ubifs utilities" .

I continued on without it but now I get the compilation error shown at the top.

Anyone have any ideas or seen this?

Thanks

Tim

8 Replies

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

    Ah, I did it with MMU. The "test-nios2" and "unstable" branches of uClinux-dist are a bit old.

    If you can afford 2K LE, please try MMU.

    Otherwise, please switch the branch of uClinux-dist to "trunk". In vendors/Altera dir,

    cp -a nios2nommu mynios2, select mynios2 and change init shell to sash.

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

    Thanks Hippo. Unfortunately, I am not sure I understand all of your instructions. I am pretty new to uClinux so you may have to be more explicit on how to perform the steps you described above. I found the vendors/Altera directory under uClinux-dist but I only have a directory of nios2 there. Not sure how to 'switch the the branch to "trunk"'. Sorry to be a bother.

    I did this under uClinux-dist:

    $git branch

    * test-nios2

    $git checkout -b trunk

    Switched to a new branch 'trunk'

    $git pull

    remote: Counting objects: 15, done.

    remote: Compressing objects: 100% (8/8), done.

    remote: Total 8 (delta 6), reused 0 (delta 0)

    Unpacking objects: 100% (8/8), done.

    From git://sopc.et.ntust.edu.tw/git/uClinux-dist

    82a6374..4843bae trunk -> origin/trunk

    You asked me to pull without telling me which branch you

    want to merge with, and 'branch.trunk.merge' in

    your configuration file does not tell me either. Please

    specify which branch you want to merge on the command line and

    try again (e.g. 'git pull <repository> <refspec>').

    See git-pull(1) for details.

    If you often merge with the same branch, you may want to

    configure the following variables in your configuration

    file:

    branch.trunk.remote = <nickname>

    branch.trunk.merge = <remote-ref>

    remote.<nickname>.url = <url>

    remote.<nickname>.fetch = <refspec>

    See git-config(1) for details.

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

    Please try this,

    cd uClinux-dist

    git fetch origin

    git checkout -b trunk origin/trunk

    It would be helpful to take some git tour.

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

    Thanks Hippo. All is good for now. I will try to find some more git server tour websites...

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

    Thanks for the git reference Hippo.

    I guess I spoke too soon about all being good...

    I am now getting the following error during the compile:

    boa.elf2flt(.text+0x148c): In function `main':

    /home/****ett/nios2/nios2-linux/uClinux-dist/user/boa/boa-0.94.14rc21/src/boa.c:94: undefined reference to `daemon'

    collect2: ld returned 1 exit status

    make[6]: *** [boa] Error 1

    make[6]: Leaving directory `/home/****ett/nios2/nios2-linux/uClinux-dist/user/boa/build-boa-0.94.14rc21/src'

    make[5]: *** [boa] Error 2

    make[5]: Leaving directory `/home/****ett/nios2/nios2-linux/uClinux-dist/user/boa/build-boa-0.94.14rc21'

    make[4]: *** [pre-build] Error 2

    make[4]: Leaving directory `/home/****ett/nios2/nios2-linux/uClinux-dist/user/boa'

    make[3]: *** [all] Error 2

    make[3]: Leaving directory `/home/****ett/nios2/nios2-linux/uClinux-dist/user/boa'

    make[2]: *** [boa] Error 2

    make[2]: Leaving directory `/home/****ett/nios2/nios2-linux/uClinux-dist/user'

    make[1]: *** [all] Error 2

    make[1]: Leaving directory `/home/****ett/nios2/nios2-linux/uClinux-dist/user'

    make: *** [subdirs] Error 1

    I tried disabling boa (although I would prefer having it eventually) and got a little farther but then got an error regarding the cgi-demo:

    romfs-inst.sh /home/httpd/cgi-bin/cgi_demo

    cp: cannot create regular file `/home/****ett/nios2/nios2-linux/uClinux-dist/romfs/home/httpd/cgi-bin/cgi_demo': No such file or directory

    Any thoughts?

    Thanks,

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

    I did a quick we search on the problem just stated above with boa and found this:

    --- Quote Start ---

    daemon is a C library function used to fork a process into the

    background (daemonize). This function is not supported on NOMMU

    architectures like MicroBlaze.

    I do not use busybox's HTTPD, but rather recommend using thttpd or

    fnord. fnord is my preference if you are doing any serious CGI due to

    some other NOMMU-related issues in thttpd's handing of get/post methods.

    Try disabling busybox's httpd option, and enable fnord in the menu

    config. Do "make user_only" *twice* (due to busybox build issues),

    remove the petalinux-dist/romfs directory, then run "make romfs image".

    From memory the fnord config file is identical syntax - it's very easy

    to get going.

    --- Quote End ---

    So I disabled httpd in BusyBox --> Networking Utilites and boa under Network Applications and enabled fnord under Network Applications. I also disabled generic-cgi under Miscellaneous Configuration. Now everything compiles ok but I have not yet tried this new build on my target. If this doesn't sound like the best approach, please advise otherwise.

    I really appreciate all the help with this.

    Thanks.

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

    I think fnord can be used instead of boa, though I didn't try it yet. Please let me know if it work. We shall update the wiki on this.

    Cheers.

    Hippo