From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1WMgMq-0005Ai-LV for mharc-grub-devel@gnu.org; Sun, 09 Mar 2014 12:14:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMgMj-000594-N9 for grub-devel@gnu.org; Sun, 09 Mar 2014 12:14:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMgMd-0005UT-V5 for grub-devel@gnu.org; Sun, 09 Mar 2014 12:14:17 -0400 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:45921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMgMd-0005UP-JB for grub-devel@gnu.org; Sun, 09 Mar 2014 12:14:11 -0400 Received: by mail-we0-f182.google.com with SMTP id p61so7370309wes.13 for ; Sun, 09 Mar 2014 09:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=BfA/10F3mW8KHkt9XlN12pxW7wmuTNm2V+SF7RMGyzI=; b=BphBDBn+Clhp6a8KEv64hUVbeEhuC/+/IVgvFHqR4WgJqmSyg2YCRB3hbnKMCe3zYF Yys8HYH4KojmRWCYcMY+bN4XW/46Z3o0bYD1YOkSjIPQAacjueAZEHqwj8RUGV0djWul oUUX44Z5DhJjI/DBVJ84Jerwv6PCT2cN9+4a/7Q7A/cwNtiQe0c/LMGPaMrWYvSQxjzb P+/25iFGgdvexSZTyaxcPBS+4A8ZdsX2jYitbL0w3wZn3T90mr0DcyXL26RYkHcuq7fQ aKgNukrQ3QND4jwWyT5nhDc/dsseCEJfl0gYjbs68E/FF82uSpO3pCMjqKlSLaUsSeQy 57eQ== X-Received: by 10.180.164.107 with SMTP id yp11mr4961610wib.37.1394381650440; Sun, 09 Mar 2014 09:14:10 -0700 (PDT) Received: from [192.168.10.45] (136.Red-88-21-16.staticIP.rima-tde.net. [88.21.16.136]) by mx.google.com with ESMTPSA id di9sm3859853wid.6.2014.03.09.09.14.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Mar 2014 09:14:08 -0700 (PDT) Message-ID: <531C934C.5070501@gmail.com> Date: Sun, 09 Mar 2014 17:14:04 +0100 From: adrian15 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.3.0 MIME-Version: 1.0 To: The development of GRUB 2 Subject: Trying to build Rescue image for three different target and platform Content-Type: multipart/mixed; boundary="------------000800030206010905080005" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::236 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2014 16:14:22 -0000 This is a multi-part message in MIME format. --------------000800030206010905080005 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/ --------------000800030206010905080005 Content-Type: text/plain; charset=UTF-8; name="supergrub-mkrescue" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="supergrub-mkrescue" #!/bin/bash -e usage() { cat <> "$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 --------------000800030206010905080005 Content-Type: text/plain; charset=UTF-8; name="supergrub-meta-mkrescue" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="supergrub-meta-mkrescue" #!/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 --------------000800030206010905080005--