On Sun, Oct 21, 2012 at 9:24 AM, Petr Štetiar <yn...@true.cz> wrote:
> Ok, sorry. I've meant "mtd" package, but wrote "mtd-utils". Anyway, the
> conditions metioned in my previous email still apply. Without that "mtd"
> package it's not possible to use jffs2 /overlay.
I noticed that many of the system scripts use mtd, so to reflect this
in the package metadata I tried to make mtd a dependency of
base-files. This would mean that if you select base-files, you also
get mtd, achieving the same effect as making mtd mandatory.

Unfortunately, that broke the build, because mtd.c includes headers
directly from the kernel tree instead of sticking to the exported
headers only. I suspect this was introduced by this change:

commit 6b08cfb731a86c548c93ae426a668f6336f4be17
Author: jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date:   Mon Oct 8 09:59:47 2012 +0000

    package: mtd: use in-kernel bcm63xx image tag header

    Use the image tag header from the kernel instead of an external header
    file.

openwrt exports kernel headers into
build_dir/linux-X/linux-X.Y.Z/user_headers, but the bcm63xx header
(bcm963xx_tag.h) is not present there. I don't know what the criteria
for exporting a header is. Could be one of several things:

1) bcm963xx_tag.h might be missing something in the source code to get
it exported.
2) mach (arch/X/include/asm/mach-X/*.h) headers, which is where
bcm963xx_tag.h lives, might be treated specially. After all, the
kernel probably doesn't want to expose a machine-dependent interface
to userspace.
3) Some other reason I haven't considered because I have no real clue
how any of this works.

I also don't know why the dependency of base-files on mtd surfaced
this problem. It must have changed the build order for some packages.

I don't think just reverting the change is the right move either - we
probably *do* want to share this header to avoid duplication. There
must exist device interfaces that are conditioned on a specific
machine, maybe this header just needs to be moved to a
platform-independent include dir?

Hope this helps :) If anyone knows some of the philosophy behind this,
I would be happy to hack away at some patches, but as it stands, I
don't have much to go on.

Catalin
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to