Notepad of a tinker, maker, hacker or whatever you call it :)

How to setup an OpenWrt repository

I recently wanted to setup a repository for some custom OpenWrt packages for Respeaker. It seems that it is not so well documented, or at least, I did not found it and I have been helped on OpenWrt forum.
Also, it is better to sign packages we go !

Prepare the repository

  1. Compile and install usign from here.
  2. Generate key thanks to: usign -G -p -s openWrtUsign.key.
  3. Put the following script in the IPK directory.
  4. Make it executable: chmod +x
  5. Execute it: ./
  6. Copy the whole directory and to a webserver.
  7. Done !

Add key and install packages on the target

# Add the public key
wget http://youserver.ext/path/to/  
opkg-key add  
opkg update

# Install package
opkg install  newPackage  

Manifest generation script



# Generates package manifest
$SCRIPT . 2>/dev/null > Packages.manifest
grep -vE '^(Maintainer|LicenseFiles|Source|Require)' Packages.manifest > Packages  
gzip -9nc Packages > Packages.gz  
usign -S -m Packages -s $KEY