Giter Site home page Giter Site logo

candyhouse-linux's Introduction

Candyhouse Routers

Candyhouse is the codename for the Cisco board that powers the Cisco/Linksys EA4500, E4200v2, and EA3500 WiFi routers. I have an EA4500 and an E4200v2 that I test these kernels on. If you happen to have an EA3500 and would be open to testing builds, please let me know.

Building USB uImages

$ make usb

Yup, it really is that simple. The included Makefile will fetch the kernel source from kernel.org, extract the source, patch with the included usb.patch, configure using the included linux.config, run the build, and copy the uImage to your pwd.

You can flash the uImage to your router like you would any normal SSA and it will look for a root filesystem on /dev/sda1 -- e.g. a USB stick.

For more info and discussion about making these kernels work in practice, check out:

http://www.wolfteck.com/projects/candyhouse/install/

Building OpenWRT SSAs

$ make openwrt

The included Makefile will clone OpenWRT, patch it as appropriate, and build SSAs for the EA4500 / E4200v2 / EA3500.

You can also limit the build to your desired platform:

$ make openwrt3500
$ make openwrt4500

For more info and disucssion about OpenWRT on Candyhouse routers, please visit:

http://www.wolfteck.com/projects/candyhouse/openwrt/

Returning to the stock firmware for reflashing

Candyhouse routers have two seperate partitions for firmware and a failed boot counter that acts as a safety mechanism. After three failed boots, the bootloader automatically stops trying to boot the failing firmware image and switches to the other partition set -- the "last known good". This build of OpenWRT will reset it to 0 on a successful boot. Since firmware flashing is currently not possible from this OpenWRT build we need to return to the stock firmware to flash new OpenWRT builds.

You can switch firmware by convincing the router it has three bad boots, either by powering off the router 5 seconds after it starts repeatedly - 3 times in succession.

Or switch by disabling the boot counter reset in OpenWRT and doing three normal reboots. You can disable the reset by ssh'ing into the router: ssh [email protected] and removing executable permissions for the reset script 'chmod 644 /etc/init.d/linksys_recovery'.

Building / Installing Modules

No need. All required functions are built into the kernel image. No more mounting your router FS to you build box!

Cleaning Up

$ make clean

This will remove all of the status files, the patchlog, the uImage, the downloaded kernel source and its extracted tree.

candyhouse-linux's People

Contributors

cilynx avatar vxbinaca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

candyhouse-linux's Issues

Make failed, patch needs to be altered I think

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

How to pass the location of rootfs to U-boot via a volume-label

Hi there,

I believe the location of rootfs is being passed to U-boot using the device name (/dev/sda1). Right?
Is it possible to pass this location using a volume-label instead?

Background: with more than one USB device plugged in, the device naming could change, so /dev/sda1 could eventually get assigned to a different (non-rootfs) partition on another plugged device, and the router won't boot... if U-boot is instead told to look for rootfs under a partition with a specific volume-label, then the device naming becomes irrelevant, and the rootfs partition will still be found... e.g. it could be /dev/sdc1, instead of /dev/sda1.

Note: The volume-label of a partition can be easily set by means of tune2fs -L.

Any thoughts?

Thanks!

Fixing the post Make cleanup and the build process

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.

OpenWRT does not reset the failed boot counter

Candyhouse routers have a failed boot counter that acts as a safety mechanism. After three failed boots, the bootloader automatically stops trying to boot the failing firmware image and switches to the other partition set -- the "last known good". OpenWRT is not aware of this couter and as such does not reset it on successful boot. Thus, if you reboot OpenWRT three times, you'll find that you're back to the Cisco stock firmware. The Candhouse OpenWRT images should reset the failed boot counter upon successful boot.

Problem installing kmod-usb* (kernel version issue)

Hey there, I seem to be having an issue with the OpenWRT build from the blog post on my E4200v2. I'm using the alt build (primary wouldn't boot), and installing kmod-usb-storage-extras returns an error stating my kernel version is mismatched.

Full error:

root@OpenWrt:~# opkg install kmod-usb-storage kmod-usb-storage-extras block-mount block-hotplug
Package kmod-usb-storage (3.18.11-1) installed in root is up to date.
Installing kmod-usb-storage-extras (3.18.21-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/kirkwood/generic/packages/base/kmod-usb-storage-extras_3.18.21-1_kirkwood.ipk.
Package block-mount (2015-05-24-09027fc86babc3986027a0e677aca1b6999a9e14) installed in root is up to date.
Unknown package 'block-hotplug'.
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-storage-extras:
 *      kernel (= 3.18.21-1-d7b10142e6fb2e5d85efe471ba282f20) *
 * opkg_install_cmd: Cannot install package kmod-usb-storage-extras.
 * opkg_install_cmd: Cannot install package block-hotplug.

uname -a output:

root@OpenWrt:~# uname -a
Linux OpenWrt 3.18.11 #12 Thu Apr 16 16:51:47 PDT 2015 armv5tel GNU/Linux

I wasn't going to post this as an issue, since I figured I'm just running an outdated build, but the Makefile isn't letting me build from source. I'm rerunning it now (for the third time) from scratch, I'll append the log to this issue once it completes.

Luci constantly asking for auth, generating new token.

Every page change, every time I try to set something it asks for a new login and regens a token. It's hindering my ability to manage the router because it's asking for them after 5 second or so of logging in and navigating to a new page or menu.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.