mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] ptxdist checks wrong kernel md5
Date: Fri, 6 Sep 2013 15:04:34 +0200	[thread overview]
Message-ID: <20130906130434.GC19326@pengutronix.de> (raw)
In-Reply-To: <1377251484.2921.4.camel@lws-weitzel>

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

      reply	other threads:[~2013-09-06 13:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23  9:51 Jan Weitzel
2013-09-06 13:04 ` Michael Olbrich [this message]

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=20130906130434.GC19326@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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