From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Message-ID: <53BC03E9.301@pengutronix.de> Date: Tue, 08 Jul 2014 16:44:57 +0200 From: Marc Kleine-Budde MIME-Version: 1.0 References: <1404830025-22351-1-git-send-email-alex.aring@gmail.com> In-Reply-To: <1404830025-22351-1-git-send-email-alex.aring@gmail.com> Subject: Re: [ptxdist] [PATCH] ptxd_make_dts_dtc: handle error if dtc failed Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1580335926==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: Alexander Aring , ptxdist@pengutronix.de This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============1580335926== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="17saFQW704SNphnUOccoRteaBdbjWWDv7" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --17saFQW704SNphnUOccoRteaBdbjWWDv7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/08/2014 04:33 PM, Alexander Aring wrote: > This patch adds error handling for the ptxd_make_dts_dtb function. >=20 > Signed-off-by: Alexander Aring > --- > scripts/lib/ptxd_make_dts_dtc.sh | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) >=20 > diff --git a/scripts/lib/ptxd_make_dts_dtc.sh b/scripts/lib/ptxd_make_d= ts_dtc.sh > index 24c5604..46eaa9d 100644 > --- a/scripts/lib/ptxd_make_dts_dtc.sh > +++ b/scripts/lib/ptxd_make_dts_dtc.sh > @@ -29,7 +29,7 @@ ptxd_make_dts_dtb() { > deps=3D"${ptx_state_dir}/dtc.$(basename "${dts}").deps" > tmp_deps=3D"${PTXDIST_TEMPDIR}/dts.deps" > =20 > - echo "CPP $(ptxd_print_path "${tmp_dts}")" > + echo "CPP $(ptxd_print_path "${tmp_dts}")" && > cpp \ > -Wp,-MD,${tmp_deps} \ > -Wp,-MT,${tmp_dts} \ > @@ -42,22 +42,22 @@ ptxd_make_dts_dtb() { > -I${dts_kernel_dir}/include \ > -undef -D__DTS__ -x assembler-with-cpp \ > -o ${tmp_dts} \ > - ${dts} > + ${dts} && > =20 > sed -e "s;^${tmp_dts}:;${dts_dtb}:;" \ > - -e 's;^ \([^ ]*\); $(wildcard \1);' "${tmp_deps}" > "${deps}" > + -e 's;^ \([^ ]*\); $(wildcard \1);' "${tmp_deps}" > "${deps}" && > =20 > if dtc -h 2>&1 | grep -q '^[[:space:]]\+-i\(,.*\)\?$'; then > dtc_include=3D"-i $(dirname "${dts}") -i ${dts_kernel_dir}/arch/${dts= _kernel_arch}/boot/dts" > fi ^^^ I think a && is missing here. > =20 > - echo "DTC $(ptxd_print_path "${dts_dtb}")" > + echo "DTC $(ptxd_print_path "${dts_dtb}")" && > dtc \ > $(ptxd_get_ptxconf PTXCONF_DTC_EXTRA_ARGS) \ > ${dtc_include} \ > -d "${tmp_deps}" \ > -I dts -O dtb -b 0 \ > - -o "${dts_dtb}" "${tmp_dts}" > + -o "${dts_dtb}" "${tmp_dts}" && > =20 > awk '{ \ > printf "%s", $1 ; \ > @@ -65,6 +65,8 @@ ptxd_make_dts_dtb() { > printf " $(wildcard %s)", $i; \ > }; \ > print "" \ > - }' "${tmp_deps}" >> "${deps}" > + }' "${tmp_deps}" >> "${deps}" || > + > + ptxd_bailout "Unable to generate dtb file." > } > export -f ptxd_make_dts_dtb >=20 otherwise looks good. Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | --17saFQW704SNphnUOccoRteaBdbjWWDv7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iEYEARECAAYFAlO8A+kACgkQjTAFq1RaXHPsGwCeIrYhKkFD8RnmzHqNIASETuG+ JC0AnieH1e6PEx3WymzoSKZOl+V4TUh2 =b9Ms -----END PGP SIGNATURE----- --17saFQW704SNphnUOccoRteaBdbjWWDv7-- --===============1580335926== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============1580335926==--