All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [v3 PATCH 0/9] Improved EFI boot support
@ 2013-09-17 13:32 Jason Wessel
  2013-09-17 13:32 ` [v3 PATCH 1/9] bootimage.bbclass: Move fat image creation into a function Jason Wessel
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Jason Wessel @ 2013-09-17 13:32 UTC (permalink / raw
  To: Openembedded-core; +Cc: dvhart

V3
- Add comment about isolinux.bin required in EFI only case
- Fix typo of PCIBIOS -> PCBIOS
- Change COMPRESSISO ?= "" -> COMPRESSISO ?= "0" for the default
- Add comment to EFI/ISO syslinux.bbclass to clarify workaround
  with EFI only case and hybrid boot
- Add patch to fix syslinux serial and menu problems
- Add patch to fix boot-directdisk.bbclass
* Two new patches are 7 & 8, the zisofs patch moved from 7 -> 9


V2
- Added reference to YOCTO #1913 for per Darren
- Remove PR number from cdrtools uprev
- Added Saul's change to cdrtools to get rid of STAGE_TEMP
- made the builtin grub cfg file copied from a SRC_URI
- upreved syslinux to 6.01
- Use the new isohybrid command from syslinux which can now
  generate EFI enabled ISO's which can boot directly when
  dd'ed to a USB or HDD device.
- Dropped any references to efi or pcbios in the qemu* configs
- Added the zisofs patch to the end of the series instead
  of depending on it, in case it is dropped later.
- git -format-patch -M20% is your friend for seeing the
  delta on recipe upgrades :-)

YAY, with the new version of syslinux it is now possible to
build a single live ISO image which can boot in legacy mode
or EFI on optical media or USB devices.

We still have to create 2 ISO's one for 32bit EFI systems and one for
64bit EFI systems but this is also true of all other Linux
distributions today as well.

Jason.

---

The goal of this patch set is to put the EFI ISO boot method on par
with the ISO PCBIOS boot method.  This also allows for the creation of
a single ISO image which can boot in "legacy boot" mode or EFI boot
mode.

In order to make this possible the cdrtools needed an update to the
very latest and this brings in an license change.  Given that change
it was not entirely clear to me if we needed to leave the older
package around.  I opted to remove the older package recipe since
there was no clean way to fail in the case you wanted to build EFI
boot media.

The bbnote that was previously in the bootimg.bbclass about EFI only
media being untested was a bit of an understatement, as the images
would not even build without errors due to the call to isohybrid.  I
removed any such warnings because that path has been fully vetted now.

Cheers,
Jason.


----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [v3 PATCH 1/9] bootimage.bbclass: Move fat image creation into a function
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
@ 2013-09-17 13:32 ` Jason Wessel
  2013-09-17 13:32 ` [v3 PATCH 2/9] cdrtools-native: Update from 3.00 to 3.01a17 Jason Wessel
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Jason Wessel @ 2013-09-17 13:32 UTC (permalink / raw
  To: Openembedded-core; +Cc: dvhart

In order to call the fat image creation multiple times it needs to be
in its own function.  A future commit will make use of the new
function to additionally create EFI image files for use with an ISO.

[YOCTO #4100]
[YOCTO #1913]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
---
 meta/classes/bootimg.bbclass |  110 ++++++++++++++++++++++--------------------
 1 file changed, 58 insertions(+), 52 deletions(-)

diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index 90a241d..bd211fb 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -111,6 +111,63 @@ build_iso() {
 	ln -s ${IMAGE_NAME}.iso ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso
 }
 
+build_fat_img() {
+	FATSOURCEDIR=$1
+	FATIMG=$2
+
+	# Calculate the size required for the final image including the
+	# data and filesystem overhead.
+	# Sectors: 512 bytes
+	#  Blocks: 1024 bytes
+
+	# Determine the sector count just for the data
+	SECTORS=$(expr $(du --apparent-size -ks ${FATSOURCEDIR} | cut -f 1) \* 2)
+
+	# Account for the filesystem overhead. This includes directory
+	# entries in the clusters as well as the FAT itself.
+	# Assumptions:
+	#   FAT32 (12 or 16 may be selected by mkdosfs, but the extra
+	#   padding will be minimal on those smaller images and not
+	#   worth the logic here to caclulate the smaller FAT sizes)
+	#   < 16 entries per directory
+	#   8.3 filenames only
+
+	# 32 bytes per dir entry
+	DIR_BYTES=$(expr $(find ${FATSOURCEDIR} | tail -n +2 | wc -l) \* 32)
+	# 32 bytes for every end-of-directory dir entry
+	DIR_BYTES=$(expr $DIR_BYTES + $(expr $(find ${FATSOURCEDIR} -type d | tail -n +2 | wc -l) \* 32))
+	# 4 bytes per FAT entry per sector of data
+	FAT_BYTES=$(expr $SECTORS \* 4)
+	# 4 bytes per FAT entry per end-of-cluster list
+	FAT_BYTES=$(expr $FAT_BYTES + $(expr $(find ${FATSOURCEDIR} -type d | tail -n +2 | wc -l) \* 4))
+
+	# Use a ceiling function to determine FS overhead in sectors
+	DIR_SECTORS=$(expr $(expr $DIR_BYTES + 511) / 512)
+	# There are two FATs on the image
+	FAT_SECTORS=$(expr $(expr $(expr $FAT_BYTES + 511) / 512) \* 2)
+	SECTORS=$(expr $SECTORS + $(expr $DIR_SECTORS + $FAT_SECTORS))
+
+	# Determine the final size in blocks accounting for some padding
+	BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE})
+
+	# Ensure total sectors is an integral number of sectors per
+	# track or mcopy will complain. Sectors are 512 bytes, and we
+	# generate images with 32 sectors per track. This calculation is
+	# done in blocks, thus the mod by 16 instead of 32.
+	BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
+
+	# mkdosfs will sometimes use FAT16 when it is not appropriate,
+	# resulting in a boot failure from SYSLINUX. Use FAT32 for
+	# images larger than 512MB, otherwise let mkdosfs decide.
+	if [ $(expr $BLOCKS / 1024) -gt 512 ]; then
+		FATSIZE="-F 32"
+	fi
+
+	mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} ${BLOCKS}
+	# Copy FATSOURCEDIR recursively into the image file directly
+	mcopy -i ${FATIMG} -s ${FATSOURCEDIR}/* ::/
+}
+
 build_hddimg() {
 	# Create an HDD image
 	if [ "${NOHDD}" != "1" ] ; then
@@ -123,58 +180,7 @@ build_hddimg() {
 			grubefi_hddimg_populate
 		fi
 
-		# Calculate the size required for the final image including the
-		# data and filesystem overhead.
-		# Sectors: 512 bytes
-		#  Blocks: 1024 bytes
-
-		# Determine the sector count just for the data
-		SECTORS=$(expr $(du --apparent-size -ks ${HDDDIR} | cut -f 1) \* 2)
-
-		# Account for the filesystem overhead. This includes directory
-		# entries in the clusters as well as the FAT itself.
-		# Assumptions:
-		#   FAT32 (12 or 16 may be selected by mkdosfs, but the extra
-		#   padding will be minimal on those smaller images and not
-		#   worth the logic here to caclulate the smaller FAT sizes)
-		#   < 16 entries per directory
-		#   8.3 filenames only
-
-		# 32 bytes per dir entry
-		DIR_BYTES=$(expr $(find ${HDDDIR} | tail -n +2 | wc -l) \* 32)
-		# 32 bytes for every end-of-directory dir entry
-		DIR_BYTES=$(expr $DIR_BYTES + $(expr $(find ${HDDDIR} -type d | tail -n +2 | wc -l) \* 32))
-		# 4 bytes per FAT entry per sector of data
-		FAT_BYTES=$(expr $SECTORS \* 4)
-		# 4 bytes per FAT entry per end-of-cluster list
-		FAT_BYTES=$(expr $FAT_BYTES + $(expr $(find ${HDDDIR} -type d | tail -n +2 | wc -l) \* 4))
-
-		# Use a ceiling function to determine FS overhead in sectors
-		DIR_SECTORS=$(expr $(expr $DIR_BYTES + 511) / 512)
-		# There are two FATs on the image
-		FAT_SECTORS=$(expr $(expr $(expr $FAT_BYTES + 511) / 512) \* 2)
-		SECTORS=$(expr $SECTORS + $(expr $DIR_SECTORS + $FAT_SECTORS))
-
-		# Determine the final size in blocks accounting for some padding
-		BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE})
-
-		# Ensure total sectors is an integral number of sectors per
-		# track or mcopy will complain. Sectors are 512 bytes, and we
-		# generate images with 32 sectors per track. This calculation is
-		# done in blocks, thus the mod by 16 instead of 32.
-		BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
-
-		# mkdosfs will sometimes use FAT16 when it is not appropriate,
-		# resulting in a boot failure from SYSLINUX. Use FAT32 for
-		# images larger than 512MB, otherwise let mkdosfs decide.
-		if [ $(expr $BLOCKS / 1024) -gt 512 ]; then
-			FATSIZE="-F 32"
-		fi
-
-		IMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
-		mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${IMG} ${BLOCKS}
-		# Copy HDDDIR recursively into the image file directly
-		mcopy -i ${IMG} -s ${HDDDIR}/* ::/
+		build_fat_img ${HDDDIR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
 
 		if [ "${PCBIOS}" = "1" ]; then
 			syslinux_hddimg_install
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [v3 PATCH 2/9] cdrtools-native: Update from 3.00 to 3.01a17
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
  2013-09-17 13:32 ` [v3 PATCH 1/9] bootimage.bbclass: Move fat image creation into a function Jason Wessel
@ 2013-09-17 13:32 ` Jason Wessel
  2013-09-17 13:32 ` [v3 PATCH 3/9] grub-efi-native: Add support for EFI ISO images Jason Wessel
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Jason Wessel @ 2013-09-17 13:32 UTC (permalink / raw
  To: Openembedded-core; +Cc: dvhart

The update is needed to support generation of EFI boot images that
work with optical media.  Specifically the "-eltorito-platform efi"
capability for mkisofs is needed.

[YOCTO #4100]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
---
 ...s-native_3.00.bb => cdrtools-native_3.01a17.bb} |   22 +++++++-------------
 1 file changed, 8 insertions(+), 14 deletions(-)
 rename meta/recipes-devtools/cdrtools/{cdrtools-native_3.00.bb => cdrtools-native_3.01a17.bb} (47%)

diff --git a/meta/recipes-devtools/cdrtools/cdrtools-native_3.00.bb b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a17.bb
similarity index 47%
rename from meta/recipes-devtools/cdrtools/cdrtools-native_3.00.bb
rename to meta/recipes-devtools/cdrtools/cdrtools-native_3.01a17.bb
index 7e4c381..2ae3f4a 100644
--- a/meta/recipes-devtools/cdrtools/cdrtools-native_3.00.bb
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a17.bb
@@ -5,26 +5,20 @@ SUMMARY = "A set of tools for CD recording, including cdrecord"
 DESCRIPTION = "A set of tools for CD recording, including cdrecord"
 HOMEPAGE = "http://cdrecord.berlios.de/private/cdrecord.html"
 SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8d16123ffd39e649a5e4a6bc1de60e6d"
-PR = "r0"
+LICENSE = "GPLv2 & CDDL-1.0 & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
 
-SRC_URI = "ftp://ftp.berlios.de/pub/cdrecord/cdrtools-${PV}.tar.bz2 \
-           file://no_usr_src.patch"
+SRC_URI = "ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-${PV}.tar.bz2"
 
-SRC_URI[md5sum] = "f9fbab08fbd458b0d2312976d8c5f558"
-SRC_URI[sha256sum] = "7f9cb64820055573b880f77b2f16662a512518336ba95ab49228a1617973423d"
+SRC_URI[md5sum] = "4cef9db0cf15a770c52d65b00bbee2db"
+SRC_URI[sha256sum] = "3d613965b213ad83e4be0ba2535e784901839ea4d11a20a2beb6765f0eb76dfa"
 
-inherit native
+S = "${WORKDIR}/cdrtools-3.01"
 
-STAGE_TEMP = "${WORKDIR}/image-temp"
+inherit native
 
 FILESPATH = "${FILE_DIRNAME}/cdrtools-native/"
 
 do_install() {
-	install -d ${STAGE_TEMP}
-	make install INS_BASE=${STAGE_TEMP}
-
-	install -d ${D}${bindir}/
-	install ${STAGE_TEMP}/bin/* ${D}${bindir}/
+	make install GMAKE_NOWARN=true INS_BASE=${prefix} DESTDIR=${D}
 }
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [v3 PATCH 3/9] grub-efi-native: Add support for EFI ISO images
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
  2013-09-17 13:32 ` [v3 PATCH 1/9] bootimage.bbclass: Move fat image creation into a function Jason Wessel
  2013-09-17 13:32 ` [v3 PATCH 2/9] cdrtools-native: Update from 3.00 to 3.01a17 Jason Wessel
@ 2013-09-17 13:32 ` Jason Wessel
  2013-09-17 13:32 ` [v3 PATCH 4/9] syslinux.bbclass, syslinux: Update to syslinux 6.01 Jason Wessel
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Jason Wessel @ 2013-09-17 13:32 UTC (permalink / raw
  To: Openembedded-core; +Cc: dvhart

The iso9660 file system support needs to be added to grub in order to
be able to correctly find the grub.cfg.  The grub commands to locate
the grub.cfg also needs to be encoded into grub's default
configuration.

This change allows the resulting grub binary to work both in the hard
drive / USB boot case or the optical media boot case.

[YOCTO #4100]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
---
 meta/recipes-bsp/grub/files/cfg               |    2 ++
 meta/recipes-bsp/grub/grub-efi-native_2.00.bb |    7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-bsp/grub/files/cfg

diff --git a/meta/recipes-bsp/grub/files/cfg b/meta/recipes-bsp/grub/files/cfg
new file mode 100644
index 0000000..ffffe47
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/cfg
@@ -0,0 +1,2 @@
+search.file /EFI/BOOT/grub.cfg root
+set prefix=($root)/EFI/BOOT
diff --git a/meta/recipes-bsp/grub/grub-efi-native_2.00.bb b/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
index 2d3d68a..04973b5 100644
--- a/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
+++ b/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
@@ -23,6 +23,7 @@ PR = "r2"
 PN := "grub-efi-${TRANSLATED_TARGET_ARCH}-native"
 
 SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
+           file://cfg \
            file://grub-2.00-fpmath-sse-387-fix.patch \
            file://grub-2.00-fix-enable_execute_stack-check.patch \
            file://grub-2.00-disable-help2man.patch \
@@ -66,9 +67,11 @@ EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \
                 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
 do_mkimage() {
-	./grub-mkimage -p /EFI/BOOT -d ./grub-core/ \
+	# Search for the grub.cfg on the local boot media by using the
+	# built in cfg file provided via this recipe
+	./grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
 	               -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
-	               boot linux ext2 fat serial part_msdos part_gpt normal efi_gop
+	               boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search
 }
 addtask mkimage after do_compile before do_install
 
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [v3 PATCH 4/9] syslinux.bbclass, syslinux: Update to syslinux 6.01
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
                   ` (2 preceding siblings ...)
  2013-09-17 13:32 ` [v3 PATCH 3/9] grub-efi-native: Add support for EFI ISO images Jason Wessel
@ 2013-09-17 13:32 ` Jason Wessel
  2013-09-17 22:10   ` Darren Hart
  2013-09-17 13:32 ` [v3 PATCH 5/9] bootimage.bbclass, grub-efi.bbclass: Improve EFI & PCBIOS+EFI ISO support Jason Wessel
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 18+ messages in thread
From: Jason Wessel @ 2013-09-17 13:32 UTC (permalink / raw
  To: Openembedded-core; +Cc: dvhart

A newer version of syslinux is required for an EFI enabled isohybrid.
This is used for the the capability to generate 3 types of ISO images,
all of which can be booted off a USB device or HDD if copied with dd.

1) PC BIOS only ISO
2) EFI only ISO
3) EFI + PC BIOS ISO

The syslinux.bbclass required a minor tweak because a few .c32
libraries require dynamic loading from the created media as of
syslinux 5 and up.  This was a good time to also fix the
duplication of the AUTO_SYSLINUXMENU block.

[YOCTO #4100]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 meta/classes/syslinux.bbclass                      |   21 +++++++---------
 .../{syslinux_4.07.bb => syslinux_6.01.bb}         |   26 ++++++++++++--------
 2 files changed, 25 insertions(+), 22 deletions(-)
 rename meta/recipes-devtools/syslinux/{syslinux_4.07.bb => syslinux_6.01.bb} (63%)

diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index dae6609..223e4dc 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -36,28 +36,25 @@ syslinux_populate() {
 
 	# Install the config files
 	install -m 0644 ${SYSLINUXCFG} ${DEST}${BOOTDIR}/${CFGNAME}
+	if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then
+		install -m 0644 ${STAGING_DATADIR}/syslinux/vesamenu.c32 ${DEST}${BOOTDIR}/vesamenu.c32
+		install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${DEST}${BOOTDIR}/libcom32.c32
+		install -m 0444 ${STAGING_DATADIR}/syslinux/libutil.c32 ${DEST}${BOOTDIR}/libutil.c32
+		if [ "${SYSLINUX_SPLASH}" != "" ] ; then
+			install -m 0644 ${SYSLINUX_SPLASH} ${DEST}${BOOTDIR}/splash.lss
+		fi
+	fi
 }
 
 syslinux_iso_populate() {
 	syslinux_populate ${ISODIR} ${ISOLINUXDIR} isolinux.cfg
 	install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
-	if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then
-		install -m 0644 ${STAGING_DATADIR}/syslinux/vesamenu.c32 ${ISODIR}${ISOLINUXDIR}/vesamenu.c32
-		if [ "${SYSLINUX_SPLASH}" != "" ] ; then
-			install -m 0644 ${SYSLINUX_SPLASH} ${ISODIR}${ISOLINUXDIR}/splash.lss
-		fi
-	fi
+	install -m 0644 ${STAGING_DATADIR}/syslinux/ldlinux.c32 ${ISODIR}${ISOLINUXDIR}
 }
 
 syslinux_hddimg_populate() {
 	syslinux_populate ${HDDDIR} ${SYSLINUXDIR} syslinux.cfg
 	install -m 0444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}${SYSLINUXDIR}/ldlinux.sys
-	if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then
-		install -m 0644 ${STAGING_DATADIR}/syslinux/vesamenu.c32 ${HDDDIR}${SYSLINUXDIR}/vesamenu.c32
-		if [ "${SYSLINUX_SPLASH}" != "" ] ; then
-			install -m 0644 ${SYSLINUX_SPLASH} ${HDDDIR}${SYSLINUXDIR}/splash.lss
-		fi
-	fi
 }
 
 syslinux_hddimg_install() {
diff --git a/meta/recipes-devtools/syslinux/syslinux_4.07.bb b/meta/recipes-devtools/syslinux/syslinux_6.01.bb
similarity index 63%
rename from meta/recipes-devtools/syslinux/syslinux_4.07.bb
rename to meta/recipes-devtools/syslinux/syslinux_6.01.bb
index bba5dda..4438ea8 100644
--- a/meta/recipes-devtools/syslinux/syslinux_4.07.bb
+++ b/meta/recipes-devtools/syslinux/syslinux_6.01.bb
@@ -2,19 +2,21 @@ DESCRIPTION = "A multi-purpose linux bootloader"
 HOMEPAGE = "http://syslinux.zytor.com/"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
-                    file://README;beginline=35;endline=41;md5=f7249a750bc692d1048b2626752aa415"
+                    file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a"
 
 # If you really want to run syslinux, you need mtools.  We just want the
 # ldlinux.* stuff for now, so skip mtools-native
 DEPENDS = "nasm-native util-linux"
-PR = "r0"
 
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/4.xx/syslinux-${PV}.tar.bz2"
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/6.xx/syslinux-${PV}.tar.bz2"
 
-SRC_URI[md5sum] = "9ff6e1b94efab931fb4717b600d88779"
-SRC_URI[sha256sum] = "1240a4e4219b518bdaef78931b6e901befeff35e6894ac6db785115848a7a05a"
+SRC_URI[md5sum] = "6945ee89e29119d459baed4937bbc534"
+SRC_URI[sha256sum] = "83a04cf81e6a46b80ee5a321926eea095af3498b04317e3674b46c125c7a5b43"
 
 COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
+# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries
+INSANE_SKIP_${PN}-misc = "arch"
+INSANE_SKIP_${PN}-chain = "arch"
 
 EXTRA_OEMAKE = " \
 	BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
@@ -28,21 +30,25 @@ do_configure() {
 	sed -e 's,win32/\S*,,g' -i Makefile
 
 	# clean installer executables included in source tarball
-	oe_runmake clean
+	oe_runmake clean firmware="efi32" EFIINC="${includedir}"
+	# NOTE: There is a temporary work around above to specify
+	#	the efi32 as the firmware else the pre-built bios
+	#	files get erased contrary to the doc/distib.txt
+	#	In the future this should be "bios" and not "efi32".
 }
 
 do_compile() {
 	# Rebuild only the installer; keep precompiled bootloaders
 	# as per author's request (doc/distrib.txt)
-	oe_runmake CC="${CC} ${CFLAGS}" LDFLAGS="${LDFLAGS}" installer
+	oe_runmake CC="${CC} ${CFLAGS}" LDFLAGS="${LDFLAGS}" firmware="bios" installer
 }
 
 do_install() {
-	oe_runmake install INSTALLROOT="${D}"
+	oe_runmake install INSTALLROOT="${D}" firmware="bios"
 
 	install -d ${D}${datadir}/syslinux/
-	install -m 644 ${S}/core/ldlinux.sys ${D}${datadir}/syslinux/
-	install -m 644 ${S}/core/ldlinux.bss ${D}${datadir}/syslinux/
+	install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/
+	install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/
 }
 
 PACKAGES += "${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [v3 PATCH 5/9] bootimage.bbclass, grub-efi.bbclass: Improve EFI & PCBIOS+EFI ISO support
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
                   ` (3 preceding siblings ...)
  2013-09-17 13:32 ` [v3 PATCH 4/9] syslinux.bbclass, syslinux: Update to syslinux 6.01 Jason Wessel
@ 2013-09-17 13:32 ` Jason Wessel
  2013-09-17 22:12   ` Darren Hart
  2013-09-17 13:32 ` [v3 PATCH 6/9] grub-efi.bbclass: Add serial and graphics menu options Jason Wessel
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 18+ messages in thread
From: Jason Wessel @ 2013-09-17 13:32 UTC (permalink / raw
  To: Openembedded-core; +Cc: dvhart

Using the latest mkisofs it is possible to generate 3 different types
of ISO images, which can be used in various scenarios.

1) PCBIOS Only ISO
   - This option remains unchanged by this commit
   - Uses syslinux menus
   - Can be directly copied with dd to a USB device
   - Can be burned to optical media

2) EFI Only ISO
   - Uses grub 2 menus
   - Can be burned to optical media
   - If you want to use this image on a USB device
     extra steps must be taken in order to format the USB
     device with fat32, and copy an EFI loader which will
     in turn load the iso image

3) PCBIOS / EFI ISO
   - This is a hybrid image ISO that will work for case 1 or 2
     as above with the same restrictions and boot menu types
     depending on what type of firmware is installed on
     the hardware or depending on if EFI or "Legacy Boot" is
     enabled on some UEFI firmwares.

The syslinux.bbclass is now always required because that is where the
isohybrid dependencies come from as well as the configuration data for
the isohybrid.  The isohybrid is the secret sauce which allows the ISO
to work as optical media or as a disk image on USB or a HDD/SSD.

[YOCTO #4100]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 meta/classes/bootimg.bbclass  |   35 +++++++++++++++++++++++------------
 meta/classes/grub-efi.bbclass |    8 ++++++++
 2 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index bd211fb..fdd4ea9 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -32,6 +32,7 @@ EXCLUDE_FROM_WORLD = "1"
 
 HDDDIR = "${S}/hddimg"
 ISODIR = "${S}/iso"
+EFIIMGDIR = "${S}/efi_img"
 
 BOOTIMG_VOLUME_ID   ?= "boot"
 BOOTIMG_EXTRA_SPACE ?= "512"
@@ -48,15 +49,10 @@ def pcbios(d):
         pcbios = base_contains("MACHINE_FEATURES", "efi", "0", "1", d)
     return pcbios
 
-def pcbios_class(d):
-    if d.getVar("PCBIOS", True) == "1":
-        return "syslinux"
-    return ""
-
 PCBIOS = "${@pcbios(d)}"
-PCBIOS_CLASS = "${@pcbios_class(d)}"
 
-inherit ${PCBIOS_CLASS}
+# The syslinux is required for the isohybrid command and boot catalog
+inherit syslinux
 inherit ${EFI_CLASS}
 
 populate() {
@@ -90,21 +86,36 @@ build_iso() {
 	fi
 	if [ "${EFI}" = "1" ]; then
 		grubefi_iso_populate
+		build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img
 	fi
 
-	if [ "${PCBIOS}" = "1" ]; then
+	# EFI only
+	if [ "${PCBIOS}" != "1" ] && [ "${EFI}" = "1" ] ; then
+		# Work around bug in isohybrid where it requires isolinux.bin
+		# In the boot catalog, even though it is not used
+		mkdir -p ${ISODIR}/${ISOLINUXDIR}
+		install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
+	fi
+
+	if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then
+		# PCBIOS only media
 		mkisofs -V ${BOOTIMG_VOLUME_ID} \
 		        -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
 			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} -r \
 			${MKISOFS_OPTIONS} ${ISODIR}
 	else
-		bbnote "EFI-only ISO images are untested, please provide feedback."
-		mkisofs -V ${BOOTIMG_VOLUME_ID} \
+		# EFI only OR EFI+PCBIOS
+		mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \
 		        -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
-			-r ${ISODIR}
+			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
+			-r ${MKISOFS_OPTIONS} \
+			-eltorito-alt-boot -eltorito-platform efi \
+			-b efi.img -no-emul-boot \
+			${ISODIR}
+		isohybrid_args="-u"
 	fi
 
-	isohybrid ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso
+	isohybrid $isohybrid_args ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso
 
 	cd ${DEPLOY_DIR_IMAGE}
 	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index c6f5d4e..c21babb 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -41,6 +41,14 @@ grubefi_populate() {
 
 grubefi_iso_populate() {
 	grubefi_populate ${ISODIR}
+	# Build a EFI directory to create efi.img
+	mkdir -p ${EFIIMGDIR}/${EFIDIR}
+	cp ${ISODIR}/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
+	cp ${ISODIR}/vmlinuz ${EFIIMGDIR}
+	echo "EFI\\BOOT\\${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh
+	if [ -f "${ISODIR}/initrd" ] ; then
+		cp ${ISODIR}/initrd ${EFIIMGDIR}
+	fi
 }
 
 grubefi_hddimg_populate() {
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [v3 PATCH 6/9] grub-efi.bbclass: Add serial and graphics menu options
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
                   ` (4 preceding siblings ...)
  2013-09-17 13:32 ` [v3 PATCH 5/9] bootimage.bbclass, grub-efi.bbclass: Improve EFI & PCBIOS+EFI ISO support Jason Wessel
@ 2013-09-17 13:32 ` Jason Wessel
  2013-09-17 22:19   ` Darren Hart
  2013-09-17 13:32 ` [v3 PATCH 7/9] syslinux.bbclass: Fix hard coding of console=tty* Jason Wessel
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 18+ messages in thread
From: Jason Wessel @ 2013-09-17 13:32 UTC (permalink / raw
  To: Openembedded-core; +Cc: dvhart

The syslinux.bbclass already has support for automatically generated
serial and graphics menu choices.  This patch adds the same concept to
the grub-efi menu.  That makes it possible to generate a single image
which can boot on a PCBIOS or EFI firmware with consistent looking
boot options.

[YOCTO #4100]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 meta/classes/grub-efi.bbclass |   41 +++++++++++++++++++++++++++--------------
 1 file changed, 27 insertions(+), 14 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index c21babb..ffbcf4c 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -9,6 +9,7 @@
 # External variables
 # ${INITRD} - indicates a filesystem image to use as an initrd (optional)
 # ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
+# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu
 # ${LABELS} - a list of targets for the automatic config
 # ${APPEND} - an override list of append strings for each label
 # ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional)
@@ -16,6 +17,7 @@
 
 do_bootimg[depends] += "grub-efi-${TRANSLATED_TARGET_ARCH}-native:do_deploy"
 
+GRUB_SERIAL ?= "console=ttyS0,115200"
 GRUBCFG = "${S}/grub.cfg"
 GRUB_TIMEOUT ?= "10"
 #FIXME: build this from the machine config
@@ -63,6 +65,8 @@ python build_grub_cfg() {
         bb.error("WORKDIR not defined, unable to package")
         return
 
+    gfxserial = d.getVar('GRUB_GFXSERIAL', True) or ""
+
     labels = d.getVar('LABELS', True)
     if not labels:
         bb.debug(1, "LABELS not defined, nothing to do")
@@ -96,6 +100,12 @@ python build_grub_cfg() {
     else:
         cfgfile.write('timeout=50\n')
 
+    if gfxserial == "1":
+        btypes = [ [ " graphics console", "" ],
+            [ " serial console", d.getVar('GRUB_SERIAL', True) or "" ] ]
+    else:
+        btypes = [ [ "", "" ] ]
+
     for label in labels.split():
         localdata = d.createCopy()
 
@@ -103,24 +113,27 @@ python build_grub_cfg() {
         if not overrides:
             raise bb.build.FuncFailed('OVERRIDES not defined')
 
-        localdata.setVar('OVERRIDES', label + ':' + overrides)
-        bb.data.update_data(localdata)
+        for btype in btypes:
+            localdata.setVar('OVERRIDES', label + ':' + overrides)
+            bb.data.update_data(localdata)
 
-        cfgfile.write('\nmenuentry \'%s\'{\n' % (label))
-        if label == "install":
-            label = "install-efi"
-        cfgfile.write('linux /vmlinuz LABEL=%s' % (label))
+            cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
+            lb = label
+            if label == "install":
+                lb = "install-efi"
+            cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
 
-        append = localdata.getVar('APPEND', True)
-        initrd = localdata.getVar('INITRD', True)
+            append = localdata.getVar('APPEND', True)
+            initrd = localdata.getVar('INITRD', True)
 
-        if append:
-            cfgfile.write('%s' % (append))
-        cfgfile.write('\n')
+            if append:
+                cfgfile.write('%s' % (append))
+            cfgfile.write(' %s' % btype[1])
+            cfgfile.write('\n')
 
-        if initrd:
-            cfgfile.write('initrd /initrd')
-        cfgfile.write('\n}\n')
+            if initrd:
+                cfgfile.write('initrd /initrd')
+            cfgfile.write('\n}\n')
 
     cfgfile.close()
 }
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [v3 PATCH 7/9] syslinux.bbclass: Fix hard coding of console=tty*
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
                   ` (5 preceding siblings ...)
  2013-09-17 13:32 ` [v3 PATCH 6/9] grub-efi.bbclass: Add serial and graphics menu options Jason Wessel
@ 2013-09-17 13:32 ` Jason Wessel
  2013-09-17 22:28   ` Darren Hart
  2013-09-17 13:32 ` [v3 PATCH 8/9] boot-directdisk.bbclass: Fix media generation problems with vmdk Jason Wessel
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 18+ messages in thread
From: Jason Wessel @ 2013-09-17 13:32 UTC (permalink / raw
  To: Openembedded-core; +Cc: dvhart

The SYSLINUX_SERIAL variable was hard coded and occasionally needs to
be different for the kernel argument vs the syslinux argument.

In the auto-generated boot mode console=tty0 was hard coded, and this
is not needed at all, and causes problems in some cases if a end user
wanted to change the console=... via the kernel boot argument APPEND
mechanism.  The default can be forced with SYSLINUX_DEFAULT_CONSOLE
for systems that need a special specification to enable the frame
buffer instead of a serial port.

[YOCTO #3944]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 meta/classes/syslinux.bbclass |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index 223e4dc..91b9731 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -12,7 +12,9 @@
 # ${APPEND} - an override list of append strings for each label
 # ${SYSLINUX_OPTS} - additional options to add to the syslinux file ';' delimited
 # ${SYSLINUX_SPLASH} - A background for the vga boot menu if using the boot menu
+# ${SYSLINUX_DEFAULT_CONSOLE} - set to "console=ttyX" to change kernel boot default console
 # ${SYSLINUX_SERIAL} - Set an alternate serial port or turn off serial with empty string
+# ${SYSLINUX_SERIAL_TTY} - Set alternate console=tty... kernel boot argument
 
 do_bootimg[depends] += "syslinux:do_populate_sysroot \
                         syslinux-native:do_populate_sysroot"
@@ -21,7 +23,11 @@ SYSLINUXCFG  = "${S}/syslinux.cfg"
 
 ISOLINUXDIR = "/isolinux"
 SYSLINUXDIR = "/"
+# The kernel has an internal default console, which you can override with
+# a console=...some_tty...
+SYSLINUX_DEFAULT_CONSOLE ?= ""
 SYSLINUX_SERIAL ?= "0 115200"
+SYSLINUX_SERIAL_TTY ?= "ttyS0,115200"
 ISO_BOOTIMG = "isolinux/isolinux.bin"
 ISO_BOOTCAT = "isolinux/boot.cat"
 MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table"
@@ -102,6 +108,8 @@ python build_syslinux_cfg () {
             cfgfile.write('%s\n' % opt)
 
     cfgfile.write('ALLOWOPTIONS 1\n');
+    syslinux_default_console = d.getVar('SYSLINUX_DEFAULT_CONSOLE', True)
+    syslinux_serial_tty = d.getVar('SYSLINUX_SERIAL_TTY', True)
     syslinux_serial = d.getVar('SYSLINUX_SERIAL', True)
     if syslinux_serial:
         cfgfile.write('SERIAL %s\n' % syslinux_serial)
@@ -144,10 +152,10 @@ python build_syslinux_cfg () {
         localdata.setVar('OVERRIDES', label + ':' + overrides)
         bb.data.update_data(localdata)
     
-        btypes = [ [ "", "console=tty0" ] ]
+        btypes = [ [ "", syslinux_default_console ] ]
         if menu and syslinux_serial:
-            btypes = [ [ "Graphics console ", " console=tty0" ],
-                [ "Serial console ",  " console=ttyS0,115200" ] ]
+            btypes = [ [ "Graphics console ", syslinux_default_console  ],
+                [ "Serial console ", syslinux_serial_tty ] ]
 
         for btype in btypes:
             cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [v3 PATCH 8/9] boot-directdisk.bbclass: Fix media generation problems with vmdk
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
                   ` (6 preceding siblings ...)
  2013-09-17 13:32 ` [v3 PATCH 7/9] syslinux.bbclass: Fix hard coding of console=tty* Jason Wessel
@ 2013-09-17 13:32 ` Jason Wessel
  2013-09-17 22:32   ` Darren Hart
  2013-09-17 13:32 ` [v3 PATCH 9/9] bootimage.bbclass, zisofs-tools-native: add ability to compress ISO images Jason Wessel
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 18+ messages in thread
From: Jason Wessel @ 2013-09-17 13:32 UTC (permalink / raw
  To: Openembedded-core; +Cc: dvhart

The various populate methods need to accept a path as an argument vs
using hard expanded variables.  In the case of the boot-directdisk
class it uses a different path for HDDDIR but it gets eclipsed by the
the class definition at the point in time ${HDDDIR} gets expanded.

The logical fix is to pass the arguments to the functions as opposed
to using globally expanded variables from the class definitions.

This patch changes 3 things:
1) syslinux_hddimg_populate takes an argument for the destination
2) syslinux_iso_populate takes an argument for the destination
3) populate is changed to boot_direct_populate because there
   was a conflict with it overriding the populate in bootimg.bbclass

[YOCTO #3994]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 meta/classes/boot-directdisk.bbclass |   16 ++++++++--------
 meta/classes/bootimg.bbclass         |    8 ++++----
 meta/classes/grub-efi.bbclass        |   13 +++++++------
 meta/classes/syslinux.bbclass        |   12 +++++++-----
 4 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 4b9d7bd..c58c6f0 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -61,15 +61,15 @@ DISK_SIGNATURE ?= "${DISK_SIGNATURE_GENERATED}"
 SYSLINUX_ROOT ?= "root=/dev/sda2"
 SYSLINUX_TIMEOUT ?= "10"
 
-populate() {
-	DEST=$1
-	install -d ${DEST}
+boot_direct_populate() {
+	dest=$1
+	install -d $dest
 
 	# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
-	install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${DEST}/vmlinuz
+	install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $dest/vmlinuz
 
 	if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
-		install -m 0644 ${INITRD} ${DEST}/initrd
+		install -m 0644 ${INITRD} $dest/initrd
 	fi
 
 }
@@ -79,13 +79,13 @@ build_boot_dd() {
 	HDDIMG="${S}/hdd.image"
 	IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
 
-	populate ${HDDDIR}
+	boot_direct_populate $HDDDIR
 
 	if [ "${PCBIOS}" = "1" ]; then
-		syslinux_hddimg_populate
+		syslinux_hddimg_populate $HDDDIR
 	fi
 	if [ "${EFI}" = "1" ]; then
-		grubefi_hddimg_populate
+		grubefi_hddimg_populate $HDDDIR
 	fi
 
 	BLOCKS=`du -bks $HDDDIR | cut -f 1`
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index fdd4ea9..ede6e21 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -82,10 +82,10 @@ build_iso() {
 	populate ${ISODIR}
 
 	if [ "${PCBIOS}" = "1" ]; then
-		syslinux_iso_populate
+		syslinux_iso_populate ${ISODIR}
 	fi
 	if [ "${EFI}" = "1" ]; then
-		grubefi_iso_populate
+		grubefi_iso_populate ${ISODIR}
 		build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img
 	fi
 
@@ -185,10 +185,10 @@ build_hddimg() {
 		populate ${HDDDIR}
 
 		if [ "${PCBIOS}" = "1" ]; then
-			syslinux_hddimg_populate
+			syslinux_hddimg_populate ${HDDDIR}
 		fi
 		if [ "${EFI}" = "1" ]; then
-			grubefi_hddimg_populate
+			grubefi_hddimg_populate ${HDDDIR}
 		fi
 
 		build_fat_img ${HDDDIR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index ffbcf4c..cd6651e 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -42,19 +42,20 @@ grubefi_populate() {
 }
 
 grubefi_iso_populate() {
-	grubefi_populate ${ISODIR}
+	iso_dir=$1
+	grubefi_populate $iso_dir
 	# Build a EFI directory to create efi.img
 	mkdir -p ${EFIIMGDIR}/${EFIDIR}
-	cp ${ISODIR}/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
-	cp ${ISODIR}/vmlinuz ${EFIIMGDIR}
+	cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
+	cp $iso_dir/vmlinuz ${EFIIMGDIR}
 	echo "EFI\\BOOT\\${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh
-	if [ -f "${ISODIR}/initrd" ] ; then
-		cp ${ISODIR}/initrd ${EFIIMGDIR}
+	if [ -f "$iso_dir/initrd" ] ; then
+		cp $iso_dir/initrd ${EFIIMGDIR}
 	fi
 }
 
 grubefi_hddimg_populate() {
-	grubefi_populate ${HDDDIR}
+	grubefi_populate $1
 }
 
 python build_grub_cfg() {
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index 91b9731..944bd92 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -53,14 +53,16 @@ syslinux_populate() {
 }
 
 syslinux_iso_populate() {
-	syslinux_populate ${ISODIR} ${ISOLINUXDIR} isolinux.cfg
-	install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
-	install -m 0644 ${STAGING_DATADIR}/syslinux/ldlinux.c32 ${ISODIR}${ISOLINUXDIR}
+	iso_dir=$1
+	syslinux_populate $iso_dir ${ISOLINUXDIR} isolinux.cfg
+	install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin $iso_dir${ISOLINUXDIR}
+	install -m 0644 ${STAGING_DATADIR}/syslinux/ldlinux.c32 $iso_dir${ISOLINUXDIR}
 }
 
 syslinux_hddimg_populate() {
-	syslinux_populate ${HDDDIR} ${SYSLINUXDIR} syslinux.cfg
-	install -m 0444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}${SYSLINUXDIR}/ldlinux.sys
+	hdd_dir=$1
+	syslinux_populate $hdd_dir ${SYSLINUXDIR} syslinux.cfg
+	install -m 0444 ${STAGING_DATADIR}/syslinux/ldlinux.sys $hdd_dir${SYSLINUXDIR}/ldlinux.sys
 }
 
 syslinux_hddimg_install() {
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [v3 PATCH 9/9] bootimage.bbclass, zisofs-tools-native: add ability to compress ISO images
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
                   ` (7 preceding siblings ...)
  2013-09-17 13:32 ` [v3 PATCH 8/9] boot-directdisk.bbclass: Fix media generation problems with vmdk Jason Wessel
@ 2013-09-17 13:32 ` Jason Wessel
  2013-09-17 22:33 ` [v3 PATCH 0/9] Improved EFI boot support Darren Hart
  2013-09-20 17:11 ` Darren Hart
  10 siblings, 0 replies; 18+ messages in thread
From: Jason Wessel @ 2013-09-17 13:32 UTC (permalink / raw
  To: Openembedded-core; +Cc: dvhart

The mkzftree is needed to allow ISO images to be compressed with
minimal runtime overhead.  Below is an example of the savings on a
core-image-minimal.

Before ls -l:
24117248 core-image-minimal-qemux86-64.iso

Using the mkzftree ls -l:
16777216 core-image-minimal-qemux86-64.iso

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
---
 meta/classes/bootimg.bbclass                       |   24 +++++++++++++++++---
 .../zisofs-tools/zisofs-tools-native_1.0.8.bb      |   19 ++++++++++++++++
 2 files changed, 40 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb

diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index ede6e21..395085d 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -19,13 +19,15 @@
 
 # External variables (also used by syslinux.bbclass)
 # ${INITRD} - indicates a filesystem image to use as an initrd (optional)
+# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
 # ${NOISO}  - skip building the ISO image if set to 1
 # ${NOHDD}  - skip building the HDD image if set to 1
 # ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
 
 do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
                         mtools-native:do_populate_sysroot \
-                        cdrtools-native:do_populate_sysroot"
+                        cdrtools-native:do_populate_sysroot \
+                        ${@oe.utils.ifelse(d.getVar('COMPRESSISO'),'zisofs-tools-native:do_populate_sysroot','')}"
 
 PACKAGES = " "
 EXCLUDE_FROM_WORLD = "1"
@@ -33,6 +35,8 @@ EXCLUDE_FROM_WORLD = "1"
 HDDDIR = "${S}/hddimg"
 ISODIR = "${S}/iso"
 EFIIMGDIR = "${S}/efi_img"
+COMPACT_ISODIR = "${S}/iso.z"
+COMPRESSISO ?= "0"
 
 BOOTIMG_VOLUME_ID   ?= "boot"
 BOOTIMG_EXTRA_SPACE ?= "512"
@@ -97,18 +101,32 @@ build_iso() {
 		install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
 	fi
 
+	if [ "${COMPRESSISO}" = "1" ] ; then
+		# create compact directory, compress iso
+		mkdir -p ${COMPACT_ISODIR}
+		mkzftree -z 9 -p 4 -F ${ISODIR}/rootfs.img ${COMPACT_ISODIR}/rootfs.img
+
+		# move compact iso to iso, then remove compact directory
+		mv ${COMPACT_ISODIR}/rootfs.img ${ISODIR}/rootfs.img
+		rm -Rf ${COMPACT_ISODIR}
+		mkisofs_compress_opts="-R -z -D -l"
+	else
+		mkisofs_compress_opts="-r"
+	fi
+
 	if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then
 		# PCBIOS only media
 		mkisofs -V ${BOOTIMG_VOLUME_ID} \
 		        -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
-			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} -r \
+			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
+			$mkisofs_compress_opts \
 			${MKISOFS_OPTIONS} ${ISODIR}
 	else
 		# EFI only OR EFI+PCBIOS
 		mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \
 		        -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
 			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
-			-r ${MKISOFS_OPTIONS} \
+			$mkisofs_compress_opts ${MKISOFS_OPTIONS} \
 			-eltorito-alt-boot -eltorito-platform efi \
 			-b efi.img -no-emul-boot \
 			${ISODIR}
diff --git a/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb b/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb
new file mode 100644
index 0000000..1501307
--- /dev/null
+++ b/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb
@@ -0,0 +1,19 @@
+# zisofs-tools-native OE build file
+# Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+SUMMARY = "A set of tools for iso file compression"
+DESCRIPTION = "A set of tools for iso file compression"
+HOMEPAGE = "http://http://freecode.com/projects/zisofs-tools"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/zisofs-tools/zisofs-tools-${PV}.tar.bz2/2d0ed8c9a1f60b45f949b136f9be1f6c/zisofs-tools-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "2d0ed8c9a1f60b45f949b136f9be1f6c"
+SRC_URI[sha256sum] = "ae4e53e4914934d41660248fb59d3c8761f1f1fd180d5ec993c17ddb3afd04f3"
+
+inherit native
+
+do_install() {
+	oe_runmake install INSTALLROOT=${D} bindir=${bindir}
+}
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [v3 PATCH 4/9] syslinux.bbclass, syslinux: Update to syslinux 6.01
  2013-09-17 13:32 ` [v3 PATCH 4/9] syslinux.bbclass, syslinux: Update to syslinux 6.01 Jason Wessel
@ 2013-09-17 22:10   ` Darren Hart
  0 siblings, 0 replies; 18+ messages in thread
From: Darren Hart @ 2013-09-17 22:10 UTC (permalink / raw
  To: Jason Wessel; +Cc: Openembedded-core

On Tue, 2013-09-17 at 08:32 -0500, Jason Wessel wrote:
> A newer version of syslinux is required for an EFI enabled isohybrid.
> This is used for the the capability to generate 3 types of ISO images,
> all of which can be booted off a USB device or HDD if copied with dd.
> 
> 1) PC BIOS only ISO
> 2) EFI only ISO
> 3) EFI + PC BIOS ISO
> 
> The syslinux.bbclass required a minor tweak because a few .c32
> libraries require dynamic loading from the created media as of
> syslinux 5 and up.  This was a good time to also fix the
> duplication of the AUTO_SYSLINUXMENU block.
> 
> [YOCTO #4100]
> 
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

Reviewed-by: Darren Hart <dvhart@linux.intel.com>

> ---
>  meta/classes/syslinux.bbclass                      |   21 +++++++---------
>  .../{syslinux_4.07.bb => syslinux_6.01.bb}         |   26 ++++++++++++--------
>  2 files changed, 25 insertions(+), 22 deletions(-)
>  rename meta/recipes-devtools/syslinux/{syslinux_4.07.bb => syslinux_6.01.bb} (63%)
> 
> diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
> index dae6609..223e4dc 100644
> --- a/meta/classes/syslinux.bbclass
> +++ b/meta/classes/syslinux.bbclass
> @@ -36,28 +36,25 @@ syslinux_populate() {
>  
>  	# Install the config files
>  	install -m 0644 ${SYSLINUXCFG} ${DEST}${BOOTDIR}/${CFGNAME}
> +	if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then
> +		install -m 0644 ${STAGING_DATADIR}/syslinux/vesamenu.c32 ${DEST}${BOOTDIR}/vesamenu.c32
> +		install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${DEST}${BOOTDIR}/libcom32.c32
> +		install -m 0444 ${STAGING_DATADIR}/syslinux/libutil.c32 ${DEST}${BOOTDIR}/libutil.c32
> +		if [ "${SYSLINUX_SPLASH}" != "" ] ; then
> +			install -m 0644 ${SYSLINUX_SPLASH} ${DEST}${BOOTDIR}/splash.lss
> +		fi
> +	fi
>  }
>  
>  syslinux_iso_populate() {
>  	syslinux_populate ${ISODIR} ${ISOLINUXDIR} isolinux.cfg
>  	install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
> -	if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then
> -		install -m 0644 ${STAGING_DATADIR}/syslinux/vesamenu.c32 ${ISODIR}${ISOLINUXDIR}/vesamenu.c32
> -		if [ "${SYSLINUX_SPLASH}" != "" ] ; then
> -			install -m 0644 ${SYSLINUX_SPLASH} ${ISODIR}${ISOLINUXDIR}/splash.lss
> -		fi
> -	fi
> +	install -m 0644 ${STAGING_DATADIR}/syslinux/ldlinux.c32 ${ISODIR}${ISOLINUXDIR}
>  }
>  
>  syslinux_hddimg_populate() {
>  	syslinux_populate ${HDDDIR} ${SYSLINUXDIR} syslinux.cfg
>  	install -m 0444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}${SYSLINUXDIR}/ldlinux.sys
> -	if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then
> -		install -m 0644 ${STAGING_DATADIR}/syslinux/vesamenu.c32 ${HDDDIR}${SYSLINUXDIR}/vesamenu.c32
> -		if [ "${SYSLINUX_SPLASH}" != "" ] ; then
> -			install -m 0644 ${SYSLINUX_SPLASH} ${HDDDIR}${SYSLINUXDIR}/splash.lss
> -		fi
> -	fi
>  }
>  
>  syslinux_hddimg_install() {
> diff --git a/meta/recipes-devtools/syslinux/syslinux_4.07.bb b/meta/recipes-devtools/syslinux/syslinux_6.01.bb
> similarity index 63%
> rename from meta/recipes-devtools/syslinux/syslinux_4.07.bb
> rename to meta/recipes-devtools/syslinux/syslinux_6.01.bb
> index bba5dda..4438ea8 100644
> --- a/meta/recipes-devtools/syslinux/syslinux_4.07.bb
> +++ b/meta/recipes-devtools/syslinux/syslinux_6.01.bb
> @@ -2,19 +2,21 @@ DESCRIPTION = "A multi-purpose linux bootloader"
>  HOMEPAGE = "http://syslinux.zytor.com/"
>  LICENSE = "GPLv2+"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
> -                    file://README;beginline=35;endline=41;md5=f7249a750bc692d1048b2626752aa415"
> +                    file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a"
>  
>  # If you really want to run syslinux, you need mtools.  We just want the
>  # ldlinux.* stuff for now, so skip mtools-native
>  DEPENDS = "nasm-native util-linux"
> -PR = "r0"
>  
> -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/4.xx/syslinux-${PV}.tar.bz2"
> +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/6.xx/syslinux-${PV}.tar.bz2"
>  
> -SRC_URI[md5sum] = "9ff6e1b94efab931fb4717b600d88779"
> -SRC_URI[sha256sum] = "1240a4e4219b518bdaef78931b6e901befeff35e6894ac6db785115848a7a05a"
> +SRC_URI[md5sum] = "6945ee89e29119d459baed4937bbc534"
> +SRC_URI[sha256sum] = "83a04cf81e6a46b80ee5a321926eea095af3498b04317e3674b46c125c7a5b43"
>  
>  COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
> +# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries
> +INSANE_SKIP_${PN}-misc = "arch"
> +INSANE_SKIP_${PN}-chain = "arch"
>  
>  EXTRA_OEMAKE = " \
>  	BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
> @@ -28,21 +30,25 @@ do_configure() {
>  	sed -e 's,win32/\S*,,g' -i Makefile
>  
>  	# clean installer executables included in source tarball
> -	oe_runmake clean
> +	oe_runmake clean firmware="efi32" EFIINC="${includedir}"
> +	# NOTE: There is a temporary work around above to specify
> +	#	the efi32 as the firmware else the pre-built bios
> +	#	files get erased contrary to the doc/distib.txt
> +	#	In the future this should be "bios" and not "efi32".
>  }
>  
>  do_compile() {
>  	# Rebuild only the installer; keep precompiled bootloaders
>  	# as per author's request (doc/distrib.txt)
> -	oe_runmake CC="${CC} ${CFLAGS}" LDFLAGS="${LDFLAGS}" installer
> +	oe_runmake CC="${CC} ${CFLAGS}" LDFLAGS="${LDFLAGS}" firmware="bios" installer
>  }
>  
>  do_install() {
> -	oe_runmake install INSTALLROOT="${D}"
> +	oe_runmake install INSTALLROOT="${D}" firmware="bios"
>  
>  	install -d ${D}${datadir}/syslinux/
> -	install -m 644 ${S}/core/ldlinux.sys ${D}${datadir}/syslinux/
> -	install -m 644 ${S}/core/ldlinux.bss ${D}${datadir}/syslinux/
> +	install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/
> +	install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/
>  }
>  
>  PACKAGES += "${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [v3 PATCH 5/9] bootimage.bbclass, grub-efi.bbclass: Improve EFI & PCBIOS+EFI ISO support
  2013-09-17 13:32 ` [v3 PATCH 5/9] bootimage.bbclass, grub-efi.bbclass: Improve EFI & PCBIOS+EFI ISO support Jason Wessel
@ 2013-09-17 22:12   ` Darren Hart
  0 siblings, 0 replies; 18+ messages in thread
From: Darren Hart @ 2013-09-17 22:12 UTC (permalink / raw
  To: Jason Wessel; +Cc: Openembedded-core

On Tue, 2013-09-17 at 08:32 -0500, Jason Wessel wrote:
> Using the latest mkisofs it is possible to generate 3 different types
> of ISO images, which can be used in various scenarios.
> 
> 1) PCBIOS Only ISO
>    - This option remains unchanged by this commit
>    - Uses syslinux menus
>    - Can be directly copied with dd to a USB device
>    - Can be burned to optical media
> 
> 2) EFI Only ISO
>    - Uses grub 2 menus
>    - Can be burned to optical media
>    - If you want to use this image on a USB device
>      extra steps must be taken in order to format the USB
>      device with fat32, and copy an EFI loader which will
>      in turn load the iso image
> 
> 3) PCBIOS / EFI ISO
>    - This is a hybrid image ISO that will work for case 1 or 2
>      as above with the same restrictions and boot menu types
>      depending on what type of firmware is installed on
>      the hardware or depending on if EFI or "Legacy Boot" is
>      enabled on some UEFI firmwares.
> 
> The syslinux.bbclass is now always required because that is where the
> isohybrid dependencies come from as well as the configuration data for
> the isohybrid.  The isohybrid is the secret sauce which allows the ISO
> to work as optical media or as a disk image on USB or a HDD/SSD.
> 
> [YOCTO #4100]
> 
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

Reviewed-by: Darren Hart <dvhart@linux.intel.com>


> ---
>  meta/classes/bootimg.bbclass  |   35 +++++++++++++++++++++++------------
>  meta/classes/grub-efi.bbclass |    8 ++++++++
>  2 files changed, 31 insertions(+), 12 deletions(-)
> 
> diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
> index bd211fb..fdd4ea9 100644
> --- a/meta/classes/bootimg.bbclass
> +++ b/meta/classes/bootimg.bbclass
> @@ -32,6 +32,7 @@ EXCLUDE_FROM_WORLD = "1"
>  
>  HDDDIR = "${S}/hddimg"
>  ISODIR = "${S}/iso"
> +EFIIMGDIR = "${S}/efi_img"
>  
>  BOOTIMG_VOLUME_ID   ?= "boot"
>  BOOTIMG_EXTRA_SPACE ?= "512"
> @@ -48,15 +49,10 @@ def pcbios(d):
>          pcbios = base_contains("MACHINE_FEATURES", "efi", "0", "1", d)
>      return pcbios
>  
> -def pcbios_class(d):
> -    if d.getVar("PCBIOS", True) == "1":
> -        return "syslinux"
> -    return ""
> -
>  PCBIOS = "${@pcbios(d)}"
> -PCBIOS_CLASS = "${@pcbios_class(d)}"
>  
> -inherit ${PCBIOS_CLASS}
> +# The syslinux is required for the isohybrid command and boot catalog
> +inherit syslinux
>  inherit ${EFI_CLASS}
>  
>  populate() {
> @@ -90,21 +86,36 @@ build_iso() {
>  	fi
>  	if [ "${EFI}" = "1" ]; then
>  		grubefi_iso_populate
> +		build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img
>  	fi
>  
> -	if [ "${PCBIOS}" = "1" ]; then
> +	# EFI only
> +	if [ "${PCBIOS}" != "1" ] && [ "${EFI}" = "1" ] ; then
> +		# Work around bug in isohybrid where it requires isolinux.bin
> +		# In the boot catalog, even though it is not used
> +		mkdir -p ${ISODIR}/${ISOLINUXDIR}
> +		install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
> +	fi
> +
> +	if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then
> +		# PCBIOS only media
>  		mkisofs -V ${BOOTIMG_VOLUME_ID} \
>  		        -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
>  			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} -r \
>  			${MKISOFS_OPTIONS} ${ISODIR}
>  	else
> -		bbnote "EFI-only ISO images are untested, please provide feedback."
> -		mkisofs -V ${BOOTIMG_VOLUME_ID} \
> +		# EFI only OR EFI+PCBIOS
> +		mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \
>  		        -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
> -			-r ${ISODIR}
> +			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
> +			-r ${MKISOFS_OPTIONS} \
> +			-eltorito-alt-boot -eltorito-platform efi \
> +			-b efi.img -no-emul-boot \
> +			${ISODIR}
> +		isohybrid_args="-u"
>  	fi
>  
> -	isohybrid ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso
> +	isohybrid $isohybrid_args ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso
>  
>  	cd ${DEPLOY_DIR_IMAGE}
>  	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso
> diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
> index c6f5d4e..c21babb 100644
> --- a/meta/classes/grub-efi.bbclass
> +++ b/meta/classes/grub-efi.bbclass
> @@ -41,6 +41,14 @@ grubefi_populate() {
>  
>  grubefi_iso_populate() {
>  	grubefi_populate ${ISODIR}
> +	# Build a EFI directory to create efi.img
> +	mkdir -p ${EFIIMGDIR}/${EFIDIR}
> +	cp ${ISODIR}/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
> +	cp ${ISODIR}/vmlinuz ${EFIIMGDIR}
> +	echo "EFI\\BOOT\\${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh
> +	if [ -f "${ISODIR}/initrd" ] ; then
> +		cp ${ISODIR}/initrd ${EFIIMGDIR}
> +	fi
>  }
>  
>  grubefi_hddimg_populate() {

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [v3 PATCH 6/9] grub-efi.bbclass: Add serial and graphics menu options
  2013-09-17 13:32 ` [v3 PATCH 6/9] grub-efi.bbclass: Add serial and graphics menu options Jason Wessel
@ 2013-09-17 22:19   ` Darren Hart
  0 siblings, 0 replies; 18+ messages in thread
From: Darren Hart @ 2013-09-17 22:19 UTC (permalink / raw
  To: Jason Wessel; +Cc: Rifenbark, Scott M, Openembedded-core

On Tue, 2013-09-17 at 08:32 -0500, Jason Wessel wrote:
> The syslinux.bbclass already has support for automatically generated
> serial and graphics menu choices.  This patch adds the same concept to
> the grub-efi menu.  That makes it possible to generate a single image
> which can boot on a PCBIOS or EFI firmware with consistent looking
> boot options.
> 
> [YOCTO #4100]
> 
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

I think I finally get GRUB_SERIAL. GRUB_SERIAL is intended to be
bootloader menu specific secondary console parameter passed to the Linux
kernel if it's set. The BSP console= options are still used from the
APPEND variable.

GRUB_SERIAL needs to be documented in the glossary, Scott R. on Cc.

Reviewed-by: Darren Hart <dvhart@linux.intel.com>



> ---
>  meta/classes/grub-efi.bbclass |   41 +++++++++++++++++++++++++++--------------
>  1 file changed, 27 insertions(+), 14 deletions(-)
> 
> diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
> index c21babb..ffbcf4c 100644
> --- a/meta/classes/grub-efi.bbclass
> +++ b/meta/classes/grub-efi.bbclass
> @@ -9,6 +9,7 @@
>  # External variables
>  # ${INITRD} - indicates a filesystem image to use as an initrd (optional)
>  # ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
> +# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu
>  # ${LABELS} - a list of targets for the automatic config
>  # ${APPEND} - an override list of append strings for each label
>  # ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional)
> @@ -16,6 +17,7 @@
>  
>  do_bootimg[depends] += "grub-efi-${TRANSLATED_TARGET_ARCH}-native:do_deploy"
>  
> +GRUB_SERIAL ?= "console=ttyS0,115200"
>  GRUBCFG = "${S}/grub.cfg"
>  GRUB_TIMEOUT ?= "10"
>  #FIXME: build this from the machine config
> @@ -63,6 +65,8 @@ python build_grub_cfg() {
>          bb.error("WORKDIR not defined, unable to package")
>          return
>  
> +    gfxserial = d.getVar('GRUB_GFXSERIAL', True) or ""
> +
>      labels = d.getVar('LABELS', True)
>      if not labels:
>          bb.debug(1, "LABELS not defined, nothing to do")
> @@ -96,6 +100,12 @@ python build_grub_cfg() {
>      else:
>          cfgfile.write('timeout=50\n')
>  
> +    if gfxserial == "1":
> +        btypes = [ [ " graphics console", "" ],
> +            [ " serial console", d.getVar('GRUB_SERIAL', True) or "" ] ]
> +    else:
> +        btypes = [ [ "", "" ] ]
> +
>      for label in labels.split():
>          localdata = d.createCopy()
>  
> @@ -103,24 +113,27 @@ python build_grub_cfg() {
>          if not overrides:
>              raise bb.build.FuncFailed('OVERRIDES not defined')
>  
> -        localdata.setVar('OVERRIDES', label + ':' + overrides)
> -        bb.data.update_data(localdata)
> +        for btype in btypes:
> +            localdata.setVar('OVERRIDES', label + ':' + overrides)
> +            bb.data.update_data(localdata)
>  
> -        cfgfile.write('\nmenuentry \'%s\'{\n' % (label))
> -        if label == "install":
> -            label = "install-efi"
> -        cfgfile.write('linux /vmlinuz LABEL=%s' % (label))
> +            cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
> +            lb = label
> +            if label == "install":
> +                lb = "install-efi"
> +            cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
>  
> -        append = localdata.getVar('APPEND', True)
> -        initrd = localdata.getVar('INITRD', True)
> +            append = localdata.getVar('APPEND', True)
> +            initrd = localdata.getVar('INITRD', True)
>  
> -        if append:
> -            cfgfile.write('%s' % (append))
> -        cfgfile.write('\n')
> +            if append:
> +                cfgfile.write('%s' % (append))
> +            cfgfile.write(' %s' % btype[1])
> +            cfgfile.write('\n')
>  
> -        if initrd:
> -            cfgfile.write('initrd /initrd')
> -        cfgfile.write('\n}\n')
> +            if initrd:
> +                cfgfile.write('initrd /initrd')
> +            cfgfile.write('\n}\n')
>  
>      cfgfile.close()
>  }

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [v3 PATCH 7/9] syslinux.bbclass: Fix hard coding of console=tty*
  2013-09-17 13:32 ` [v3 PATCH 7/9] syslinux.bbclass: Fix hard coding of console=tty* Jason Wessel
@ 2013-09-17 22:28   ` Darren Hart
  0 siblings, 0 replies; 18+ messages in thread
From: Darren Hart @ 2013-09-17 22:28 UTC (permalink / raw
  To: Jason Wessel; +Cc: Rifenbark, Scott M, Openembedded-core

On Tue, 2013-09-17 at 08:32 -0500, Jason Wessel wrote:
> The SYSLINUX_SERIAL variable was hard coded and occasionally needs to
> be different for the kernel argument vs the syslinux argument.
> 
> In the auto-generated boot mode console=tty0 was hard coded, and this
> is not needed at all, and causes problems in some cases if a end user
> wanted to change the console=... via the kernel boot argument APPEND
> mechanism.  The default can be forced with SYSLINUX_DEFAULT_CONSOLE
> for systems that need a special specification to enable the frame
> buffer instead of a serial port.
> 
> [YOCTO #3944]
> 
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

The two new variables need to be documented in the glossary, Scott R on
Cc.

One question below, not blocking this though.

Reviewed-by: Darren Hart <dvhart@linux.intel.com>

> ---
>  meta/classes/syslinux.bbclass |   14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
> index 223e4dc..91b9731 100644
> --- a/meta/classes/syslinux.bbclass
> +++ b/meta/classes/syslinux.bbclass
> @@ -12,7 +12,9 @@
>  # ${APPEND} - an override list of append strings for each label
>  # ${SYSLINUX_OPTS} - additional options to add to the syslinux file ';' delimited
>  # ${SYSLINUX_SPLASH} - A background for the vga boot menu if using the boot menu
> +# ${SYSLINUX_DEFAULT_CONSOLE} - set to "console=ttyX" to change kernel boot default console
>  # ${SYSLINUX_SERIAL} - Set an alternate serial port or turn off serial with empty string
> +# ${SYSLINUX_SERIAL_TTY} - Set alternate console=tty... kernel boot argument
>  
>  do_bootimg[depends] += "syslinux:do_populate_sysroot \
>                          syslinux-native:do_populate_sysroot"
> @@ -21,7 +23,11 @@ SYSLINUXCFG  = "${S}/syslinux.cfg"
>  
>  ISOLINUXDIR = "/isolinux"
>  SYSLINUXDIR = "/"
> +# The kernel has an internal default console, which you can override with
> +# a console=...some_tty...
> +SYSLINUX_DEFAULT_CONSOLE ?= ""
>  SYSLINUX_SERIAL ?= "0 115200"
> +SYSLINUX_SERIAL_TTY ?= "ttyS0,115200"
>  ISO_BOOTIMG = "isolinux/isolinux.bin"
>  ISO_BOOTCAT = "isolinux/boot.cat"
>  MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table"
> @@ -102,6 +108,8 @@ python build_syslinux_cfg () {
>              cfgfile.write('%s\n' % opt)
>  
>      cfgfile.write('ALLOWOPTIONS 1\n');
> +    syslinux_default_console = d.getVar('SYSLINUX_DEFAULT_CONSOLE', True)
> +    syslinux_serial_tty = d.getVar('SYSLINUX_SERIAL_TTY', True)
>      syslinux_serial = d.getVar('SYSLINUX_SERIAL', True)
>      if syslinux_serial:
>          cfgfile.write('SERIAL %s\n' % syslinux_serial)
> @@ -144,10 +152,10 @@ python build_syslinux_cfg () {
>          localdata.setVar('OVERRIDES', label + ':' + overrides)
>          bb.data.update_data(localdata)
>      
> -        btypes = [ [ "", "console=tty0" ] ]
> +        btypes = [ [ "", syslinux_default_console ] ]
>          if menu and syslinux_serial:
> -            btypes = [ [ "Graphics console ", " console=tty0" ],
> -                [ "Serial console ",  " console=ttyS0,115200" ] ]
> +            btypes = [ [ "Graphics console ", syslinux_default_console  ],
> +                [ "Serial console ", syslinux_serial_tty ] ]
>  
>          for btype in btypes:
>              cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))

Is no space between the to string "%s%s" correct?


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [v3 PATCH 8/9] boot-directdisk.bbclass: Fix media generation problems with vmdk
  2013-09-17 13:32 ` [v3 PATCH 8/9] boot-directdisk.bbclass: Fix media generation problems with vmdk Jason Wessel
@ 2013-09-17 22:32   ` Darren Hart
  0 siblings, 0 replies; 18+ messages in thread
From: Darren Hart @ 2013-09-17 22:32 UTC (permalink / raw
  To: Jason Wessel; +Cc: Openembedded-core

On Tue, 2013-09-17 at 08:32 -0500, Jason Wessel wrote:
> The various populate methods need to accept a path as an argument vs
> using hard expanded variables.  In the case of the boot-directdisk
> class it uses a different path for HDDDIR but it gets eclipsed by the
> the class definition at the point in time ${HDDDIR} gets expanded.
> 
> The logical fix is to pass the arguments to the functions as opposed
> to using globally expanded variables from the class definitions.
> 
> This patch changes 3 things:
> 1) syslinux_hddimg_populate takes an argument for the destination
> 2) syslinux_iso_populate takes an argument for the destination
> 3) populate is changed to boot_direct_populate because there
>    was a conflict with it overriding the populate in bootimg.bbclass
> 
> [YOCTO #3994]
> 
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

We definitely want Martin and Saul to review.

Reviewed-by: Darren Hart <dvhart@linux.intel.com>

> ---
>  meta/classes/boot-directdisk.bbclass |   16 ++++++++--------
>  meta/classes/bootimg.bbclass         |    8 ++++----
>  meta/classes/grub-efi.bbclass        |   13 +++++++------
>  meta/classes/syslinux.bbclass        |   12 +++++++-----
>  4 files changed, 26 insertions(+), 23 deletions(-)
> 
> diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
> index 4b9d7bd..c58c6f0 100644
> --- a/meta/classes/boot-directdisk.bbclass
> +++ b/meta/classes/boot-directdisk.bbclass
> @@ -61,15 +61,15 @@ DISK_SIGNATURE ?= "${DISK_SIGNATURE_GENERATED}"
>  SYSLINUX_ROOT ?= "root=/dev/sda2"
>  SYSLINUX_TIMEOUT ?= "10"
>  
> -populate() {
> -	DEST=$1
> -	install -d ${DEST}
> +boot_direct_populate() {
> +	dest=$1
> +	install -d $dest
>  
>  	# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
> -	install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${DEST}/vmlinuz
> +	install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $dest/vmlinuz
>  
>  	if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
> -		install -m 0644 ${INITRD} ${DEST}/initrd
> +		install -m 0644 ${INITRD} $dest/initrd
>  	fi
>  
>  }
> @@ -79,13 +79,13 @@ build_boot_dd() {
>  	HDDIMG="${S}/hdd.image"
>  	IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
>  
> -	populate ${HDDDIR}
> +	boot_direct_populate $HDDDIR
>  
>  	if [ "${PCBIOS}" = "1" ]; then
> -		syslinux_hddimg_populate
> +		syslinux_hddimg_populate $HDDDIR
>  	fi
>  	if [ "${EFI}" = "1" ]; then
> -		grubefi_hddimg_populate
> +		grubefi_hddimg_populate $HDDDIR
>  	fi
>  
>  	BLOCKS=`du -bks $HDDDIR | cut -f 1`
> diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
> index fdd4ea9..ede6e21 100644
> --- a/meta/classes/bootimg.bbclass
> +++ b/meta/classes/bootimg.bbclass
> @@ -82,10 +82,10 @@ build_iso() {
>  	populate ${ISODIR}
>  
>  	if [ "${PCBIOS}" = "1" ]; then
> -		syslinux_iso_populate
> +		syslinux_iso_populate ${ISODIR}
>  	fi
>  	if [ "${EFI}" = "1" ]; then
> -		grubefi_iso_populate
> +		grubefi_iso_populate ${ISODIR}
>  		build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img
>  	fi
>  
> @@ -185,10 +185,10 @@ build_hddimg() {
>  		populate ${HDDDIR}
>  
>  		if [ "${PCBIOS}" = "1" ]; then
> -			syslinux_hddimg_populate
> +			syslinux_hddimg_populate ${HDDDIR}
>  		fi
>  		if [ "${EFI}" = "1" ]; then
> -			grubefi_hddimg_populate
> +			grubefi_hddimg_populate ${HDDDIR}
>  		fi
>  
>  		build_fat_img ${HDDDIR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
> diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
> index ffbcf4c..cd6651e 100644
> --- a/meta/classes/grub-efi.bbclass
> +++ b/meta/classes/grub-efi.bbclass
> @@ -42,19 +42,20 @@ grubefi_populate() {
>  }
>  
>  grubefi_iso_populate() {
> -	grubefi_populate ${ISODIR}
> +	iso_dir=$1
> +	grubefi_populate $iso_dir
>  	# Build a EFI directory to create efi.img
>  	mkdir -p ${EFIIMGDIR}/${EFIDIR}
> -	cp ${ISODIR}/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
> -	cp ${ISODIR}/vmlinuz ${EFIIMGDIR}
> +	cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
> +	cp $iso_dir/vmlinuz ${EFIIMGDIR}
>  	echo "EFI\\BOOT\\${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh
> -	if [ -f "${ISODIR}/initrd" ] ; then
> -		cp ${ISODIR}/initrd ${EFIIMGDIR}
> +	if [ -f "$iso_dir/initrd" ] ; then
> +		cp $iso_dir/initrd ${EFIIMGDIR}
>  	fi
>  }
>  
>  grubefi_hddimg_populate() {
> -	grubefi_populate ${HDDDIR}
> +	grubefi_populate $1
>  }
>  
>  python build_grub_cfg() {
> diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
> index 91b9731..944bd92 100644
> --- a/meta/classes/syslinux.bbclass
> +++ b/meta/classes/syslinux.bbclass
> @@ -53,14 +53,16 @@ syslinux_populate() {
>  }
>  
>  syslinux_iso_populate() {
> -	syslinux_populate ${ISODIR} ${ISOLINUXDIR} isolinux.cfg
> -	install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
> -	install -m 0644 ${STAGING_DATADIR}/syslinux/ldlinux.c32 ${ISODIR}${ISOLINUXDIR}
> +	iso_dir=$1
> +	syslinux_populate $iso_dir ${ISOLINUXDIR} isolinux.cfg
> +	install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin $iso_dir${ISOLINUXDIR}
> +	install -m 0644 ${STAGING_DATADIR}/syslinux/ldlinux.c32 $iso_dir${ISOLINUXDIR}
>  }
>  
>  syslinux_hddimg_populate() {
> -	syslinux_populate ${HDDDIR} ${SYSLINUXDIR} syslinux.cfg
> -	install -m 0444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}${SYSLINUXDIR}/ldlinux.sys
> +	hdd_dir=$1
> +	syslinux_populate $hdd_dir ${SYSLINUXDIR} syslinux.cfg
> +	install -m 0444 ${STAGING_DATADIR}/syslinux/ldlinux.sys $hdd_dir${SYSLINUXDIR}/ldlinux.sys
>  }
>  
>  syslinux_hddimg_install() {

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [v3 PATCH 0/9] Improved EFI boot support
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
                   ` (8 preceding siblings ...)
  2013-09-17 13:32 ` [v3 PATCH 9/9] bootimage.bbclass, zisofs-tools-native: add ability to compress ISO images Jason Wessel
@ 2013-09-17 22:33 ` Darren Hart
  2013-09-20 17:11 ` Darren Hart
  10 siblings, 0 replies; 18+ messages in thread
From: Darren Hart @ 2013-09-17 22:33 UTC (permalink / raw
  To: Jason Wessel; +Cc: Openembedded-core

On Tue, 2013-09-17 at 08:32 -0500, Jason Wessel wrote:
> V3
> - Add comment about isolinux.bin required in EFI only case
> - Fix typo of PCIBIOS -> PCBIOS
> - Change COMPRESSISO ?= "" -> COMPRESSISO ?= "0" for the default
> - Add comment to EFI/ISO syslinux.bbclass to clarify workaround
>   with EFI only case and hybrid boot
> - Add patch to fix syslinux serial and menu problems
> - Add patch to fix boot-directdisk.bbclass
> * Two new patches are 7 & 8, the zisofs patch moved from 7 -> 9
> 

It looks good to me, but I would like to see Saul and Martin review the
direct disk modifications.

Reviewed-by: Darren Hart <dvhart@linux.intel.com>

--
Darren

> 
> V2
> - Added reference to YOCTO #1913 for per Darren
> - Remove PR number from cdrtools uprev
> - Added Saul's change to cdrtools to get rid of STAGE_TEMP
> - made the builtin grub cfg file copied from a SRC_URI
> - upreved syslinux to 6.01
> - Use the new isohybrid command from syslinux which can now
>   generate EFI enabled ISO's which can boot directly when
>   dd'ed to a USB or HDD device.
> - Dropped any references to efi or pcbios in the qemu* configs
> - Added the zisofs patch to the end of the series instead
>   of depending on it, in case it is dropped later.
> - git -format-patch -M20% is your friend for seeing the
>   delta on recipe upgrades :-)
> 
> YAY, with the new version of syslinux it is now possible to
> build a single live ISO image which can boot in legacy mode
> or EFI on optical media or USB devices.
> 
> We still have to create 2 ISO's one for 32bit EFI systems and one for
> 64bit EFI systems but this is also true of all other Linux
> distributions today as well.
> 
> Jason.
> 
> ---
> 
> The goal of this patch set is to put the EFI ISO boot method on par
> with the ISO PCBIOS boot method.  This also allows for the creation of
> a single ISO image which can boot in "legacy boot" mode or EFI boot
> mode.
> 
> In order to make this possible the cdrtools needed an update to the
> very latest and this brings in an license change.  Given that change
> it was not entirely clear to me if we needed to leave the older
> package around.  I opted to remove the older package recipe since
> there was no clean way to fail in the case you wanted to build EFI
> boot media.
> 
> The bbnote that was previously in the bootimg.bbclass about EFI only
> media being untested was a bit of an understatement, as the images
> would not even build without errors due to the call to isohybrid.  I
> removed any such warnings because that path has been fully vetted now.
> 
> Cheers,
> Jason.
> 
> 
> ----------------------------------------------------------------

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [v3 PATCH 0/9] Improved EFI boot support
  2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
                   ` (9 preceding siblings ...)
  2013-09-17 22:33 ` [v3 PATCH 0/9] Improved EFI boot support Darren Hart
@ 2013-09-20 17:11 ` Darren Hart
  2013-09-21 12:08   ` Jason Wessel
  10 siblings, 1 reply; 18+ messages in thread
From: Darren Hart @ 2013-09-20 17:11 UTC (permalink / raw
  To: Jason Wessel; +Cc: Openembedded-core

On Tue, 2013-09-17 at 08:32 -0500, Jason Wessel wrote:
> V3
> - Add comment about isolinux.bin required in EFI only case
> - Fix typo of PCIBIOS -> PCBIOS
> - Change COMPRESSISO ?= "" -> COMPRESSISO ?= "0" for the default
> - Add comment to EFI/ISO syslinux.bbclass to clarify workaround
>   with EFI only case and hybrid boot
> - Add patch to fix syslinux serial and menu problems
> - Add patch to fix boot-directdisk.bbclass
> * Two new patches are 7 & 8, the zisofs patch moved from 7 -> 9
> 
> 
> V2
> - Added reference to YOCTO #1913 for per Darren
> - Remove PR number from cdrtools uprev
> - Added Saul's change to cdrtools to get rid of STAGE_TEMP
> - made the builtin grub cfg file copied from a SRC_URI
> - upreved syslinux to 6.01
> - Use the new isohybrid command from syslinux which can now
>   generate EFI enabled ISO's which can boot directly when
>   dd'ed to a USB or HDD device.
> - Dropped any references to efi or pcbios in the qemu* configs
> - Added the zisofs patch to the end of the series instead
>   of depending on it, in case it is dropped later.
> - git -format-patch -M20% is your friend for seeing the
>   delta on recipe upgrades :-)
> 
> YAY, with the new version of syslinux it is now possible to
> build a single live ISO image which can boot in legacy mode
> or EFI on optical media or USB devices.
> 
> We still have to create 2 ISO's one for 32bit EFI systems and one for
> 64bit EFI systems but this is also true of all other Linux
> distributions today as well.
> 
> Jason.
> 
> ---
> 
> The goal of this patch set is to put the EFI ISO boot method on par
> with the ISO PCBIOS boot method.  This also allows for the creation of
> a single ISO image which can boot in "legacy boot" mode or EFI boot
> mode.
> 
> In order to make this possible the cdrtools needed an update to the
> very latest and this brings in an license change.  Given that change
> it was not entirely clear to me if we needed to leave the older
> package around.  I opted to remove the older package recipe since
> there was no clean way to fail in the case you wanted to build EFI
> boot media.
> 
> The bbnote that was previously in the bootimg.bbclass about EFI only
> media being untested was a bit of an understatement, as the images
> would not even build without errors due to the call to isohybrid.  I
> removed any such warnings because that path has been fully vetted now.
> 
> Cheers,
> Jason.
> 
> 
> ----------------------------------------------------------------
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

So with these now upstream, I'm hitting the following after removing
NO_ISO="1" from the MinnowBoard machine config. Is anything missing?
Have you validated this is working for you after the merge?

ERROR: Function failed: build_iso (log file is located
at /build/yocto/master/minnow_20130223110941/build/tmp/work/minnow-poky-linux/core-image-sato/1.0-r0/temp/log.do_bootimg.26036)                                                                      ERROR: Logfile of failure stored in: /build/yocto/master/minnow_20130223110941/build/tmp/work/minnow-poky-linux/core-image-sato/1.0-r0/temp/log.do_bootimg.26036        Log data follows:                                                                   | DEBUG: Executing python function do_bootimg
| DEBUG: Executing python function build_grub_cfg
| DEBUG: Python function build_grub_cfg finished
| DEBUG: Executing shell function build_hddimg
| mkdosfs 2.11 (12 Mar 2005)
| DEBUG: Shell function build_hddimg finished
| DEBUG: Executing shell function build_iso
| NOTE: EFI-only ISO images are untested, please provide feedback.
|   4.89% done, estimate finish Fri Sep 20 09:36:57 2013
|   9.76% done, estimate finish Fri Sep 20 09:36:57 2013
|  14.65% done, estimate finish Fri Sep 20 09:36:57 2013
|  19.52% done, estimate finish Fri Sep 20 09:36:57 2013
|  24.40% done, estimate finish Fri Sep 20 09:36:57 2013
|  29.27% done, estimate finish Fri Sep 20 09:36:57 2013
|  34.16% done, estimate finish Fri Sep 20 09:36:57 2013
|  39.03% done, estimate finish Fri Sep 20 09:36:57 2013
|  43.92% done, estimate finish Fri Sep 20 09:36:57 2013
|  48.79% done, estimate finish Fri Sep 20 09:36:57 2013
|  53.67% done, estimate finish Fri Sep 20 09:36:57 2013
|  58.55% done, estimate finish Fri Sep 20 09:36:57 2013
|  63.43% done, estimate finish Fri Sep 20 09:36:57 2013
|  68.30% done, estimate finish Fri Sep 20 09:36:57 2013
|  73.19% done, estimate finish Fri Sep 20 09:36:57 2013
|  78.06% done, estimate finish Fri Sep 20 09:36:57 2013
|  82.95% done, estimate finish Fri Sep 20 09:36:57 2013
|  87.82% done, estimate finish Fri Sep 20 09:36:57 2013
|  92.70% done, estimate finish Fri Sep 20 09:36:57 2013
|  97.57% done, estimate finish Fri Sep 20 09:36:57 2013
| Total translation table size: 0
| Total rockridge attributes bytes: 1095
| Total directory bytes: 4096
| Path table size(bytes): 34
| Max brk space used 0
| 102490 extents written (200 MB)
|
isohybrid: /build/yocto/master/minnow_20130223110941/build/tmp/deploy/images/minnow/core-image-sato-minnow-20130920155947.iso: could not find boot record
|
WARNING: /build/yocto/master/minnow_20130223110941/build/tmp/work/minnow-poky-linux/core-image-sato/1.0-r0/temp/run.build_iso.26036:1 exit 1 from
|
isohybrid /build/yocto/master/minnow_20130223110941/build/tmp/deploy/images/minnow/core-image-sato-minnow-20130920155947.iso
| DEBUG: Python function do_bootimg finished
| ERROR: Function failed: build_iso (log file is located
at /build/yocto/master/minnow_20130223110941/build/tmp/work/minnow-poky-linux/core-image-sato/1.0-r0/temp/log.do_bootimg.26036)
ERROR: Task 8
(/build/yocto/master/minnow_20130223110941/poky/meta/recipes-sato/images/core-image-sato.bb, do_bootimg) failed with exit code '1'



-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [v3 PATCH 0/9] Improved EFI boot support
  2013-09-20 17:11 ` Darren Hart
@ 2013-09-21 12:08   ` Jason Wessel
  0 siblings, 0 replies; 18+ messages in thread
From: Jason Wessel @ 2013-09-21 12:08 UTC (permalink / raw
  To: Darren Hart; +Cc: Openembedded-core

On 09/20/2013 12:11 PM, Darren Hart wrote:
> So with these now upstream, I'm hitting the following after removing
> NO_ISO="1" from the MinnowBoard machine config. Is anything missing?
> Have you validated this is working for you after the merge?
> 


Only the first 2 patches in the series were actually merged, and the patches that provide the functionality you are looking for are not yet merged. 

Does that mean that I should post the remaining 7 patches again?  I don't know if it was the intent to only partially merge things or not.  Perhaps Saul is still doing some testing because 2 of the 9 patches (the 2 that were merged) came from his unified pull to Richard.

Cheers,
Jason. 


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-09-21 12:08 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 13:32 [v3 PATCH 0/9] Improved EFI boot support Jason Wessel
2013-09-17 13:32 ` [v3 PATCH 1/9] bootimage.bbclass: Move fat image creation into a function Jason Wessel
2013-09-17 13:32 ` [v3 PATCH 2/9] cdrtools-native: Update from 3.00 to 3.01a17 Jason Wessel
2013-09-17 13:32 ` [v3 PATCH 3/9] grub-efi-native: Add support for EFI ISO images Jason Wessel
2013-09-17 13:32 ` [v3 PATCH 4/9] syslinux.bbclass, syslinux: Update to syslinux 6.01 Jason Wessel
2013-09-17 22:10   ` Darren Hart
2013-09-17 13:32 ` [v3 PATCH 5/9] bootimage.bbclass, grub-efi.bbclass: Improve EFI & PCBIOS+EFI ISO support Jason Wessel
2013-09-17 22:12   ` Darren Hart
2013-09-17 13:32 ` [v3 PATCH 6/9] grub-efi.bbclass: Add serial and graphics menu options Jason Wessel
2013-09-17 22:19   ` Darren Hart
2013-09-17 13:32 ` [v3 PATCH 7/9] syslinux.bbclass: Fix hard coding of console=tty* Jason Wessel
2013-09-17 22:28   ` Darren Hart
2013-09-17 13:32 ` [v3 PATCH 8/9] boot-directdisk.bbclass: Fix media generation problems with vmdk Jason Wessel
2013-09-17 22:32   ` Darren Hart
2013-09-17 13:32 ` [v3 PATCH 9/9] bootimage.bbclass, zisofs-tools-native: add ability to compress ISO images Jason Wessel
2013-09-17 22:33 ` [v3 PATCH 0/9] Improved EFI boot support Darren Hart
2013-09-20 17:11 ` Darren Hart
2013-09-21 12:08   ` Jason Wessel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.