Customizing Router Firmware - linux

i've got a netgear DG834 router, and i want to have a go at hacking the firmware on it to try and add a Wake on Lan option. Netgear let you download the source and the tools to build an image, but i'm not sure where to start.
I've never programmed on a unix platform before, and never done any firmware hacking, just wondering if anyone knows any good resources i can look through
Ta

Check for openwrt or tomato or some other firmware.

Well, hacking would be fine... except that wake-on-lan requires hardware support, which almost certainly does not exist in your device.

Related

Auto-launch a program on USB key insertion

I am looking for a way to store a script on a USB flash drive that will be executed she the device is inserted in a computer.
It should be a script that keep the files on my USB key up to date with their source on the web.
I have identified two main issues :
Security issue
Platform agnostic issue: may be easily solved by a test of the platform
Can anyone give me a hint for my research?
Thanks
That is impossible on the newer versions on windows. But you could try something like a bad usb, it's a usb that you can program to act like a keyboard, try looking it up and see if it is something you can use. If you think it can be used you can create it your self or buy one, if you choose to buy i would recommend either a rubber ducky or a malduino.
Hope it helps ;)

Balanced processor/SOC (?) for small embedded system running linux

So, I know Linux kernel is quite "heavy" when considering lower scale embedded systems, but currently but we're a 2 man team trying to see how to create our own embedded system.
I'm the one in charge of all software (the other guy is a HW guy), and thus I would like to re-use existing libraries and frameworks as much as possible, and I would like to bounce off some ideas with gurus around here.
I am fairly comfortable in Linux, but the booting and initialization process is new to me, and I need to dive in to that soon enough. Any book recommendations are welcome as well!
I haven't designed any embedded systems before.. Only own some ARM dev boards (beagleboard and raspberry pi).
Current I have prototype of the software running on beagleboard already, and now we're thinking how to minimize the cost, and to create something our own..
It's a system connected to the internet, and I need to run a tiny web server with some scripting support. Performance wise I don't think it needs to be too powerful.
I would like to minimize all bootloader etc work, since I'm a one man SW team, and just concentrate on the application itself.
Of course I understand that I need to configure our kernel for this, but this is indeed why I thought selecting some SoC would be good, since they usually have some linux and bootloaders ready..
First I thought that Cirrus EP9301 would be perfect, since it seems to be a good package, and not very expensive.. But it seems that it's already in end-of-life, and also support for this is very bad (people on the cirrus forums constantly complain about it).
Are there some good choices for this kind of project, which would enable us "easily" to get linux kernel up and running, with still maintaining some kind of decent BOM (hopefully 20USD or so) ?
Your hardware guy should already know this, but go with an existing reference design. Take the raspberry pi, the beagleboard/bone, open-rd, or any number of other existing systems and clone the part you need. As a result the linux porting will be a matter of removing what you are not using from the reference design instead of adding new stuff and hoping it works. If you go with flat pack parts you can do the work in your garage, if you go with bgas you need the equipment for that or pay someone to do it. (can you tell yet that I hate bgas?).
Is linux a requirement, if not that opens the door to a lot more devices using freertos or chibios or a number of other solutions. the stm32f4 discovery board for example is $20, uses what can barely be called a microcontroller for all the features it has (cortex-m4). Supposedly possible to run uclinux on a cortex-m, but definitely possible to run any number of rtoses and have an ip stack, etc. stellaris (ti.com) has a number of eval boards, one/some with ethernet already (use as a reference design). You can also take the wiznet approach (or a spi ethernet) and use any microcontroller (puts you into the avr/msp430 level and price range). Bang for buck the cortex-m's are good, arm based so comfortable to work with, etc.
Using linux if you are already not an experienced at porting to an embedded platform, and dont want to learn that on this go around, I would definitely go with a clone of an existing design, leverage as much as you can from a project with folks that are experienced at porting linux to a platform. If need be take an existing board (beagle/raspi/openrd) and go through the motions of porting to the platform with the cheat sheet of having access to an existing port, see if you cant get uboot ported and linux booting, etc. (dont really need uboot at all, that is possibly an unnecessary complication, just get dram up and pass the atags, etc to linux and just branch to it, pretty easy to launch linux from bare metal).
You could probably do worse than taking the Broadcom BCM2835 - used on the Raspberry Pi - as your starting point - especially if you want to avoid kernel and boot-loader work and a source of reference schematics. If this proves too expensive, check out other devices in the Broadcom range.
A few bits of advice
You probably want some flash rather than a MMC card interface for production use. eMMC is an option. NAND flash is a nightmare due to rapid component obsolescence and the need to get own and dirty with the MTD drivers.
USB Ethernet will be easier to integrate than a controller hanging off a general purpose bus, but won't perform as well. SmSC seems to be popular source for either
You could also have a look at the work that Olimex is doing with their linux boards. Perhaps even order a som and then combine it with other external components.

Getting started with this ARM7 board

This bad boy arrived in the post recently. But, didn't have any instructions, CD-ROM or Dev Kit stuff.
Despite lack of instructions, I'm pretty sure we should be able to get it going with DS-5, a JTAG cable and embedded linux. The goal is to get a small web server/site running on it.
It's an UB4020EVB board with SEP 4020 ARM7 chip. Has JTAG, USB and ethernet connections.
Does anyone know a) What hardware kit I need to get it up and running with an OS, and b) if there's any particular JTAG cable we need.
Any help appreciated.
Thanks!
T
Good luck; all the data I can find on this is in Chinese. Apart from that ARM7 is not a good platform for Linux since it lacks an MMU. uCLinux will run without an MMU, but rather misses much of the benefit of using Linux in the first instance.

Embedded Linux and device driver development

I plan to learn embedded linux and writing linux device drivers.
I need a dev board where I can,
Build and boot it with a linux distribution.
Write drivers for peripherals in the board.
(In future) Possible port Android to it
Can you suggest a dev kit to help me with this? Cost is not a bar - I am already familiar with linux at user space, I am willingly to spend to get better at the other side.
Thanks
James
How about a BeagleBoard (TI OMAP)? The Beagleboard has an active community and a lot of example projects, including an Android porting project. They're a few versions of Android behind the present day, but that should provide a starting point.
There is a new 25$ and 35$ option called Raspberry PI.
check this http://elinux.org/Android_on_OMAP
Google's Android on TI's ARM based OMAP SoCs / 2.6.23 Linux kernel
I think Armadeus project is for you. It is an open source project, that started in France and that is now expanding. The community is great and the number of peripherals is growing fast. Of course it is based on Linux.
A small company is building the boards. They are based on ARM9 and now ARM11. In the boards you also have a Xilinx FPGA, that open the doors for exciting experiments.
Hope this helps.
JCLL
Some cheap mini2440 linux board sounds like a good start. It can also run Android.
maybe you can have a Virtual Development Board, that is interesting.
Check also the OK6410 at http://www.arm9board.net, it is provided with Linux - 2.6.28 (2.6.36 in a quit near future) with all peripheral drivers and a basic Android system. You'll find it interesting and quit useful.

Best/Easy way to set up a quick booting Linux

Hopefully this still falls within StackOverflow's umbrella!
I'm looking to create a quick boot linux laptop for my wife. All it really needs is to be able to do is browse the internet (with flash and video etc.).
Are there any distros that are made for this, or any guides out there that show good ways to speed stuff up? I've read that I should "remove stuff from the kernel that I don't use" but that's a little out of my skill set.
Thanks!
If you're using Ubuntu (or a variant, like xubuntu or kubuntu), there is a package called BootUp-Manager. There's an article about it over at Lifehacker. It lets you check and uncheck things in the startup and shutdown scripts to optimize things (such as turning off checking for new hardware, or whatever)
You may also be able to gain a simple speed-up by going into System->Administration->Services and disabling any services you don't need.
If you'd like to see how much time is being spent on each part, install the package Bootchart, and that should give you a detailed profile of everything that goes on during startup, and let you focus on the most time-consuming parts, and measure your progress as you tune the system.
I believe Xubuntu is designed for low memory footprint/fast booting and whatnot while still having a decent amount of features. Not a Linux user but it just seems to stick out in my head.
Some guys got an EEE PC netbook booting in 5 seconds running a modified version of Fedora. Might be a good starting point: http://lwn.net/Articles/299483/
Try: Damn Small Linux is a very versatile 50MB mini desktop oriented Linux distribution.
Alternatively, get an Asus motherboard with expressgate - it has an onboard Linux (spashtop) that boots in 3 seconds. Its designed for quick web surfing, IM, music etc whilst still letting you boot into your main OS.
If you really want it to boot fast, I would suggest creating an initrd containing exactly the software you need to do what you want it to do. The initrd will get read from the disk once as one large file, and then everything will run out of ram.
This is not an easy solution, the easiest solution will be jishi's solution of using a Live CD, but, that won't be the fastest solution.
I have been using Kubuntu 14.04.4/5 on a Dell laptop with dual boot. Am not real happy at the moment with it. You are all correct about the slowness of a liveCD.
There are LiveCD-versions of working linux-distros with browser and installed flash, java.
Check out LiveCD
http://en.wikipedia.org/wiki/Live_CD
you will find links to different flavours with download.
There are also USB-drive-versions.

Resources