clarkpadgett
Posts: 16
Joined: Sun May 19, 2013 11:19 am

FTP kernel.img to your SD card.

Tue Aug 20, 2013 1:22 pm

After reading a blog where a guy had hacked a Transcend Wi-Fi SD card (http://haxit.blogspot.ch/2013/08/hackin ... cards.html), I ordered one to see what I could do with it. It turns out I can start an FTP server and transfer my kernel.img directly to the SD card. First, I downloaded the latest version of busybox for the processer in the card from http://busybox.net/downloads/binaries/l ... box-armv5l and stored that in the root of the card. Then, I created a script named autorun.sh (also stored in the root) that contained:

Code: Select all

#!/bin/sh
cp /www/sd/busybox-armv5l /sbin/busybox
chmod a+x /sbin/busybox
/sbin/busybox telnetd -l /bin/bash &
/sbin/busybox tcpsvd -vE 0.0.0.0 21 ftpd -w /www/sd &
This starts the FTP server and also a telnet server that I use to explore the Linux system running the Wi-Fi. Just FTP kernel.img to the Wi-Fi address, cycle the power on the Pi, and your new kernel is running. One thing that is not so great is that the Wi-Fi takes around 50 seconds after power up to become available. My plan is to rig up a reset button connected to P6 on the Pi so that the power does not have to be cycled to run the new kernel.

JazzD
Posts: 7
Joined: Fri Aug 09, 2013 10:09 pm

Re: FTP kernel.img to your SD card.

Wed Aug 21, 2013 6:41 pm

wow that is awesome, just what i need.

dhavalx
Posts: 2
Joined: Fri Jan 03, 2014 10:02 am

Re: FTP kernel.img to your SD card.

Fri Jan 03, 2014 10:07 am

It would help me for my product...Thanks..By xtintt.com :idea: http://www.raspberrypi.org/phpBB3/posti ... 340d1a4eb9#

pointfree
Posts: 4
Joined: Tue Jan 01, 2013 5:28 pm
Location: Boston, MA
Contact: Website

Re: FTP kernel.img to your SD card.

Sat Jan 04, 2014 7:21 pm

I have been doing something similar with raspbootin and a reset button on a breadboard. All I have to do is "make" and then press the button to boot up the new kernel over serial. Raspbootin has saved me much time.

mram
Posts: 7
Joined: Sun Nov 24, 2013 6:46 am

Re: FTP kernel.img to your SD card.

Mon Jan 13, 2014 12:31 am

I would like to buy for my sony nex5, it could be nice to use with my Amiga RPI Drive, customizing web server with some useful script... :D :D

sk83
Posts: 3
Joined: Mon Jan 13, 2014 5:33 pm

Re: FTP kernel.img to your SD card.

Mon Jan 13, 2014 5:38 pm

I've set up mine with u-boot and tftp. Every time the rpi boots, it loads kernel.img over ethernet. My makefile copies kernel.img to the tftp root directory(my mac acts as the tftp server). Then I just push the reset button connected to P6 to reboot and reload kernel.img. Works like a charm.

Return to “Bare metal, Assembly language”