Updating Pogoplug V4 u-boot from Arch u-boot October 21, 2017 05:30PM |
Registered: 6 years ago Posts: 5 |
dev: size erasesize name mtd0: 00200000 00020000 "u-boot" mtd1: 00300000 00020000 "uImage" mtd2: 00300000 00020000 "uImage2" mtd3: 00800000 00020000 "failsafe" mtd4: 07000000 00020000 "root"
Re: Updating Pogoplug V4 u-boot from Arch u-boot October 21, 2017 09:08PM |
Admin Registered: 13 years ago Posts: 18,555 |
> dev: size erasesize name > mtd0: 00200000 00020000 "u-boot" > mtd1: 00300000 00020000 "uImage" > mtd2: 00300000 00020000 "uImage2" > mtd3: 00800000 00020000 "failsafe" > mtd4: 07000000 00020000 "root" >
Re: Updating Pogoplug V4 u-boot from Arch u-boot October 22, 2017 04:42PM |
Registered: 6 years ago Posts: 5 |
fw_setenv dtb_file
Re: Updating Pogoplug V4 u-boot from Arch u-boot October 22, 2017 05:02PM |
Admin Registered: 13 years ago Posts: 18,555 |
Quote
> Per guidelines I need to clear dtb_file:
>
>> fw_setenv dtb_file >
Re: Updating Pogoplug V4 u-boot from Arch u-boot October 22, 2017 05:44PM |
Registered: 6 years ago Posts: 5 |
#!/bin/bash set -u -e flash_erase=echo nandwrite=echo fw_setenv=echo nanddump=echo netconsole_client_ip=192.168.1.139 netconsole_server_ip=192.168.1.100 uenv_txt=/tmp/uEnv.txt #uenv_txt=/boot/uEnv.txt read_keyboard() { read -p "Continue (y/n)? " [ "$REPLY" != "y" ] && exit 1 return 0 } echo "Checking /etc/fw_env.config" set -- $(grep -v ^# /etc/fw_env.config) [ "$1" != /dev/mtd0 ] && exit 1 [ "$2" != 0xc0000 ] && exit 1 [ "$3" != 0x20000 ] && exit 1 [ "$4" != 0x20000 ] && exit 1 echo "Checking ethaddr" ethaddr=$(fw_printenv ethaddr|cut -f2 -d=) [ -z "$ethaddr" ] && exit 1 echo "Dumping /dev/mtd0" $nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0 echo "Saving current env" fw_printenv > current_envs.txt echo "Checking for bad blocks" [ $(dmesg | grep -c -i 'bad') != 1 ] && exit 1 cat <<MSG Erasing /dev/mtd0, expected output: Erase Total 4 Units Performing Flash Erase of length 131072 at offset 0x60000 done Actual output: MSG $flash_erase /dev/mtd0 0 4 read_keyboard cat <<MSG Writing /dev/mtd0, expected output: Writing data to block 0 at offset 0x0 Writing data to block 1 at offset 0x20000 Writing data to block 2 at offset 0x40000 Writing data to block 3 at offset 0x60000 Actual output: MSG $nandwrite /dev/mtd0 uboot.2016.05-tld-1.pogo_v4.mtd0.kwb read_keyboard cat <<MSG Erasing /dev/mtd0, expected output: Erase Total 1 Units Performing Flash Erase of length 131072 at offset 0xc0000 done Actual output: MSG $flash_erase /dev/mtd0 0xc0000 1 read_keyboard cat <<MSG Writing /dev/mtd0, expected output: Writing data to block 6 at offset 0xc0000 Actual output: MSG $nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img read_keyboard echo "Modifying environment" $fw_setenv arcNumber 3960 $fw_setenv machid f78 # TODO I don't have mtdparts $fw_setenv mtdparts 'xxxxxxxxx' $fw_setenv ethaddr $ethaddr $fw_setenv dtb_file '/boot/dts/kirkwood-pogoplug_v4.dtb' echo "!!! Please check environment below !!!" fw_printenv read_keyboard echo "Configuring netconsole" $fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi' $fw_setenv preboot 'run preboot_nc' $fw_setenv ipaddr $netconsole_client_ip $fw_setenv serverip $netconsole_server_ip # TODO Will dtb_file in the uEnv.txt conflict with dtb_file set via fw_setenv? echo "Creating $uenv_txt" cat >$uenv_txt <<UENV dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb devices=usb UENV
Re: Updating Pogoplug V4 u-boot from Arch u-boot October 23, 2017 12:05AM |
Admin Registered: 13 years ago Posts: 18,555 |
fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)'
[ 5.976998] Scanning device for bad blocks [ 5.985954] Bad eraseblock 100 at 0x000000c80000 [ 5.995373] Bad eraseblock 200 at 0x000001900000
Re: Updating Pogoplug V4 u-boot from Arch u-boot October 25, 2017 08:31PM |
Registered: 6 years ago Posts: 5 |
Re: Updating Pogoplug V4 u-boot from Arch u-boot October 25, 2017 11:10PM |
Admin Registered: 13 years ago Posts: 18,555 |