visopsys.org

Visopsys Forums
It is currently Sat Apr 21, 2018 6:28 pm

All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: problem with imgboot trying to boot for the first time
PostPosted: Tue Sep 03, 2013 9:16 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 462
Sorry oscar, I didn't get around yet to doing the various experiments I wanted to try. I'm running Ubuntu 11.10, which is a bit older (it's now regularly telling me that it's unsupported and that I should upgrade).

I still suspect it'll be an issue with the runtime linking, perhaps when loading the shared libraries for the executable (like libc.so). There will probably be some change in the way the newer gcc or ld lay out the binaries, that my runtime linker isn't accounting for.

If I upgraded to some newer Ubuntu, perhaps I'd see it here too, though I don't like messing around with my dev environment too often! Upgrading the OS usually results in a bunch of work to get everything working smoothly again... Better maybe if I can just identify the issue using your binaries, and fix whatever needs fixing in the kernel or libraries.


Top
 Profile  
 
 Post subject: Re: problem with imgboot trying to boot for the first time
PostPosted: Tue Sep 03, 2013 10:35 am 
Offline

Joined: Thu Aug 15, 2013 4:23 pm
Posts: 22
Hi Andy,

I think you're right and probably it's something related to the software version in my linux. I know that upgrading linux usually takes a lot of time (I'm also lazy upgrading to fedora 19 :lol: ), so I will try to use the same gcc and binutils that you have, and if possible I will use the same distro version as well. When I have something new about it I will tell you :)

Have a nice day!

Oscar


Top
 Profile  
 
 Post subject: Re: problem with imgboot trying to boot for the first time
PostPosted: Fri Sep 06, 2013 5:26 pm 
Offline

Joined: Thu Aug 15, 2013 4:23 pm
Posts: 22
Hello Andy,

I didn't tried to compile with your version of gcc and binutils, I want to do it soon. But I tried to use two Visopsys iso images that I compiled with VirtualBox in another laptop that works with Windows. One iso was compiled from an unmodified source code, while the other iso was compiled from a source in which I tried to port my two test programs.

When I run the isos, I obtained the imgboot error again, with the same details for both isos. But this time there are two variables that are different.
I attached the image, indicating with [ ] the two variables with a different value compared with the error that I obtain when I run them on my laptop.

Hope it helps you :) Have a nice day!

Oscar


Attachments:
Visopsys_08.png
Visopsys_08.png [ 12.3 KiB | Viewed 7055 times ]
Top
 Profile  
 
 Post subject: Re: problem with imgboot trying to boot for the first time
PostPosted: Sun Sep 08, 2013 1:20 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 462
...investigating. It seems as though simply adding your version of libwindow.so triggers the fault on my system. So, I'll need to go in-depth with the runtime loader tomorrow, to see what's different about it.


Top
 Profile  
 
 Post subject: Re: problem with imgboot trying to boot for the first time
PostPosted: Sun Sep 08, 2013 5:21 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 462
It seems as if it may be a result of a known issue with my runtime linker/loader, given the presence of GNU_RELRO program headers in several of the shared libraries (.so) that your linker is generating.

From my collection of issues:
Quote:
- 1865 - Investigate why having a GNU_RELRO program header in an ELF
shared library causes a page fault on execution. Doesn't seem to cause
any problems in program binaries. Can our ELF loader be equipped to deal
with it properly for libraries? Seems as if having "-static -lgcc" in
the linker command line triggers its creation.

...ongoing...


Top
 Profile  
 
 Post subject: Re: problem with imgboot trying to boot for the first time
PostPosted: Sun Sep 08, 2013 5:45 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 462
Does adding the flag -norelro in the following places in your library Makefiles (src/lib/lib*/Makefile) solve the problem?
Code:
${SHAREDLIB}: ${PICOBJS}
   ${LD} -shared -nostdlib -norelro [...]


Top
 Profile  
 
 Post subject: Re: problem with imgboot trying to boot for the first time
PostPosted: Sun Sep 08, 2013 8:26 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 462
Oops, it's actually -z norelro

I noticed that I was already using it in a couple of the Makefiles (and thus those .so files from you didn't have the offending section).

Here's a patch that will apply the changes. Run in the top-level visopsys source distribution directory:
Code:
patch -p0 < norelro.patch


Attachments:
norelro.patch.gz [493 Bytes]
Downloaded 360 times
Top
 Profile  
 
 Post subject: Re: problem with imgboot trying to boot for the first time
PostPosted: Mon Sep 09, 2013 11:42 am 
Offline

Joined: Thu Aug 15, 2013 4:23 pm
Posts: 22
Hi Andy,

Yes, I will try it now and I tell you what happens :)


Top
 Profile  
 
 Post subject: Re: problem with imgboot trying to boot for the first time
PostPosted: Mon Sep 09, 2013 1:59 pm 
Offline

Joined: Thu Aug 15, 2013 4:23 pm
Posts: 22
I found that norelro.patch looks for 'liblic' folder in /src/lib, but this folder doesn't exist. The only folder that lefts in the /src/lib folder is 'libc'.
After modifying norelro.patch with the path to libc (insted of liblic), it worked but one error appeared:

Code:
Hunk #1 FAILED at 47.
1 out of 1 hunk FAILED -- saving rejects to file src/lib/libc/Makefile.rej


Now I will built it and I will try to run it on VirtualBox. I'm using a source code that I just have extracted from the zipped source code. Let's see what happens :geek:


Top
 Profile  
 
 Post subject: Re: problem with imgboot trying to boot for the first time
PostPosted: Mon Sep 09, 2013 2:01 pm 
Offline

Joined: Thu Aug 15, 2013 4:23 pm
Posts: 22
Good news Andy! :dance:

Now all works weel until the Visopsys desktop appears :D
But... a new error appears, this time related to the process login :geek:

I attach an image in this post so that you can read it :)


Attachments:
Visopsys_login_error.png
Visopsys_login_error.png [ 109.79 KiB | Viewed 7037 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group