Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
openwrt:manual:a5-v11 [2019/11/17 06:51]
theexpertnoob created
openwrt:manual:a5-v11 [2022/06/26 21:23]
theexpertnoob Too outdated to maintain.
Line 10: Line 10:
 If you brick it trying these procedures, **YOU** are solely responsible for your actions.  ​ If you brick it trying these procedures, **YOU** are solely responsible for your actions.  ​
 **YOU HAVE BEEN WARNED**. However, we can try and help in the forums.  ​ **YOU HAVE BEEN WARNED**. However, we can try and help in the forums.  ​
-This has been recently tested on Nov 17, 2019 and working with PirateBox v1.1.2. </​WRAP>​+This has been recently tested on Nov 17, 2019 and working with PirateBox v1.1.4. </​WRAP>​
    
 ==== 0a. PreSetup A5-V11 from STOCK FIRMWARE ==== ==== 0a. PreSetup A5-V11 from STOCK FIRMWARE ====
Line 19: Line 19:
   * VFAT formatted USB flash drive (might not be empty)   * VFAT formatted USB flash drive (might not be empty)
 Download: Download:
-  * [[http://druss.org/​public/​test-build/​uboot256.img|u-boot 256]] This is version 3 which supports recovery from USB as well as TFTP and serial. +  * [[http://gandalfsax.com/​public/​test-build/​uboot_usb_256_03.img|u-boot 256]] This is version 3 which supports recovery from USB as well as TFTP and serial. 
-  * [[http://druss.org/​public/​test-build/​openwrt-ramips-rt305x-a5-v11-squashfs-factory.bin|My OpenWrt release]]+  * [[http://gandalfsax.com/​public/​test-build/​lede-ramips-rt305x-a5-v11-squashfs-factory.bin|My OpenWrt release]]
   ​   ​
   * Copy them to USB drive, rename OpenWrt image to firmware.bin   * Copy them to USB drive, rename OpenWrt image to firmware.bin
Line 56: Line 56:
   * Ethernet Cable   * Ethernet Cable
 Download: Download:
-  * [[http://druss.org/​public/​test-build/​openwrt-ramips-rt305x-a5-v11-squashfs-sysupgrade.bin|My OpenWrt release]]+  * [[http://gandalfsax.com/​public/​test-build/​lede-ramips-rt305x-a5-v11-squashfs-sysupgrade.bin|My OpenWrt release]]
   * In a command line interface be it bash for linux or CMD for Windows, copy over the sysupgrade using pscp. below is an example.   * In a command line interface be it bash for linux or CMD for Windows, copy over the sysupgrade using pscp. below is an example.
 <​code>​ <​code>​
Line 87: Line 87:
 export LD_LIBRARY_PATH='/​lib:/​usr/​lib:/​tmp/​lib:/​tmp/​usr/​lib'​ export LD_LIBRARY_PATH='/​lib:/​usr/​lib:/​tmp/​lib:/​tmp/​usr/​lib'​
 opkg update && opkg install -d ram e2fsprogs dosfstools fdisk opkg update && opkg install -d ram e2fsprogs dosfstools fdisk
-wget http://druss.org/​public/​parts+wget http://gandalfsax.com/​public/​parts
 chmod +x /tmp/parts chmod +x /tmp/parts
 ./parts ./parts
Line 118: Line 118:
 reboot reboot
 </​code>​ </​code>​
 +  * Reconnect to device
 +At this point, if you botch anything below, you can pull the USB drive, kill the partitions and start over at step 1b.
  
-=== It is getting late. === +==== 2Install Packages ==== 
-I will finish ​this later. :-D Hopefully not in a year or so.+  * Copy and paste each code block and reboot between installation blocks as noted. Due to "​newer"​ packages, I have been running out of ram and I am having to split them up so the process doesn'​t kill itself while configuring. ​I will work on an alternate solution soon. 
 +<​code>​ 
 +opkg update && opkg install python lighttpd lighttpd-mod-cgi lighttpd-mod-redirect lighttpd-mod-alias lighttpd-mod-setenv lighttpd-mod-fastcgi 
 +</​code>​ 
 +  * Reboot 
 +<​code>​ 
 +opkg update && opkg install perl perlbase-base perlbase-cgi perl-cgi perlbase-essential perlbase-file perlbase-bytes perlbase-config perlbase-data perlbase-db-file perlbase-digest perlbase-encode perlbase-encoding perlbase-fcntl perlbase-gdbm-file perlbase-integer perlbase-socket perlbase-time perlbase-unicode perlbase-unicore perlbase-utf8 perlbase-xsloader 
 +</​code>​ 
 +You may get an error that it couldn'​t install pearlbase-cgi,​ package is missing. Included perl-cgi and looking into it further. 
 +  * Reboot 
 +<​code>​ 
 +opkg update && opkg install php7-cgi php7-fastcgi unzip minidlna 
 +</​code>​ 
 +LEDE 18.06 does not have php5 but php7. Lets hope this doesn'​t mess too much up. 
 +  * Reboot 
 + 
 + 
 +==== 2-5. Lets set up wifi ==== 
 +<​code>​ 
 +uci set wireless.radio0.disabled=0 
 +uci set wireless.@wifi-iface[0].ssid='​Piratebox - Share Freely'​ 
 +uci commit 
 +/​etc/​init.d/​network reload && wifi 
 +</​code>​ 
 + 
 + 
 +==== 3. Set-up Piratebox, Imageboard & MiniDLNA ==== 
 +  * Copy and paste each line separately. 
 +<​code>​ 
 +cd /tmp 
 +wget http://​downloads.piratebox.de/​piratebox-ws_current.tar.gz 
 +tar xzf piratebox-ws_current.tar.gz 
 +cd piratebox 
 +cp -rv piratebox /opt 
 +cp /​opt/​piratebox/​src/​openwrt.example.minidlna /​etc/​config/​minidlna 
 +sed -i '​s|DO_IFCONFIG="​yes"​|DO_IFCONFIG="​no"​|g'​ /​opt/​piratebox/​conf/​piratebox.conf 
 +sed -i '​s|USE_APN="​yes"​|USE_APN="​no"​|g'​ /​opt/​piratebox/​conf/​piratebox.conf 
 +sed -i '​s|NET=192.168.77|NET=192.168.1|g'​ /​opt/​piratebox/​conf/​piratebox.conf 
 +sed -i '​s|DNSMASQ_INTERFACE="​wlan0"​|DNSMASQ_INTERFACE="​br-lan"​|g'​ /​opt/​piratebox/​conf/​piratebox.conf 
 +sed -i '​s|DROOPY_CHMOD|#​DROOPY_CHMOD|g'​ /​opt/​piratebox/​conf/​piratebox.conf 
 +sed -i '​s|getenv = CDLL("​libc.so.6"​).getenv|getenv = CDLL("​libc.so.0"​).getenv|g'​ /​opt/​piratebox/​bin/​droopy 
 +sed -i '​s|$SERVER["​socket"​] == "​[::​]:​80"​ {  }||# $SERVER["​socket"​] == "​[::​]:​80"​ {  }|g' /​opt/​piratebox/​conf/​lighttpd/​lighttpd.conf 
 +/​etc/​init.d/​lighttpd stop 
 +/​etc/​init.d/​lighttpd disable 
 +/​opt/​piratebox/​init.d/​piratebox_alt start 
 +/​opt/​piratebox/​bin/​install_piratebox.sh /​opt/​piratebox/​conf/​piratebox.conf imageboard 
 +/​opt/​piratebox/​bin/​board-autoconf.sh 
 +</​code>​ 
 +  * Enter in a code for your imageboard. 
 +<​code>​ 
 +uci set network.lan.proto='​static'​ 
 +uci set system.@system[0].hostname='​piratebox'​ 
 +uci commit 
 +service network reload && /​etc/​init.d/​system reload 
 +</​code>​ 
 +  * Press Enter (you will be disconnected) 
 +  * Reconnect to '​Piratebox - Share Freely'​ SSID and back to 192.168.1.1 
 +==== 4. Create piratebox start ==== 
 +<​code>​vi /​etc/​init.d/​piratebox</​code>​ 
 +  * Copy the below code. In your shell window, press I to insert text then right-click ​or paste to insert. Be sure **ALL** of it has been pasted. Press ESC, SHIFT+Z, Shift+Z to save. (editor will auto close) 
 +<​code>​ 
 +#!/bin/sh /​etc/​rc.common 
 + 
 +NAME=piratebox 
 +START=55 
 +STOP=20 
 + 
 +start() { 
 +        /​opt/​piratebox/​init.d/​piratebox_alt start 
 +
 + 
 +stop() { 
 +        /​opt/​piratebox/​init.d/​piratebox_alt stop 
 +
 +</​code>​ 
 +==== 5. Finalization ==== 
 +  * Copy and paste each line separately. 
 +<​code>​ 
 +chmod +x /​etc/​init.d/​piratebox 
 +/​etc/​init.d/​piratebox start 
 +/​etc/​init.d/​piratebox enable 
 +reboot 
 +</​code>​ 
 +==== 6. Options are optional ==== 
 +~Sarge, RvB 
 +=== 6.1 Enable PHP === 
 +<​code>​ 
 +sed -i '​s|#​include "/​opt/​piratebox/​conf/​lighttpd/​fastcgi-php.conf"​|include "/​opt/​piratebox/​conf/​lighttpd/​fastcgi-php.conf"​|g'​ /​opt/​piratebox/​conf/​lighttpd/​lighttpd.conf 
 + 
 +sed -i '​s|doc_root =|;doc_root =|g' /​etc/​php.ini 
 + 
 +echo "<?​php phpinfo() ?>" > /​opt/​piratebox/​share/​content/​phpinfo.php 
 + 
 +/​etc/​init.d/​piratebox reload 
 +</​code>​ 
 +  * test 
 +http://​piratebox.lan/​content/​phpinfo.php you should get a long php info page of stuff. 
 +If it works, you can delete the phpinfo page with this command. 
 +<​code>​ 
 +rm /​opt/​piratebox/​share/​content/​phpinfo.php 
 +</​code>​ 
 +=== 6.2 Enable IRC === 
 +  * Copy and past each line 
 +<​code>​ 
 +sed -i '​s|ENABLE_IRC_SERVER="​no"​|ENABLE_IRC_SERVER="​yes"​|g'​ /​opt/​piratebox/​conf/​piratebox.conf 
 +/​etc/​init.d/​piratebox restart 
 +</​code>​ 
 +=== 6.3 Change Upload Folder === 
 +<​code>​ 
 +mkdir -p /​opt/​piratebox/​share/​Shared/​Uploaded 
 +sed -i '​s|UPLOADFOLDER="​$SHARE_FOLDER/​Shared"​|UPLOADFOLDER="​$SHARE_FOLDER/​Shared/​Uploaded"​|g'​ /​opt/​piratebox/​conf/​piratebox.conf 
 +/​etc/​init.d/​piratebox restart 
 +</​code>​ 
 + 
 +==== 7. Fixes ==== 
 +  * MiniDLNA 
 +Minidlna config points to the wrong path. So we need to fix it 
 +<​code>​ 
 +vi /​etc/​config/​minidlna 
 +</​code>​ 
 +Press **I** on the keyboard to get into edit mode\\ 
 +change the line that reads **list media_dir '/​mnt/​usb/​PirateBox/​Shared/'​**\\ 
 +to **list media_dir '/​opt/​piratebox/​share/​Shared/'​**\\ 
 +Press SHIFT+Z, SHIFT+Z on the keyboard ​ to save. 
 +<​code>​ 
 +/​etc/​init.d/​minidlna reload 
 +</​code>​ 
 +to save changes 
 +==== Credits ==== 
 +  * Matthias - for the Piratebox Project and updated code. 
 +  * meduza - for the majority of the scripting for the Zsun. 
 +  * stylesuxx - for the wifi configuration and troubleshooting. 
 +  * TheExpertNoob - for troubleshooting and this wiki guide. 
 + 
 +If I forgot anyone else, PM me.