SD Card performance in R-Pi onboard slot
I am interested in testing a few of my cards. What is the correct way to determine which firmware / kernel I am running? When I run uname -a it always returns the same value.
---
Bob
Bob
- Posts: 9
- Joined: Sat May 12, 2012 9:16 pm
dom wrote:I've been meaning to a add a mailbox based get/set property machanism that could handle this (and also cope with changing clocks from ARM).
Being able to query and/or change clocks from Linux on the fly would be a very nice feature.
- Posts: 19
- Joined: Mon May 28, 2012 7:45 pm
This will give you the firmware at least:
- Code: Select all
pi@raspberrypi:~$ /opt/vc/bin/vcgencmd version
Jun 13 2012 11:52:26
Copyright (c) 2012 Broadcom
version 319513 (release)
- Posts: 71
- Joined: Tue Jan 10, 2012 5:42 pm
lb wrote:A firmware update w/o kernel update shouldn't be harmful. SD access will be slow due to the low clock, but that's all. The other way around won't work, though.
Yes that's very true.
lb wrote:bootc, by the way I ported the cleaned up patchset to the 3.2.19 kernel, it's available from https://github.com/grigorig/rpi-linux/t ... 2.19-sdhci. For some reason I can't make a pull request to your branch. Github is a bit stupid.
Oh great! I'll take a look, try it out soon and hopefully roll out a kernel with the patch now this work is becoming much more official.
- Posts: 19
- Joined: Mon May 28, 2012 7:45 pm
lb, thanks for clearing up the tran_speed value in the CSD register, it was highly confusing seeing every card return 32, because we were always reading stale data! Is the tran_speed bit essentially useless to us for guessing what the max clock speed of the card is? I'll look into cmd6, I assumed that it was only used in the init stage of the card and just queried the card once.
Selsinork, oh sure, I'm not trying to say we do a suite of rigourous tests, just that if we're going to do some simple ones, which ones would be useful?
I thought the cid might be a bit heavy for some people to cope with but essentially I posted my post to get people talking about it, I'm not an expert in any shape or form, so I bow to other peoples greater knowledge.
Lastly, yeah, it turns out that the /sys/ data is stale, it's read in as the card is first initialised and not updated thereafter. It had me quite confused until lb posted the debugfs stuff above.
Selsinork, oh sure, I'm not trying to say we do a suite of rigourous tests, just that if we're going to do some simple ones, which ones would be useful?
I thought the cid might be a bit heavy for some people to cope with but essentially I posted my post to get people talking about it, I'm not an expert in any shape or form, so I bow to other peoples greater knowledge.
Lastly, yeah, it turns out that the /sys/ data is stale, it's read in as the card is first initialised and not updated thereafter. It had me quite confused until lb posted the debugfs stuff above.
- Posts: 150
- Joined: Fri Aug 26, 2011 11:51 am
Great job lb !!
To make a long story short :
My config :
Stock Raspberry Pi Model B from RS received May 30 (No Alpha/Beta board)
SD Card Transcend 4GB SDHC Class 6 (The one bundled from RS)
The card was working before and is working after kernel and firmware update (so far ...)
hdparm shows better performances after upgrade :
x 4.10 (Avg) on buffered disk reads
x 4.50 (Avg) on O_DIRECT disk/cached reads
Boot time not better :
Before -> 19.2 Sec (Avg)
After -> 20.8 Sec (Avg)
The long story :
-----------
Conf and 1st mmc Perf test on the 20120419 Stock Debian Squeeze image
-----------
#To confirm Kernel Version :
sum /boot/kernel.img
02786 3800
#To confirm Firwmare version
opt/vc/bin/vcgencmd version
Apr 18 2012 15:04:46
Copyright (c) 2012 Broadcom
version 310376 (release)
#To confirm the clock pb :
cat /sys/devices/platform/bcm2708_sdhci.0/status
present: yes
power: on
clock: 20000000 Hz
dma: on (0 waits)
#MMC read Perf test :
sudo hdparm -tT /dev/mmcblk0
/dev/mmcblk0:
Timing cached reads: 134 MB in 2.01 seconds = 66.77 MB/sec
Timing buffered disk reads: 14 MB in 3.18 seconds = 4.40 MB/sec
sudo hdparm -tT --direct /dev/mmcblk0
/dev/mmcblk0:
Timing O_DIRECT cached reads: 10 MB in 2.20 seconds = 4.55 MB/sec
Timing O_DIRECT disk reads: 14 MB in 3.08 seconds = 4.55 MB/sec
#Boot time from "TV screen ligths up" to "Login Prompt" : 19.2 Sec
-----------
Kernel and Firmware update path
-----------
sudo apt-get update
sudo apt-get update
sudo apt-get install ca-certificates
sudo apt-get install git-core
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update
sudo rpi-update
---> ERROR : /opt/vc/sbin/vcfiled: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
---> CF : https://github.com/Hexxeh/rpi-update/issues/7
sudo rm /boot/.firmware_revision
sudo ldconfig
sudo rpi-update
---> ERROR : 2769590689: vchiq_lib: Very incompatible VCHIQ library - cannot retrieve driver version
---> CF : https://github.com/Hexxeh/rpi-update/issues/8
sudo rm /boot/.firmware_revision
sudo reboot
sudo rpi-update
---> OK
sudo reboot
-----------
Conf and 2nd mmc Perf test on the Kernel and Firmware updated Debian Squeeze image
-----------
sum /boot/kernel.img
50730 6091
opt/vc/bin/vcgencmd version
Jun 13 2012 11:52:26
Copyright (c) 2012 Broadcom
version 319513 (release)
cat /sys/devices/platform/bcm2708_sdhci.0/status
present: yes
power: on
clock: 50000000 Hz
dma: on (0 waits)
sudo hdparm -tT /dev/mmcblk0
/dev/mmcblk0:
Timing cached reads: 276 MB in 2.00 seconds = 137.81 MB/sec
Timing buffered disk reads: 56 MB in 3.06 seconds = 18.31 MB/sec
sudo hdparm -tT --direct /dev/mmcblk0
/dev/mmcblk0:
Timing O_DIRECT cached reads: 42 MB in 2.01 seconds = 20.90 MB/sec
Timing O_DIRECT disk reads: 64 MB in 3.07 seconds = 20.87 MB/sec
Boot time from "TV screen ligths up" to "Login Prompt" : 20.8 Sec
To make a long story short :
My config :
Stock Raspberry Pi Model B from RS received May 30 (No Alpha/Beta board)
SD Card Transcend 4GB SDHC Class 6 (The one bundled from RS)
The card was working before and is working after kernel and firmware update (so far ...)
hdparm shows better performances after upgrade :
x 4.10 (Avg) on buffered disk reads
x 4.50 (Avg) on O_DIRECT disk/cached reads
Boot time not better :
Before -> 19.2 Sec (Avg)
After -> 20.8 Sec (Avg)
The long story :
-----------
Conf and 1st mmc Perf test on the 20120419 Stock Debian Squeeze image
-----------
#To confirm Kernel Version :
sum /boot/kernel.img
02786 3800
#To confirm Firwmare version
opt/vc/bin/vcgencmd version
Apr 18 2012 15:04:46
Copyright (c) 2012 Broadcom
version 310376 (release)
#To confirm the clock pb :
cat /sys/devices/platform/bcm2708_sdhci.0/status
present: yes
power: on
clock: 20000000 Hz
dma: on (0 waits)
#MMC read Perf test :
sudo hdparm -tT /dev/mmcblk0
/dev/mmcblk0:
Timing cached reads: 134 MB in 2.01 seconds = 66.77 MB/sec
Timing buffered disk reads: 14 MB in 3.18 seconds = 4.40 MB/sec
sudo hdparm -tT --direct /dev/mmcblk0
/dev/mmcblk0:
Timing O_DIRECT cached reads: 10 MB in 2.20 seconds = 4.55 MB/sec
Timing O_DIRECT disk reads: 14 MB in 3.08 seconds = 4.55 MB/sec
#Boot time from "TV screen ligths up" to "Login Prompt" : 19.2 Sec
-----------
Kernel and Firmware update path
-----------
sudo apt-get update
sudo apt-get update
sudo apt-get install ca-certificates
sudo apt-get install git-core
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update
sudo rpi-update
---> ERROR : /opt/vc/sbin/vcfiled: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
---> CF : https://github.com/Hexxeh/rpi-update/issues/7
sudo rm /boot/.firmware_revision
sudo ldconfig
sudo rpi-update
---> ERROR : 2769590689: vchiq_lib: Very incompatible VCHIQ library - cannot retrieve driver version
---> CF : https://github.com/Hexxeh/rpi-update/issues/8
sudo rm /boot/.firmware_revision
sudo reboot
sudo rpi-update
---> OK
sudo reboot
-----------
Conf and 2nd mmc Perf test on the Kernel and Firmware updated Debian Squeeze image
-----------
sum /boot/kernel.img
50730 6091
opt/vc/bin/vcgencmd version
Jun 13 2012 11:52:26
Copyright (c) 2012 Broadcom
version 319513 (release)
cat /sys/devices/platform/bcm2708_sdhci.0/status
present: yes
power: on
clock: 50000000 Hz
dma: on (0 waits)
sudo hdparm -tT /dev/mmcblk0
/dev/mmcblk0:
Timing cached reads: 276 MB in 2.00 seconds = 137.81 MB/sec
Timing buffered disk reads: 56 MB in 3.06 seconds = 18.31 MB/sec
sudo hdparm -tT --direct /dev/mmcblk0
/dev/mmcblk0:
Timing O_DIRECT cached reads: 42 MB in 2.01 seconds = 20.90 MB/sec
Timing O_DIRECT disk reads: 64 MB in 3.07 seconds = 20.87 MB/sec
Boot time from "TV screen ligths up" to "Login Prompt" : 20.8 Sec
- Posts: 35
- Joined: Thu May 31, 2012 11:29 pm
Where exactly do I download the
kernel.img file from?
I tried to run rpi-update last night and it just was'nt happening. Not sure if it was because of a problem 'there' end, or 'my' end
As I stated in another thread, what I,d like in an ideal world, is the new wheezy os, the fix in this thread to get SD card's fully working, and also
my 8188cus wifi adapter all working OOB.
Texy
- Code: Select all
Jun 13 2012 11:52:26
Copyright (c) 2012 Broadcom
version 319513 (release)
kernel.img file from?
I tried to run rpi-update last night and it just was'nt happening. Not sure if it was because of a problem 'there' end, or 'my' end
As I stated in another thread, what I,d like in an ideal world, is the new wheezy os, the fix in this thread to get SD card's fully working, and also
my 8188cus wifi adapter all working OOB.
Texy
"!.8inch TFT LCD + Switch Shield" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
- Moderator
- Posts: 1272
- Joined: Sat Mar 03, 2012 10:59 am
- Location: Berkshire, England
This where I found it:
http://www.bootc.net/projects/raspberry-pi-kernel/
There are instructions there too.
HDD updated fine
San Disk class 4 fine
San Disk class 6 stops part way through boot. I will copy from the class 4 using GParted, Should make it work again. I copied the file into the /boot and installed it there. Then deleted the files it left when done.
http://www.bootc.net/projects/raspberry-pi-kernel/
There are instructions there too.
HDD updated fine
San Disk class 4 fine
San Disk class 6 stops part way through boot. I will copy from the class 4 using GParted, Should make it work again. I copied the file into the /boot and installed it there. Then deleted the files it left when done.
RS rewards Europe customers for long wait with old stock also
(RS)Allied ships old stock to reward U.S. Customers for long wait!
http://rich1.dyndns.tv/?page_id=71
(RS)Allied ships old stock to reward U.S. Customers for long wait!
http://rich1.dyndns.tv/?page_id=71
XavM wrote: sudo rpi-update
---> ERROR : /opt/vc/sbin/vcfiled: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
---> CF : https://github.com/Hexxeh/rpi-update/issues/7
sudo rm /boot/.firmware_revision
sudo ldconfig
sudo rpi-update
---> ERROR : 2769590689: vchiq_lib: Very incompatible VCHIQ library - cannot retrieve driver version
---> CF : https://github.com/Hexxeh/rpi-update/issues/8
sudo rm /boot/.firmware_revision
sudo reboot
sudo rpi-update
---> OK
sudo reboot
I'm fairly sure there's no need to run rpi-update multiple times - just running it once followed by a reboot should be enough.
texy wrote:Where exactly do I download the
- Code: Select all
Jun 13 2012 11:52:26
Copyright (c) 2012 Broadcom
version 319513 (release)
kernel.img file from?
https://github.com/raspberrypi/firmware ... aster/boot
But it's best to use rpi-update, because there are more files than "just the kernel" to update...
I tried to run rpi-update last night and it just was'nt happening. Not sure if it was because of a problem 'there' end, or 'my' end
Can you give more details about what didn't work, any error messages you got, etc. ?
I wish I could give you specifics which would be help, but alas memory isn't what it should be
I got various error messages basically saying I didn't have permission to rup rpi-update.
I tried sudo rpi-update...fail
I tried logging on as root, or rather switching to root by typing
sudu su - ....fail
One of the above basically told me it didn't understand the command rpi-update.
I went to the directory where it lives - usr/bin/ or something like that
and when I type rpi-update it didn't come back with an error, in fact it did nothing, just returned to the prompt.
Remember that this is with the new wheezy download - it could be that this was all down to a combination of the wheezy distro with
the firmware improvements in this thread? Or I didn't follow the correct procedure to copy the file(s) neccessary?
Texy
I got various error messages basically saying I didn't have permission to rup rpi-update.
I tried sudo rpi-update...fail
I tried logging on as root, or rather switching to root by typing
sudu su - ....fail
One of the above basically told me it didn't understand the command rpi-update.
I went to the directory where it lives - usr/bin/ or something like that
and when I type rpi-update it didn't come back with an error, in fact it did nothing, just returned to the prompt.
Remember that this is with the new wheezy download - it could be that this was all down to a combination of the wheezy distro with
the firmware improvements in this thread? Or I didn't follow the correct procedure to copy the file(s) neccessary?
Texy
"!.8inch TFT LCD + Switch Shield" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
- Moderator
- Posts: 1272
- Joined: Sat Mar 03, 2012 10:59 am
- Location: Berkshire, England
texy wrote:I got various error messages basically saying I didn't have permission to rup rpi-update.
I tried sudo rpi-update...fail
Did you remember to make it executable with
- Code: Select all
sudo chmod +x /usr/bin/rpi-update
I went to the directory where it lives - usr/bin/ or something like that
and when I type rpi-update it didn't come back with an error, in fact it did nothing, just returned to the prompt.
On Unix/Linux if you want to run a program in your current directory, you need to run it with
- Code: Select all
./programname
I was getting the same issues as you.
Following a fresh install of Wheezy...
I needed to login as root (user = root, password = root)
I then ran:
Then got the rpi update by :
Daz
Following a fresh install of Wheezy...
I needed to login as root (user = root, password = root)
I then ran:
- Code: Select all
sudo apt-get update
sudo apt-get upgrade
Then got the rpi update by :
- Code: Select all
wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
rpi-update
Daz
- Posts: 51
- Joined: Tue May 22, 2012 10:18 am
- Location: Cwmbran, S.Wales
Alfadaz wrote:I was getting the same issues as you.
Following a fresh install of Wheezy...
I needed to login as root (user = root, password = root)
I then ran:
- Code: Select all
sudo apt-get update
sudo apt-get upgrade
Then got the rpi update by :
- Code: Select all
wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
rpi-update
Daz
Well the only thing I did differently was using
sudu su -
instead of logging in with root / root
...but at least someone else had trouble, and its wasn't just me
I will give it another go tonight, but just to confirm.....using rpi-update wont pull bootc's kernel.img file that fixes the SD card issues will it?
Will I be able to overwrite the kernel.img over what rpi-update changes it to? Anything else?
Texy
"!.8inch TFT LCD + Switch Shield" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
- Moderator
- Posts: 1272
- Joined: Sat Mar 03, 2012 10:59 am
- Location: Berkshire, England
My kernel doesn't have any of the patches that really make a difference, as mentioned in this thread, yet.
- Posts: 19
- Joined: Mon May 28, 2012 7:45 pm
texy wrote:I will give it another go tonight, but just to confirm.....using rpi-update wont pull bootc's kernel.img file that fixes the SD card issues will it?
Correct, it'll pull in the 'official' kernel that Dom updated the other day to include these SD card issue fixes
Unless you use the SKIP_KERNEL option of course https://github.com/Hexxeh/rpi-update
Will I be able to overwrite the kernel.img over what rpi-update changes it to? Anything else
That should be it. Rather than overwriting the kernel.img you may want to rename it to something like kernel_3.1.9.img
Great! So is there an easy way to find out if my pi, ie the wheezy distro and what rpi-update gives me, supports my edimax8188cus wifi dongle (or not!)
Texy
Texy
"!.8inch TFT LCD + Switch Shield" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
- Moderator
- Posts: 1272
- Joined: Sat Mar 03, 2012 10:59 am
- Location: Berkshire, England
I'm fairly sure there's no need to run rpi-update multiple times - just running it once followed by a reboot should be enough.
I've run through the process twice now, and in both cases, I had to run rpi-update 3 times. You must run it until it's clean i.e. no errors reported else you risk boot failure
- Posts: 2
- Joined: Thu Jun 14, 2012 7:23 am
If you've been playing with my wheezy test image (viewtopic.php?f=50&t=8071) then you can now `sudo apt-get update && sudo apt-get upgrade` to try out this latest firmware. See viewtopic.php?p=100168#p100168 for more details.
- Moderator
- Posts: 652
- Joined: Fri Sep 16, 2011 7:16 pm
Another thing to try if you are having trouble with rpi-update is:
sudo apt-get install git-core
I needed this to get rpi-update working for me. It was one of the error messages I received.
here is the link to the new kernel and instructions to install it
http://www.bootc.net/projects/raspberry-pi-kernel/
sudo apt-get install git-core
I needed this to get rpi-update working for me. It was one of the error messages I received.
here is the link to the new kernel and instructions to install it
http://www.bootc.net/projects/raspberry-pi-kernel/
RS rewards Europe customers for long wait with old stock also
(RS)Allied ships old stock to reward U.S. Customers for long wait!
http://rich1.dyndns.tv/?page_id=71
(RS)Allied ships old stock to reward U.S. Customers for long wait!
http://rich1.dyndns.tv/?page_id=71
Just to let you know that I am now up and running with wheezy and rpi-update on 2 SD cards
Although it wasn't without a problem - either I am continuing the type in the goo.gl url incorrectly or something else is happening. Basically if I attempt to install rpi-update from the command prompt before I enter X, it does not load - it confirms the ip address ok, but then declares a 404 error. If I then go into the X gui and browse this thread and cut and paste the goo.gl url into a root terminal, all is well. I believe I have the url correct, ie captial O's, not 0's, etc, but who knows!
Yes can confirm the git-core dependency, however rpi-update does warn you if you do not have it installed.
Now the next thing is to try my rtl8188cus wifi nano dongle.
Thanks everyone,
Texy
Although it wasn't without a problem - either I am continuing the type in the goo.gl url incorrectly or something else is happening. Basically if I attempt to install rpi-update from the command prompt before I enter X, it does not load - it confirms the ip address ok, but then declares a 404 error. If I then go into the X gui and browse this thread and cut and paste the goo.gl url into a root terminal, all is well. I believe I have the url correct, ie captial O's, not 0's, etc, but who knows!
Yes can confirm the git-core dependency, however rpi-update does warn you if you do not have it installed.
Now the next thing is to try my rtl8188cus wifi nano dongle.
Thanks everyone,
Texy
"!.8inch TFT LCD + Switch Shield" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
- Moderator
- Posts: 1272
- Joined: Sat Mar 03, 2012 10:59 am
- Location: Berkshire, England
I installed 3.2.19 last night. My SanDisk 8GB class four works just fine. My USB HDD setup works fine. my SanDisk 8GB Ultra class fails at the keyboard. I switched to a wired keyboard and it still fails at the keyboard. I used GParted to copy the root from the good card to the Ultra and it is still failing. Any suggestions?
Edit: I moved the keyboard over to the powered hub. The system acknowledged the disconnect and the reconnect. Nut still not moving on. connect USB HDD see connect.
waiting for root device
sdhci switching to 1.8V failed
mmc0 error -110
Edit: I moved the keyboard over to the powered hub. The system acknowledged the disconnect and the reconnect. Nut still not moving on. connect USB HDD see connect.
waiting for root device
sdhci switching to 1.8V failed
mmc0 error -110
RS rewards Europe customers for long wait with old stock also
(RS)Allied ships old stock to reward U.S. Customers for long wait!
http://rich1.dyndns.tv/?page_id=71
(RS)Allied ships old stock to reward U.S. Customers for long wait!
http://rich1.dyndns.tv/?page_id=71
One of the 2 SD cards I mentioned above was also problematic - a DANE-ELEC ULTIMATE PRO class 6 8GB. It would not work with the virgin wheezy distro, loads of mmc -110 errors and it would not get to the login prompt, therefore I could not rpi-update it. So I used another wrking card to go through the complete upgrade. I then plugged it into my windows laptop and copied all of the boot partition files to a temporary folder. I then plugged in the DANE-ELEC and overwrote the original files from the temp folder. Plugged it into the pi
and alls well - hdparm show read speed of 19.2megs.
Hope this helps,
Texy
and alls well - hdparm show read speed of 19.2megs.
Hope this helps,
Texy
"!.8inch TFT LCD + Switch Shield" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
- Moderator
- Posts: 1272
- Joined: Sat Mar 03, 2012 10:59 am
- Location: Berkshire, England
No joy @texy card still freezes just after reading the keyboard. wheres the log at so I can post the boot?
RS rewards Europe customers for long wait with old stock also
(RS)Allied ships old stock to reward U.S. Customers for long wait!
http://rich1.dyndns.tv/?page_id=71
(RS)Allied ships old stock to reward U.S. Customers for long wait!
http://rich1.dyndns.tv/?page_id=71
I think the card has gone bad. It is brand new too. I repartitioned the card, reformatted. Re-Imaged it with debian 4-19 image. Still failing.
mmc0: Timeout waiting for hardware interrupt.
works for Data but does not want to read from rootfs.
mmc0: Timeout waiting for hardware interrupt.
works for Data but does not want to read from rootfs.
RS rewards Europe customers for long wait with old stock also
(RS)Allied ships old stock to reward U.S. Customers for long wait!
http://rich1.dyndns.tv/?page_id=71
(RS)Allied ships old stock to reward U.S. Customers for long wait!
http://rich1.dyndns.tv/?page_id=71