linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: changbin.du@intel.com
To: hpa@zytor.com, tglx@linutronix.de
Cc: mingo@redhat.com, x86@kernel.org, linux-kernel@vger.kernel.org,
	yamada.masahiro@socionext.com,
	Changbin Du <changbin.du@intel.com>,
	Ingo Molnar <mingo@kernel.org>
Subject: [PATCH v2 2/4] x86, build: Add new paths for isolinux.bin and ldlinux.c32
Date: Mon,  6 Nov 2017 11:32:57 +0800	[thread overview]
Message-ID: <1509939179-7556-3-git-send-email-changbin.du@intel.com> (raw)
In-Reply-To: <1509939179-7556-1-git-send-email-changbin.du@intel.com>

From: Changbin Du <changbin.du@intel.com>

Recently I failed to build isoimage target, because the path of isolinux.bin
changed to /usr/xxx/ISOLINUX/isolinux.bin, as well as ldlinux.c32 which
changed to /usr/xxx/syslinux/modules/bios/ldlinux.c32.

This patch improves the file search logic:
  - Show a error message instead of silent fail.
  - Add above new paths.

Signed-off-by: Changbin Du <changbin.du@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>

---
v2: Improve description. (Ingo)
---
 arch/x86/boot/genimage.sh | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/arch/x86/boot/genimage.sh b/arch/x86/boot/genimage.sh
index 75a9de1..6c8100b 100644
--- a/arch/x86/boot/genimage.sh
+++ b/arch/x86/boot/genimage.sh
@@ -76,14 +76,27 @@ genisoimage() {
 	rm -rf $tmp_dir
 	mkdir $tmp_dir
 	for i in lib lib64 share end ; do
-		if [ -f /usr/$i/syslinux/isolinux.bin ] ; then
-			cp /usr/$i/syslinux/isolinux.bin $tmp_dir
-			if [ -f /usr/$i/syslinux/ldlinux.c32 ]; then
-				cp /usr/$i/syslinux/ldlinux.c32 $tmp_dir
+		for j in syslinux ISOLINUX ; do
+			if [ -f /usr/$i/$j/isolinux.bin ] ; then
+				isolinux=/usr/$i/$j/isolinux.bin
+				echo "Using $isolinux"
+				cp $isolinux $tmp_dir
 			fi
+		done
+		for j in syslinux syslinux/modules/bios ; do
+			if [ -f /usr/$i/$j/ldlinux.c32 ]; then
+				ldlinux=/usr/$i/$j/ldlinux.c32
+				echo "Using $ldlinux"
+				cp $ldlinux $tmp_dir
+			fi
+		done
+		if [ -n "$isolinux" -a -n "$ldlinux" ] ; then
 			break
 		fi
-		if [ $i = end ] ; then exit 1 ; fi ;
+		if [ $i = end -a -z "$isolinux" ] ; then
+			echo 'Need an isolinux.bin file, please install syslinux/isolinux.'
+			exit 1
+		fi
 	done
 	cp $FBZIMAGE $tmp_dir/linux
 	echo "$KCMDLINE" > $tmp_dir/isolinux.cfg
-- 
2.7.4

  parent reply	other threads:[~2017-11-06  3:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06  3:32 [PATCH v2 0/4] x86, kbuild: Some improvement for fdimage/isoimage generation changbin.du
2017-11-06  3:32 ` [PATCH v2 1/4] x86, build: Factor out fdimage/isoimage generation commands to standalone script changbin.du
2017-11-07 10:20   ` Ingo Molnar
2017-11-07 10:35     ` Du, Changbin
2017-11-07 11:12       ` Ingo Molnar
2017-11-07 11:13   ` [tip:x86/asm] x86/build: " tip-bot for Changbin Du
2017-11-06  3:32 ` changbin.du [this message]
2017-11-07 11:14   ` [tip:x86/asm] x86/build: Add new paths for isolinux.bin and ldlinux.c32 tip-bot for Changbin Du
2017-11-06  3:32 ` [PATCH v2 3/4] x86, build: Specify -input-charset=utf-8 for mkisofs changbin.du
2017-11-07 11:14   ` [tip:x86/asm] x86/build: " tip-bot for Changbin Du
2017-11-06  3:32 ` [PATCH v2 4/4] x86, boot: Add some generated files to the .gitignore file changbin.du
2017-11-07 11:14   ` [tip:x86/asm] x86/build: Add more " tip-bot for Changbin Du

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1509939179-7556-3-git-send-email-changbin.du@intel.com \
    --to=changbin.du@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).