> AR> Or will figure only prvide the low-level library for GRUB, thus
> AR> adding portability without changing much of the program?
>
> Exactly.
Very good.
> AR> It isn't clear at all whether multi-platform support (or at least
> AR> infrastructure) is planned or not.
>
> It is planned. The first platform to be supported is `Posix C'. ;)
> The platform we will need for GRUB is `i386 BIOS with GRUB asm and C
> functions'.
Ok, so it's not platform independent. I still think a
platform-independent infrastructure is needed, to encourage other
developers to join and adopt GRUB. For example, both Sparc and ARM
would easily be supported by just replacing stage1 (and compiling
stage2 against the right low-level library, through figure, I
suppose).
I'd use an approach similar to how the Linux kernel is laid out,
partly because it's the one I know best and partly because it works
well. I'd use:
arch-pc/ pc-specific files
arch-sparc/ sparc-specific files
arch-generic/ used to build the grub shell (like asmstub.c)
...
arch -> arch-pc symlink determined at ./configure time
arch/Makefile main Makefile, setting platform-specifc opts etc
arch/stage1/ all the stage1 is platform-specific
arch/settings.h platform-specific macros: addresses etc
stage2/ stage2 should be definitely portable
arch/lib/ functions used by stage2, implemented for the plat.
arch/util/ grub-install, for example
util/ portable utils: mkchk and whatelse
grub/ the shell, using arch-generic
Would such reorganization fit the future move to Figure? Would that
be acceptable?
If so, I'll slowly try to implement this. I have several platforms to
test on, and I can definitely ensure that the reorganized code is
well-split between portable and non-portable stuff and sort any 32-bit
64-bit issue. When it's done, I'll post a list of changes and a patch
for current code.
Unfortunately, I don't promise to port grub to actually boot any other
platform, but this is mainly for lack of time. Given infinite time, I
can definitely port it to at least Sparc systems and the Netwinder, as
all the information is there; Alpha and IA64 come next: info is there
but the task looks harder. Since there are much better hackers than me,
I think my inability to actually port is not an issue.
(disclaimer: I might even take ages, or abandon completely, as life
and time are not renewable resources; if my proposal looks acceptable,
I'd like to devote some time to it anyways).
/alessandro