[oe-users] grub; general configuration files

joseph at pfeifferfamily.net joseph at pfeifferfamily.net
Mon Apr 2 20:54:07 UTC 2007


This is more-or-less a followup to Timothy St. Clair's message of
2005/03/06, with subject "[oe-users] grub (do_install.?.?.?)"

Indeed, the upstream distribution of grub just installs into
/usr/lib/grub/i386-pc/, and relies on you running grub-install (or
otherwise installing grub from there.  Also, there is no default
menu.lst distributed with grub.  openembedded follows this lead.

I'm in the process of trying to create a machine configuration for the
Technologic Systems TS5500 SBC, and one of the things I'd like to do
is add things like a grub menu.lst and a pcmciautils config.opts file,
specific to this machine.  I've been having a hard time finding a good
way to do it...  So, I'll describe what I've done in the case of grub,
and ask for guidance on how to do it right.

In the case of grub, I've modified the existing grub_0.97.bb file by
adding the following:

SRC_URI_append_ts5500 = " file://${MACHINE}/menu.lst"
PACKAGE_ARCH = "${MACHINE}"

do_install_append_ts5500() {
        install -d ${D}/boot/
        ln -sf ../usr/lib/grub/i386-pc ${D}/boot/grub

        install -m 0644 ${WORKDIR}/ts5500/menu.lst ${D}/boot/grub
}

and created a ts5500 directory including my menu.lst file.  This
works, but I don't like it:  I've gone in and messed with somebody
else's very general recipe, for the sake of my particular board.  If
15 other people modify the recipe for their own boards, it turns into
a royal mess!  (I noticed, incidentally, that there was already a
do_install_append_vmware() defined in there...  so I'm not the only
one to take this approach).

As I start looking at pcmciautils, I'm realizing that the same
approach would work there...  but would have the same drawbacks
(actually, that one's a little bit different since it would be
modifying config.opts, which would look more like a patch).

Over in the machine configuration file, I was able to define
SERIAL_CONSOLE = "ttyS1 115200"
which adds a line to /etc/inittab.  What I'd really like would be a
centralized place (probably someplace like ts5500.conf) that would
allow me to specify a central location for a bunch of config files and
post-install steps for this machine, which would then be plugged in as
needed to their relevant recipes.

Guidance, please?




More information about the Openembedded-users mailing list