Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Neutrino Makefiles: (5 Items)
   
Neutrino Makefiles  
First of all, when I run hide-gnu.sh as an external tool from within Momentics there are a lot of failed touch commands 
because for some reason it's picking up the "QNX Neutrino" dir as
"QNX" and "Neutrino" dirs. The workaround I've been using is to rename it to something that won't be mistaken (i.e. 
QNX_Neutrino) and then renaming it back ... but, there has to be a better way. I didn't see anything in the script that 
would allow me to do that since it's apparent that QNX and Neutrino are being held in the dir var at different times.

Second, when I try doing a make -j3 (after I do make -j3 hinstall) at the CLI instead of within momentics, I get an 
Error 2 failure (DNDEBUG command not found) which means there's no DNDEBUG env. var. What should I set this to?

Adittionally, I have a multi-core processor and would like to use it to its full potential, so a
make -j3 <target> would be fantastic, but according to the man page, the last -j option is the one used by default. I've
 noticed that each makefile within the Neutrino source uses make -j 1 <targets>  ... is there a special reason for that,
 and is there a way I can change it (if it's safe)?

Last, but not least, the target machine that I'm building for has two processors, an arm7 and an arm9 ... how would I 
cross-compile the Operating System (kernel/procmgr) for the target using momentics or the command line?

That's all I've got for now, thanks in advance for looking at this all ... if I have any more questions I'll be back.

Cheers,
-Aaron
Re: Neutrino Makefiles  
On Wed, Feb 20, 2008 at 10:19 AM, Aaron Cripps <cripps@cs.mun.ca> wrote:

> First of all, when I run hide-gnu.sh as an external tool from within
> Momentics there are a lot of failed touch commands because for some reason
> it's picking up the "QNX Neutrino" dir as
> "QNX" and "Neutrino" dirs. The workaround I've been using is to rename it
> to something that won't be mistaken (i.e. QNX_Neutrino) and then renaming
> it back ... but, there has to be a better way. I didn't see anything in the
> script that would allow me to do that since it's apparent that QNX and
> Neutrino are being held in the dir var at different times.


The whole QNX build process will fall to pieces if you put the source down a
path that contains directories with spaces in them.
It is a known issue, but unlikely to change in the near term.  So your
problem with the hide-gnu.sh is just the tip of the iceberg.

>
> Second, when I try doing a make -j3 (after I do make -j3 hinstall) at the
> CLI instead of within momentics, I get an Error 2 failure (DNDEBUG command
> not found) which means there's no DNDEBUG env. var. What should I set this
> to?
>
Again, you are likely running into a parse error that started somewhere
along the line with directories containing
spaces causing the makefile macros to get confused.  It is wanting to pass
-DNDEBUG as a compiler/pre-processor
define of NDEBUG on the command line.  The makefiles do this explicitely for
specific (non-debug) variants.


> Adittionally, I have a multi-core processor and would like to use it to
> its full potential, so a
> make -j3 <target> would be fantastic, but according to the man page, the
> last -j option is the one used by default. I've noticed that each makefile
> within the Neutrino source uses make -j 1 <targets>  ... is there a special
> reason for that, and is there a way I can change it (if it's safe)?


There are some tricky dependencies that are explicit in the build structure,
but not known to make so you have to be carefull.
I also think that there was a bug that has since been fixed that was a
limiting factor.  If you search through previous posts
in the community (unfortunately I don't remember if it was in IDE, command
line tools or in the OS forums) there was a
report of how to best do this.  It involves setting a make parameter (like
OSLIST=nto)

>
> Last, but not least, the target machine that I'm building for has two
> processors, an arm7 and an arm9 ... how would I cross-compile the Operating
> System (kernel/procmgr) for the target using momentics or the command line?
>
The build system 'cross compiles' based on what you set as your build
variants, the CPULIST is the one that you will
be interested in, although you may prefer the EXCLUDE_CPULIST instead since
you will want to build for ARM but
not PPC.


> That's all I've got for now, thanks in advance for looking at this all ...
> if I have any more questions I'll be back.
>
You will want to take a look through the other forums, lots of interesting
information for you there.  Also read through
the extra details on how the QNX makefiles work since that will clear up a
lot about things like cross compiling for
you.

Hope this helps,
 Thomas
Re: Neutrino Makefiles  
Yes, that does help a fair amount, thanks Thomas.

I think a simple fix for allowing the hide-gnu.sh script to run is at the beginning of the script do "mkdir QNX_Neutrino
;" and at the end do "mv QNX_Neutrino QNX\ Neutrino" ...
I know, it's a dirty hack, but it prevents users from having to do it manually.

I have been/will be taking a deeper look through the forums just to glean what information I can ... I did know about 
the CPULIST, but I didn't know about EXCLUDE_CPULIST ... that's kind of nifty.

It's good to know that some of these problems aren't so much my configuration as they are general problems.

One last quick question, about general architecture, the Neutrino ARM build, will that work for any version of the ARM 
proc, or is there a base subset of instructions that all versions of the ARM processor will run ... is there any way to 
optimize the build for, say, an ARMv7/ARMv9 pair?

Again, thanks for the help, and for your patience.
Cheers,
-Aaron
Re: Neutrino Makefiles  
On Wed, 2008-02-20 at 20:23 -0500, Thomas Fletcher wrote:

> The whole QNX build process will fall to pieces if you put the source
> down a 
> path that contains directories with spaces in them. 
> It is a known issue, but unlikely to change in the near term.

Just to add some verbosity... the problem comes from the fact that good
ol' "make" uses spaces as the filenames seperator.  That was a
reasonable choice in the good ol' days when make was born.  In order to
"fix" this would pretty much require that we get rid of make.

> There are some tricky dependencies that are explicit in the build
> structure, 
> but not known to make so you have to be carefull. 
> I also think that there was a bug that has since been fixed that was
> a 
> limiting factor.

The makefiles in 6.3.2SP3 and before have issues with parallel make.

The makefiles in head should work for parallel build (and so in 6.4 it
will work).  There were fixes that needed to be made in the central
makefiles, and a handful of other fixes in some of the common.mk files.

Assuming a system with the fixed makefiles, one should run:

make JLEVEL=3 install

Do not use make's -j option.

But as I said, you cannot do this without the latest makefiles.

Re: Neutrino Makefiles  
Okay, I made some additions to the hide-gnu.sh script, this should prevent the errors associated with having a directory
 name containing a space.

The additions basically do what I suggested earlier:

After the argument checks are made:
If QNX Neutrino directory exists, rename it to (else create) QNX_Neutrino

After the script is finished doing it's stuff:
If QNX_Neutrino directory exists, rename it to QNX Neutrino, else tell the user that something's wrong.


Attached to this post is the modified version of the script ... I hope it helps somebody :)

cheers,
-Aaron Cripps

Attachment: Text hide-gnu.sh 959 bytes