Optware on K3-AC-ARM/Repositories/magick777

From DD-WRT Wiki

Jump to: navigation, search


[edit] magick777's minimal repository

After countless failed attempts to recompile the whole OpenWRT repository, I decided to try a slightly different approach, i.e. to start with the most minimal build possible, and to add packages in function of need. This repo is built on a different machine than the development repo, below, which I'm still working on.

[edit] Why use it?

There are some fixes and improvements as compared with using the unmodified imx6 repo.

  • rdiff-backup, tweaked to find python under /opt
  • tor updated, compiled with static openssl, zlib, libevent - fixes a segfault
    • tor-alpha also updated, take your pick
    • arm Tor anonymising relay monitor, packaged & tweaked for /opt + deps on lsof, python-readline

[edit] Why not use it?

This is a deliberately minimal repository and it contains far fewer packages than the Optware imx6 repository. For a list of what's available in the imx6 repository but missing or not yet available in this one, please see http://debian.keithdunnett.net/ddwrt/bcm53xx/missing-packages - note that this is generated manually and it may not be completely up to date.

[edit] What does it contain?

This section will never be a complete list and might get deleted. It contains some of the same packages as the imx6 repo, with some additions, deletions, changes and bugfixes. And maybe some new bugs, for all I know.

  • aria2 version bump to 1.18.3
  • chillispot
  • coreutils-*
  • mysql
  • nano + dependencies
  • rdiff-backup (fixed path) + dependencies
  • rsync
  • sshfs
  • openssl version bump to 1.0.1f, recompiled with all ciphers enabled to keep Tor happy
  • tor stable version bump to, static openssl, libevent & zlib (no segfault now)
  • tor-alpha version bump to, static openssl, libevent & zlib (no segfault now)

[edit] How to use it?

WARNING: this is as raw and bleeding as it gets. This is a straight upload of the output dir that I'm using for my own testing, and while much of it might work, it is not a collection of tested and working software. You have been warned.

[edit] Architecture

This repository is compiled using OpenWRT's 'bcm53xx' target, which is for ARM-based Broadcom 47xx and 53xx SoCs. Suitable routers include Netgear R7000, and possibly anything else that runs <Kong>'s K3-AC-ARM build. Recommended DD-WRT firmware is version r23550M-R01 or later.

[edit] Instructions

[edit] Preparing for optware install

[edit] Using USB storage

Prepare a usb flash disk with 3 partitions 512MB swap + 2 partitions ext2/ext3 or ext4. Enable USB Storage and mount one partition to /jffs, the other to /opt, by using the uuids which are shown in disk info. Note: if you use this method, you do NOT need to enable JFFS2 support in the GUI. That's for putting the JFFS partition on the internal flash.

[edit] Using JFFS storage

If you don't have USB storage attached to your router you can resort to the time-honoured method of enabling JFFS2 (from the DD-WRT GUI), which will give you ~90MB of storage under /jffs. You can then

mkdir /jffs/opt 
mount --bind /jffs/opt /opt

which will let you install smaller packages using JFFS alone. If you do this, you'll need to re-create the bind mount on startup.

[edit] Installing optware

[edit] Scripted configure of opkg

[edit] For brave people [and those who examined the file first]
wget -q -O- http://debian.keithdunnett.net/ddwrt/optware_setup | sh

Note: you should never trust a script like this without examining it. Go visit that file in your web browser and satisfy yourself it doesn't contain anything malicious before you run the above command. It doesn't, but it's good practice to get into if you're going to start piping scripts off the web into a shell interpreter.

[edit] For not so brave people
mkdir -p /opt/usr/bin
wget -q -O- http://debian.keithdunnett.net/ddwrt/optware_setup > /opt/usr/bin/optware_setup
vi /opt/usr/bin/optware_setup #or use your favourite editor, just have a look at it anyway
chmod 700 /opt/usr/bin/optware_setup

[edit] Manually configure opkg

Recorded here for reference. You only need to do this if you didn't take the scripted option, above.

[edit] Use ipkg to install opkg
ipkg update
ipkg install opkg
[edit] Create the opkg config file
cat > /jffs/etc/opkg.conf <<EOF
src trunk http://debian.keithdunnett.net/ddwrt/bcm53xx/packages
dest root /opt
dest ram /tmp
lists_dir ext /jffs/var/opkg-lists
option overlay_root /opt/overlay
arch all 1
arch noarch 1
arch bcm53xx 5
[edit] Update opkg lists
opkg -f /jffs/etc/opkg.conf update
[edit] Reinstall opkg from new repo
opkg -f /jffs/etc/opkg.conf --force-reinstall install opkg
[edit] Install a package
opkg -f /jffs/etc/opkg.conf --force-depends install <package>
[edit] Fix the opkg command with an alias
alias opkg="opkg -f /jffs/etc/opkg.conf --force-depends"

will add the necessary switches for you by default, so you can just use "opkg list", "opkg install <what>". If you want to make this permanent, you can add

echo 'alias opkg="opkg -f /jffs/etc/opkg.conf --force-depends"' >>/tmp/root/.profile

to your startup commands; this will add the relevant entry into your profile to be called as you log in.

[edit] Suppress annoying dependency errors

The libc package isn't indexed by default, but you can install it manually to stop opkg complaining:

opkg install http://debian.keithdunnett.net/ddwrt/bcm53xx/packages/libc_0.9.33.2-1_bcm53xx.ipk

As for the errors thrown by kmod-* postinst scripts, these can be suppressed (not fixed, just silenced) by setting the environment variable "IPKG_INSTROOT"; the postinst scripts check whether this variable exists and abort if it does. This does not make kernel modules work; it does stop the complaining when you're installing something that depends on kernel modules or functionality already available in DD-WRT, such as tun or fuse.

export IPKG_INSTROOT=/opt

should do it, and add

echo 'export IPKG_INSTROOT=/opt' >>/tmp/root/.profile

to your startup scripts to make it permanent.

[edit] Install package(s)

[edit] Update opkg

opkg update

[edit] List packages

opkg list

[edit] FAQ

[edit] What are you doing next?

Looking at adding more relevant packages, and bugfixing where possible.

[edit] Will you add <package>?

Possibly, but with no guarantees. If it's already in OpenWRT, and it compiles for our architecture, and there's a believable use case for having it on an R7000 router, very possibly.

[edit] Will you add custom kernel modules?

[edit] What about porting OTRW2?

A direct port of basmaf's OTRW2 may be possible, at such time as the repository supports a useful set of packages.

[edit] Changelog


  • sslh: version bump to 1.16, enabled libconfig, Makefile fixes
  • initial release, ~500 packages compiled


[edit] Odds and ends [not useful to end users]

Stuff in this section is probably not of interest to end users, but it might be useful to anyone looking to compile their own repository (and/or to me in the future).

[edit] Snippets

[edit] Check broken packages (buildbot output vs. local config file)

for pkg in `lynx -dump -nolist http://buildbot.openwrt.org:8010/broken_packages/imx6/ | grep "\[Dir" | awk {'print $1'}| sed -e "s|/$||g"`; do grep "_$pkg\=" openwrt/.config | grep -v "not set"; done;

Highlights which (if any) of the packages reported broken for imx6 by OpenWRT's buildbot are enabled in our config file. We can expect these to break for bcm53xx also, unless we have provided fixes for them. Can be useful for fixing or disabling preemptively.

[edit] Compare package feed dir against master package feed from OpenWRT

diff --exclude=.svn --exclude=wget-log --exclude=Makefile.orig -ruN master/feeds/packages/ openwrt/feeds/packages

[edit] Compare the built packages against the imx6 repository

lynx -source http://downloads.openwrt.org/snapshots/trunk/imx6/packages/ | cut -d\" -f 2 | grep \.ipk | cut -d \_ -f 1 | sort > imx6
lynx -source http://debian.keithdunnett.net/ddwrt/bcm53xx/packages/ | cut -d\" -f 8 | grep \.ipk | cut -d \_ -f 1 | sort > bcm53xx
comm -13 bcm53xx imx6