So, some weeks ago, we have switched to modular IDE in the cooker kernel.
The spadework was mostly done for tmb kernels, since mkinitrd was already able to cope with modular IDE. Though, it's quite a premiere for our DrakX installer.
Last week, Pixel added some support in our bootloader-config utility that is called in kernel post-install. Now, it automatically adds an ide-controller alias (actually, an install directive) in /etc/modprobe.conf if needed. Titi also made the installer automatically load the IDE modules on the fly.
Nice, but it turns out it's not enough, and both of Pixel and Titi left on vacations... And now I have the QA team (excuse me, I meant "Enabling" team) on my back, especially my dear Damien /o\
After all, it shouldn't be that difficult. Arnaud mentionned that we have to load the ide-disk module (of course, we really want to use the disks), it should be a piece of cake. Ok, so make the ide-disk module included in drakx-installer-images, then make the stage1 part load the ide-disk module (in the rare case the installer uses ISO images or mirror tree from disk), and finally make the installer load the ide-disk module when probing IDE controllers.
That's it, I'm done. It's about minor modifications, don't even bother test them, just submit! No?
Grmpf, it does not build. Our init-like part of the stage1 installer used a minilibc (borrowed from Redhat a long time ago), which made use of _syscallX() macros, allowing to wrap system calls. But these have been hidden from user view in upstream kernel, and then completely removed, userspace applications having to use the syscall() function.
But it's quite different when you're buidling a libc... And RedHat|Fedora's Anaconda does not use minilibc anymore. Ok, I don't want to reinvent the wheel, some other minimal libc such as uClibc and dietlibc have an implementation of the syscall() function (commit of _syscallX() removal in uClibc).
And since we already use dietlibc in the plain stage1, that was the way to go. Even if we are losing 6K in the resulting binary, poor of us ;-) Then we just need to link with libcompat.a to use the syscall() function:
-static inline _syscall3(int, syslog, int, type, char *, bufp, int, len); -static inline _syscall3(int, reboot, int, magic, int, magic2, int, flag); +#include <sys/syscall.h> +#define syslog(...) syscall(__NR_syslog, __VA_ARGS__) +#define reboot(...) syscall(__NR_reboot, __VA_ARGS__)
I also used the occasion to update our dietlibc package to 0.30. It didn't build out of the box, because of a small typo (patch from ALT Linux, seriously?).
Finally, a day and a half after the initial rants, IDE disks can be used in the Cooker installer \o/
(and I don't mention the other projects I'm working on, neither the other installer build problems caused by new kernel headers, new glibc, new whatever, current buildsystem, whatever...)
Oh, and that was the "trivial" part, I expect migration to libata PATA drivers to be a lot more fun!