-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use wget/zip instead of Git #95
Comments
The Might be worth timing the two cases to see if it's significantly faster. (if it says you are up to date, "sudo rm /boot/.firmware_revision" will force it to update). |
Well from the test I ran, I understand that Sidenote : It took me a loooong time to figure out the
;) |
Theres a "depth" parameter? |
Why? Because it gives us complete history. You think start.elf had a regression that started about 3 months ago: you can download any previous version and see the history of changes. |
Well Popcornmix I must admit I think that, in my opinion, LordMike is right : most users won't do that. Beside the script is not fit for taking advantage of a full local history because of #64 |
@GrmpCerber If we didn't use git at all for firmware, we'd have to invent alternate means to achieve this. |
Some observations:
Therefore it seems like a few datapoints should be collected, and that can drive whether it would be better to switch to http(s) downloads:
|
github supports downloading as a single archive. See my first post in this thread. If someone just times a normal rpi-update, and the command I gave in my first post, we'd know how much speed difference there was and if it's worth switching. (I'm sure the archive will be faster). git-core is tiny, and is preinstalled on latest rasbian image, so it's not a big concern. |
With git $ time strace -e trace=read,write -o git.log git clone https://github.com/Hexxeh/rpi-firmware --depth=1 With wget : $ time strace -e trace=read,write -o wget.log wget https://codeload.github.com/Hexxeh/rpi-firmware/zip/master --2013-06-05 16:26:43-- https://codeload.github.com/Hexxeh/rpi-firmware/zip/master Résolution de codeload.github.com (codeload.github.com)... 204.232.175.86 Connexion vers codeload.github.com (codeload.github.com)|204.232.175.86|:443...connecté. requête HTTP transmise, en attente de la réponse...200 OK Longueur: non spécifié [application/zip] Sauvegarde en : «master» [ <=> ] 31 687 757 942K/s ds 43s 2013-06-05 16:27:35 (713 KB/s) - «master» sauvegardé [31687757] real 0m52.166s user 0m19.180s sys 0m25.250s $ egrep 'read|write' wget.log | awk 'BEGIN {FS="="}{ sum += $2} END {print sum}' 28550717 Unzipping wget result : $time strace -e trace=read,write -o unzip.log unzip master .... real 0m28.660s user 0m7.780s sys 0m11.160s $ egrep 'read|write' unzip.log | awk 'BEGIN {FS="="}{ sum += $2} END {print sum}' 84418077 Which means :
So, in the end, I think that |
This is fishy.
I can't see how git could write 132MB of files doing only 56MB of I/O. I think you need to add Also, for both the unzip and git checkout stages, the reads should be cheap/free, as it the just download data will probably still be in cache. |
I have tested the 'git clone' and 'wget' options Test environment I tested each option twice in case github server caching would impact the result. First git clone test
Second git clone test
First wget test
Second wget test
|
I haven't done any timing or comparisons myself, but just a small point to note that |
Useful. |
...and this also means that if the latest rpi-update'd firmware prevents your Pi from booting, you can use the offline-update mode of rpi-update on another Linux computer, and ask rpi-update to install the |
Latest update removes the requirement for git, and all downloading uses curl. |
when I use wget down a compressed file, e.g., tar, tar.gz or zip file, I failed to un-zip them. Error is: Can't extract files from the archive, you missed the archive name! any idea about that??? |
Post the exact commands you entered and errors reported and we may be able to help. |
I use Raspian, the OS in my raspberry pi. Compressed a folder to tar.gz file, and then I uploaded it to my github repository in the master branch. Then I click the tar.gz file, and copy the link in the address bar, and use wget http://aaa/aa/aaa/file.tar.gz, it will download the file into my raspberry pi. then I use tar -xzvf file.tar.gz to unzip it. it tells you that it cannot extract, there is no archive. Very strange thing is when I use the download button in github to download the same file, it works well. |
Please post the actual wget url, not one with aaa/aaa. |
You probably just need to get the right link to the 'raw' URL, rather than the HTML preview that Github offers you by default. |
@xyd945 could you try to run the |
I was just wondering, why not use wget to fetch the firmware?
It is possible, with Github, to download the entire repository as a .zip file
F.ex. here
https://codeload.github.com/Hexxeh/rpi-firmware/zip/master
Or here, for a specific revision
https://codeload.github.com/Hexxeh/rpi-firmware/zip/d5b05be2147bf5dc0137798837af24b0bbbe398d
Then you won't need to clone the repository with history and all, but instead just need to unzip the file.
The text was updated successfully, but these errors were encountered: