Possible improvements to build system
Hello, I noticed that updating some pieces of code needs modification of nearly all *.rmk. IMO it's bad thing because e.g. it easily brings different architectures out of sync. My improvement propositions:
1. normal.mod
There is one part which is CPU-dependent - setjmp.S. t's used only in
static grub_err_trescue_command (struct grub_arg_list *state __attribute__ ((unused)),
int argc __attribute__ ((unused)),
char **args __attribute__ ((unused))){
grub_longjmp (grub_exit_env, 0);
/* Never reach here. */
return 0;
}
We could replace this longjmp by a call of grub_enter_rescue_mode and move the call to attempt_normal_mode to grub_main.
Another possibility is to create a symlink normal/cpu during configure time and then during build time just use normal/cpu/setjmp.S
2. ata.mod, hdparm.mod, ata_pthru.mod, usbms.mod, ohci.mod, uhci.mod, usbtest.mod, usb.mod, memdisk.mod
I don't see why these modules are in i386-pc.rmk and not in common.rmk
3. kernel.img, grub-setup
These contain a number of files shared by all platforms. Like e.g. filesystems. I propose to create an additional file common-pre.rmk which could contain the variables like FS_files=...
which platform-specific files can use later
Signature · 2 lines
Regards Vladimir 'phcoder' Serbinenko
Quoted 3 lines · phcoder
2. ata.mod, hdparm.mod, ata_pthru.mod, usbms.mod, ohci.mod, uhci.mod, usbtest.mod, usb.mod, memdisk.mod
I don't see why these modules are in i386-pc.rmk and not in common.rmk
This is because nobody implemented grub_in* and grub_out* functions on powerpc. But in the meantime, they could move to i386.rmk.
As for memdisk, it used to depend on the image format (thus PE had to be excluded), but IIRC this is not so anymore. It could move to common.rmk.
Quoted 6 lines
3. kernel.img, grub-setup
These contain a number of files shared by all platforms. Like e.g. filesystems. I propose to create an additional file common-pre.rmk which could contain the variables like
FS_files=...
which platform-specific files can use later
This is trickier than it seems. Many of the gen* scripts parse those files and changing them this way would break stuff. It needs to be done carefully.
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."