cilynx / Candyhouse-Linux

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

Make failed, patch needs to be altered I think #6

Open vxbinaca opened 9 years ago

vxbinaca commented 9 years ago

cd openwrt && patch -p1 < ../patches/openwrt.patch patching file target/linux/kirkwood/image/Makefile patching file .config Hunk #3 FAILED at 40. Hunk #4 succeeded at 210 (offset 7 lines). Hunk #5 succeeded at 226 (offset 7 lines). Hunk #6 succeeded at 256 (offset 7 lines). Hunk #7 succeeded at 295 (offset 7 lines). Hunk #8 succeeded at 303 (offset 7 lines). Hunk #9 succeeded at 320 (offset 7 lines). Hunk #10 succeeded at 376 (offset 9 lines). Hunk #11 FAILED at 387. Hunk #12 succeeded at 417 (offset 7 lines). Hunk #13 succeeded at 1353 (offset 7 lines). Hunk #14 succeeded at 1363 with fuzz 1 (offset 6 lines). Hunk #15 succeeded at 1375 (offset 6 lines). Hunk #16 succeeded at 1412 (offset 6 lines). Hunk #17 succeeded at 1435 (offset 6 lines). Hunk #18 succeeded at 1475 (offset 7 lines). Hunk #19 succeeded at 1533 (offset 7 lines). Hunk #20 succeeded at 1555 (offset 7 lines). Hunk #21 succeeded at 1564 (offset 7 lines). Hunk #22 succeeded at 1703 with fuzz 1 (offset 8 lines). Hunk #23 succeeded at 1785 (offset 7 lines). Hunk #24 FAILED at 1789. Hunk #25 succeeded at 1802 (offset 4 lines). Hunk #26 succeeded at 1830 (offset 4 lines). Hunk #27 succeeded at 1847 (offset 4 lines). Hunk #28 succeeded at 1890 (offset 8 lines). Hunk #29 succeeded at 1919 (offset 8 lines). Hunk #30 FAILED at 1949. Hunk #31 FAILED at 1976. Hunk #32 succeeded at 2049 (offset 14 lines). Hunk #33 succeeded at 2339 (offset 14 lines). Hunk #34 succeeded at 2385 (offset 14 lines). Hunk #35 succeeded at 2459 (offset 14 lines). Hunk #36 succeeded at 2494 (offset 14 lines). Hunk #37 succeeded at 2519 (offset 14 lines). Hunk #38 succeeded at 2538 (offset 14 lines). Hunk #39 succeeded at 2563 (offset 14 lines). Hunk #40 succeeded at 2586 with fuzz 1 (offset 19 lines). Hunk #41 succeeded at 2602 (offset 19 lines). Hunk #42 succeeded at 2612 (offset 19 lines). Hunk #43 FAILED at 2607. Hunk #44 succeeded at 2664 (offset 17 lines). Hunk #45 succeeded at 2687 (offset 17 lines). 6 out of 45 hunks FAILED -- saving rejects to file .config.rej Makefile:82: recipe for target 'openwrt-kirkwood-ea4500-pri.ssa' failed make: *\ [openwrt-kirkwood-ea4500-pri.ssa] Error 1

cilynx commented 9 years ago

Yup, this is getting to be SOP. Unfortunately, I'm very limited on cycles these days. This one is "easy", but tedious, to fix. The fix is to go through the upstream .config to identify the changes, then adjust the patch you're seeing fail here so that it no longer fails. Sadly, I don't have any automated patch creation -- I'm literally auditing by hand and making the changes in vi.

vxbinaca commented 9 years ago

Is it an issue of donations? I get paid Thursday. Couldn't you just fix the patch and commit it up to OpenWRT and get official support?

cilynx commented 9 years ago

Not an issue of donations at all -- this is a labor of love for me. I just have a lot of real life commitments and I'm hoping that some other folks will join in the development efforts here so I'm not a single point of failure. With respect to submitting my work here upstream, I've tried and OpenWRT has officially told me that they're not interested. Here is the very end of my thread with them:

The only issue left was getting the image onto the device without a serial port.

I see... I am not interested in that option though since it will complicate maintenance on OpenWrt side. You can maintain the patch out of tree if you are that interested in this specific feature.

From their perspective, anything that requires patching the kernel is not worth maintaining in the tree. It saddens me that the ability of normal humans who don't want to solder ports onto their routers to use the firmware is considered a "feature" and not an absolute baseline requirement.

vxbinaca commented 9 years ago

They wouldn't even do it as a compilation flag that you do specifically for Candyhouse routers? Lame.

If it's a matter of hardware, I'd be willing to donate Akira (my future testing EA4500) to either you or OpenWRT so they could RE where that reboot check is. What do you think?

cilynx commented 9 years ago

It would probably be worth your time to ping the OpenWRT folks. If they see some more demand for support for Candyhouse routers, they might be more inclined to work with us. As for me, I have a E4200v2 and a EA4500 sitting on my desk that I use for all my testing.

Straight up, the quickest way to contribute right now will be to figure out what OpenWRT recently changed in their .config and update the Candyhouse patch. I've got 12 hour work days today and tomorrow, but I might get a chance to look at this later in the week.

vxbinaca commented 9 years ago

Whats the thread you mentioned I can't find it. Just get me a link when you have time please don't eat into your work time.

I also found this, some Polish guys apperantly had some success (picked up on the boot flag thing it appears) http://eko.one.pl/?p=openwrt-ea4500

adrinux commented 9 years ago

@cilynx I started working on updating the openwrt.patch (initial aim is to have it sucessfully patch the chaos calmer release branch). But I'm wondering how you generated openwrt.patch - particularly with .config being on OpenWRT's .gitignore!?

I can faff about and generate separate patches for Makefile and .config, but not sure how to produce a combined one (hand edit?). Any advice for speeding this process up would be welcome.

I should say that so far I've hand applied the failed hunks, so I have an openwrt git clone with all the changes openwrt.patch should have made. Was expecting to just git diff until I noticed .config was gitignored.

adrinux commented 9 years ago

Ok, I realised .config.orig was sitting there and was able to git diff on that, then hand merged the two patches so my updated openwrt.patch looked much like yours...

Just added this pull request https://github.com/cilynx/Candyhouse-Linux/pull/8 with my work so far, its tweaked to the openwrt chaos calmer release branch since that seems most sensible at this point.

I've tried a build of the firmware I need "make openwrt-kirkwood-ea4500-pri.ssa". The make proceeds successfully until it tries to reverse apply the openwrt.patch, at which point it fails - exactly what is that patch -R supposed to achieve, clean up the openwrt clone? Unfortunately this means the make fails before the final copy and rename of the ssa, so I've just manually run that command:

cp openwrt/bin/kirkwood/openwrt-kirkwood-ea4500.ssa openwrt-kirkwood-ea4500-pri.ssa

Hard to fix this properly when I'm not sure what you were trying to achieve by the second reversed apply of the patch...

vxbinaca commented 9 years ago
Signing key has not been configured
make[3]: Leaving directory '/home/vxbinaca/git/Candyhouse-Linux/openwrt'
make[2]: Leaving directory '/home/vxbinaca/git/Candyhouse-Linux/openwrt'
make[1]: Leaving directory '/home/vxbinaca/git/Candyhouse-Linux/openwrt'
cd openwrt && patch -p1 -R < ../patches/openwrt-pri.patch
patching file target/linux/kirkwood/config-3.18
cd openwrt && patch -p1 -R < ../patches/openwrt-4500.patch
patching file .config
patching file target/linux/kirkwood/image/Makefile
patching file target/linux/kirkwood/patches-3.18/160-ea4500.patch
cd openwrt && patch -p1 -R < ../patches/openwrt.patch
patching file package/system/mtd/src/Makefile
patching file target/linux/kirkwood/image/Makefile
patching file .config
Hunk #31 FAILED at 1962.
Hunk #32 FAILED at 2076.
Hunk #33 succeeded at 2363 (offset -3 lines).
Hunk #34 succeeded at 2393 (offset -3 lines).
Hunk #35 succeeded at 2462 (offset -3 lines).
Hunk #36 succeeded at 2483 (offset -3 lines).
Hunk #37 FAILED at 2510.
Hunk #38 succeeded at 2525 (offset -4 lines).
Hunk #39 succeeded at 2549 (offset -4 lines).
Hunk #40 succeeded at 2560 with fuzz 1 (offset -9 lines).
Hunk #41 succeeded at 2569 (offset -9 lines).
Hunk #42 succeeded at 2577 (offset -9 lines).
Hunk #43 succeeded at 2585 (offset -9 lines).
Hunk #44 succeeded at 2625 (offset -9 lines).
Hunk #45 succeeded at 2640 (offset -9 lines).
3 out of 45 hunks FAILED -- saving rejects to file .config.rej
patching file target/linux/kirkwood/base-files/etc/init.d/linksys_recovery
Makefile:84: recipe for target 'openwrt-kirkwood-ea4500-pri.ssa' failed
make: *** [openwrt-kirkwood-ea4500-pri.ssa] Error 1