From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752747AbdKEJZs (ORCPT ); Sun, 5 Nov 2017 04:25:48 -0500 Received: from mga02.intel.com ([134.134.136.20]:38949 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752593AbdKEJZn (ORCPT ); Sun, 5 Nov 2017 04:25:43 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,346,1505804400"; d="scan'208";a="1033655838" 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 Subject: [PATCH 2/4] x86, build: Add new paths for isolinux.bin and ldlinux.c32 Date: Sun, 5 Nov 2017 17:18:11 +0800 Message-Id: <1509873493-17929-3-git-send-email-changbin.du@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509873493-17929-1-git-send-email-changbin.du@intel.com> References: <1509873493-17929-1-git-send-email-changbin.du@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Changbin Du 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 has a improvement of the file search: - Show a error message instead of silent fail. - Add above new paths. Signed-off-by: Changbin Du --- 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..f7994ad 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 isolinux.bin, please install syslinux/isolinux' + exit 1 + fi done cp $FBZIMAGE $tmp_dir/linux echo "$KCMDLINE" > $tmp_dir/isolinux.cfg -- 2.7.4