2011-06-30 17:59:53     UBIFS fails to build

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-06-30 17:59:53     UBIFS fails to build

Timothy Stotts (UNITED STATES)

Message: 101940   

 

I have a failure attempting to build support for UBIFS into the latest 2010 distribution release.

 

I followed the instructions at:

 

https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:ubifs

 

A make clean does not resolve the issue.

 

Please advise as how to file a bug report.

 

# make > log 2>&1

 

Log and configurations attached.

 

# tail -n 15 log

unset CC CFLAGS CPPFLAGS CROSS LDFLAGS;         make -C 606f38a2221648ca5c5fa292c9f71d2ddd59fa66/mkfs.ubifs WITHOUT_XATTR=1 SUBDIRS= BUILDDIR=$PWD/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.ubifs TARGETS="  mkfs.ubifs"

make[4]: Entering directory `/home/adi/myboard/blackfin-linux-dist/user/mtd-utils/606f38a2221648ca5c5fa292c9f71d2ddd59fa66/mkfs.ubifs'

mkdir -p /home/adi/myboard/blackfin-linux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.ubifs/

gcc -D_FILE_OFFSET_BITS=64 -O2 -g -Wall -Wextra -Wwrite-strings -Wno-sign-compare -c -o /home/adi/myboard/blackfin-linux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.ubifs/lpt.o lpt.c -g -Wp,-MD,/home/adi/myboard/blackfin-linux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.ubifs/.lpt.c.dep

In file included from lpt.c:23:

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

make[4]: *** [/home/adi/myboard/blackfin-linux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.ubifs/lpt.o] Error 1

make[4]: Leaving directory `/home/adi/myboard/blackfin-linux-dist/user/mtd-utils/606f38a2221648ca5c5fa292c9f71d2ddd59fa66/mkfs.ubifs'

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

make[3]: Leaving directory `/home/adi/myboard/blackfin-linux-dist/user/mtd-utils'

make[2]: *** [mtd-utils] Error 2

make[2]: Leaving directory `/home/adi/myboard/blackfin-linux-dist/user'

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

make[1]: Leaving directory `/home/adi/myboard/blackfin-linux-dist/user'

make: *** [subdirs] Error 1

 

config_config

log

linux_config

QuoteReplyEditDelete

 

 

2011-06-30 18:10:18     Re: UBIFS fails to build

Mike Frysinger (UNITED STATES)

Message: 101941   

 

your error shows the issue:

error: uuid/uuid.h: No such file or directory

 

so install the package in your host distro that provides the file as detailed in the documentation:

  docs.blackfin.uclinux.org/doku.php?id=installing_linux

QuoteReplyEditDelete

 

 

2011-07-05 10:53:45     Re: UBIFS fails to build

Timothy Stotts (UNITED STATES)

Message: 102133   

 

Sorry Mike. I already followed that documentation when initially setting up my host. I am using coLinux (Debian Lenny).

 

I tried the following; it installed more packages, but it did not help.

 

# sudo apt-get build-dep mtd-utils

 

I have read from very old forums that I want to install the package e2fsprogs-dev; however, this package is not available in the coLinux distribution and e2fslibs-dev does not contain uuid.h.

 

I will continue to look into it.

QuoteReplyEditDelete

 

 

2011-07-05 10:58:19     Re: UBIFS fails to build

Timothy Stotts (UNITED STATES)

Message: 102134   

 

# apt-get install uuid-dev

QuoteReplyEditDelete

 

 

2011-07-05 11:06:21     Re: UBIFS fails to build

Timothy Stotts (UNITED STATES)

Message: 102135   

 

Now that the UBIFS MTD Utils are building, the static device table provided by vendor BlueTechnix for CM-BF537E is failing to parse for the ubifs root filesystem only. For romfs, there is no error.

 

        /home/adi/myboard/blackfin-linux-dist/tools/mkdevdir-genromfs.sh /home/adi/myboard/blackfin-linux-dist/romfs device_table.txt; \

        romfs-inst.sh -s /var/tmp/log /dev/log; \

        /home/adi/myboard/blackfin-linux-dist/user/genromfs/genromfs  -f /home/adi/myboard/blackfin-linux-dist/images/rootfs.romfs -d /home/adi/myboard/blackfin-linux-dist/romfs; \

        rm -rf /home/adi/myboard/blackfin-linux-dist/romfs/dev/*

/home/adi/myboard/blackfin-linux-dist/user/mtd-utils/mkfs.ubifs --squash-uids -m 2048 -e 204800 -c 1024 -d /home/adi/myboard/blackfin-linux-dist/romfs -D device_table.txt -o /home/adi/myboard/blackfin-linux-dist/images/rootfs.ubifs

Error: count cannot be zero if increment is non-zero

Error: cannot parse '/dev/mtdblock0     b       640     0       0       31     0

        0       1       -'

Error: cannot parse device table file 'device_table.txt'

make[3]: *** [image.rootfs.ubifs.force] Error 255

make[3]: Leaving directory `/home/adi/myboard/blackfin-linux-dist/vendors/myvendor/myboard1'

make[2]: *** [image] Error 2

make[2]: Leaving directory `/home/adi/myboard/blackfin-linux-dist/vendors/myvendor/myboard1'

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

make[1]: Leaving directory `/home/adi/myboard/blackfin-linux-dist/vendors'

make: *** [image] Error 2

 

device_table.txt

QuoteReplyEditDelete

 

 

2011-07-05 12:18:44     Re: UBIFS fails to build

Mike Frysinger (UNITED STATES)

Message: 102137   

 

use the ADI ones as examples

QuoteReplyEditDelete

 

 

2011-07-05 18:50:52     Re: UBIFS fails to build

Gilles Ganault (FRANCE)

Message: 102145   

 

> Now that the UBIFS MTD Utils are building, the static device table provided by vendor BlueTechnix for CM-BF537E is failing to parse for the ubifs root filesystem only. For romfs, there is no error. "Error: count cannot be zero if increment is non-zero"

 

I had the same issue. It was solved by using the device_table-min.txt and letting  /bin/mdev build the dev nodes dynamically. Give it a shot and see if it solves the problem.

QuoteReplyEditDelete

 

 

2011-07-08 16:34:27     Re: UBIFS fails to build

Timothy Stotts (UNITED STATES)

Message: 102264   

 

Thank you Gilles. However, I have already tried that approach. I have been unable to get mdev to operate while having the root filesystem mounted as a romfs filesystem in RAM.

QuoteReplyEditDelete

 

 

2011-07-08 19:46:30     Re: UBIFS fails to build

Gilles Ganault (FRANCE)

Message: 102272   

 

> I have been unable to get mdev to operate while having the root filesystem mounted as a romfs filesystem in RAM.

 

Works for me on an BF532 CPU. Is there anything suspicious in dmesg?

 

FWIW, here's my /etc/rc.d/S20mdev called through /etc/rc:

 

#!/bin/sh

# Start up file for mdev

 

case $1 in

        start) echo "Starting mdev...";

        #echo /sbin/mdev > /proc/sys/kernel/hotplug;

        /sbin/mdev -s;

        ;;

 

        stop) killall -9 mdev;;

 

        enable) rm -f /etc/rc.d/S20mdev;

                ln -s /etc/init.d/mdev /etc/rc.d/S20mdev;;

 

        disable) rm -f /etc/rc.d/S20mdev;;

 

        *) cat <<EOF;;

 

Syntax: /etc/init.d/mdev [command]

 

Available commands:

        start   Start the service

        stop    Stop the service

        enable  Enable service autostart

        disable Disable service autostart

EOF

esac

 

QuoteReplyEditDelete

 

 

2011-07-11 18:41:39     Re: UBIFS fails to build

Timothy Stotts (UNITED STATES)

Message: 102330   

 

# /etc/rc

 

if [ -e /bin/mdev ] ; then

    mount -t ramfs ramfs /dev

    echo /bin/mdev 2>/dev/null > /proc/sys/kernel/hotplug

    /bin/mdev -s 2> /dev/null

fi

Outcomes