attila-lendvai / openwrt-auto-extroot Goto Github PK
View Code? Open in Web Editor NEWUse the OpenWRT ImageBuilder to build a firmware that automatically formats and moves extroot to any (!) inserted storage device
License: MIT License
Use the OpenWRT ImageBuilder to build a firmware that automatically formats and moves extroot to any (!) inserted storage device
License: MIT License
I have a small change to the build.sh script to update it to reflect the openwrt-lede remerge, and also to update the default version number to the current one.
--- a/build.sh
+++ b/build.sh
@@ -26,7 +26,7 @@ BUILD=`absolutize $BUILD`
### chose a release
###
#RELEASE="15.05.1"
-RELEASE="17.01.1"
+RELEASE="17.01.4"
IMGBUILDER_NAME="lede-imagebuilder-${RELEASE}-${TARGET_ARCHITECTURE}-${TARGET_VARIANT}.Linux-x86_64"
IMGBUILDER_DIR="${BUILD}/${IMGBUILDER_NAME}"
@@ -35,7 +35,7 @@ IMGBUILDER_ARCHIVE="${IMGBUILDER_NAME}.tar.xz"
IMGTEMPDIR="${BUILD}/openwrt-build-image-extras"
#https://downloads.lede-project.org/snapshots/targets/ar71xx/generic/lede-imagebuilder-ar71xx-generic.Linux-x86_64.tar.xz
#https://downloads.lede-project.org/snapshots/targets/ar71xx/generic/lede-imagebuilder-ar71xx-generic.Linux-x86_64.tar.xz
-IMGBUILDERURL="https://downloads.lede-project.org/releases/${RELEASE}/targets/${TARGET_ARCHITECTURE}/${TARGET_VARIANT}/${IMGBUILDER_ARCHIVE}"
+IMGBUILDERURL="https://downloads.openwrt.org/releases/${RELEASE}/targets/${TARGET_ARCHITECTURE}/${TARGET_VARIANT}/${IMGBUILDER_ARCHIVE}"
if [ -z ${TARGET_DEVICE} ]; then
echo "Usage: $0 architecture variant device-profile"
hi!
i have os x and i tried to build an openwrt image for tp-link mr3020 and everything went well (minor modifications of mkdir -pv
and from make to gmake in build.sh
file) until I got:
fi
/Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/find: line 4: /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/bundled/lib/ld-linux-x86-64.so.2: cannot execute binary file
/Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/find: line 4: /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/bundled/lib/ld-linux-x86-64.so.2: Undefined error: 0
/Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/opkg: line 4: /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/bundled/lib/ld-linux-x86-64.so.2: cannot execute binary file
/Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/opkg: line 4: /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/bundled/lib/ld-linux-x86-64.so.2: Undefined error: 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make package_install
Installing packages...
IPKG_NO_SCRIPT=1 IPKG_TMP="/Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/tmp/ipkgtmp" IPKG_INSTROOT="/Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx" IPKG_CONF_DIR="/Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/tmp" IPKG_OFFLINE_ROOT="/Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx" /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/opkg -f /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05x" /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/opkg -f /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/repositories.conf --force-depends --force-overwrite --force-postinstall --cache /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/dl --offline-root /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx --add-dest root:/ --add-arch all:100 --add-arch ar71xx:200 install /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/packages/base/libc_0.9.33.2-1_ar71xx.ipk
/Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/opkg: line 4: /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/bundled/lib/ld-linux-x86-64.so.2: cannot execute binary file
/Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/opkg: line 4: /Users/sindhus/openwrt-auto-extroot/build/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64/staging_dir/host/bin/bundled/lib/ld-linux-x86-64.so.2: Undefined error: 0
make[2]: *** [package_install] Error 1
make[1]: *** [_call_image] Error 2
make: *** [image] Error 2
am guessing the Makefile in the build dir is trying to execute the binaries of openwrt?
How do I use this project on OS X?
Thanks!
converting PR #15 into this issue, so that i can close it.
i opened an OpenWRT feature request that hopes to resolve this upstream: openwrt/openwrt#6618
it would be nice to get a confirmation before formatting the plugged in storage device, but there aren't many convenient ways in this context to interact with the user...
I've tried the methods on the Failsafe Mode, Factory Reset, and Recovery Mode page without luck.
Both the soft reset firstboot && reboot now
and the hard reset umount /overlay && jffs2reset && reboot now
don't seem to have any effect.
How can I reset the extroot to factory / defaults?
I have a couple of TP-Link TL-WDR3600 v1 routers. I'm posting here because of a strange quirk I noticed and I'm not sure how to debug for. Hoping someone here has an idea what could be up.
When trying the build generated from this project it seems to work but requires a manual power cycle after the USB storage is setup.
What I've observed is that the router will turn on and with the below LED code flash the appropriate LEDs showing that the script is setting up along with the USB thumb drive flashing itself. After seeing the router reboot the first time both the router and USB will flash LEDs more signifying that it's installing packages, then a second reboot happens. It's at the second reboot where it seems to hang. The USB LED will not come on but the LEDs for router power and connected Ethernet ports do come on. It seems to get into a odd state where internet is "passing through" like a unmanaged switch but it doesn't bother with the USB or respond to SSH or WebUI requests, it's not accessible over 192.168.1.1.
If I manually cycle power at this state the router reboots normally and everything appears to work as if nothing is wrong. I can at this point even run a reboot command from he WebUI LUCI.
Any thoughts what might be happening? I'm hazarding a guess that after setup and manually power cycling once that it is good to go.
LED code
*tl-wdr3600*)
autoprovisionUSBLed="green:wlan2g"
autoprovisionStatusLed="green:wlan5g"
;;
Tried with lede-imagebuilder-17.01.2 and 01,same result all time.
TP-Link TL-MR3420 v2
these packages disabled
#PREINSTALLED_PACKAGES+=" ppp ppp-mod-pppoe ppp-mod-pppol2tp ppp-mod-pptp kmod-ppp kmod-pppoe"
#PREINSTALLED_PACKAGES+=" luci"
Hi,
I've created image for Asus RT-AC88U. Everything worked until one random reboot and USB that I use for extroot got formatted again. And it happened again randomly after poweroff/reboot. Not sure why this happens. I can provide more information if you direct me to what you need.
OpenWrt 23.05.2
tnx
It's an very useful addon!!
I'd ask for it.
Thanks!
I have OpenWRT already running on a WD My Net n750 but it is an older build, 19.07.9. Due to a issue with newer builds and a possible solution of using extroot to get around it. I would like to use this to build a extroot enabled OpenWRT image.
I know the LEDs are named differently for this model but I'm not sure where to get the proper names. The only names I see so far are:
ls /sys/class/leds/
ath9k-phy0 ath9k-phy1 mynet-n750:blue:internet mynet-n750:blue:power mynet-n750:blue:wireless mynet-n750:blue:wps
Does that mean I would insert something like the following into the autoprovision-functions.sh
file?
*mynet-n750*)
autoprovisionUSBLed="blue:wps"
autoprovisionStatusLed="blue:wireless"
;;
Hi!
In
$make info | grep 3040
TLMR3040:
TP-LINK TL-MR3040
i found only TL-MR3040.
Is it means that TL-MR3040 V2 is not supported by this script?
UPDATE:
After successful compilation there a 2 versions of bins for V1 and V2 hardware separately
Nice!!!
Thx
PREINSTALLED_PACKAGES+=" blkid mount-utils swap-utils e2fsprogs fdisk"
add to the size of the image and leave very little space so one can have functionality (like USB Storage PREINSTALLED_PACKAGES="block-mount kmod-usb-storage kmod-fs-exfat"
).
I commented out:
#PREINSTALLED_PACKAGES+=" kmod-usb-uhci kmod-usb-ohci"
# the following packages are optional, feel free to (un)comment them
#PREINSTALLED_PACKAGES+=" wireless-tools firewall iptables"
#PREINSTALLED_PACKAGES+=" kmod-usb-storage-extras kmod-mmc"
#PREINSTALLED_PACKAGES+=" ppp ppp-mod-pppoe ppp-mod-pppol2tp ppp-mod-pptp kmod-ppp kmod-pppoe"
#PREINSTALLED_PACKAGES+=" luci"
and yet I get errors:
[mktplinkfw] *** error: images are too big
and of course no .bin images are generated as a result.
Because I had the same issue of NAND memory running out on router trying to install USB support manually (opkg install), I figured your project would help. Of course, am still stuck in the same problem as before.
How do I go about this?
After upgrading from 17.01.1 to 17.01.4 (extroot to extroot), there was an issue: The overlay was not properly mounted.
Kernel will log something like [ 11.680000] block: extroot: UUID mismatch (root: 57a0acc6-ecc0a5e7-2ea71070-845539a7, overlay: d578bcbf-510a3603-823f14c1-4e16d34e)
This takes a look at what might be the underlying issue - I ended fixing the issue by mounting the USB-stick and deleting /etc/.extroot-uuid as explained here.
Perhaps there is a way this could be automated in the future...
Another issue I ran into after the sysupgrade was, that I couldn't install any packages, as they were expecting a newer kernel. I could only solve this issue by manually wget
ing the current kernel-ipkg and installing it. Perhaps also something that should be considered by the provisioning-script when performing a sysupgrade...
is this version supported... already tried make info and it wasnt listed, yet in your project i can see a folder with its name
back up master branch in a branch called 'openwrt', and replace master with the 'lede' branch.
the lede branch was reported to work by one user at around the end of 2016.
rename the project to lede-auto-extroot.
Hey,
I have created an image with your script for the TL-WDR4300.
I have used the -sysupgrade.img
to maintain my previous configuration.
After rebooting, I had the USB stick mounted and the system has been upgraded.
The problem is that /
is not mounted to the USB stick.
Since I could not find any other possibility to contact you, I am trying this, even if this is not the proper way to ask such questions :)
thanks for this wonderful application.
I use this to build my own 19.07.3 openwrt image , it's perfect !
now it's 512M in / , and remain space goes to /mnt/data
like I want more space in root , like 8G or more
can I just modify autoprovision-stage1.sh to make my own disk layout
or is there any other script should bt modified ?
I cloned the repository, edited the build.sh
to have RELEASE="18.06.0"
and then run:
./build.sh ar71xx generic tl-wdr3600-v1
But I get this error:
./build.sh: line 84: pushd: /home/user/openwrt-auto-extroot-2018-07/build/lede-imagebuilder-18.06.0-ar71xx-generic.Linux-x86_64: No such file or directory
Does openwrt-auto-extroot
work with 18.06.0
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.