* Trying to build Rescue image for three different target and platform
@ 2014-03-09 16:14 adrian15
2014-03-13 5:51 ` Andrey Borzenkov
0 siblings, 1 reply; 5+ messages in thread
From: adrian15 @ 2014-03-09 16:14 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 5006 bytes --]
Basically what I want to do is to use grub-mkrescue to generate a grub2
rescue disk with some custom files (The Super Grub2 Disk stuff).
However I want to build different files depending on target+platform
combination.
My four combinations are:
* (Hybrid) x86_64+efi and i386+pc
* i386 - pc
* x86_64 - efi
* i386 - efi
More about this setup.
1) As an initial setup I work with a Debian Unstable Sid Chroot amd64 as
described in:
http://www.supergrubdisk.org/wiki/Super_Grub2_Disk_Sid_Chroot#Introduction
2) I use Debian's Grub2 source code so that I do not have to deal
manually with dependencies. That's explained here:
http://www.supergrubdisk.org/wiki/Super_Grub2_Disk_Sid_Chroot_Grub2_Build_And_Installation
(just before Hybrid build section).
3) x86_64_efi build is working. Basically what I run in the src dir is:
sudo rm -rf /usr/local/share/grub
sudo rm -rf /usr/local/lib/grub
make clean
make distclean
bash linguas.sh
bash autogen.sh
./configure --target=i386 --with-platform=efi && make && sudo make
uninstall
make clean
make distclean
./configure --target=i386 --with-platform=pc && make && sudo make
uninstall
make clean
make distclean
./configure --target=x86_64 --with-platform=efi && make && sudo make
uninstall
make clean
make distclean
make clean
make distclean
bash linguas.sh
bash autogen.sh
./configure --target=x86_64 --with-platform=efi && make && sudo make
install
And what I do for generating the file image is:
grub-mkrescue --output=super_grub2_disk_x86_64_efi_2.00s1-beta6.iso
$(mktemp -d)
4) i386_pc build is not working. Basically what I run in the src dir is:
sudo rm -rf /usr/local/share/grub
sudo rm -rf /usr/local/lib/grub
make clean
make distclean
bash linguas.sh
bash autogen.sh
./configure --target=i386 --with-platform=efi && make && sudo make
uninstall
make clean
make distclean
./configure --target=i386 --with-platform=pc && make && sudo make
uninstall
make clean
make distclean
./configure --target=x86_64 --with-platform=efi && make && sudo make
uninstall
make clean
make distclean
make clean
make distclean
bash linguas.sh
bash autogen.sh
./configure --target=i386 --with-platform=pc && make && sudo make install
And what I do for generating the file image is:
grub-mkrescue --output=super_grub2_disk_i386_pc_2.00s1-beta6.iso
$(mktemp -d)
5) I attach the current helper scripts that I use.
supergrub-mkrescue : This is a very simple wrapper around:
grub-mkrescue. You do not need to take care about it.
supergrub-meta-mkrescue : This is what I have explained above. This
script assumes that you have setup your grub2 source code in:
/home/adrian/gnu/sgd/debian_grub2/grub2-2.00
and that supergrub-mkrescue script is found in the same folder as
supergrub-meta-mkrescue.
Currently supergrub-meta-mkrescue has been modified so that it ends
(Check the return 0 ; line) after building:
* x86_64_efi
and
* i386 - pc
.
6) When I build i386 - pc I get this error:
xorriso : FAILURE : Given path does not exist on disk: -boot_image
system_area='/usr/local/lib/grub/i386-pc/boot_hybrid.img'
Why is it failing to create /usr/local/lib/grub/i386-pc/boot_hybrid.img
file?
7) Is it useful that I insist on building an i386+efi release? Any
machine system that uses it? Some old Mac-something hardware perhaps?
8) What's the best way to build and install an hybrid system that
includes both: x86_64_efi and i386 - pc stuff?
Current code is:
./configure --target=i386 --with-platform=pc && make && sudo make install
make clean
make distclean
./configure --target=x86_64 --with-platform=efi && make && sudo make
install
9) A) What's the best way to remove grub configuration files installed
on the system so that I can start from scratch so that already built
target+platform grub binaries or configurations are ignored?
B) That's what I try to do in clean_every_build function in
supergrub-meta-mkrescue script but I do not think its an efficient way
of doing it.
C) You know I would like to remove the rm -rf /usr/local/share/grub and
rm -rf /usr/local/lib/grub lines (too weird) and just use the:
./configure ; make ; make uninstall part.
D) Which I do not know if could be re-written as:
./configure ; make uninstall
(Notice that there is not a make step).
Does removing the make default target call (make) breaks "make
uninstall" functionality?
10) As a summary I basically want to build and install from upstream
source code and then make one rescue disk for each one of these four
combinations. (And make theses rescue diks in a row)
* (Hybrid) x86_64+efi and i386+pc
* i386 - pc
* x86_64 - efi
* i386 - efi
So... any help on this build automation process?
Thank you very much!
adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/
[-- Attachment #2: supergrub-mkrescue --]
[-- Type: text/plain, Size: 3164 bytes --]
#!/bin/bash -e
usage() {
cat <<EOF
$0 -o=output.iso
Copyright Adrian Gibanel Lopez
Licensed under the GNU PUBLIC LICENSE 3.0
CREATE CALL
===========
Usage: $0 [-o=FILENAME]
Example: $0 -o=myrescatux.iso
EOF
}
# Check the arguments.
for option in "$@"; do
case "$option" in
-h | --help)
usage
exit 0
;;
-o=*)
CUSTOM_ISO_FILENAME=`echo "$option" | sed 's/-o=//'`
;;
esac
done
# Get the version number for this Super GRUB2 Disk release
source menus/version.cfg
BOOT_ISOS_DIRECTORY="boot-isos"
overlay=$(mktemp -d)
ISO_FILENAME="super_grub2_disk_hybrid_${sgrub_version}.iso"
if [[ "x$CUSTOM_ISO_FILENAME" != x ]] ; then
ISO_FILENAME="${CUSTOM_ISO_FILENAME}"
fi
default_options="--output=${ISO_FILENAME} $overlay"
mkdir -p "$overlay/boot/grub/"
cp -r menus/* "$overlay/boot/grub/"
if [ -d ${BOOT_ISOS_DIRECTORY} ] ; then
cp -r ${BOOT_ISOS_DIRECTORY} "$overlay/boot/"
fi
cp AUTHORS COPYING "$overlay/boot/grub/"
# Generate mo files and add them to overlay
for pofile in po/*.po; do
basename=${pofile##*/}
lang_code="${basename%.po}"
info_cfg="menus/sgd_locale/${lang_code}_info.cfg"
msgfmt "$pofile" --output-file="$overlay/boot/grub/sgd_locale/${lang_code}.mo"
if ! [[ -f "$info_cfg" ]]; then
echo "Thank you for providing a new translation for Super GRUB2 Disk!"
echo "Before this translation can be used in Super GRUB2 Disk we need to know what"
echo "to call it in our language selection menu."
echo "We need to know the name of the language you've translated, in that language."
echo "For example, for Spanish you would enter \"Español\" (without the quotes)."
echo -n "Please enter the name of the language for $pofile: "
read language_name
cp info_cfg_header.cfg "$info_cfg"
echo "lang_code='${lang_code}'" >> "$info_cfg"
# This will fail if $language_name contains a single quote character.
# TODO: Fix aforementioned problem by escaping quotes in $language_name.
echo "language_name='${language_name}'" >> "$info_cfg"
echo "A file, ${info_cfg}, was created with this information."
echo "Thanks again for contributing a new translation!"
echo; echo
fi
done
# Find unifont font file to create grub font. This is needed for gfxterm in grub, which
# in turn is needed for displaying non-ASCII characters for non-English translations.
# This unifont finding code was copied from grub's configure.ac.
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont; do
if test -f "$dir/unifont.$ext"; then
font_source="$dir/unifont.$ext"
break 2
fi
done
done
if [[ -n "$font_source" ]]; then
grub-mkfont "$font_source" --output="$overlay/boot/grub/unifont.pf2"
else
echo "Error: Unifont not found. Unifont is needed for Super GRUB2 Disk" >&2
echo "to properly display non-ASCII characters. Aborting without creating an iso." >&2
exit 1
fi
grub-mkrescue $default_options
rm -r "$overlay"
md5sum ${ISO_FILENAME} > ${ISO_FILENAME}.md5
sha1sum ${ISO_FILENAME} > ${ISO_FILENAME}.sha1
sha256sum ${ISO_FILENAME} > ${ISO_FILENAME}.sha256
[-- Attachment #3: supergrub-meta-mkrescue --]
[-- Type: text/plain, Size: 2683 bytes --]
#!/bin/bash
SUPER_GRUB2_DISK_FILE_PREFIX="super_grub2_disk"
DEBIAN_GRUB2_SRC_DIR="/home/adrian/gnu/sgd/debian_grub2/grub2-2.00"
SGD2_SOURCE_DIR="$(pwd)"
function grub2_src_prepare () {
make clean
make distclean
bash linguas.sh
bash autogen.sh
}
function build_sg2d () {
./supergrub-mkrescue -o="${SUPER_GRUB2_DISK_FILE_PREFIX}_${TARGET_PLATFORM}_${sgrub_version}.iso"
}
function clean_every_build () {
sudo rm -rf /usr/local/share/grub
sudo rm -rf /usr/local/lib/grub
grub2_src_prepare
./configure --target=i386 --with-platform=efi && make && sudo make uninstall
make clean
make distclean
./configure --target=i386 --with-platform=pc && make && sudo make uninstall
make clean
make distclean
./configure --target=x86_64 --with-platform=efi && make && sudo make uninstall
make clean
make distclean
}
function grub2_sg2d_hybrid_build () {
# Grub2 - Hybrid build
cd ${DEBIAN_GRUB2_SRC_DIR}
clean_every_build
grub2_src_prepare
./configure --target=i386 --with-platform=pc && make && sudo make install
make clean
make distclean
./configure --target=x86_64 --with-platform=efi && make && sudo make install
cd ${SGD2_SOURCE_DIR}
# Super Grub2 Disk - Hybrid build
TARGET_PLATFORM="hybrid"
build_sg2d
}
function grub2_sg2d_i386_pc_build () {
# Grub2 - i386 - pc build
cd ${DEBIAN_GRUB2_SRC_DIR}
clean_every_build
grub2_src_prepare
bash lingua.sh
bash autogen.sh
./configure --target=i386 --with-platform=pc && make && sudo make install
cd ${SGD2_SOURCE_DIR}
# Super Grub2 Disk - i386 - pc build
TARGET_PLATFORM="i386_pc"
build_sg2d
}
function grub2_sg2d_x86_64_efi_build () {
# Grub2 - x86_64 - efi build
cd ${DEBIAN_GRUB2_SRC_DIR}
clean_every_build
grub2_src_prepare
./configure --target=x86_64 --with-platform=efi && make && sudo make install
cd ${SGD2_SOURCE_DIR}
# Super Grub2 Disk - x86_64 - efi build
TARGET_PLATFORM="x86_64_efi"
build_sg2d
}
function grub2_sg2d_i386_efi_build () {
# Grub2 - i386 - efi build
cd ${DEBIAN_GRUB2_SRC_DIR}
clean_every_build
grub2_src_prepare
./configure --target=i386 --with-platform=efi && make && sudo make install
cd ${SGD2_SOURCE_DIR}
# Super Grub2 Disk - i386 - efi build
TARGET_PLATFORM="i386_efi"
build_sg2d
}
if [ ! -d "${DEBIAN_GRUB2_SRC_DIR}" ] ; then
echo -e -n "Please set up a valid path for Debian Grub2 source code in this same file: ${0}\n"
fi
# Needed for getting SG2D version
source menus/version.cfg
grub2_sg2d_x86_64_efi_build
grub2_sg2d_i386_pc_build
exit 0 ############################################### QUITAR ESTA LINEA
grub2_sg2d_i386_efi_build
grub2_sg2d_hybrid_build
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trying to build Rescue image for three different target and platform
2014-03-09 16:14 Trying to build Rescue image for three different target and platform adrian15
@ 2014-03-13 5:51 ` Andrey Borzenkov
2014-03-16 5:56 ` adrian15
0 siblings, 1 reply; 5+ messages in thread
From: Andrey Borzenkov @ 2014-03-13 5:51 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: adrian15sgd
В Sun, 09 Mar 2014 17:14:04 +0100
adrian15 <adrian15sgd@gmail.com> пишет:
> Basically what I want to do is to use grub-mkrescue to generate a grub2
> rescue disk with some custom files (The Super Grub2 Disk stuff).
>
> However I want to build different files depending on target+platform
> combination.
>
> My four combinations are:
>
> * (Hybrid) x86_64+efi and i386+pc
> * i386 - pc
> * x86_64 - efi
> * i386 - efi
>
> More about this setup.
>
> 1) As an initial setup I work with a Debian Unstable Sid Chroot amd64 as
> described in:
> http://www.supergrubdisk.org/wiki/Super_Grub2_Disk_Sid_Chroot#Introduction
> 2) I use Debian's Grub2 source code so that I do not have to deal
> manually with dependencies. That's explained here:
> http://www.supergrubdisk.org/wiki/Super_Grub2_Disk_Sid_Chroot_Grub2_Build_And_Installation
> (just before Hybrid build section).
>
> 3) x86_64_efi build is working. Basically what I run in the src dir is:
>
> sudo rm -rf /usr/local/share/grub
> sudo rm -rf /usr/local/lib/grub
> make clean
> make distclean
> bash linguas.sh
> bash autogen.sh
> ./configure --target=i386 --with-platform=efi && make && sudo make
> uninstall
> make clean
> make distclean
> ./configure --target=i386 --with-platform=pc && make && sudo make
> uninstall
> make clean
> make distclean
> ./configure --target=x86_64 --with-platform=efi && make && sudo make
> uninstall
> make clean
> make distclean
> make clean
> make distclean
> bash linguas.sh
> bash autogen.sh
> ./configure --target=x86_64 --with-platform=efi && make && sudo make
> install
>
To be honest, I do not understand what you are trying to do here.
> 6) When I build i386 - pc I get this error:
>
> xorriso : FAILURE : Given path does not exist on disk: -boot_image
> system_area='/usr/local/lib/grub/i386-pc/boot_hybrid.img'
>
> Why is it failing to create /usr/local/lib/grub/i386-pc/boot_hybrid.img
> file?
>
This file should be built and installed on 386-pc platform. If not
either there is a bug, or you are doing something wrong. It is hard to
tell, you are doing so many steps ...
> 7) Is it useful that I insist on building an i386+efi release? Any
> machine system that uses it? Some old Mac-something hardware perhaps?
>
> 8) What's the best way to build and install an hybrid system that
> includes both: x86_64_efi and i386 - pc stuff?
>
Just built and install grub for each platform you want to use;
grub-mkrescue will automatically include every platform it finds.
> Current code is:
>
> ./configure --target=i386 --with-platform=pc && make && sudo make install
> make clean
> make distclean
> ./configure --target=x86_64 --with-platform=efi && make && sudo make
> install
>
It is better to explicitly force host platform with --host=.... to make
sure user space is always the same. Otherwise it should be fine.
I prefer to build every platform in separate directory, there were
issues with incomplete cleanup. If you hit one, please report.
> 9) A) What's the best way to remove grub configuration files installed
> on the system so that I can start from scratch so that already built
> target+platform grub binaries or configurations are ignored?
>
There are no configuration files after "make install" (if we do not
count /etc/grub.d as configuration).
> B) That's what I try to do in clean_every_build function in
> supergrub-meta-mkrescue script but I do not think its an efficient way
> of doing it.
>
> C) You know I would like to remove the rm -rf /usr/local/share/grub and
> rm -rf /usr/local/lib/grub lines (too weird) and just use the:
>
> ./configure ; make ; make uninstall part.
>
> D) Which I do not know if could be re-written as:
>
> ./configure ; make uninstall
>
> (Notice that there is not a make step).
>
> Does removing the make default target call (make) breaks "make
> uninstall" functionality?
>
> 10) As a summary I basically want to build and install from upstream
> source code and then make one rescue disk for each one of these four
> combinations. (And make theses rescue diks in a row)
>
> * (Hybrid) x86_64+efi and i386+pc
> * i386 - pc
> * x86_64 - efi
> * i386 - efi
>
> So... any help on this build automation process?
>
> Thank you very much!
>
>
> adrian15
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trying to build Rescue image for three different target and platform
2014-03-13 5:51 ` Andrey Borzenkov
@ 2014-03-16 5:56 ` adrian15
2014-03-16 7:04 ` Andrey Borzenkov
0 siblings, 1 reply; 5+ messages in thread
From: adrian15 @ 2014-03-16 5:56 UTC (permalink / raw)
To: Andrey Borzenkov, The development of GNU GRUB
El 13/03/14 06:51, Andrey Borzenkov escribió:
> В Sun, 09 Mar 2014 17:14:04 +0100
> adrian15 <adrian15sgd@gmail.com> пишет:
>
>> Basically what I want to do is to use grub-mkrescue to generate a grub2
>> rescue disk with some custom files (The Super Grub2 Disk stuff).
>>
>> However I want to build different files depending on target+platform
>> combination.
>>
>> My four combinations are:
>>
>> * (Hybrid) x86_64+efi and i386+pc
>> * i386 - pc
>> * x86_64 - efi
>> * i386 - efi
>>
>>
>> 3) x86_64_efi build is working. Basically what I run in the src dir is:
>>
>> sudo rm -rf /usr/local/share/grub
>> sudo rm -rf /usr/local/lib/grub
>> make clean
>> make distclean
>> bash linguas.sh
>> bash autogen.sh
>> ./configure --target=i386 --with-platform=efi && make && sudo make
>> uninstall
>> make clean
>> make distclean
>> ./configure --target=i386 --with-platform=pc && make && sudo make
>> uninstall
>> make clean
>> make distclean
>> ./configure --target=x86_64 --with-platform=efi && make && sudo make
>> uninstall
>> make clean
>> make distclean
>> make clean
>> make distclean
>> bash linguas.sh
>> bash autogen.sh
>> ./configure --target=x86_64 --with-platform=efi && make && sudo make
>> install
>>
>
> To be honest, I do not understand what you are trying to do here.
The same thing as in:
https://forja.cenatic.es/plugins/scmgit/cgi-bin/gitweb.cgi?p=supergrub2/supergrub2.git;a=blob_plain;f=supergrub-meta-mkrescue;hb=22683e2b5fa0d65141c1be1a7487914b1d43f4dd
(which uses Debian packages) but using source code.
>
>> 6) When I build i386 - pc I get this error:
>>
>> xorriso : FAILURE : Given path does not exist on disk: -boot_image
>> system_area='/usr/local/lib/grub/i386-pc/boot_hybrid.img'
>>
>> Why is it failing to create /usr/local/lib/grub/i386-pc/boot_hybrid.img
>> file?
>>
>
> This file should be built and installed on 386-pc platform. If not
> either there is a bug, or you are doing something wrong. It is hard to
> tell, you are doing so many steps ...
I see.
>> 8) What's the best way to build and install an hybrid system that
>> includes both: x86_64_efi and i386 - pc stuff?
>>
>
> Just built and install grub for each platform you want to use;
> grub-mkrescue will automatically include every platform it finds.
Any advice for the special where I want to build x86_64_efi + x86_pc
hybrid disk?
>
>> Current code is:
>>
>> ./configure --target=i386 --with-platform=pc && make && sudo make install
>> make clean
>> make distclean
>> ./configure --target=x86_64 --with-platform=efi && make && sudo make
>> install
>>
>
> It is better to explicitly force host platform with --host=.... to make
> sure user space is always the same. Otherwise it should be fine.
Ok, I'll check that.
>
> I prefer to build every platform in separate directory, there were
> issues with incomplete cleanup. If you hit one, please report.
Well, as I don't want to have a separate directory for each build my
question would be:
What is it the official commands for doing a safe cleanup?
>
>> 9) A) What's the best way to remove grub configuration files installed
>> on the system so that I can start from scratch so that already built
>> target+platform grub binaries or configurations are ignored?
>>
>
> There are no configuration files after "make install" (if we do not
> count /etc/grub.d as configuration).
I meant the ones that someone makes grub-mkrescue to look for the
/usr/local/lib/grub/i386-pc/boot_hybrid.img files which I suppose are
not found in source code but in the system (Gnu/Linux filesystem I mean).
Hope it's a bit more clear what I mean.
Thank you.
adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trying to build Rescue image for three different target and platform
2014-03-16 5:56 ` adrian15
@ 2014-03-16 7:04 ` Andrey Borzenkov
2014-03-16 12:05 ` adrian15
0 siblings, 1 reply; 5+ messages in thread
From: Andrey Borzenkov @ 2014-03-16 7:04 UTC (permalink / raw)
To: adrian15; +Cc: The development of GNU GRUB
В Sun, 16 Mar 2014 06:56:46 +0100
adrian15 <adrian15sgd@gmail.com> пишет:
> >
> > To be honest, I do not understand what you are trying to do here.
>
> The same thing as in:
>
> https://forja.cenatic.es/plugins/scmgit/cgi-bin/gitweb.cgi?p=supergrub2/supergrub2.git;a=blob_plain;f=supergrub-meta-mkrescue;hb=22683e2b5fa0d65141c1be1a7487914b1d43f4dd
>
> (which uses Debian packages) but using source code.
>
Why would you want to build separate ISO for every platform? The whole
point of using grub-mkrescue is to create single ISO image that
supports and can be booted on all platforms.
>
> >> 8) What's the best way to build and install an hybrid system that
> >> includes both: x86_64_efi and i386 - pc stuff?
> >>
> >
> > Just built and install grub for each platform you want to use;
> > grub-mkrescue will automatically include every platform it finds.
>
> Any advice for the special where I want to build x86_64_efi + x86_pc
> hybrid disk?
>
Not really. Just build and install both platforms using the same prefix
and run grub-mkrescue that is build to use the same prefix.
As mentioned, when building you should distinguish between host (grub
utils) and target (boot time). It is perfectly valid to build utils for
x86 and target for ARM as long as you have suitable cross tools. In
your case all builds should use the same host (which defaults to target
which may be wrong even for x86 case - consider 32 vs. 64 bit).
See INSTALL how to set various options for each environment.
> >
> > I prefer to build every platform in separate directory, there were
> > issues with incomplete cleanup. If you hit one, please report.
>
> Well, as I don't want to have a separate directory for each build my
> question would be:
>
> What is it the official commands for doing a safe cleanup?
>
I always used "make distclean". But IIRC there are some files that are
not removed. Not sure to which extent they affect subsequent builds. I
had problems when re-building on Windows but they should be fixed now.
From my point of view, "make distclean" is official and if it does not
work it is a bug that has to be fixed.
>
> >
> >> 9) A) What's the best way to remove grub configuration files installed
> >> on the system so that I can start from scratch so that already built
> >> target+platform grub binaries or configurations are ignored?
> >>
> >
> > There are no configuration files after "make install" (if we do not
> > count /etc/grub.d as configuration).
>
> I meant the ones that someone makes grub-mkrescue to look for the
> /usr/local/lib/grub/i386-pc/boot_hybrid.img files which I suppose are
> not found in source code but in the system (Gnu/Linux filesystem I mean).
>
There are no special configuration files. If grub-mkrescue is called
without --directory option, it will enumerate all platforms found
under /usr/local/lib/grub (in your example). Just place additional
platform directory there and grub-mkrescue will pick it up.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trying to build Rescue image for three different target and platform
2014-03-16 7:04 ` Andrey Borzenkov
@ 2014-03-16 12:05 ` adrian15
0 siblings, 0 replies; 5+ messages in thread
From: adrian15 @ 2014-03-16 12:05 UTC (permalink / raw)
To: Andrey Borzenkov; +Cc: The development of GNU GRUB
El 16/03/14 08:04, Andrey Borzenkov escribió:
> В Sun, 16 Mar 2014 06:56:46 +0100
> adrian15 <adrian15sgd@gmail.com> пишет:
>
>>>
>>> To be honest, I do not understand what you are trying to do here.
>>
>> The same thing as in:
>>
>> https://forja.cenatic.es/plugins/scmgit/cgi-bin/gitweb.cgi?p=supergrub2/supergrub2.git;a=blob_plain;f=supergrub-meta-mkrescue;hb=22683e2b5fa0d65141c1be1a7487914b1d43f4dd
>>
>> (which uses Debian packages) but using source code.
>>
>
> Why would you want to build separate ISO for every platform? The whole
> point of using grub-mkrescue is to create single ISO image that
> supports and can be booted on all platforms.
Because I want to support all the GRUB2 platforms but not having a
single 60 MB (random size guess) download for that.
The other reason is because a: i386-efi + x86_64_efi + x86_pc hybrid did
not boot in a x86_64_efi only system. Right now I'm not sure if I built
it from source or if I made the iso with Debian binaries but, what it's
sure is that it did not boot at all. It just hung.
So I want a separate ISO for every platform.
>
>>
>>>> 8) What's the best way to build and install an hybrid system that
>>>> includes both: x86_64_efi and i386 - pc stuff?
>>>>
>>>
>>> Just built and install grub for each platform you want to use;
>>> grub-mkrescue will automatically include every platform it finds.
>>
>> Any advice for the special where I want to build x86_64_efi + x86_pc
>> hybrid disk?
>>
>
> Not really. Just build and install both platforms using the same prefix
> and run grub-mkrescue that is build to use the same prefix.
Ok.
>
> As mentioned, when building you should distinguish between host (grub
> utils) and target (boot time). It is perfectly valid to build utils for
> x86 and target for ARM as long as you have suitable cross tools. In
> your case all builds should use the same host (which defaults to target
> which may be wrong even for x86 case - consider 32 vs. 64 bit).
>
> See INSTALL how to set various options for each environment.
Ok,I'll check that.
>
>>>
>>> I prefer to build every platform in separate directory, there were
>>> issues with incomplete cleanup. If you hit one, please report.
>>
>> Well, as I don't want to have a separate directory for each build my
>> question would be:
>>
>> What is it the official commands for doing a safe cleanup?
>>
>
> I always used "make distclean". But IIRC there are some files that are
> not removed. Not sure to which extent they affect subsequent builds. I
> had problems when re-building on Windows but they should be fixed now.
>
> From my point of view, "make distclean" is official and if it does not
> work it is a bug that has to be fixed.
make distclean . Written down.
>
>>
>>>
>>>> 9) A) What's the best way to remove grub configuration files installed
>>>> on the system so that I can start from scratch so that already built
>>>> target+platform grub binaries or configurations are ignored?
>>>>
>>>
>>> There are no configuration files after "make install" (if we do not
>>> count /etc/grub.d as configuration).
>>
>> I meant the ones that someone makes grub-mkrescue to look for the
>> /usr/local/lib/grub/i386-pc/boot_hybrid.img files which I suppose are
>> not found in source code but in the system (Gnu/Linux filesystem I mean).
>>
>
> There are no special configuration files. If grub-mkrescue is called
> without --directory option, it will enumerate all platforms found
> under /usr/local/lib/grub (in your example). Just place additional
> platform directory there and grub-mkrescue will pick it up.
So I just need to purge the /usr/local/lib/grub contents so that I can
start again without the fear of grub-mkrescue picking up an earlier
built platform (That's what I tried to achieve before with make
uninstall by the way).
That's exactly what I wanted to know.
Thank you very much!
I do not know when I will be able to try all of this but now it's much
more clear everything and I'll be able to report GRUB build errors (or
runtime) more easily for my special use case.
adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-16 12:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-09 16:14 Trying to build Rescue image for three different target and platform adrian15
2014-03-13 5:51 ` Andrey Borzenkov
2014-03-16 5:56 ` adrian15
2014-03-16 7:04 ` Andrey Borzenkov
2014-03-16 12:05 ` adrian15
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).