[OpenWrt-Devel] HELP : Can't patch config.sub in a package
Hello, I'm trying to add a new processor type (lexra), but having trouble patching the config.sub, that checks for recognizable cpu-os-kernel identifier, used in some packages. More specifically, I want the config.sub in iptables-1.4.10 to recognize the 'lexra-openwrt-linux'. I'm working on the trunk r29839. In the first place, I thought I can do this as a piece of cake by adding a patch file that adds couple of lines to the config.sub, in ${BUILDROOT}/package/iptables/patches. Then, after few attempts, I found out that the autoreconf or a similar mechanism replaces ${BUILDROOT}/build_dir/${TARGETSPEC}/iptables-1.4.10/config.sub during the build process so that it points (symlinks) to ${BUILDROOT}/staging_dir/host/share/automake-1.11/config.sub. At this point, I turned around and added a similar patch to ${BUILDROOT}/tools/automake/patches. I checked my result immediately after the automake build, and confirmed that the config.sub was patched appropriately. But, ...the next make V=99 only revealed that the ${BUILDROOT}/staging_dir/host/share/automake-1.11/config.sub was magically overwritten to the original unpatched state. Here's my question: I'm not an expert on OpenWrt build system, and therefore I believe this is some kind of magic, and I also believe that I need a same kind of magic to overcome this problem. Is there any? Thanks in advance, --- shinoda P.S. Here's some discussion: Is the behavior of Modifying a generic build tool during a build process for a single target considered legitimate? Wouldn't it introduce some unexpected side effects? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] HELP : Can't patch config.sub in a package
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. I need a same kind of magic to overcome this problem. Is there any? Yes, patch scripts/config.sub - that is whats fored upon each package. Is the behavior of Modifying a generic build tool during a build process for a single target considered legitimate? Modifying the generic build tool to accept a new platform is certainly legitimate, nobody wants to patch a new CPU definition into each single package. Wouldn't it introduce some unexpected side effects? Its autohell so nobody can tell :) ~ Jow -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8cVnkACgkQdputYINPTPOmHQCeK+HDFGdXAfX8QjM4trm9B1uM RDoAoIB1Gu3rRoaRs3OVkviYxsET6qLx =7I17 -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] HELP : Can't patch config.sub in a package
Jow, Yes, patch scripts/config.sub - that is whats fored upon each package. Yikes!!! Thanks a billion!!! I've been caught in this trap for half a day. Packages were built flawlessly. Is the behavior of Modifying a generic build tool during a build process for a single target considered legitimate? Modifying the generic build tool to accept a new platform is certainly legitimate, nobody wants to patch a new CPU definition into each single package. Ah, then, automake's config.sub should be patched once when it is built? :-) (There's no argument, just my personal thoughts.) --- shinoda On 2012/01/23, at 3:33, Jo-Philipp Wich wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. I need a same kind of magic to overcome this problem. Is there any? Yes, patch scripts/config.sub - that is whats fored upon each package. Is the behavior of Modifying a generic build tool during a build process for a single target considered legitimate? Modifying the generic build tool to accept a new platform is certainly legitimate, nobody wants to patch a new CPU definition into each single package. Wouldn't it introduce some unexpected side effects? Its autohell so nobody can tell :) ~ Jow -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8cVnkACgkQdputYINPTPOmHQCeK+HDFGdXAfX8QjM4trm9B1uM RDoAoIB1Gu3rRoaRs3OVkviYxsET6qLx =7I17 -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] HELP : Can't patch config.sub in a package
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. Modifying the generic build tool to accept a new platform is certainly legitimate, nobody wants to patch a new CPU definition into each single package. In general yes, in practice it should be unneeded though since we're forced to replace config.sub anyway in each package since all ship different versions of config.sub and not all of them are autoreconfigurable. See Build/configure/Default in include/package-defaults.mk, thats where we replace config.sub with our central scripts/ version in each package. ~ Jow -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8cXk4ACgkQdputYINPTPM3WgCfdVgW0f3ac8SKo/gmMKuFw87R RgUAoIbQj3NaCsR4m1dgpT85uOTh5w4/ =dQWJ -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel