From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757346AbdKGLRw (ORCPT ); Tue, 7 Nov 2017 06:17:52 -0500 Received: from terminus.zytor.com ([65.50.211.136]:49605 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755473AbdKGLRu (ORCPT ); Tue, 7 Nov 2017 06:17:50 -0500 Date: Tue, 7 Nov 2017 03:14:00 -0800 From: tip-bot for Changbin Du Message-ID: Cc: mingo@kernel.org, peterz@infradead.org, tglx@linutronix.de, changbin.du@intel.com, linux-kernel@vger.kernel.org, hpa@zytor.com, torvalds@linux-foundation.org Reply-To: peterz@infradead.org, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, changbin.du@intel.com In-Reply-To: <1509939179-7556-3-git-send-email-changbin.du@intel.com> References: <1509939179-7556-3-git-send-email-changbin.du@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/build: Add new paths for isolinux.bin and ldlinux.c32 Git-Commit-ID: 8a7546a04ecb7c9388a3e935c6cfcc7c2c4c6b67 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 8a7546a04ecb7c9388a3e935c6cfcc7c2c4c6b67 Gitweb: https://git.kernel.org/tip/8a7546a04ecb7c9388a3e935c6cfcc7c2c4c6b67 Author: Changbin Du AuthorDate: Mon, 6 Nov 2017 11:32:57 +0800 Committer: Ingo Molnar CommitDate: Tue, 7 Nov 2017 11:22:20 +0100 x86/build: Add new paths for isolinux.bin and ldlinux.c32 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 Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: yamada.masahiro@socionext.com Link: http://lkml.kernel.org/r/1509939179-7556-3-git-send-email-changbin.du@intel.com Signed-off-by: Ingo Molnar --- 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