[oe] x86->x86 GRUB bootable image in OE?
Leon Woestenberg
leon.woestenberg at gmail.com
Mon Sep 28 20:21:38 UTC 2009
Hello,
on x86 target support, I have some ideas how to create bootable disk
images from OE using GRUB (not using the post image command approach).
However, I suspect this will only work if we have GRUB on the host,
i.e. assume a x86 host, and have grub-native.
grub-native would be step one, but I am having a hard time getting the
staging to work.
In general, for staging host-native tools, do we use the "make
install" approach?
Regards,
Leon.
DESCRIPTION = "GRand Unified Bootloader"
HOMEPAGE = "http://www.gnu.org/software/grub"
SECTION = "bootloaders"
PRIORITY = "optional"
RDEPENDS_${PN}-install = "diffutils"
PR = "r5"
SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://automake-1.10.patch;patch=1 \
file://menu.lst"
inherit autotools_stage native
CFLAGS += "-fno-stack-protector"
#do_install() {
# oenote do_install
# oenote DESTDIR=${D}
# oe_runmake 'DESTDIR=${D}' install
#}
do_stage() {
oenote do_stage
oenote DESTDIR=${STAGING_DIR_HOST}
oe_runmake 'DESTDIR=${STAGING_DIR_HOST}' install
}
#do_stage() {
# oe_runmake 'DESTDIR=${STAGING_DIR_HOST}' install
# install -m 0644 -D ${WORKDIR}/menu.lst ${}/boot/grub/menu.lst
#
# # Copy stage1/1_5/2 files to /boot/grub
# GRUB_TARGET_ARCH=$(echo ${TARGET_ARCH} | sed -e 's/.86/386/')
# install -m 0744 -d ${STAGING_DIR_HOST}/boot/grub/
# install -m 0644 \
# ${D}/${libdir}/grub/${GRUB_TARGET_ARCH}${TARGET_VENDOR}/* \
# ${STAGING_DIR_HOST}/boot/grub/
#}
PACKAGES =+ "${PN}-install ${PN}-eltorito"
FILES_${PN}-install = " \
${sbindir}/grub-install \
${sbindir}/grub-terminfo \
${sbindir}/grub-md5-crypt \
${bindir}/mbchk \
${libdir}/grub \
"
FILES_${PN}-eltorito = "/boot/grub/stage2_eltorito"
FILES_${PN} += "/boot"
COMPATIBLE_HOST = "i.86.*-linux"
--
Leon
More information about the Openembedded-devel
mailing list