cilynx / Candyhouse-Linux

Linux kernel for Cisco/Linksys Candyhouse routers
Apache License 2.0
16 stars 10 forks source link

Fixing the post Make cleanup and the build process #11

Open adrinux opened 9 years ago

adrinux commented 9 years ago

There's an ongoing problem with the Makefile recipes use of reverse patching to cleanup the openwrt source files between builds. Specifically the problem relates to the openwrt/.config file. .config is altered by oldconfig after being patched, making it less likely that the patch will reverse successfully.

I've tried modifying the patch to account for this and now have it down to 1 failing hunk - but even that is not likely to last as upstream changes filtering through tend to break this further.

I have two possible suggestions that may fix the issue. One is to have the Makefile recipe copy the .config file before it is patched:

cd openwrt && cp .config .config.clean

then patch and build as normal before copying .config.clean back over .config.

A second possibility is perhaps to have the make recipe run oldconfig before applying the patch to .config.

In both cases I think splitting the current combined openwrt.patch into separate patches would help, allowing for a .config specific patch to be used.

I'm planning on trying one or both these approaches if I can find time.