Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How can we force linux kernel linking from QNX build file? : (7 Items)
   
How can we force linux kernel linking from QNX build file?  
We have been working on project where we are porting from QNX kernel to Linux kernel,Currently we have QNX build file 
from where we are calling our procnto Qnx kernel after some startup code.

Now we are trying to call Linux Kernel instead of Qnx Kernel but while building our IFS file we are not able to link to 

Linux Kernel to this final IFS image although we have inserted ELF Header into Linux KERNEL.

Error msg shows says ->

Warning: Host file 'libc.so' missing.
Can not find required linker for '/nobackup/njaganat/CRS_2/nto/os/sys/bin-x86e/Linux_kernel '.
 /nobackup/njaganat/CRS_2/nto/util/bin-x86-linux/mkxfs returns error



Below is content of build file.




[image=0x400000]

[+optional]

[+compress]


[linker="gld.c4.2.1-p2.linux -m elf_i386 -e _start -T/xyz/build/src-x86e/link.map -EL %(h!=0, -Ttext 0x%t%)%(d!=0, -
Tdata 0x%d%) -o%o %i %[M -L%^i -uinit_%n -lmod_%n -L%^i -L/nobackup/xyz/nto/os/lib/bin-x86e -Bstatic -lc %]"]

[virtual=x86,name] .bootstrap = {


[+keeplinked]

   [search="$\{ROOT_DIR\}"/nto/os/sys/bin-x86e ]  KER_VSIZE=512M PATH="/bin:/sbin:" Linux_kernel 

}


 Is it because we are missing libc.so file as  "The runtime linker is expected to be found in a file called ldqnx.so.2, 

but the runtime linker is currently contained within the libc.so file, so we would make a process manager symbolic link 

to it."

Canbody let us know what could be the problem

Thanks,
Amit


Re: How can we force linux kernel linking from QNX build file?  
The problem is the Linux kernel. You should not be using it.

> 
> We have been working on project where we are porting from QNX kernel to Linux 
> kernel,Currently we have QNX build file 
> from where we are calling our procnto Qnx kernel after some startup code.
> 
> Now we are trying to call Linux Kernel instead of Qnx Kernel but while 
> building our IFS file we are not able to link to 
> Linux Kernel to this final IFS image although we have inserted ELF Header into
>  Linux KERNEL.
> 
> Error msg shows says ->
> 
> Warning: Host file 'libc.so' missing.
> Can not find required linker for '/nobackup/njaganat/CRS_2/nto/os/sys/bin-x86e
> /Linux_kernel '.
>  /nobackup/njaganat/CRS_2/nto/util/bin-x86-linux/mkxfs returns error
> 
> 
> 
> Below is content of build file.
> 
> 
> 
> 
> [image=0x400000]
> 
> [+optional]
> 
> [+compress]
> 
> 
> [linker="gld.c4.2.1-p2.linux -m elf_i386 -e _start -T/xyz/build/src-x86e/link.
> map -EL %(h!=0, -Ttext 0x%t%)%(d!=0, -
> Tdata 0x%d%) -o%o %i %[M -L%^i -uinit_%n -lmod_%n -L%^i -L/nobackup/xyz/nto/os
> /lib/bin-x86e -Bstatic -lc %]"]
> 
> [virtual=x86,name] .bootstrap = {
> 
> 
> [+keeplinked]
> 
>    [search="$\{ROOT_DIR\}"/nto/os/sys/bin-x86e ]  KER_VSIZE=512M PATH="/bin:/
> sbin:" Linux_kernel 
> 
> }
> 
> 
>  Is it because we are missing libc.so file as  "The runtime linker is expected
>  to be found in a file called ldqnx.so.2, 
> but the runtime linker is currently contained within the libc.so file, so we 
> would make a process manager symbolic link 
> to it."
> 
> Canbody let us know what could be the problem
> 
> Thanks,
> Amit
> 
> 


Re: How can we force linux kernel linking from QNX build file?  
So are you saying not possible to link the Linux kernel with IFS image at all??
Re: How can we force linux kernel linking from QNX build file?  
No, it is not possible.

It isn't clear what you are trying to do, but booting Linux and booting QNX are very different things. I would guess 
that most of the people on this list would be quite confused as to why you might think it was possible.  As an example, 
would you think that grabbing chunks of Windows boot code to bring up a Linux system would work? I don't know know that 
it isn't, but my educated guess would be it would be impossible too. They are very different animals, just like QNX and 
Linux are.

Although QNX and Linux share the same POSIX API and ostensibly look very similar at the programmer level, they are quite
 different under the covers. The driver model is not at all similar, for example. These differences lead to QNX being 
much more reliable, among other unique characteristics.

Maybe if you explain why you are trying to do this, people could provide some advice on an approach that would work.

Sent from my BlackBerry 10 smartphone.

From: AMIT TOMAR
Sent: Sunday, March 24, 2013 9:50 AM
To: general-toolchain
Reply To: general-toolchain@community.qnx.com
Subject: Re: How can we force linux kernel linking from QNX build file?


So are you saying not possible to link the Linux kernel with IFS image at all??



_______________________________________________

General
http://community.qnx.com/sf/go/post100118
To cancel your subscription to this discussion, please e-mail general-toolchain-unsubscribe@community.qnx.com
Attachment: HTML sf-attachment-mime10975 4.08 KB
Re: How can we force linux kernel linking from QNX build file?  
Thanks Andy Gryc ,We have a big IFS image carrying various pacake into it ,for example OS package and L2 protocol 
package which will be loading to router ,Now the underlying OS is QNX based which we want to port to Liux,so now final 
image having OS package based on linux.

Our build infrastructure is using thing QNX build file to link QNX kerenl to big final image ,now what we are trying to 
use this build file to link to linux kernel. 
Re: How can we force linux kernel linking from QNX build file?  
AMIT TOMAR wrote:
> Thanks Andy Gryc ,We have a big IFS image carrying various pacake into it ,for example OS package and L2 protocol 
package which will be loading to router ,Now the underlying OS is QNX based which we want to port to Liux,so now final 
image having OS package based on linux.
>
> Our build infrastructure is using thing QNX build file to link QNX kerenl to big final image ,now what we are trying 
to use this build file to link to linux kernel. 

You never have to link the QNX kernel !  You can create a boot image ...
that's all.  The boot image of QNX shows just all resources which must
be managed within the modular LINUX kernel.

--Armin


Re: How can we force linux kernel linking from QNX build file?  
Armin Steinhoff wrote:
> AMIT TOMAR wrote:
>> Thanks Andy Gryc ,We have a big IFS image carrying various pacake into it ,for example OS package and L2 protocol 
package which will be loading to router ,Now the underlying OS is QNX based which we want to port to Liux,so now final 
image having OS package based on linux.
>>
>> Our build infrastructure is using thing QNX build file to link QNX kerenl to big final image ,now what we are trying 
to use this build file to link to linux kernel. 
> You never have to link the QNX kernel !  You can create a boot image ...
> that's all.  The boot image of QNX shows just all resources which must
> be managed within the modular LINUX kernel.

... and the boot script of the QNX boot image has nothing to do with the
Makefile for linking the LINUX kernel ... they are completely incompatible !

>
> --Armin
>
>