See the OpenWRT official doc:
Router configuration
Configure the OpenWRT router to know about the new custom feed location; In /etc/opkg.conf
add something like this
# customfeeds
src/gz custompackages http://s3.amazonaws.com/mycustompackages-orwhatever
You will also need to accept your custom signing key assuming you do package signing.
wget http://s3.amazonaws.com/mycustompackages/public.key
opkg-key add public.key
Server files needed
Now you need to setup the HTTP server, I've successfully an S3 bucket for a while.
Packages.gz
- compressed version of Package
Packages
- uncompressed version of Packages
Packages.sig
-
custom_public.key
-
yourpackage.ipk
- the actual ipk package file to be installed
How to create the files
- You can create the ipk file using
ipkg-build
; I've used this version
- You can create the
Packages
index file using ipkg-make-index.sh
script. (I've used this one)
- Get
Packages.gz
by gzipping the Packages
file
- Use usign to create the Private/Public keys for Package signing
- Also use usign to create the
Packages.sig
file
Sample script
This sample assumes your private key is private.key
ipkg-build mypackage .
mv mypackage.ipk packages/
cd packages
../ipkg-make-index.sh . > Packages
usign -S -m Packages -s ../keys/private.key -x Packages.sig
gzip -fk Packages