mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] ptxdist checks wrong kernel md5
@ 2013-08-23  9:51 Jan Weitzel
  2013-09-06 13:04 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Weitzel @ 2013-08-23  9:51 UTC (permalink / raw)
  To: ptxdist

Hello,
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.

Jan



-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] ptxdist checks wrong kernel md5
  2013-08-23  9:51 [ptxdist] ptxdist checks wrong kernel md5 Jan Weitzel
@ 2013-09-06 13:04 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2013-09-06 13:04 UTC (permalink / raw)
  To: ptxdist

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-06 13:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23  9:51 [ptxdist] ptxdist checks wrong kernel md5 Jan Weitzel
2013-09-06 13:04 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox