Go Down

Topic: Setup local packages repository (Read 8471 times) previous topic - next topic

sonnyyu

In case no internet or deploying a large number of Yun.  The local packages repository will help..

Mount Micro SD card with Yun,  230MB available space will be needed.

Code: [Select]
mkdir -p /mnt/sda1/packages
cd /mnt/sda1/packages

wget http://downloads.arduino.cc/openwrtyun/1/packages/Packages
wget http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig
wget http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz

cat Packages | grep "Filename: " >downloadfile.txt
sed -i 's/Filename: /http:\/\/downloads.arduino.cc\/openwrtyun\/1\/packages\//g' downloadfile.txt
wget -i downloadfile.txt


after ~20 mins , 3030 files will be downloaded to Micro SD card.

Change feed to local:

Code: [Select]
nano /etc/opkg.conf
#src/gz attitude_adjustment http://downloads.arduino.cc/openwrtyun/1/packages
src/gz local file:////mnt/sda1/packages
opkg update


take cab to airport, get on board and happy programming Yun.

federicofissore


sonnyyu

#2
Jan 21, 2015, 09:33 pm Last Edit: Jan 21, 2015, 09:36 pm by sonnyyu
At debian using aria2 to download with multiple simultaneous connections

Code: [Select]
apt-get install -y aria2

Download with 16 simultaneous connections:

Code: [Select]
time aria2c -x 16 -i  downloadfile.txt

Code: [Select]
Status Legend:
(OK):download completed.

real    2m33.657s
user    0m3.644s
sys     0m5.772s


Much quicker than 20mins.

Code: [Select]
tar -cvzf openwrtyun.tar.gz openwrtyun

Upload openwrtyun.tar.gz  into https://www.dropbox.com




sonnyyu

#3
Jan 21, 2015, 09:36 pm Last Edit: Jan 22, 2015, 06:09 pm by sonnyyu
At Yun:

Download openwrtyun.tar.gz:

Code: [Select]
wget -O openwrtyun.tar.gz https://www.dropbox.com/s/ilfb7hainhq9r0o/openwrtyun.tar.gz?dl=0 --no-check-certificate


Code: [Select]
root@Arduino:/mnt/sda1# md5sum openwrtyun.tar.gz
f4351fcf4ebeda3eec702fa98812cf96  openwrtyun.tar.gz


Make sure md5 hash is f4351fcf4ebeda3eec702fa98812cf96

Code: [Select]
tar -xvzf openwrtyun.tar.gz

Code: [Select]
nano /etc/opkg.conf
#src/gz attitude_adjustment http://downloads.arduino.cc/openwrtyun/1/packages
src/gz local file:////mnt/sda1/openwrtyun
opkg update

sonnyyu

#4
Jan 21, 2015, 09:37 pm Last Edit: Jan 23, 2015, 05:25 am by sonnyyu
For person in China:

http://pan.baidu.com/s/1jGIcLIu

download openwrtyun.tar.gz into PC

Then use winscp ( Select SCP protocol) to upload to Yun:


http://winscp.net/eng/download.php


Code: [Select]
root@Arduino:/mnt/sda1# md5sum openwrtyun.tar.gz
f4351fcf4ebeda3eec702fa98812cf96  openwrtyun.tar.gz


Make sure md5 hash is f4351fcf4ebeda3eec702fa98812cf96


iamadog3333

#5
Jan 22, 2015, 10:36 am Last Edit: Jan 22, 2015, 10:39 am by iamadog3333
Dear sonnyyu,
I am using goagent. I thought I could across the "wall" that blocks the internet.
Actually, Too young too simple. I can not use the cmd "opkg updat" online.


Your offline method worked for me.

Thanks a lot!

iamadog3333

#6
Jan 22, 2015, 01:23 pm Last Edit: Jan 22, 2015, 01:31 pm by iamadog3333
For person in China:

http://pan.baidu.com/s/1pJ3Fz9T

download openwrtyun.tar.gz into PC

Then use winscp ( Select SCP protocol) to upload to Yun:


http://winscp.net/eng/download.php





It seems tha both Packages.gz and Packages.sig needed. But there is not enough files in your Baidu Yun.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.

sonnyyu

#7
Jan 22, 2015, 06:15 pm Last Edit: Jan 22, 2015, 07:09 pm by sonnyyu
It seems tha both Packages.gz and Packages.sig needed. But there is not enough files in your Baidu Yun.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.
Thank you for point it out. I re-upload the file to baidu and also list md5 hash. Please try it again.

iamadog3333

Hi sonnyyu,
   Your baidu yun link broken. May be you should post out a  new link.

sonnyyu


louisbourdon

@sonnyyu
I have downloaded the baidu file, but when I scp to Yun, I get an error as I don't have much space.
Should I copy the image to the microSD card? I don't understand the process, could you clarify?
Thanks

sonnyyu


louisbourdon

I copied to another microSD and it is ok now.

I changed the text file

nano /etc/opkg.conf
#src/gz attitude_adjustment http://downloads.arduino.cc/openwrtyun/1/packages
src/gz local file:////mnt/sda1/openwrtyun
opkg update

But I get:

root@Arduino:/mnt/sda1# opkg update
Collected errors:
* opkg_conf_load: Could not lock /var/lock/opkg.lock: Resource temporarily unavailable.


sonnyyu

Use overlay or root expansion will make your life much easy.




louisbourdon

#14
Feb 12, 2015, 04:59 am Last Edit: Feb 12, 2015, 05:00 am by louisbourdon
Using the YunDiscSpaceExpander sketch, I get this:

Ready to install utility software. Please ensure your Arduino Yun is connected to internet.
Ready to proceed (yes/no)? yes
Updating software list...
err. with opkg, check internet connection

(btw, board is online, I checked)

Again, no opkg packages are coming whatsoever. I have no clue how to update. I have tried for two days all solutions I could find!!!

Go Up