Re: FreeBSD port work

2019-06-08 Thread Eric McCorkle
On 6/8/19 8:53 AM, Eric McCorkle wrote:

> Basically, you have to treat R_X86_64_PLT32 linker symbols as R_X86_64_32.

I'm sorry, I meant R_X86_64_PC32.



signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: FreeBSD port work

2019-06-08 Thread Eric McCorkle
On 6/3/19 6:05 AM, Leif Lindholm wrote:
> Hi Eric,
> 
> Well, feels a bit silly to deal with the other main BSDs and not
> FreeBSD... (especially as it looks like it was supported at some point
> in the past).

A bit of info here: the way the FreeBSD ports system works, we have a
bunch of patch files which get applied to a standard distribution to fix
up any issues.  The port system unpacks the distribution archive,
applies the patches, and builds.  We actually have scripts to create
these patches as part of a porting effort.  That's what these files are.

I also had to do a bit more work to get GRUB to a point where
grub-install works.  Basically, you have to treat R_X86_64_PLT32 linker
symbols as R_X86_64_32.  The reason for this is that binutils is
creating a single R_X86_64_PLT32 symbol for the main, which gets
referenced from _start.  I'll repost that, plus any other work I end up
doing once I get it booting.

Unfortunately, I'm getting a boot hang when it boots the FreeBSD kernel.
 This might be a regression of some kind, so I'm going back to the
FreeBSD port to see if the same behavior happens.  If that fails, I'll
try log messages to figure out what's going on.

> Most of the below is out of my area of knowledge, but the patch seems
> to have some whitespace-only changes (pointed out individually below)
> that should probably be filtered out separately, or dropped.

That's an artifact of my emacs setup, I think.  It auto-deletes trailing
whitespace.  I can undo it.

>> +#include 
>> +
>> +typedef unsigned int uint_t;
>> +typedef uint64_t hrtime_t;
>> +typedef unsigned char uchar_t;
>> +typedef int boolean_t;
> 
> I see these four lines repeated a couple of times below as well, but I
> don't see any code in the tree making use of them. What are they
> needed for? Is there some common header (i.e. grub/cpu/freebsd.h)
> where they could go?
> 

I think this is an artifact of OS differences, so it would make sense
for it to go there.

I will apply these to the git repo and send them as a git-generated
patch once I get a boot working on 2.02.  Not sure how long that'll be;
I don't have a great deal of time to work on this at present.



signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel