Showing posts with label jcnip. Show all posts
Showing posts with label jcnip. Show all posts

Tuesday, February 22, 2011

Jcnip M218B #10

$ strings E-Rootfs/drivers/battery_15.ko | grep -E "vermagic"
vermagic=2.6.16.14 ARMv4 gcc-3.4

$ sudo chmod a+r E-Rootfs/drivers/current_controller.ko

$ find E-Rootfs/drivers/ -exec strings -f {} \; | grep -E "license|author|description"
E-Rootfs/drivers/battery_old_15.ko: license=GPL
E-Rootfs/drivers/battery_old_15.ko: description=Battery Level Detecter
E-Rootfs/drivers/battery_old_15.ko: author=Sam Ng <sng@cwlinux.com>
E-Rootfs/drivers/imx-keypad_15.ko: license=GPL
E-Rootfs/drivers/imx-keypad_15.ko: description=i.MX Keypad Input driver
E-Rootfs/drivers/imx-keypad_15.ko: author=Andrew Ip <aip@cwlinux.com>
E-Rootfs/drivers/charging_15.ko: license=GPL
E-Rootfs/drivers/charging_15.ko: description=Charging
E-Rootfs/drivers/charging_15.ko: author=Gideon <gideon.tsang@cwlinux.com>
E-Rootfs/drivers/fbcon_rotate.ko: license=GPL
E-Rootfs/drivers/fbcon_rotate.ko: description=Console Rotation Support
E-Rootfs/drivers/fbcon_rotate.ko: author=Antonino Daplas <adaplas@pol.net>
E-Rootfs/drivers/battery_15.ko: license=GPL
E-Rootfs/drivers/battery_15.ko: description=Battery Level Detecter
E-Rootfs/drivers/battery_15.ko: author=Sam Ng <sng@cwlinux.com>
E-Rootfs/drivers/fbcon_ud.ko: license=GPL
E-Rootfs/drivers/fbcon_ud.ko: description=Console Rotation (180 degrees) Support
E-Rootfs/drivers/fbcon_ud.ko: author=Antonino Daplas <adaplas@pol.net>
E-Rootfs/drivers/power_switch.ko: license=GPL
E-Rootfs/drivers/power_switch.ko: description=Power Switch Detecter
E-Rootfs/drivers/power_switch.ko: author=Sam Ng <sng@cwlinux.com>
E-Rootfs/drivers/imx-keypad-noled.ko: license=GPL
E-Rootfs/drivers/imx-keypad-noled.ko: description=i.MX Keypad Input driver
E-Rootfs/drivers/imx-keypad-noled.ko: author=Andrew Ip <aip@cwlinux.com>
E-Rootfs/drivers/fbcon_cw.ko: license=GPL
E-Rootfs/drivers/fbcon_cw.ko: description=Console Rotation (90 degrees) Support
E-Rootfs/drivers/fbcon_cw.ko: author=Antonino Daplas <adaplas@pol.net>
E-Rootfs/drivers/imx-keypad.ko: license=GPL
E-Rootfs/drivers/imx-keypad.ko: description=i.MX Keypad Input driver
E-Rootfs/drivers/imx-keypad.ko: author=Andrew Ip <aip@cwlinux.com>
E-Rootfs/drivers/charging.ko: license=GPL
E-Rootfs/drivers/charging.ko: description=Charging
E-Rootfs/drivers/charging.ko: author=Gideon <gideon.tsang@cwlinux.com>
E-Rootfs/drivers/g_file_storage.ko: license=Dual BSD/GPL
E-Rootfs/drivers/g_file_storage.ko: author=Alan Stern
E-Rootfs/drivers/g_file_storage.ko: description=File-backed Storage Gadget
E-Rootfs/drivers/battery_jl01.ko: license=GPL
E-Rootfs/drivers/battery_jl01.ko: description=Battery Level Detecter
E-Rootfs/drivers/battery_jl01.ko: author=Sam Ng <sng@cwlinux.com>
E-Rootfs/drivers/lcd_config.ko: license=GPL
E-Rootfs/drivers/lcd_config.ko: description=NT39171 TMD LCD Driver
E-Rootfs/drivers/lcd_config.ko: author=Sam Ng <sng@cwlinux.com>
E-Rootfs/drivers/current_controller.ko: license=GPL
E-Rootfs/drivers/current_controller.ko: description=i.MX Current controller driver
E-Rootfs/drivers/current_controller.ko: author=ZXYang <zxyang_jzhu@163.com
E-Rootfs/drivers/imxfb.ko: license=GPL
E-Rootfs/drivers/imxfb.ko: author=Sascha Hauer, Pengutronix
E-Rootfs/drivers/imxfb.ko: description=Motorola i.MX framebuffer driver
E-Rootfs/drivers/font.ko: license=GPL
E-Rootfs/drivers/font.ko: description=Console Fonts
E-Rootfs/drivers/font.ko: author=James Simmons <jsimmons@users.sf.net>
E-Rootfs/drivers/charging_old.ko: license=GPL
E-Rootfs/drivers/charging_old.ko: description=Charging
E-Rootfs/drivers/charging_old.ko: author=Gideon <gideon.tsang@cwlinux.com>
E-Rootfs/drivers/softcursor.ko: license=GPL
E-Rootfs/drivers/softcursor.ko: description=Generic software cursor
E-Rootfs/drivers/softcursor.ko: author=James Simmons <jsimmons@users.sf.net>
E-Rootfs/drivers/imx-keypad_15_delay_more.ko: license=GPL
E-Rootfs/drivers/imx-keypad_15_delay_more.ko: description=i.MX Keypad Input driver
E-Rootfs/drivers/imx-keypad_15_delay_more.ko: author=Andrew Ip <aip@cwlinux.com>
E-Rootfs/drivers/battery_old_jl01.ko: license=GPL
E-Rootfs/drivers/battery_old_jl01.ko: description=Battery Level Detecter
E-Rootfs/drivers/battery_old_jl01.ko: author=Sam Ng <sng@cwlinux.com>
E-Rootfs/drivers/cfbfillrect.ko: license=GPL
E-Rootfs/drivers/cfbfillrect.ko: description=Generic software accelerated fill rectangle
E-Rootfs/drivers/cfbfillrect.ko: author=James Simmons <jsimmons@users.sf.net>
E-Rootfs/drivers/freq_scaling.ko: license=GPL
E-Rootfs/drivers/freq_scaling.ko: description=Frequency Scaling Module
E-Rootfs/drivers/freq_scaling.ko: author=Gideon Tsang<gideon.tsang@cwlinux.com>
E-Rootfs/drivers/cfbcopyarea.ko: license=GPL
E-Rootfs/drivers/cfbcopyarea.ko: description=Generic software accelerated copyarea
E-Rootfs/drivers/cfbcopyarea.ko: author=James Simmons <jsimmons@users.sf.net>
E-Rootfs/drivers/imx_keypad.ko: license=GPL
E-Rootfs/drivers/imx_keypad.ko: description=iMX Keypad Driver
E-Rootfs/drivers/imx_keypad.ko: author=Inky Lung <ilung@cwlinux.com>
E-Rootfs/drivers/fbcon.ko: license=GPL
E-Rootfs/drivers/imx_keypad_orig.ko: license=GPL
E-Rootfs/drivers/imx_keypad_orig.ko: description=iMX Keypad Driver
E-Rootfs/drivers/imx_keypad_orig.ko: author=Inky Lung <ilung@cwlinux.com>
E-Rootfs/drivers/fbcon_ccw.ko: license=GPL
E-Rootfs/drivers/fbcon_ccw.ko: description=Console Rotation (270 degrees) Support
E-Rootfs/drivers/fbcon_ccw.ko: author=Antonino Daplas <adaplas@pol.net>
E-Rootfs/drivers/battery_old.ko: license=GPL
E-Rootfs/drivers/battery_old.ko: description=Battery Level Detecter
E-Rootfs/drivers/battery_old.ko: author=Sam Ng <sng@cwlinux.com>
E-Rootfs/drivers/cfbimgblt.ko: license=GPL
E-Rootfs/drivers/cfbimgblt.ko: description=Generic software accelerated imaging drawing
E-Rootfs/drivers/cfbimgblt.ko: author=James Simmons <jsimmons@users.sf.net>
E-Rootfs/drivers/imx-keypad_15_10times.ko: license=GPL
E-Rootfs/drivers/imx-keypad_15_10times.ko: description=i.MX Keypad Input driver
E-Rootfs/drivers/imx-keypad_15_10times.ko: author=Andrew Ip <aip@cwlinux.com>
E-Rootfs/drivers/bitblit.ko: license=GPL
E-Rootfs/drivers/bitblit.ko: description=Bit Blitting Operation
E-Rootfs/drivers/bitblit.ko: author=Antonino Daplas <adaplas@pol.net>
E-Rootfs/drivers/rtc.ko: license=GPL
E-Rootfs/drivers/rtc.ko: description=Real Time Clock Driver
E-Rootfs/drivers/rtc.ko: author=Sam Ng <sng@cwlinux.com>
E-Rootfs/drivers/fb.ko: license=GPL
E-Rootfs/drivers/fb.ko: description=Framebuffer base
E-Rootfs/drivers/fb.ko: license=GPL
E-Rootfs/drivers/battery.ko: license=GPL
E-Rootfs/drivers/battery.ko: description=Battery Level Detecter
E-Rootfs/drivers/battery.ko: author=Sam Ng <sng@cwlinux.com>

Jcnip M218B #9

$ find E-Rootfs/lib/ -maxdepth 1 -not -type l -not -type d
E-Rootfs/lib/libcrypt-0.9.28.so
E-Rootfs/lib/libstdc++.so.6.0.3
E-Rootfs/lib/libz.so.1.1.4
E-Rootfs/lib/libutil-0.9.28.so
E-Rootfs/lib/librt-0.9.28.so
E-Rootfs/lib/libfloat.so.1
E-Rootfs/lib/ld-uClibc-0.9.28.so
E-Rootfs/lib/libgcc_s.so.1
E-Rootfs/lib/libdl-0.9.28.so
E-Rootfs/lib/libthread_db-0.9.28.so
E-Rootfs/lib/libresolv-0.9.28.so
E-Rootfs/lib/libpthread-0.9.28.so
E-Rootfs/lib/libuClibc-0.9.28.so
E-Rootfs/lib/libm-0.9.28.so
E-Rootfs/lib/libnsl-0.9.28.so

$ find E-Rootfs/usr/lib/ -maxdepth 1 -not -type l -not -type d
E-Rootfs/usr/lib/libintl.so.2.2.0
E-Rootfs/usr/lib/libEP2SBBG.so.2.1.12
E-Rootfs/usr/lib/libpangoft2-1.0.so.0.1003.1
E-Rootfs/usr/lib/libpangox-1.0.so.0.1003.1
E-Rootfs/usr/lib/libmad.la
E-Rootfs/usr/lib/libpng.so.3.1.2.8
E-Rootfs/usr/lib/libfreetype.so.6.3.8
E-Rootfs/usr/lib/libgettextlib-0.11.5.so
E-Rootfs/usr/lib/libcrypto.so.0.9.8
E-Rootfs/usr/lib/libiconv_plug.so
E-Rootfs/usr/lib/libgmodule-2.0.so.0.800.5
E-Rootfs/usr/lib/libstlport.so.5.0.2
E-Rootfs/usr/lib/libglib-2.0.so.0.800.5
E-Rootfs/usr/lib/libjpeg.so.62.0.0
E-Rootfs/usr/lib/libstlport.so.5.0
E-Rootfs/usr/lib/libpango-1.0.so.0.1003.1
E-Rootfs/usr/lib/libncurses.so.5.2
E-Rootfs/usr/lib/libmad.so.0.2.0
E-Rootfs/usr/lib/libstlport.so.5
E-Rootfs/usr/lib/libpangoxft-1.0.so.0.1003.1
E-Rootfs/usr/lib/libpangocairo-1.0.so.0.1003.1
E-Rootfs/usr/lib/libcairo.so.2.9.2
E-Rootfs/usr/lib/libgobject-2.0.so.0.800.5
E-Rootfs/usr/lib/libungif.so.4.1.4
E-Rootfs/usr/lib/libgthread-2.0.so.0.800.5
E-Rootfs/usr/lib/libgtk-x11-2.0.so.0.800.16
E-Rootfs/usr/lib/libgdk-x11-2.0.so.0.800.16
E-Rootfs/usr/lib/libpoppler-glib.so.1.0.0
E-Rootfs/usr/lib/libstlport.so
E-Rootfs/usr/lib/libtiff.so.3.8.1
E-Rootfs/usr/lib/libiconv.so
E-Rootfs/usr/lib/libgettextlib-0.11.5.soT
E-Rootfs/usr/lib/libcharset.so
E-Rootfs/usr/lib/libssl.so.0.9.8
E-Rootfs/usr/lib/libgdk_pixbuf-2.0.so.0.800.16
E-Rootfs/usr/lib/libpng12.so.0.1.2.8
E-Rootfs/usr/lib/libatk-1.0.so.0.1010.3

Jcnip M218B #8

$ find E-Rootfs/sbin/ -not -type l -not -type d
E-Rootfs/sbin/nandwrite
E-Rootfs/sbin/mkdosfs
E-Rootfs/sbin/flash_eraseall
E-Rootfs/sbin/ldconfig
E-Rootfs/sbin/submountd

$ find E-Rootfs/usr/sbin/ -not -type l -not -type d
E-Rootfs/usr/sbin/chat
E-Rootfs/usr/sbin/pppd
E-Rootfs/usr/sbin/pppdump
E-Rootfs/usr/sbin/pppstats

Jcnip M218B #7

$ find E-Rootfs/usr/bin/ -not -type l -not -type d
E-Rootfs/usr/bin/ncftpput
E-Rootfs/usr/bin/play
E-Rootfs/usr/bin/tcpdump
E-Rootfs/usr/bin/ncftp
E-Rootfs/usr/bin/lynx
E-Rootfs/usr/bin/netperf
E-Rootfs/usr/bin/slideshow
E-Rootfs/usr/bin/sox
E-Rootfs/usr/bin/fbv
E-Rootfs/usr/bin/ldd
E-Rootfs/usr/bin/stl_unit_test
E-Rootfs/usr/bin/ncftpls
E-Rootfs/usr/bin/netserver
E-Rootfs/usr/bin/sz
E-Rootfs/usr/bin/serv0
E-Rootfs/usr/bin/cli0
E-Rootfs/usr/bin/ttcp
E-Rootfs/usr/bin/ncftpget
E-Rootfs/usr/bin/rz
E-Rootfs/usr/bin/gifview
E-Rootfs/usr/bin/gengif
E-Rootfs/usr/bin/gifsicle
E-Rootfs/usr/bin/display
E-Rootfs/usr/bin/client
E-Rootfs/usr/bin/animate
E-Rootfs/usr/bin/convert
E-Rootfs/usr/bin/server

$ strings E-Rootfs/usr/bin/ncftpput | grep -E "NcFTP [0-9]\.[0-9]\.[0-9]"
@(#) NcFTP 3.2.0/294 Aug 05 2006, 04:52 PM
LibNcFTP 3.2.0
@(#) LibNcFTP 3.2.0 (August 5, 2006)

NcFTP 3.2.0
ftp://ftp.ncftp.com/ncftp/older_versions/ncftp-3.2.0-src.tar.bz2

$ strings E-Rootfs/usr/bin/tcpdump | grep -E "^[0-9]\.[0-9]\.[0-9]"
3.9.5

tcpdump 3.9.5
http://www.tcpdump.org/release/tcpdump-3.9.5.tar.gz

$ strings E-Rootfs/usr/bin/gifsicle | grep -E "^[0-9]\.[0-9]{2}"
1.44

gifsicle 1.44
http://www.lcdf.org/gifsicle/gifsicle-1.44.tar.gz

Jcnip M218B #6

$ find E-Rootfs/bin/ -not -type l -not -type d
E-Rootfs/bin/busybox
E-Rootfs/bin/boa
E-Rootfs/bin/blink
E-Rootfs/bin/serial_write
E-Rootfs/bin/loop_sox
E-Rootfs/bin/rtcsync
E-Rootfs/bin/sox
E-Rootfs/bin/read_serial_number
E-Rootfs/bin/burn_in
E-Rootfs/bin/cpu_freq
E-Rootfs/bin/nor_check_md5
E-Rootfs/bin/xwarppointer
E-Rootfs/bin/memtester
E-Rootfs/bin/mpg123
E-Rootfs/bin/InitLcdFlicker
E-Rootfs/bin/mpg123-static
E-Rootfs/bin/sz
E-Rootfs/bin/inotifywait
E-Rootfs/bin/dosfsck
E-Rootfs/bin/nanddump
E-Rootfs/bin/charging_mode
E-Rootfs/bin/led_blink
E-Rootfs/bin/rw_lcd_conf
E-Rootfs/bin/nor_write_md5
E-Rootfs/bin/tinylogin
E-Rootfs/bin/init_lcd
E-Rootfs/bin/peripheral_self_test
E-Rootfs/bin/rz
E-Rootfs/bin/sdtestprogram
E-Rootfs/bin/detect_checksum
E-Rootfs/bin/testperf
E-Rootfs/bin/write_serial_number
E-Rootfs/bin/write_mtd2
E-Rootfs/bin/detect_jl01

$ strings E-Rootfs/bin/busybox | grep -E "BusyBox v[0-9]\.[0-9]{1,2}(\.[0-9])?"
BusyBox v1.00 (2007.04.11-03:27+0000) Built-in shell (ash)
klogd started: BusyBox v1.00 (2007.04.11-03:27+0000)
syslogd started: BusyBox v1.00 (2007.04.11-03:27+0000)
BusyBox v1.00 (2007.04.11-03:27+0000) multi-call binary

BusyBox 1.00
http://www.busybox.net/downloads/busybox-1.00.tar.bz2

$ strings E-Rootfs/bin/boa | grep -E "Boa/"
Boa/0.94.14rc21
Server: Boa/0.94.14rc21

Boa 0.94.14rc21
http://www.boa.org/boa-0.94.14rc21.tar.gz

$ strings E-Rootfs/bin/mpg123 | grep -E "[0-9]\.[0-9]{2}"
0.59r-gpl

mpg123 0.59r
http://www.mpg123.de/mpg123/mpg123-0.59r.tar.gz

$ strings E-Rootfs/bin/sz | grep -E "[0-9]\.[0-9]{2}\.[0-9]{2}"
0.12.20

lrzsz 0.12.20
http://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz

$ strings E-Rootfs/bin/dosfsck | grep -E "dosfsck [0-9]\.[0-9]{2}"
dosfsck 2.11 (12 Mar 2005)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN

dosfsck 2.11

Jcnip M218B #5

$ strings M218B-v0.56/data/busybox | grep -E "BusyBox v[0-9]\.[0-9]{1,2}(\.[0-9])?"
BusyBox v1.00 (2006.11.27-03:42+0000) Built-in shell (ash)
BusyBox v1.00 (2006.11.27-03:42+0000) multi-call binary

BusyBox 1.00

$ mkdir E-Rootfs

$ sudo tar -xzf M218B-v0.56/data/E-Rootfs.tar.gz -C E-Rootfs

Jcnip M218B #4

$ sudo aptitude install aespipe

$ aespipe -p3 -d 3< squashfs-root/etc/.passwd < firmware/M218B-v0.56.bin > M218B-v0.56.tar

$ file M218B-v0.56.tar
M218B-v0.56.tar: POSIX tar archive (GNU)

$ mkdir M218B-v0.56

$ tar -C M218B-v0.56 -x -f M218B-v0.56.tar

$ find M218B-v0.56
M218B-v0.56
M218B-v0.56/md5sum
M218B-v0.56/md5sum/md5sum
M218B-v0.56/bin
M218B-v0.56/bin/run.sh
M218B-v0.56/data
M218B-v0.56/data/busybox
M218B-v0.56/data/ungen-eroot.sh
M218B-v0.56/data/fail.bin.gz
M218B-v0.56/data/mtd1
M218B-v0.56/data/md5sum_64
M218B-v0.56/data/md5sum_32
M218B-v0.56/data/fail_m218a.bin.gz
M218B-v0.56/data/success.bin.gz
M218B-v0.56/data/4.bin.gz
M218B-v0.56/data/3.bin.gz
M218B-v0.56/data/nanddump
M218B-v0.56/data/JL01
M218B-v0.56/data/2.bin.gz
M218B-v0.56/data/checksum
M218B-v0.56/data/fail_sd.bin.gz
M218B-v0.56/data/bootup.bin
M218B-v0.56/data/bootupsum_list
M218B-v0.56/data/1.bin.gz
M218B-v0.56/data/mtd032
M218B-v0.56/data/E-Rootfs.tar.gz
M218B-v0.56/data/mtd2
M218B-v0.56/data/mtd064
M218B-v0.56/data/gen-eroot.sh
M218B-v0.56/data/E-Kernel

Jcnip M218B #3

$ cat squashfs-root/etc/release-ebook
Patch-15

$ grep aespipe squashfs-root/sbin/flash.sh
cd $TMP_SD && aespipe -p3 -d 3< $PASSWD < `ls $SRC_PATH` | tar x -
#cd $TMP && aespipe -p3 -d 3< $PASSWD < `ls $SRC_PATH/$SRC_FILE-*.bin` | tar x -

$ strings squashfs-root/bin/busybox | grep -E "BusyBox v[0-9]\.[0-9]{1,2}(\.[0-9])?"
BusyBox v1.00 (2006.11.27-03:42+0000) Built-in shell (ash)
BusyBox v1.00 (2006.11.27-03:42+0000) multi-call binary

BusyBox 1.00
http://www.busybox.net/downloads/busybox-1.00.tar.bz2

$ strings squashfs-root/sbin/aespipe | grep "version 2.2a"
version 2.2a Copyright (c) 2002,2003 Jari Ruusu, (c) 2001 Dr Brian Gladman

aespipe 2.2a
http://loop-aes.sourceforge.net/aespipe.README

Jcnip M218B #2

$ file reflash_nor/mtd2
reflash_nor/mtd2: Squashfs filesystem, little endian, version 3.0, 384138 bytes, 262 inodes, blocksize: 65536 bytes, created: Mon Dec 7 03:43:16 2009

$ sudo unsquashfs reflash_nor/mtd2
Parallel unsquashfs: Using 4 processors
243 inodes (253 blocks) to write

[=============================================================================================================|] 253/253 100%
created 27 files
created 19 directories
created 100 symlinks
created 116 devices
created 0 fifos

$ find squashfs-root/ -not -type l -not -type d | grep -v /dev/
squashfs-root/lib/ld-uClibc-0.9.28.so
squashfs-root/lib/libgcc_s.so.1
squashfs-root/lib/libuClibc-0.9.28.so
squashfs-root/etc/test.bin
squashfs-root/etc/rcS
squashfs-root/etc/inittab
squashfs-root/etc/fstab
squashfs-root/etc/release-ebook
squashfs-root/etc/.passwd
squashfs-root/usr/bin/ldd
squashfs-root/bin/busybox
squashfs-root/bin/sdaccesstest
squashfs-root/bin/p_halt
squashfs-root/bin/nor_write_md5
squashfs-root/bin/checksum
squashfs-root/bin/detect_nor
squashfs-root/bin/p_confirm
squashfs-root/root/.bash_profile
squashfs-root/root/.bash_logout
squashfs-root/root/.bash_history
squashfs-root/root/.bashrc
squashfs-root/sbin/flash.sh
squashfs-root/sbin/nandwrite
squashfs-root/sbin/fail_sd.sh
squashfs-root/sbin/flash_eraseall
squashfs-root/sbin/aespipe
squashfs-root/sbin/flashing.sh

Jcnip M218B #1


$ unrar-nonfree x M218B056firmware.rar

UNRAR 4.00 beta 3 freeware Copyright (c) 1993-2010 Alexander Roshal


Extracting from M218B056firmware.rar

Creating firmware OK
Extracting firmware/M218B-v0.56.bin OK
Creating reflash_nor OK
Extracting reflash_nor/md5sum_32 OK
Extracting reflash_nor/md5sum_64 OK
Extracting reflash_nor/mtd032 OK
Extracting reflash_nor/mtd064 OK
Extracting reflash_nor/mtd1 OK
Extracting reflash_nor/mtd2 OK
Extracting reflash_nor/upgrade.sh OK
All OK

$ cat reflash_nor/upgrade.sh
#!/bin/sh

REFLASH_NOR=/mnt/sd1/reflash_nor
PKERNEL=mtd1
ROOTFS=mtd2
BOOTLOADER_DEST=/dev/mtdblock0
PKERNEL_DEST=/dev/mtdblock1
ROOTFS_DEST=/dev/mtdblock2
MEM_SIZE=`cat /proc/cmdline | cut -d '=' -f3 | cut -d ' ' -f1`
test $MEM_SIZE = "32M" && BOOTLOADER=mtd032
test $MEM_SIZE = "64M" && BOOTLOADER=mtd064

echo "Upgrading Bootloader"
dd "if=$REFLASH_NOR/$BOOTLOADER" "of=$BOOTLOADER_DEST"
echo "Upgrading P-Kernel"
dd "if=$REFLASH_NOR/$PKERNEL" "of=$PKERNEL_DEST"
echo "Upgrading Pminiroot"
dd "if=$REFLASH_NOR/$ROOTFS" "of=$ROOTFS_DEST"
echo "done"