Dell Poweredge

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, November 24, 2011

WRT54GL Hacking

Posted on 7:03 AM by Unknown
Driver for SD card downloaded from here
mmc-v1.3.4-gpio2.tgz file

tar xzvf mmc-v1.3.4-gpio2.tgz
cp mmc-v1.3.4-gpio2/mmc-v1.3.4-gpio2/mmc /lib/modules/2.4.37.4
insmod mmc (comment: at this point check with dmesg if every thing is ok)
mkfs.ext3 dev/mmc/disc0/part1



opkg update update the package list
opkg install kmod-fs-ext3 install package ext3 filesystem
insmod ext3 activate the module ext3
lsmod List installed modules
mkdir /mmc create the directory /mmc
echo "0x9c" > /proc/diag/gpiomask Mask the gpio for the SD card and Wifi
insmod mmc Activate the module mmc (sd card driver)
mount /dev/mmc/disc0/part1 /mmc Mount the SD card to /mmc
grep /mnt /proc/mounts List the mounts to check SD card is mounted

Mounting to External Media
Mount root to SD Card

#!/bin/sh
. /etc/functions.sh
mount proc /proc -t
insmod diag
echo 0x9c > /proc/diag/gpiomask
insmod mmc
insmod ext2
mount -o rw /dev/mmc/disc0/disc /mnt
[ -x /mnt/sbin/init ] && {
. /bin/firstboot
pivot /mnt /mnt
}
exec /bin/busybox init


We have to format the thing:
opkg install e2fsprogs kmod-fs-ext2
mkfs.ext2 /dev/mmc/disc0/disc # See above for the correct partition path
mount -t ext2 /dev/mmc/disc0/disc /mnt/


Now we are going to copy over the root stuff
mkdir -p /tmp/root
mount -o bind /rom /tmp/root
cp /tmp/root/* /mnt -a
sync
umount /tmp/root
umount /mnt


Another way of mounting root to SD Card

rm /sbin/init Remove this file

File /sbin/init Create this file script is below

#!/bin/sh
echo "0x9c" > /proc/diag/gpiomask
insmod mmc
insmod ext2
boot_dev="/dev/mmc/disc0/part1"

sleep 15s
mount "$boot_dev" /mmc
[ -x /mmc/sbin/init ] && {
mount -o move /proc /mmc/proc && \
pivot_root /mmc /mmc/mmc && {
mount -o move /mmc/dev /dev
mount -o move /mmc/tmp /tmp
mount -o move /mmc/jffs2 /jffs2 2>&-
mount -o move /mmc/sys /sys 2>&-
}
}
exec /bin/busybox init


chmod a+x /sbin/init Make the file executable

reboot


df -h You should see that /dev/mmc/disc0/part1 is mounted to /

OpenWRT Website

OpenWRT Downloads

openwrt-brcm-2.4-squashfs.trx file This is a 2.4 Kernel



Flashing Firmware (This is a 2.4 Kernel)

Script to clean nvram settings


./nvram-clean.sh
nvram commit




sysupgrade /tmp/openwrt-brcm-2.4-squashfs.trx
or
mtd write /tmp/openwrt-brcm-2.4-squashfs.trx


The commands below allows the use of a tftp server to flash firmware by allowing a delay in the startup to access tftp

nvram set boot_wait=on
nvram set boot_time=10
nvram commit && reboot
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Ubuntu Enterprise Cloud
    Hadoop Cluster I had problems with ssh passwordless logins taking ages on the hadoop Ubuntu cluster I was working on. This was fixed by addi...
  • Programming ATTiny45 using an Arduino Uno
    Wiring of the Programmer The Arduino is programmed using the Arduino IDE and USB with the ArduinoISP sketch from the File Menu located in ex...
  • Raspberry PI Enterprise Wifi
    The dongle I used was the Farnell WiPi this was identified by the PI using the command lsusb as a Bus 001 Device 005: ID 148f:5370 Ralink T...
  • Raspberry PI Kiosk
    Do the usual things after installing an image on the SD card and booting the Pi for the first time run sudo raspi-config then set boot deskt...
  • PXE Boot a Dban image from an Ubuntu Server
     Dhcp Offers from Ubuntu Server to Compute Nodes ****Note**** exercise extreme care with these notes I have made as you can boot and wipe an...
  • Remove CentOS Xen
    Install Standard Kernel yum install kernel Remove Xen Kernel yum remove xen kernel-xen Edit Grub to Select Correct Kernel /boot/grub/grub.co...
  • IPTables Lost After Reboot of Head Node
    IPTables Lost After Reboot of Head Node The iptables were lost every time the machine was rebooted so I found I needed to save the iptabels ...
  • SSH Connection Problems
    Ssh-agent Problem When I attempted to use the command 'ssh-agent' then the command 'ssh-add' to enter my rsa passphrase ...
  • VirtualBox
    Create a VM VBoxManage –help VBoxManage createvm --name "MyvmServer" --register VBoxManage modifyvm "MyvmServer" --memor...
  • Create a Video Using DeVeDe
    DeVeDe is a CD/DVD creator package for Linux. In Ubuntu sudo apt-get install devede , this will install the package. Run the program in Gno...

Categories

  • Cluster Login Problem
  • Hadoop Cluster Passwordless SSH login
  • Open-SSH Installation
  • Software Update Command Line

Blog Archive

  • ►  2013 (6)
    • ►  September (3)
    • ►  April (2)
    • ►  March (1)
  • ►  2012 (16)
    • ►  November (1)
    • ►  October (1)
    • ►  July (2)
    • ►  June (3)
    • ►  May (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ▼  2011 (17)
    • ►  December (1)
    • ▼  November (3)
      • WRT54GL Hacking
      • Failing SG31V2 Shuttle
      • Vboxmanage Command
    • ►  August (4)
    • ►  July (1)
    • ►  June (2)
    • ►  May (2)
    • ►  March (2)
    • ►  February (1)
    • ►  January (1)
  • ►  2010 (18)
    • ►  December (2)
    • ►  September (2)
    • ►  August (2)
    • ►  July (4)
    • ►  June (7)
    • ►  May (1)
Powered by Blogger.

About Me

Unknown
View my complete profile