Installing packages on the R7000

5 posts / 0 new
Last post
djones
djones's picture
Installing packages on the R7000

Not sure if I am missing something but I could not find much on the installation of other packages on the Kong Mods, is there a way? I would like to install perl to do a little tinkering.

 

I saw it somehow was linked inside the /usr/bin directory of latest version but is a dead link. Any information would be great.

DANgerous25
DANgerous25's picture
Hey there, I recently wanted

Hey there, I recently wanted to do the same thing. After a lot of searching, I found a very easy solution! It might depend on your build though. Here's what to do:

1. Set up a USB drive and attach to the router (this is well documented if you do an internet search, and can be done very easily from the web GUI)

2. Assuming you have the USB drive working, and a working mount of /opt that refers to your USB drive, log into the router using telnet or SSH

3. Type bootstrap at the command prompt and hit enter.  This will do some checking to make sure /opt is available, and if it is it will install opkg package manager.

4. Now you can install stuff at will! For example try opkg list | grep perl and you'll see all the various perl packages available.

It took me days to find out this very simple info, I hope that it saves you or someone else that time! p.s. I'm using build v3.0-r30870M kongac on Netgear R7000.

 

stanly
stanly's picture
Hi, I havethe following DD
Hi, I havethe following DD-WRT version installed but th "bootstrap" command is not found. Do I have to install the Kong version? 
Firmware Version

DD-WRT v3.0-r30880 std (11/14/16)

Kernel Version

Linux 4.4.32-rc1 #1576 SMP Mon Nov 14 10:28:24 CET 2016 armv7l

Thanks,

 

 

DANgerous25
DANgerous25's picture
Hi Stanly, I'm afraid I don't

Hi Stanly, I'm afraid I don't know the answer. Mine is definitely a Kong build, this is the article that gave me the idea to try it: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=263675

The script in my case is in /bin/bootstrap. If you don't have it, you could try creating it yourself and doing what it does. However I have no idea if this will work with your build, so try at your own risk!

Good luck!

Here's the script itself:

oot@DD-WRT:~# cat /bin/bootstrap
#!/bin/sh
# bootstrap - DD-WRT - Prepare router for software installation from package repository
#
# Copyright (C) 2014 Richard Schneidt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details
 
signature () {
 
        ext=".sig"
        /usr/bin/wget -O opkg.ipk.sig http://www.desipro.de/musl/base/opkg.ipk.sig
        verification=`openssl dgst -sha1 -verify /etc/kong.pem -signature opkg.ipk.sig opkg.ipk`
        if [ "$verification" == "Verified OK" ]; then
                return 0
        else
                return 1
        fi
 
}
 
echo "Bootstrap is checking prerequisites..."
echo ""
 
if [ "$(nvram get usb_automnt)" = "1" ]; then
      echo "USB automounter is enabled."
else
      echo "You did not enable USB automount."
fi
 
opt_part=`mount | grep /opt`
 
if [ "$opt_part" != "" ]; then
      echo "Found a valid partition: /opt."
      echo ""
      echo "Proceed with download and install of opkg? (y/n) [default=n]:"
      read input
      if [ "$input" == "y" ]; then
                cd /opt
                `/usr/bin/wget http://www.desipro.de/musl/base/opkg.ipk -O opkg.ipk`
                if signature ; then
                        `/bin/mkdir -p /opt/lib`
                        `/usr/bin/wget http://www.desipro.de/musl/functions.sh -O /opt/lib/functions.sh`
                        EXTB=`tar zxvf opkg.ipk`
                        EXTC=`tar zxvf data.tar.gz`
                        REMOVE=`rm -rf opkg.ipk data.tar.gz control.tar.gz debian-binary`
                        UPDATE=`/opt/bin/opkg update`
                        echo "Bootstrap complete. You can now use opkg to install additional packages."
                else
                        echo "Error: Signature does not match."
                fi
      else
                echo "Aborting."
      fi
else
      echo "No usable partition found."
fi

 

shane8750
shane8750's picture
Holy! I was looking for hours

Holy! I was looking for hours last night, have hdd with \opt mounted and Voila! 'bootstrap' commmand initiated opkg installer and all is good. Kind of wish this important step could be listed under the main tips page (R7000 34015m dec-17 release) 

Thanks for this easy fix of missing opkg :)