Monthly Archives: September 2010

Grub legacy issues with ext2 resolved

Back in 2006, I was playing around with buildroot on a small personal project I had. This month, I decided to return to that project again, but this time with the latest version of buildroot.

Buildroot has advanced quite a lot since 2006, but it only took little time to get the build environment running again. The only obstacle turned out to be the bootloader – Grub (Grub Legacy, that is). Grub Legacy is no longer under active development (Grub2 has taken its place), but patched versions of the latest release of Grub Legacy (0.97) are still in use; In Buildroot 2010.08 and Ubuntu 10.04, for example. Unfortunately, these versions suffer from two problems:

  1. The code relies on a manual parsing of C var_args in order not to link against the C standard library. This parsing is, however, incompatible with GCC 4.3.5. A segmentation fault therefore occurs.
  2. The code does not handle the ext2 file system correctly. A division by 0 may therefore occur.

I’ve therefore created a patch to buildroot 2010.08 and filed a bug report. The patch is attached to the bug report.