Clarification / Pogo-E02 January 15, 2015 05:35PM |
Registered: 9 years ago Posts: 24 |
Re: Clarification / Pogo-E02 January 15, 2015 11:17PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Clarification / Pogo-E02 January 19, 2015 03:35PM |
Registered: 9 years ago Posts: 24 |
Re: Clarification / Pogo-E02 January 19, 2015 03:50PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Clarification / Pogo-E02 January 19, 2015 06:59PM |
Registered: 9 years ago Posts: 24 |
Re: Clarification / Pogo-E02 January 19, 2015 08:48PM |
Registered: 9 years ago Posts: 24 |
Re: Clarification / Pogo-E02 January 19, 2015 10:14PM |
Registered: 10 years ago Posts: 70 |
Re: Clarification / Pogo-E02 January 20, 2015 04:26AM |
Admin Registered: 13 years ago Posts: 18,997 |
Quote
Is there a more feature full version of the rootfs that i can use? (refering partly to the lack of what i think is rsyslog)
Re: Clarification / Pogo-E02 January 21, 2015 09:29AM |
Registered: 9 years ago Posts: 24 |
Re: Clarification / Pogo-E02 January 21, 2015 03:21PM |
Registered: 10 years ago Posts: 2 |
./bin/blparam ./bin/flash_erase ./bin/fw_printenv ./bin/fw_setenv ./bin/nanddump ./bin/nandwrite ./my.environment.img ./uboot.2014.07-tld-2.dockstar.mtd0.kwb ./uboot.2014.07-tld-2.environment.img ./uboot.2014.07-tld-2.pogo_e02.mtd0.kwb ./uboot.2014.07-tld-2.pogo_v4.mtd0.kwb ./update_uboot.sh
#!/bin/sh # # Install newest uBoot on mtd0 # ideas and valid-uboot.md5 from Jeff doozan # using the uboots from bodhi http://forum.doozan.com/read.php?3,12381 # echo DANGER, only use if you know what to do when things go wrong. comment this line if you do;exit # md5sums from http://jeff.doozan.com/uboot/valid-uboot.md5 grep -v "^#" >/tmp/valid-uboot.md5 <<EOF b2d9681ef044e9ab6b058ef442b30b6e dockstar original 5cbbbca7693c5939836349bbd7f270e8 goflexnet original 9b940e0b3b5a523f8b50ef0fa50af97f goflexhome original c7b77a049725096d83db958f39b2c0c3 pinkpogo original 7e454d6b669ddadf3e97a2bf562653fa pogov1 original 3a6f82e07f89e569d721f1f8b25096c2 dockstar jeff-2010-08-07 76a3ff87a2a2df5ab129319c6cf14089 dockstar jeff-2010-08-23 21196b4c6bf2f7ef94b9ddf7d44f5272 dockstar jeff-2010-08-24 447561d59678984205324463d003311f dockstar jeff-2010-08-25 7acb243fb8c3f131f1a165b3dc64faaf dockstar jeff-2010-08-30 ebd566de30c6521e65fb1255415c037f dockstar jeff-2010-10-23 ebd566de30c6521e65fb1255415c037f pogov1 jeff-2010-10-23 2774216e13c4e46bb7e554b9a3eb1dfb goflexnet jeff-2010-10-23 0eb4684426a96efd12574c1ea9b52b6f pinkpogo jeff-2010-10-23 e18a2c7e308c249bc16f55bbaad31f50 dockstar davygravy-2012-02-12-current e18a2c7e308c249bc16f55bbaad31f50 pogov1 davygravy-2012-02-12-current e84a5fd0a0205bb79aed07c3c6fbd145 pinkpogo davygravy-2012-02-20-current 77ce1df732843774e5257b615ba8a9db goflexnet davygravy-2012-04-19-current 77ce1df732843774e5257b615ba8a9db goflexhome davygravy-2012-04-19-current # md5sums below added_by_peter_lorenzen ec62667e96e893c77f163f31b8d268cf pogo_v4 original b96574b1ee60d525be7e3c8bceeb6fda pogo_v4 ebbes-2014-03-19-current ef326d50277b6fa8cba02bc0032875ed dockstar uboot.2014.07-tld-2.dockstar.mtd0.kwb 5b9a551516d177ed716cd8b64f84beea pogo_e02 uboot.2014.07-tld-2.pogo_e02.mtd0.kwb 8f8e8cf2e0f18462fe881988e3e7b3e1 pogo_v4 uboot.2014.07-tld-2.pogo_v4.mtd0.kwb f2ca69d5ad1147244aabb5da3381bb14 environment uboot.2014.07-tld-2.environment.img # 142fc6ce939f918622e1fc1b3887de80 environment my.environment.img EOF # to use your own custom environment, adjust the last line # NOTE pogo_e02 == pinkpogo # when newer version appear, add them to the end of the above list, keep the old ones too. usage() { echo "$*" echo "update_uboot <-u> <-e> <-n> <-s>" echo " -u update uboot DANGER no further questions asked" echo " -e update environment DANGER no further questions asked" echo " -n setup boot from nfs, last priority" echo " -s just check status of uboot (default)" exit } error() { echo $* -- please FIX exit } version() { strings $1 |awk '/^U-Boot/ { if (length($0) > length(string)) string=$0} END {print string}' } install_uboot() { NEW=`grep " $PLATFORM " /tmp/valid-uboot.md5 | tail -1` NEW_MD5=`echo $NEW | cut -f1 -d' '` NEW_UBOOT=`echo $NEW | cut -f3 -d' '` if [ x$MD5 = $NEW_MD5 ]; then echo " already on newest" return fi if [ ! -f $NEW_UBOOT ]; then error "download and unpack $NEW_UBOOT, from http://forum.doozan.com/read.php?3,12381" fi MD5=`md5sum $NEW_UBOOT | cut -f1 -d' '` grep $MD5 /tmp/valid-uboot.md5 >/dev/null if [ $? != 0 ]; then error Current uBoot unknown fi echo "INSTALL -- `version $NEW_UBOOT` -- $NEW_UBOOT --" if [ xYES != x$DO_INSTALL_UBOOT_WITHOUT_ASKING ]; then echo "no harm done to uboot" return fi flash_erase /dev/mtd0 0 4 # Erase the first 4 blocks (512k) nandwrite /dev/mtd0 $NEW_UBOOT nanddump --noecc --omitoob -l 0x80000 -f /tmp/mtd0-dump /dev/mtd0 MD5=`md5sum /tmp/mtd0-dump | cut -f1 -d' '` if [ $MD5 != $NEW_MD5 ]; then error "checksum failed - DO NOT POWEROFF" fi echo "uBoot Succesfully installed -- `version /tmp/mtd0-dump`" } install_env() { echo " uBoot environment" if [ xYES = x$ON_NEVER_UBOOT ]; then echo allready on newer uboot, env update is not strictly necessarry fi if [ xYES = x$DO_INSTALL_UBOOT_WITHOUT_ASKING -a xYES != x$DO_INSTALL_U_ENV_WITHOUT_ASKING ]; then usage upgrade of original uboot, new env MUST be installed fi NEW=`grep " environment " /tmp/valid-uboot.md5 | tail -1` NEW_MD5=`echo $NEW | cut -f1 -d' '` NEW_ENV=`echo $NEW | cut -f3 -d' '` if [ ! -f $NEW_ENV ]; then error "download and unpack $NEW_ENV, from http://forum.doozan.com/read.php?3,12381" fi echo "INSTALL -- Environment -- $NEW_ENV" MD5=`md5sum $NEW_ENV | cut -f1 -d' '` if [ $MD5 != $NEW_MD5 ]; then error " md5 on $NEW_ENV does not match" fi echo "ENV arcNumber=$arcNumber machid=$machid ethaddr=$ethaddr" if [ xYES != x$DO_INSTALL_U_ENV_WITHOUT_ASKING ]; then echo "no harm done to uboot env" return fi flash_erase /dev/mtd0 0xc0000 1 nandwrite -s 786432 /dev/mtd0 $NEW_ENV nanddump --noecc --omitoob -f /tmp/mtd0-dump -s 0xc0000 -l 0x20000 /dev/mtd0 MD5=`md5sum /tmp/mtd0-dump | cut -f1 -d' '` if [ $MD5 != $NEW_MD5 ]; then error "checksum failed after flash of environment - DO NOT POWEROFF" fi fw_setenv ethaddr $ethaddr fw_setenv arcNumber $arcNumber fw_setenv machid $machid echo "uBoot ENV from \"$NEW_ENV\" Succesfully installed --- $NEW_ENV arc=$arcNumber ($ethaddr)" } install_nfs_boot() { if [ xYES != x$DO_INSTALL_U_NFS_WITHOUT_ASKING ]; then echo "nfs_boot not installed into env" return; fi fw_setenv ipaddr fw_setenv serverip fw_setenv nfs_init 'setenv autoload no; dhcp; setenv options root=/dev/nfs rootfstype=nfs rootwait nfsroot=$rootpath ip=$ipaddr:$serverip:$gatewayip:$n etmask:$hostname:eth0:off' fw_setenv nfs_load 'nfs $addr $rootpath/boot/$file' fw_setenv set_bootargs 'setenv bootargs console=$console $options $mtdparts' fw_setenv boot 'run ${dev}_init; run set_bootargs; echo ** ${dev} Booting -- $bootargs; mw 0x800000 0 1; addr=0x800000; file=uImage; run ${dev}_load; addr=0x1100000; file=uInitrd; if run ${dev}_load; then bootm 0x800000 0x1100000; else bootm 0x800000; fi' fw_setenv bootcmd_nfs 'dev=nfs;run boot' BOOTCMD=`fw_printenv bootcmd | sed -e 's/^[^=]*=//' -e 's/; run bootcmd_nfs//' -e 's/; reset//'` fw_setenv bootcmd "$BOOTCMD; run bootcmd_nfs; reset" } #### Main script starts here #### while getopts "uens" o; do case "${o}" in u) DO_INSTALL_UBOOT_WITHOUT_ASKING=YES;; e) DO_INSTALL_U_ENV_WITHOUT_ASKING=YES;; n) DO_INSTALL_U_NFS_WITHOUT_ASKING=YES;; s) DO_STATUS;; *) usage wrong options;; esac done PATH=`pwd`/bin:$PATH # newer fw_setenv will not set ethaddr, use ours export PATH for i in blparam flash_erase fw_printenv fw_setenv nanddump nandwrite strings md5sum;do if ! type $i; then usage $i not found, please install f.ex in ./bin fi done echo " Validating existing uBoot" nanddump --noecc --omitoob -l 0x80000 -f /tmp/mtd0-dump /dev/mtd0 2>/dev/null if [ $? != 0 ]; then error nanddump failed; fi MD5=`md5sum /tmp/mtd0-dump | cut -f1 -d' '` LINE=`grep $MD5 /tmp/valid-uboot.md5` if [ $? != 0 ]; then error "Unknown current uBoot: `version /tmp/mtd0-dump`" fi PLATFORM=`echo $LINE | cut -f2 -d' '` UBOOT=`echo $LINE | cut -f3 -d' '` echo Current -- `version /tmp/mtd0-dump` -- $UBOOT -- $PLATFORM if [ -f /proc/board_type -o $UBOOT = original ]; then killall hbwd mount -o remount,rw / echo "/dev/mtd0 0xc0000 0x20000 0x20000" > /etc/fw_env.config # fw_setenv requires it eval `blparam | grep ethaddr` eval `blparam | grep ceboardver` case $ceboardver in REDSTONE:1.0) arcNumber=2998; machid=; PLATFORM=dockstar ;; PPV2) arcNumber=3542; machid=dd6; PLATFORM=pogo_e02 ;; PPV4A1) arcNumber=3960; machid=f78; PLATFORM=pogo_v4 ;; *) error unknown ceboardver=$ceboardver;; esac else ON_NEVER_UBOOT=YES eval `fw_printenv ethaddr` eval `fw_printenv arcNumber` eval `fw_printenv machid` case $arcNumber in 2998) PLATFORM=dockstar ;; 3542) PLATFORM=pogo_e02 ;; 3960) PLATFORM=pogo_v4 ;; *) error unknown arcNumber=$arcNumber;; esac fi if [ x$ethaddr = x ]; then error ethaddr not set in uboot environment - FIX; fi install_uboot install_env install_nfs_boot echo "Done"