Skip to contentSkip to conversation

syslinux: Update to 4.06

PATCH New Jonathan Liu 3 participants 8 messages May 9, 2013 – Jun 10, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v9 1/3 syslinux: Update to 4.06

Patches are now part of upstream or no longer needed. Added new util-linux dependency for isohybrid. Paths updated to reflect directory structure changes. Add CFLAGS and LDFLAGS overrides.

[YOCTO #4438]

---
 meta/classes/boot-directdisk.bbclass               |   4 +-
 meta/classes/syslinux.bbclass                      |   8 +-
 .../syslinux/files/cross-build.patch               |  71 --
 .../libinstaller-Avoid-using-linux-ext2_fs.h.patch | 975 ---------------------
 .../recipes-devtools/syslinux/files/no-strip.patch |  31 -
 meta/recipes-devtools/syslinux/syslinux_4.03.bb    |  65 --
 meta/recipes-devtools/syslinux/syslinux_4.06.bb    |  62 ++
 7 files changed, 68 insertions(+), 1148 deletions(-)
 delete mode 100644 meta/recipes-devtools/syslinux/files/cross-build.patch
 delete mode 100644 meta/recipes-devtools/syslinux/files/libinstaller-Avoid-using-linux-ext2_fs.h.patch
 delete mode 100644 meta/recipes-devtools/syslinux/files/no-strip.patch
 delete mode 100644 meta/recipes-devtools/syslinux/syslinux_4.03.bb
 create mode 100644 meta/recipes-devtools/syslinux/syslinux_4.06.bb
meta/classes/boot-directdisk.bbclass +2 -2
index d265485..aa172c6 100644
@@ -48,7 +48,7 @@ build_boot_dd() {
 	install -d ${HDDDIR}
 	install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${HDDDIR}/vmlinuz
 	install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg
-	install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
+	install -m 444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
 
 	BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
 	BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
@@ -82,7 +82,7 @@ build_boot_dd() {
 	parted $IMAGE print
 
 	OFFSET=`expr $END2 / 512`
-	dd if=${STAGING_LIBDIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
+	dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
 	dd if=${HDDIMG} of=$IMAGE conv=notrunc seek=1 bs=512
 	dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
 
meta/classes/syslinux.bbclass +4 -4
index 0b90eab..501bc6d 100644
@@ -40,9 +40,9 @@ syslinux_populate() {
 
 syslinux_iso_populate() {
 	syslinux_populate ${ISODIR} ${ISOLINUXDIR} isolinux.cfg
-	install -m 0644 ${STAGING_LIBDIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
+	install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
 	if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then
-		install -m 0644 ${STAGING_LIBDIR}/syslinux/vesamenu.c32 ${ISODIR}${ISOLINUXDIR}/vesamenu.c32
+		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
@@ -51,9 +51,9 @@ syslinux_iso_populate() {
 
 syslinux_hddimg_populate() {
 	syslinux_populate ${HDDDIR} ${SYSLINUXDIR} syslinux.cfg
-	install -m 0444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}${SYSLINUXDIR}/ldlinux.sys
+	install -m 0444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}${SYSLINUXDIR}/ldlinux.sys
 	if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then
-		install -m 0644 ${STAGING_LIBDIR}/syslinux/vesamenu.c32 ${HDDDIR}${SYSLINUXDIR}/vesamenu.c32
+		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
meta/recipes-devtools/syslinux/files/cross-build.patch deleted +0 -71

71 lines not on this page · raw message

meta/recipes-devtools/syslinux/files/libinstaller-Avoid-using-linux-ext2_fs.h.patch deleted +0 -975

975 lines not on this page · raw message

meta/recipes-devtools/syslinux/files/no-strip.patch deleted +0 -31
deleted file mode 100644
index 775851a..0000000
@@ -1,31 +0,0 @@
-Disable stripping of binaries
-
-We don't want to strip these as this is handled separately at package
-time.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Paul Eggleton <[email protected]>
-
---- syslinux-4.03.orig/mtools/Makefile
-+++ syslinux-4.03/mtools/Makefile
-@@ -4,7 +4,7 @@ include $(topdir)/MCONFIG
- OPTFLAGS = -g -Os
- INCLUDES = -I. -I.. -I../libfat -I../libinstaller
- CFLAGS	 = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
--LDFLAGS	 = -s
-+LDFLAGS	 =
- 
- SRCS     = syslinux.c \
- 	   ../libinstaller/fat.c \
---- syslinux-4.03.orig/utils/Makefile
-+++ syslinux-4.03/utils/Makefile
-@@ -18,7 +18,7 @@ topdir = ..
- include $(topdir)/MCONFIG
- 
- CFLAGS   = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
--LDFLAGS  = -O2 -s
-+LDFLAGS  = -O2
- 
- TARGETS	 = mkdiskimage isohybrid gethostip memdiskfind
- TARGETS += isohybrid.pl  # about to be obsoleted
meta/recipes-devtools/syslinux/syslinux_4.03.bb deleted +0 -65

65 lines not on this page · raw message

meta/recipes-devtools/syslinux/syslinux_4.06.bb new file +62 -0

62 lines not on this page · raw message

Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 2/3 boot-directdisk: Scope HDDDIR and HDDIMG variables to avoid conflicts

These variables should not be shared with other image classes. The bootimg class also has an HDDDIR variable that could be overwritten if executing concurrently in the same image recipe.

---
 meta/classes/boot-directdisk.bbclass | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)
meta/classes/boot-directdisk.bbclass +12 -13
index aa172c6..9673760 100644
@@ -28,9 +28,6 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
 PACKAGES = " "
 EXCLUDE_FROM_WORLD = "1"
 
-HDDDIR = "${S}/hdd/boot"
-HDDIMG = "${S}/hdd.image"
-
 BOOTDD_VOLUME_ID   ?= "boot"
 BOOTDD_EXTRA_SPACE ?= "16384"
 
@@ -43,14 +40,16 @@ SYSLINUX_TIMEOUT ?= "10"
 inherit syslinux
 		
 build_boot_dd() {
+	HDDDIR="${S}/hdd/boot"
+	HDDIMG="${S}/hdd.image"
 	IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
 
-	install -d ${HDDDIR}
-	install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${HDDDIR}/vmlinuz
-	install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg
-	install -m 444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
+	install -d $HDDDIR
+	install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $HDDDIR/vmlinuz
+	install -m 0644 ${S}/syslinux.cfg $HDDDIR/syslinux.cfg
+	install -m 444 ${STAGING_DATADIR}/syslinux/ldlinux.sys $HDDDIR/ldlinux.sys
 
-	BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
+	BLOCKS=`du -bks $HDDDIR | cut -f 1`
 	BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
 
 	# Ensure total sectors is an integral number of sectors per
@@ -59,11 +58,11 @@ build_boot_dd() {
 	# done in blocks, thus the mod by 16 instead of 32.
 	BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
 
-	mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C ${HDDIMG} $BLOCKS 
-	mcopy -i ${HDDIMG} -s ${HDDDIR}/* ::/
+	mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS 
+	mcopy -i $HDDIMG -s $HDDDIR/* ::/
 
-	syslinux ${HDDIMG}
-	chmod 644 ${HDDIMG}
+	syslinux $HDDIMG
+	chmod 644 $HDDIMG
 
 	ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1`
 	TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS`
@@ -83,7 +82,7 @@ build_boot_dd() {
 
 	OFFSET=`expr $END2 / 512`
 	dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
-	dd if=${HDDIMG} of=$IMAGE conv=notrunc seek=1 bs=512
+	dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
 	dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
 
 	cd ${DEPLOY_DIR_IMAGE}
Signature · 1 line
1.8.2.1
#2 lore raw

Re: [PATCH 2/3] boot-directdisk: Scope HDDDIR and HDDIMG variables to avoid conflicts

Quoted 4 lines · Jonathan Liu

These variables should not be shared with other image classes. The bootimg class also has an HDDDIR variable that could be overwritten if executing concurrently in the same image recipe.

Nice catch. Would you considering sending a patch against the bootimg class as well?

Thanks,

Darren

Quoted 67 lines
---
 meta/classes/boot-directdisk.bbclass | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)
meta/classes/boot-directdisk.bbclass +12 -13
index aa172c6..9673760 100644
@@ -28,9 +28,6 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
 PACKAGES = " "
 EXCLUDE_FROM_WORLD = "1"
 
-HDDDIR = "${S}/hdd/boot"
-HDDIMG = "${S}/hdd.image"
-
 BOOTDD_VOLUME_ID   ?= "boot"
 BOOTDD_EXTRA_SPACE ?= "16384"
 
@@ -43,14 +40,16 @@ SYSLINUX_TIMEOUT ?= "10"
 inherit syslinux
 
 build_boot_dd() {
+	HDDDIR="${S}/hdd/boot"
+	HDDIMG="${S}/hdd.image"
 	IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
 
-	install -d ${HDDDIR}
-	install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${HDDDIR}/vmlinuz
-	install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg
-	install -m 444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
+	install -d $HDDDIR
+	install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $HDDDIR/vmlinuz
+	install -m 0644 ${S}/syslinux.cfg $HDDDIR/syslinux.cfg
+	install -m 444 ${STAGING_DATADIR}/syslinux/ldlinux.sys $HDDDIR/ldlinux.sys
 
-	BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
+	BLOCKS=`du -bks $HDDDIR | cut -f 1`
 	BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
 
 	# Ensure total sectors is an integral number of sectors per
@@ -59,11 +58,11 @@ build_boot_dd() {
 	# done in blocks, thus the mod by 16 instead of 32.
 	BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
 
-	mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C ${HDDIMG} $BLOCKS 
-	mcopy -i ${HDDIMG} -s ${HDDDIR}/* ::/
+	mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS 
+	mcopy -i $HDDIMG -s $HDDDIR/* ::/
 
-	syslinux ${HDDIMG}
-	chmod 644 ${HDDIMG}
+	syslinux $HDDIMG
+	chmod 644 $HDDIMG
 
 	ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1`
 	TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS`
@@ -83,7 +82,7 @@ build_boot_dd() {
 
 	OFFSET=`expr $END2 / 512`
 	dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
-	dd if=${HDDIMG} of=$IMAGE conv=notrunc seek=1 bs=512
+	dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
 	dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
 
 	cd ${DEPLOY_DIR_IMAGE}
Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
#3 lore raw

Re: [PATCH 2/3] boot-directdisk: Scope HDDDIR and HDDIMG variables to avoid conflicts

Quoted 7 lines · Darren Hart
Quoted 3 lines · Jonathan Liu

These variables should not be shared with other image classes. The bootimg class also has an HDDDIR variable that could be overwritten if executing concurrently in the same image recipe.

Nice catch. Would you considering sending a patch against the bootimg class as well?

I did originally submit a patch against the bootimg class as well but it turns out those variables are used by grub-efi.bbclass and syslinux.bbclass. See
http://lists.openembedded.org/pipermail/openembedded-core/2013-May/078011.html.

Regards,
Jonathan

#4 lore raw

Re: [PATCH 2/3] boot-directdisk: Scope HDDDIR and HDDIMG variables to avoid conflicts

Quoted 6 lines · Jonathan Liu
Quoted 5 lines · Darren Hart
Quoted 3 lines · Jonathan Liu

These variables should not be shared with other image classes. The bootimg class also has an HDDDIR variable that could be overwritten if executing concurrently in the same image recipe.

Quoted 7 lines
Quoted 2 lines

Nice catch. Would you considering sending a patch against the bootimg class as well?

I did originally submit a patch against the bootimg class as well but it turns out those variables are used by grub-efi.bbclass and syslinux.bbclass. See
http://lists.openembedded.org/pipermail/openembedded-core/2013-May/078011.html.

Ah yes. And boot-directdisk.bbclass also makes use of those. Sounds like some investigation into how to better modularize this is in order.

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
#5 lore raw

PATCH 3/3 image-vmdk: Fix error recreating symbolic link

In reply to Jonathan Liu

If the vmdk image symbolic link already exists from a previous build, overwrite it instead of returning an error.

---
 meta/classes/image-vmdk.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image-vmdk.bbclass +1 -1
index 6f7df3f..c225bed 100644
@@ -18,8 +18,8 @@ inherit boot-directdisk
 
 create_vmdk_image () {
 	qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk
+	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk
 	ln -s ${IMAGE_NAME}.vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk
-
 }
 
 python do_vmdkimg() {
Signature · 1 line
1.8.2.1
#6 lore raw

Re: [PATCH 3/3] image-vmdk: Fix error recreating symbolic link

Quoted 13 lines · Jonathan Liu

If the vmdk image symbolic link already exists from a previous build, overwrite it instead of returning an error.

---
  meta/classes/image-vmdk.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image-vmdk.bbclass +0 -0
index 6f7df3f..c225bed 100644

meta/classes/image-vmdk.bbclass inherit boot-directdisk · line 22

Quoted 5 lines
meta/classes/image-vmdk.bbclass +1 -0
@@ -18,8 +18,8 @@ inherit boot-directdisk
 
  create_vmdk_image () {
  	qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk
+	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk
  	ln -s ${IMAGE_NAME}.vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk

How about "ln -sf", the '-f' will remove existing destination files.

// Robert

Quoted 5 lines
meta/classes/image-vmdk.bbclass +0 -1
-
  }
 
  python do_vmdkimg() {
#7 lore raw

Re: [PATCH 3/3] image-vmdk: Fix error recreating symbolic link

Quoted 26 lines · Robert Yang
Quoted 18 lines · Jonathan Liu

If the vmdk image symbolic link already exists from a previous build, overwrite it instead of returning an error.

---
  meta/classes/image-vmdk.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image-vmdk.bbclass +0 -0
index 6f7df3f..c225bed 100644
@@ -18,8 +18,8 @@ inherit boot-directdisk
 
  create_vmdk_image () {
      qemu-img convert -O vmdk 

${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk
+ rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk

Quoted 2 lines
      ln -s ${IMAGE_NAME}.vmdk 

${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk

How about "ln -sf", the '-f' will remove existing destination files.

Quoted 1 line

// Robert

Done.

Quoted 6 lines
Quoted 6 lines

-
}

  python do_vmdkimg() {

Regards,
Jonathan