Howto update to 01.01

hossman
Posts: 7
Joined: Wed Feb 11, 2015 7:37 pm

Re: Work in Progress - Howto

Postby hossman » Wed Feb 18, 2015 9:03 pm

Does this work with the latest update .56?
How do you get the update file to the hub? With the changes to the /etc/hosts file the hub cannot contact the update server.
Do you have to update to get the hub to control devices?

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Work in Progress - Howto

Postby CloneNum3 » Sun Feb 22, 2015 9:12 am

Jonesie wrote:

Code: Select all

[root@flex-dvt database]# ubiattach -p /dev/mtd5
ubiattach: error!: cannot attach "/dev/mtd5"
           error 17 (File exists)


Any assistance you could provide would be appreciated.

Thanks - Jonesie


Jonesie,

What step of the process are you in?

If you're just getting started, you'll want to mount mtd2 (the update filesystem) not mtd5 (the active/in-use filesystem).

Then you'll boot to the updater filesystem at which time you'll mount mtd5 (the main filesystem)

-CloneNum3

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Work in Progress - Howto

Postby CloneNum3 » Sun Feb 22, 2015 11:12 am

Jonesie wrote:Hello, and thank you for the awesome info on rooting this device. I have rooted my hub fresh out of the box, and I'm working to upgrade it while maintaining root, following this post by copying/pasting, so as to avoid typos.

I have gotten to the following step, and I'm getting an error:

Code: Select all

[root@flex-dvt database]# ubiattach -p /dev/mtd5
ubiattach: error!: cannot attach "/dev/mtd5"
           error 17 (File exists)


Based on Google results, I figured you guys would ask for this info, so I'm including it in an effort to be proactive about requesting help. :)

Code: Select all

[root@flex-dvt ]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00300000 00020000 "gpmi-nfc-0-boot"
mtd1: 00400000 00020000 "updater-kernel"
mtd2: 01c00000 00020000 "updater-rootfs"
mtd3: 00800000 00020000 "database"
mtd4: 00800000 00020000 "app-kernel"
mtd5: 04d00000 00020000 "gpmi-nfc-general-use"


Any assistance you could provide would be appreciated.

Thanks - Jonesie


I would need a little more information to help... it would appear that mtd5 (gpmi-nfc-general-use) is already mounted when you run the ubiattach command. This means you either already mounted it manually or you are not booted to the mtd2 (updater-rootfs) partition.

You can check to see what filesystem you are currently booted into by running ...

# This is the output if you are booted to mtd5: 04d00000 00020000 "gpmi-nfc-general-use"

Code: Select all

[root@flex-dvt ~]# dmesg | grep ubi0
Kernel command line: noinitrd console=ttyAM0,115200 rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs rw gpmi
UBI: attaching mtd5 to ubi0
UBI: attached mtd5 to ubi0


# This is the output if you are booted to mtd2: 01c00000 00020000 "updater-rootfs"

Code: Select all

[root@flex-dvt ~]# dmesg | grep ubi0
Kernel command line: noinitrd console=ttyAM0,115200 rootfstype=ubifs ubi.mtd=2 root=ubi0:rootfs rw gpmi
UBI: attaching mtd2 to ubi0
UBI: attached mtd2 to ubi0

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Howto update to 00.56

Postby CloneNum3 » Sun Feb 22, 2015 11:32 am

I just followed the instructions in the main post line by line... I changed the formatting and added some verification/explanation but the process generally worked for me.

Here are my final results (00.05 update, 00.56 main firmware):

Code: Select all

[root@flex-dvt ~]# for i in `find /database/cf* -type f`; do echo -n "$i="; cat $i; done
/database/cf_build=00.01
/database/cf_fver0=00.01
/database/cf_fver1=00.05
/database/cf_fver2=00.01
/database/cf_fver3=00.56


Serial console is still enabled

Code: Select all

[root@flex-dvt ~]# grep ttyAM0 /etc/inittab
ttyAM0::respawn:/sbin/getty -L  ttyAM0 115200 vt100 # GENERIC_SERIAL


set_dev hack preserved

Code: Select all

[root@flex-dvt ~]# ls -al /var/www/set_dev_value.php
-rwx------    1 root     root           399 Feb 22 15:57 /var/www/set_dev_value.php

Jonesie
Posts: 23
Joined: Sat Feb 14, 2015 11:22 am

Re: Howto update to 00.56

Postby Jonesie » Sun Feb 22, 2015 8:28 pm

Thanks, Clone. I'll give this a shot in the morning. I must have missed something along the way.

Jonesie
Posts: 23
Joined: Sat Feb 14, 2015 11:22 am

Re: Howto update to 00.56

Postby Jonesie » Mon Feb 23, 2015 6:57 am

Hey Clone,
I tried this again this morning. I copied/pasted your commands directly from this thread into my PuTTY SSH session connected to my hub. I am good to go until step #6, the reboot.

CloneNum3 wrote:#### 5. root the 00.05 update partition

Code: Select all

ubiattach -p /dev/mtd2
mkdir /tmp/updater
mount -t ubifs ubi2:rootfs /tmp/updater
sed -i 's/reboot/#reboot/g' /tmp/updater/root/platform/*.sh
cp -r /root/.ssh /tmp/updater/root/
chmod 655 /tmp/updater/root/.ssh
chmod 644 /tmp/updater/root/.ssh/authorized_keys
rm -f /tmp/updater/etc/init.d/S99local
touch /tmp/updater/database_default/ENABLE_SSH
cp /database/authorized_keys /tmp/updater/database_default/
reboot


#### 6. Reboot ####

#Verify you are booted into the updater-rootfs by making sure mtd2 (not mtd5) is being attached to ubi0

Code: Select all

[root@flex-dvt ~]# dmesg | grep ubi0
Kernel command line: noinitrd console=ttyAM0,115200 rootfstype=ubifs ubi.mtd=2 root=ubi0:rootfs rw gpmi
UBI: attaching mtd2 to ubi0
UBI: attached mtd2 to ubi0



It reboots fine, but when I run your dmesg command, this is my output.

Code: Select all

[root@flex-dvt ~]# dmesg | grep ubi0
Kernel command line: noinitrd console=ttyAM0,115200 rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs rw gpmi badupdater
UBI: attaching mtd5 to ubi0
UBI: attached mtd5 to ubi0


For some reason, it looks like it's trying to use mtd5 instead of mtd2.

Here is the output of the cat /proc/mtd command:

Code: Select all

[root@flex-dvt ~]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00300000 00020000 "gpmi-nfc-0-boot"
mtd1: 00400000 00020000 "updater-kernel"
mtd2: 01c00000 00020000 "updater-rootfs"
mtd3: 00800000 00020000 "database"
mtd4: 00800000 00020000 "app-kernel"
mtd5: 04d00000 00020000 "gpmi-nfc-general-use"


For the record, I'm USUALLY pretty good with this kind of thing. I'm not a Linux newbie.

I really appreciate your help with this. :)

Thanks - Jonesie

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Howto update to 00.56

Postby CloneNum3 » Mon Feb 23, 2015 9:37 am

Jonesie wrote:Hey Clone,
I tried this again this morning. I copied/pasted your commands directly from this thread into my PuTTY SSH session connected to my hub. I am good to go until step #6, the reboot.


After step4...

Code: Select all

cat /database/DO_UPDATE


This should be 1... 1 says "next time I boot, boot into the update filesystem" and 0 is "boot normal"

For whatever reason, it appears yours is not booting to the update partition. You can force it by

Code: Select all

echo "1" > /database/DO_UPDATE
reboot


It should then boot to the update partition.

-CloneNum3

Jonesie
Posts: 23
Joined: Sat Feb 14, 2015 11:22 am

Re: Howto update to 00.56

Postby Jonesie » Mon Feb 23, 2015 2:28 pm

Hey Clone,
I ran through the steps again, and before running the upgrade.sh, I changed DO_UPDATE to be 1 instead of 0. No change. I think I have a bad updater-rootfs because of the output of the dmesg command:

Code: Select all

[root@flex-dvt ~]# dmesg | grep ubi0
Kernel command line: noinitrd console=ttyAM0,115200 rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs rw gpmi badupdater
UBI: attaching mtd5 to ubi0
UBI: attached mtd5 to ubi0


The end of the Kernel command line reads "badupdater". I guess something got corrupted? I'm going to keep playing with it, and I'm starting by combing through the /root/platform scripts.

Jonesie

hossman
Posts: 7
Joined: Wed Feb 11, 2015 7:37 pm

Re: Howto update to 00.56

Postby hossman » Mon Feb 23, 2015 8:54 pm

How can I verify the update worked. The phone app still reports the hub need updated.

Code: Select all


[root@flex-dvt database]# for i in `find /database/cf* -type f`; do echo -n "$i="; cat $i; done
/database/cf_build=00.01
/database/cf_fver0=00.01
/database/cf_fver1=00.05
/database/cf_fver2=00.01
/database/cf_fver3=00.56

[root@flex-dvt database]# uname -a
Linux flex-dvt 2.6.35.3-flex-dvt #32 PREEMPT Tue Apr 29 23:15:31 EDT 2014 armv5tejl GNU/Linux


Jonesie
Posts: 23
Joined: Sat Feb 14, 2015 11:22 am

Re: Howto update to 00.56

Postby Jonesie » Tue Feb 24, 2015 6:35 am

I'm wondering if my Hub has some bad memory. The output of the upgrade.sh script, shows the following:

Code: Select all

ubiformat: 223 eraseblocks have valid erase counter, mean value is 7
ubiformat: 1 bad eraseblocks found, numbers: 155


Return to “Upgrade to current firmware maintaining root”

Who is online

Users browsing this forum: No registered users and 1 guest