From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1VHviF-0001WX-0P for ptxdist@pengutronix.de; Fri, 06 Sep 2013 15:04:35 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1VHviE-0007dB-V2 for ptxdist@pengutronix.de; Fri, 06 Sep 2013 15:04:34 +0200 Date: Fri, 6 Sep 2013 15:04:34 +0200 From: Michael Olbrich Message-ID: <20130906130434.GC19326@pengutronix.de> References: <1377251484.2921.4.camel@lws-weitzel> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1377251484.2921.4.camel@lws-weitzel> Subject: Re: [ptxdist] ptxdist checks wrong kernel md5 Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Hi, On Fri, Aug 23, 2013 at 11:51:24AM +0200, Jan Weitzel wrote: > I have a misconfigured BSP with the wrong PTXCONF_KERNEL_MD5. But > ptxdist works fine with that: > > > weitzel@numalfix:~/tmp/phyCORE-OMAP4-PD13.1.0 > $ /home/weitzel/git/ptxdist/bin/ptxdist -f print KERNEL_MD5 > 146af0160fc7a60cf9acf44aec13482b > weitzel@numalfix:~/tmp/phyCORE-OMAP4-PD13.1.0 > $ /home/weitzel/git/ptxdist/bin/ptxdist -f print KERNEL_HEADER_MD5 > 967f72983655e2479f951195953e8480 > weitzel@numalfix:~/tmp/phyCORE-OMAP4-PD13.1.0 > $ /home/weitzel/git/ptxdist/bin/ptxdist -f print PTXCONF_KERNEL_MD5 > 146af0160fc7a60cf9acf44aec13482b > weitzel@numalfix:~/tmp/phyCORE-OMAP4-PD13.1.0 > $ /home/weitzel/git/ptxdist/bin/ptxdist -f print > PTXCONF_KERNEL_HEADER_MD5 > 967f72983655e2479f951195953e8480 > > > weitzel@numalfix:~/tmp/phyCORE-OMAP4-PD13.1.0$ > md5sum /home/ptxdist_src/linux-3.4.tar.xz > 967f72983655e2479f951195953e8480 /home/ptxdist_src/linux-3.4.tar.xz > > > I add this for debug: > diff --git a/scripts/lib/ptxd_make_world_check_src.sh > b/scripts/lib/ptxd_make_world_check_src.sh > index fa89ec5..e8821c9 100644 > --- a/scripts/lib/ptxd_make_world_check_src.sh > +++ b/scripts/lib/ptxd_make_world_check_src.sh > @@ -92,6 +92,7 @@ ptxd_make_world_check_src() { > if [ -z "${pkg_src}" ]; then > return > fi > +echo ptxd_make_world_check_src "${pkg_pkg}" "${pkg_src}" "${pkg_md5}" > ptxd_make_check_src_impl "${pkg_src}" "${pkg_md5}" && return > > if [ "${PTXCONF_SETUP_CHECK}" = "update" ]; then > > > And get this: > weitzel@numalfix:~/tmp/phyCORE-OMAP4-PD13.1.0 > $ /home/weitzel/git/ptxdist/bin/ptxdist -f get kernel > > ------------------ > target: kernel.get > ------------------ > > ptxd_make_world_check_src linux-3.4 /home/ptxdist_src/linux-3.4.tar.xz > 967f72983655e2479f951195953e8480 > finished target kernel.get > > > > So it seams we use PTXCONF_KERNEL_HEADER_MD5 for the kernel rule. I'm not sure we can fix this. The problem is in rules/post/ptxd_make_world_get.make: [...] define pkg_source $(if $($(1)_SOURCE),$(eval $($(1)_SOURCE) := $(1)),) endef $(foreach pkg, $(PTX_PACKAGES_SELECTED), $(call pkg_source,$(PTX_MAP_TO_PACKAGE_$(pkg)))) [...] will generate: /home/ptxdist_src/linux-3.4.tar.xz := KERNEL /home/ptxdist_src/linux-3.4.tar.xz := KERNEL_HEADER and then here: [...] $(STATEDIR)/%.get: @$(call targetinfo) @$(foreach src,$($(PTX_MAP_TO_PACKAGE_$(*))_SOURCES), \ $(call world/get, $($(src)));) @$(foreach src,$($(PTX_MAP_TO_PACKAGE_$(*))_SOURCES), \ $(call world/check_src, $($(src)));) [...] $(src) == /home/ptxdist_src/linux-3.4.tar.xz $($(src)) == KERNEL_HEADER so we basically get: $(STATEDIR)/kernel.get: @$(call targetinfo) @$(call world/get, KERNEL_HEADER) @$(call world/check_src, KERNEL_HEADER) @$(call touch) And the magic is necessary to make packages with multiple sources possible. mfg, Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de