Building on Ubuntu Desktop

12 replies [Last post]
BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010

When trying to build the latest source on Ubuntu 13.04, I've found a couple of issues :-

The xap-flash Makefile has a line :- 

install -m 444 *.{swf,png,jpg,xml} $(INSTALL_DIR)/usr/share/flash

This throws an error :-

install: cannot stat '*.{swf,png,jpg,xml}

A workaround is to include 4 seperate lines for each file type :-

install -m 444 *.swf $(INSTALL_DIR)/usr/share/flash
install -m 444 *.png $(INSTALL_DIR)/usr/share/flash
install -m 444 *.jpg $(INSTALL_DIR)/usr/share/flash
install -m 444 *.xml $(INSTALL_DIR)/usr/share/flash

NOTE: The next time you sync with the repository you will get a conflict.

The second problem is that there is no root user as such, so at the end of the build process when you get prompted for the root password, whatever you enter is wrong.  To overcome this it is necessary to run the make command like this and enter your password when prompted, a downside of this is that root then owns all the files :- 
$ cd livebox-hah-read-only
$ sudo make
A workaround for this would to to change the lines below in the HAH Makefile, but again, you will get a repository conflict the next time you sync.
Under the buildimage section:
su --command="cd $(TARGETS_DIR); ./buildFS"
to
sudo su --command="cd $(TARGETS_DIR); ./buildFS"
Under target_clean section:
su --command "rm -fr $(TARGET_RS)"
to
sudo su --command "rm -fr $(TARGET_RS)"
There may be better solutions, but these worked for me.
brett
Offline
Providence, United States
Joined: 9 Jan 2010
It just globbing.

Strange because this syntax is perfectly valid.  I'll expand it.  This is just standand bash syntax thou?

http://tldp.org/LDP/abs/html/globbingref.html

brett
Offline
Providence, United States
Joined: 9 Jan 2010
No root user on Ubuntu - yeah

No root user on Ubuntu - yeah well I don't consider Ubuntu a real OS either ;)

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Syntax

I know, I tested it from the command line like this without a problem :-

ls -l *.{swf,png,jpg,xml}

 

I might just use a different OS, it'll make things easier.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
if you "svn update" you'll

if you "svn update" you'll pick up the changes I committed - its only the part that needs to run as root that will be wart for you now.

PS: I do all my develop on CentOS 5.5 - its getting a little old now.

Brett

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Linux

I like choice, but there are too many distributions of Linux.  I'm just loading Debian now, might make RasPi development a bit easier as well.

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Build Process

For info, I've also noted this output when building :-

sudo su --command="cd /home/karl/livebox-hah-read-only/targets; ./buildFS"

[sudo] password for karl:

./buildFS: 6: [: unexpected operator

I've had a look at the buildFS file, and assumed the 6 refers to line 6, but can't see what might be wrong.

 

Also, this seems to take FOREVER, is that expecxted?

'proc/kmsg' -> '/fs/proc/kmsg'

 

No big deal, as I said I'm looking at Debian as well.  I'll probably try the latest CentOS laterjust to be thorough.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
[ is a standard command.  Its

[ is a standard command.  Its an alias for "test" effectively.  Its a another standard linux command without it things are going to die badly.

[root@wombat brett]# ls -l /usr/bin/[
-rwxr-xr-x 1 root root 32296 Mar  1  2010 /usr/bin/[
[root@wombat brett]#

There is nothing wrong... Its Ubuntu that is having a hissy fit.  Is that again or still :)
Debian is Ubuntu without all the marketing... it will also give you grief.

RedHat (Commerical) - CentOS (free distro of RedHat) - Fedora (Redhat public domain).
I tend to use CentOS as I spend all my working life in RedHat.

A nice graph also try googing "linux distribution tree" (images)
http://httwww.kde-look.org/CONTENT/content-files/46315-linux_timeline_po...

Brett

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
CentOS it is then

OK, deleting Ubuntu and Debian and installing CentOS.

That's a big graph, my screen isn't big enough to display it :)

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
New Problems with CentOS

OK, so I built a CentOS system, 32 bit minimal install, installed the toolchains in /opt and modified the .bashrc of my user, logged out and back in again.  I then checked out the repository, latest build 445, cd'd into the directory, ran make, but get this error :-

[karl@hahdev livebox-hah-read-only]$ make

cp /home/karl/livebox-hah-read-only/targets/LIVEBOX/kernel-Config /home/karl/livebox-hah-read-only/kernel_2_4_17/linux/.config

cd /home/karl/livebox-hah-read-only/kernel_2_4_17/linux; \

        make oldconfig; \

        make dep && make

make[1]: Entering directory `/home/karl/livebox-hah-read-only/kernel_2_4_17/linux'

rm -f include/asm

( cd include ; ln -sf asm-mips asm)

/bin/sh scripts/Configure -d arch/mips/config.in

#

# Using defaults found in .config

#

scripts/Configure: line 556: .: .config: file not found

scripts/Configure: line 558: .: .config-is-not.4132: file not found

*

* Code maturity level options

*

Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL) [N/y/?] (NEW) 

Now if I understand what's going on correctly, which is questionable, the "scripts/Configure" script is looking for the presense of the .config file, I've checked and it does exist in the "~/livebox-hah-read-only/kernel_2_4_17/linux" folder.  The output doesn't give the full path to the .config file, so could it be looking, or in, the wrong place?

 

I've checked my PATH, whick looks right :-

[karl@hahdev livebox-hah-read-only]$ echo $PATH

/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/toolchains/bin:/home/karl/bin

I seemed to get past this part when compiling on Ubuntu.
If any of you Linux experts out there can shed any light on it I'd appreciate it.
The only thing I could find on the Web was this http://askubuntu.com/questions/22267/error-when-i-try-to-compile-the-kernel-2-6-37 but that didn't help.
Thanks
Karl
BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Downgrade Works

Going to CentOS 5.5, instead of 6.4, seems to sort the problem out.

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
yacc error

Almost there :-

make -C /home/karl/livebox-hah-read-only/userapps/opensource/avrdude-5.10

make[1]: Entering directory `/home/karl/livebox-hah-read-only/userapps/opensource/avrdude-5.10'

make  all-recursive

make[2]: Entering directory `/home/karl/livebox-hah-read-only/userapps/opensource/avrdude-5.10'

make[3]: Entering directory `/home/karl/livebox-hah-read-only/userapps/opensource/avrdude-5.10'

/bin/sh ./ylwrap config_gram.y y.tab.c config_gram.c y.tab.h config_gram.h y.output config_gram.output -- yacc  -d

./ylwrap: line 111: yacc: command not found

make[3]: *** [config_gram.c] Error 1

make[3]: Leaving directory `/home/karl/livebox-hah-read-only/userapps/opensource/avrdude-5.10'

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

make[2]: Leaving directory `/home/karl/livebox-hah-read-only/userapps/opensource/avrdude-5.10'

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

make[1]: Leaving directory `/home/karl/livebox-hah-read-only/userapps/opensource/avrdude-5.10'

make: *** [avrdude] Error 2

[karl@hahdev livebox-hah-read-only]$

This needed yum install byacc to fix it.  Again, this CentOS installation was minimal so perhaps not a normal error, not sure if this is worth updating the wiki for.
Lets see how far the compilation gets now, time for a coffee ........
Worked like a charm.
brett
Offline
Providence, United States
Joined: 9 Jan 2010
I have bison installed

I have bison installed instead of byacc but it should do the same job even though its a different parser generator.

I'll add bison as a dependency to the Building the HAH firmware page.

AVRDUDE was added well after I wrote those setup notes so the fact there is now a missing dependency doesn't suprise me.
Thanks for the feedback glad you figure it out.  I was a little suprised that CentOS 6.x failed and you had to downgrade back to 5.x I guess I'll run into this if I ever upgrade my OS !

Brett

Hardware Info