Simplenet hacking

From Knelcorpwiki

Jump to: navigation, search

Contents

Simplenet

Custom firmware

#orignal bits (stage1)

  11  mv SimpleNet.2.3.22b1.bin SimpleNet.2.3.22b1.tar
  12  tar xf SimpleNet.2.3.22b1.tar 
  13  ls
  14  unsquashfs-lzma filesystem.bin

#modifcation bits

  15  ls
  16  cd squashfs-root/
  17  ls
  18  cd bin/
  19  ls
  20  touch xyz.sh
  21  vi xyz.sh
  22  chmod +x xyz.sh 
  23  ls
  24  cd ..
  25  ls

#Create bits (stage2)

  26  cp filesystem.bin filesystem.orig.bin
  27  ls
  28  rm filesystem.bin.md5sum 
  29  ls
  30  rm filesystem.bin 
  33  mksquashfs-lzma squashfs-root filesystem.bin -all-root -no-fragments -b 1048576 
  34  md5sum filesystem.bin > filesystem.bin.md5sum 
  35  ls
  36  cat filesystem.bin.md5sum 
  37  tar --group root --owner root -cvf test1.bin zImage zImage.md5sum filesystem.bin filesystem.bin.md5sum 
  38  ls test1.bin 
  39  ls
  40  ls -lh filesystem.bin filesystem.orig.bin

Stage 1 automated script

  1. !/bin/bash
  1. A script to create simplenet firmware images

UnsqPath="/usr/local/bin/unsquashfs-lzma"

MksqPath="/usr/local/bin/mksquashfs-lzma"

OriginalFirmwarePath="../working.old/filesystem.bin"

cd ../working.current

$UnsqPath $OriginalFirmwarePath

cd -

echo "Make mods now and then run createSimplenetFirmwareStage2.sh..."