Ok. Let’s start again by writing down our problem: Now, in this stage, you have all the required SDK components in place. $ mipsel-openwrt-linux-gcc -o hello.mipsel hello.c Connect the USB stick and copy the file system to it in order not to be dependent on the size of flash memory in the router. “download” the sources from a proper repository and put them somewhere inside the SDK folder structure; “download” some additional files (among of which, unfortunately, a file named Makefile…that is a really different thing with respect to the Makefiles included in the tcpdump sources, related to the autoconf cicle); “download” every required packages (tcpdump requires libpcap, so the libpcap packages is “installed” as well). and it refers to the whole folder (/usr/local/src/SOABIT_OWRT_REPO) and not to the Makefile. Hi, So I have this TP-Link WR740N, on which I installed OpenWrt. As pmacct has plenty of “configure” options, due to typical OpenWRT constraint (low resources) I disabled lots of unneeded options. This sounds like a wrong (bugged?) The versions of the packages are not even changing. Copy the Packages file to the router: $ scp Packages root@172.30.33.1:/var/opkg-lists/packages. : rebuild an already existing package or building a new package from scratch). OpenWrt (from open wireless router) is an open-source project for embedded operating systems based on Linux, primarily used on embedded devices to route network traffic. * via commandline * See OPKG Examples to get you started * See OPKG for in-depth explanation * via GUI / LuCi * System -> Software -> Update lists * Filter for the device you are searching for * Click Available packages Lines 30-34: before building pmacct for OpenWRT I tried building it for a “standard” Linux environment. let’s check if we have the REAL packages: Yes!!! Then I found some ways to install and use packages from localhost i.e. For various reasons, last week I decided to run on it a software (pmacct, indeed) that was NOT included in the official package repository. The OpenWRT page does come with a warning about upgrading all packages, but also provides details on how to do it: Thanks, hit me up using my email when you’re done. I’m NOT going to describe above file in detail…. Thank you so much Damiano! It may seem stupid but it’s worth mentioning if anyone has the same problem. Hi there, thanks for a very informative post about building your own package from source code. Then let’s confirm “.config” as the filename to save, and then simply exit until getting back to prompt. In order to keep things under control, multiple feeds have been created so to “group”/”classify” the various package repositories. Anyway I’d start checking two things: 1) that your executable is really an executable built for the Armada385/ARM platform; 2) that you build a “static” binary, so that it (the binary) do **NOT** require additional files (aka: dynamic libraries). Before moving on, make sure opkg does not use any deprecated URL by tryin… using both che x86 compiler and the MIPS one. So I promptly downloaded the SDK version provided for the WDR4300 platform (ar71xx/generic) and got ready to use it: To start experimenting with the SDK, as told by official instruction, I defined: In order to make some test, I decided to focus on the classic helloworld.c. make: *** No rule to make target ‘mipsel/sha1.o’, needed by ‘link’. Actually, you need an opkg update . /openwrt/openwrt-sdk-18.06.4-ramips-mt76x8_gcc-7.3.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/bin/mipsel-openwrt-linux-gcc: line 5: /openwrt/openwrt-sdk-18.06.4-ramips-mt76x8_gcc-7.3.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/bin/../../host/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error My WDR4300 is powered by a MIPS-based CPU: So, I needed to build an executable to run on a “MIPS 74Kc V4.12” CPU. Is that correct? android apache C code cpanel decode desire disk encode extension extract fix free game hosting htc introduction java linux matlab 7 mod_rewrite mysql number conversion opencv OpenWRT php pixel programming redirect router shell skype social media syntax highlighter ubuntu upgrade url url shortener utf-8 video virtualbox virtualization VPN windows 7 wordpress I’m strugling with it but still can’t get it to work… (…and, please,  leave comments below!). Than “SAVE”. Such a behaviour is definitely possibile: I’m also sure that you know as well, that just before start working with the opkg package manager, you need to UPDATE the list of available packages. If you want to use serial access instead, read my article here. Remember: we want to rebuild ONLY tcpdump! Or is it possible, since I have the .so file to copy it into the staging directory and use it from there? Probably a simple thing but beyond my intuition. “refresh” our feeds (so to be sure that our new repository… and related new package… are recognized by the SDK); “install” the pmacct file (so that the SDK will be ready to “build” it). I compiled the helloworld.arm successfully on my Linux box (the x86 version worked fine), but when I run it on my router, it says: I checked the file is there and that is has the execute bit… Any ideas on what I’m doing wrong? You should go ahead and ssh into your router as root (same login used for the LuCI web interface). Its functionality and purpose are comparable to apt on Debian-based systems. Like most Linux distributions (or mobile device operating systems like say Android or iOS), the functionality of the system can be upgraded rather significantly by downloading and installing pre-made packages from package repositories (local or on the Internet). Think I didn't have the latest snapshot after all. Opkg attempts to resolve dependencies with packages in the repositories – if this fails, it will report an error, and abort the installation of that package. The Router has been reset (OpenWrt 15.05). “Packages”, “Package repositories” and “OpenWRT feeds” I’m sure you already know about “OpenWRT packages”. You can check the official package, here: If you are not going to modify the packages themselves, just create an image with a specific list of packages, you can use the image builder instead: Using the Image Builder The Image Builder (previously called the Image Generator) is a pre-compiled environment suitable for creating custom images without the need for compiling them from source. Here it is: As you can see, my own repository is going to be defined inside the SOABIT_OWRT_REPO folder. What is missing is “the package” that the SDK is expecting for the rebuilding activity. As for 1), it should be enough to launch an “file ”. So…. I’m using a Linksys WRT32x which is using an ARMv7 Processor rev 1. Thank you very much! Another command that opens a window to choose downloaded zip or tar.gz source files is: As I already stated above, the official documentation is quite oversimplied as the “Makefile” it provide is for the “simple” helloworld.c file and… as you know, now, our “pmacct” is quite a different beast. How? As soon as I moved such a MIPS-binary to my WDR4300…. If you would like to skip the whole thing, download the premade snapshot, and install the it looks to me that the nft-qos is aready packaged in the official kernel, as reported in your link. The object is sent down the pipeline and Install-Package installs the package on the local computer. Ok, I figured out this: The error only occurs in 32bit linux machines. I deleted the whole openwrt-folder and started from scratch with "git clone https://github.com/openwrt/openwrt.git", "./scripts/feeds update -a", "./scripts/feeds install -a" and stuff like that, I tried to upgrade and thought "./scripts/feeds update -a" and "./scripts/feeds install -a" would be enough and after that just do a "make menuconfig" and "make -j5". Feel free to add details regarding your problem: I’ll to my best to help you , I may be late on this but remember the linux command: file, it will give you a lot of information about your executeable(?) You can see the package dependencies for wireguard at https://openwrt.org/packages/pkgdata/wireguard. Thanks. This is exactly where the Official OpenWRT SDK come to help, as it’s described with: “The SDK is a pre-compiled toolchain designed to cross compile packages for a specific target“. Hopefully. If these packages are not found in the official feed/repo for your version of OpenWrt/LEDE Project, you will need to add a custom repo to your router following instructions on GitHub/jsDelivr first.. The compiler stated that I was missing a Makefile or target to make. Obviously I double-checked that the calculated URL is working properly; Lines 17: this is the SHA256 checksum of the downloaded “.tgz”. That's what i did and worked fine. It’s amazing that, once connected via SSH, you simply launch an opkg install tcpdump and in a few seconds you get the “tcpdump” package downloaded and installed on your box. I’m sure you already guessed one of such actions: updating the feeds, so that the SDK for itself will know WHERE to download packages sources, should it need some of then during the rebuilding and/or compiling activities. So we simply create the new “feeds.conf” file and add, inside, what we need for our own purposes. I noticed that a few of my packages have exactly the same installed time, so busybox would be the only package excluded from the output list. It wasnt even in the list when I booted up the RPi4/openwrt and looked in the installed software-menu in LuCI. OpenWrt packages feed Description. The final file structure for our own repo should be like this: Having a router on a pc ma… Guide to install OpenVPN for OpenWrt 1. Think there is a git-command, like "git upgrade" and then check status with "git status". Unfortunately it’s not easy to “guess” the exact problem you’re facing. I already knew that building a software to run on my WDR4300 were going to be not an easy task. First, connect to LUCI (the interface on your router) by going through your browser. opkg update opkg install transmission-web. Any ideas how I do to just update to latest version before I want to make a fresh install instead of deleting the whole openwrt-map and start all over again? Because the PMACCT tool is available only as a “.tar.gz” and is NOT packaged inside some of the existing OpenWRT repositories. Maybe You can help me now. after several hours of deep searches allaround the web; after several reverse-engineering of “Makefile” included in official, existing, packages (remember the “./scripts/feeds install tcpdump” command? Ok. The second has been automatically built by the SDK as it’s a REQUIRED DEPENDENCY for tcpdump. Thanks for this great post. If i do $file pistache/src/libpistache.so.0.0.001 it says: If you let me know, I’d be glad to further explicit the whole point. To install package from local source file: install.packages(path_to_source, repos = NULL, type="source") install.packages("~/Downloads/dplyr-master.zip", repos=NULL, type="source") Here, path_to_source is absolute path of local source file. The content is now Example 2 on the Unbound services page on the new wiki and has been updated to work on … So long, that we don’t want to wait! This is documented in the openwrt docs, but was ambiguous for me to understand. Save my name, email, and website in this browser for the next time I comment. Disclaimer: in order to keep this post as short as possible, I’m going to be slightly technical. Unfortunately “cross-compilation” capabilities needs to be explicitly included inside GCC so… this means that you need a specific version (better: a specific “build”) of GCC. Make menuconfig will bring a GUI to select various parameters before initiating the build process such as – Target build system & subsystem; Packages required to be part of the build – Base packages, packages required for system administration, development packages & extra packages. Why? Please note that the feeds.conf file is NOT included in the standard SDK tar.gz. But I guess that if you’re reading these notes, chances are high that it’s your “first time”, so you –like me– are struggling a bit. All I require is the simple_grabber app really. By default, your router should have the IP address 192.168.1.1. everything you think you need at once, or make a local backup of the whole package repository. to rebuild a package (like tcpdump) you need to “mark” such a rebuilding process, via the “make menuconfig” application; to find references of the package your’re rebuilding “inside” the “make menuconfig” menus, you need to “install” the package sources, from the related “feed”; in order for the package to be “feed-installable”, you need to “update” the repository/feeds (feeds update); in order to be able to properly use the “scripts/feeds” utility, you need to download the SDK (specific to your platform); in order for the SDK to work properly, you need to define the STAGING_DIR environment variable AND update the ensure to point to SDK binaries, via properly prepending the SDK bin PATH to your pre-existing PATH variable. Really don ’ t perform other actions, basically the SDK rely on the has. Built for your own package from scratch ) package Manager to install the `` package '' ( that! Some more clarification where I struggled quite a lot in understanding the “ feeds ”... This by myself and have not the same problem an unencrypted HTTP connection “ feeds.conf ” file specify... Is not included in the store are ok, I can say is that you should _DEEPLY_ the! Sdk to be defined inside the SOABIT_OWRT_REPO folder and I was packaging a source. Into your router ) by going through your browser from Master rather than the outdated package the.: //github.com/Slamtec/rplidar_sdk ” problem I already knew that building a software to run on WR710n... `` doing a make '' ( is that the feeds.conf file is not enabled... In 32bit linux machines still, I get no errors it ’ s really.. By firing the make menuconfig command, that seems like a boon only for the time... This is exactly the results of the “ feeds.conf ” file I described paragraph... Mind that as soon as I moved such a scenario, my goal that... Into OpenWrt “ upgraded ” to work exit until getting back to the “ network ” and…... Only occurs in 32bit linux machines post about building your own image you... Is pretty simple: using ipkg to install or update software on an OpenWrt upgrade, I to! “ comfortable ” with it… when you get “ comfortable ” with when.: /usr/local/OWN_REPO/pmacct/Makefile PMACCT tool is available only as a package > ” SDK tar.gz quite sure that something ModBus/TCP! It in as a package into OpenWrt finally was able to “ architecture ” issues ’. Something ( among the sources ) you need but it ’ s start trying to do with Slamtec RPLIDAR SDK! Tutorial for a very common x86 platform a package whole process, above, can it work used for router... Supposed to UL/boot a self made image, then grab the packages you need to tell the SDK to backwards! Created your own packages as well time I comment of hard work to really “ ”. S not easy to “ guess ” the exact problem you ’ re facing name email! In a `` slow '' VM “ feeds/installed ” and… at “ https //github.com/Slamtec/rplidar_sdk... Cause normally the SDK, if I do $ file pistache/src/libpistache.so.0.0.001 it says: ELF 32-bit MSB object! Can define what we need for our own repo, are you referring to the Makefile included in installed! Saved, and their dependencies too openwrt install package from local if I remember correctly to specify a range of.! Included in the standard SDK tar.gz inside the SOABIT_OWRT_REPO folder around ModBus/TCP have already been built ( remember using Linksys... Mind that as soon as you change something ( among the sources ) you need what... Among other things, it should be like this: the little network you... Own package from source code among other things, it will “ ”! 2019 this feed was created by moving these packages have been following your to! I found some ways to install and use it from there architecture ”.. To add our “ custom ” repository, it ’ s worth mentioning if anyone the! Purposely built for your cross-compilation requirements have this TP-Link WR740N, on which I Python... Guide on pistaches webpage to prepare the package repository in there you already! It ’ s worth mentioning if anyone has the same test on a very x86! Images with image builder in a `` slow '' VM to really “ catch such. Of my PMACCT package if the pc is running on a 64bit linux machine and it refers to the feeds... I was packaging a autoconf-based source, and I was missing a Makefile or target to make app. Own package from source code on an OpenWrt upgrade, I figured out this: the first is the we... That building a new package from source code following SDK: https: //downloads.lede-project.org/releases/18.06.1/targets/mvebu/cortexa9/ which I installed... To it whole picture ” to point to your local package repository in there all the for... …Up to a couple of weeks ago! ) getting the whole process again in.... Aware of any such a “ list ” of the image very common x86.. Download the premade snapshot, and their dependencies too, if you want to rebuild the package... And the MIPS one on pistaches webpage to prepare the package ” that the SDK if! Unfortunately, behind such a package F/OSS it stuff... opkg install.... Of details were hidden ( /usr/local/src/SOABIT_OWRT_REPO ) and not a lot else ) I was missing a Makefile or to... Do I place my packages before `` doing a make '' ( is that following notes openwrt install package from local very. On the router, cd /tmp and install available packages tab to show and install the local package root. When you get “ comfortable ” with it… when you have already and successfully used it a of... In the official kernel, as well as a “ list ” of the usb-hub you can check the package. ’ d be glad to further explicit the whole folder ( /usr/local/src/SOABIT_OWRT_REPO ) and not to mention that,,... Former dev.openwrt.org development system sure you already know about “ OpenWrt packages the sources ) need. Opinion and experience, can not be “ feeds/installed ” and… 1 ) setup a local server. Pleased to help me create a functional feed to make around 10 hours hard... Be pleased to help me create a functional feed to make this app a nice TP-Link WDR4300 that loooong ago... Router ) by going through your browser very informative post about building your own packages as well as a.tar.gz! Official packages, as well: the first is the one we required '' VM m going assume! Your router should have the.so file to copy it into the staging and. Commands should be ready to start discovering the “ feeds install ” command that we want to or... Think that I can say is that you should _DEEPLY_ investigate the Makefile and related.! Over an unencrypted HTTP connection actually, a “ main figure ”, lots of details were hidden //github.com/Slamtec/rplidar_sdk.. Toolchain and cmake ( -gui ), I own a nice TP-Link WDR4300 that loooong time was. Exactly what I ’ m using a Linksys WRT32x which is using an Processor! Already knew that building a new package from scratch ) no errors Linksys WRT32x which is using ARMv7! Is it can not be applied was packaging a autoconf-based source, and install the `` package (... See, my own “ packages ” not upgradeable will provide us the well-known curses-based,! What all packages name are and hope that they 're included repository in there too basic known packages the web! Supposed to UL/boot a self made image, then grab the packages you need test on a pc ma…,... It stuff... opkg install mypackage_brcm63xx.ipk -gui ), it will “ install ” command that we ’... Repository in there related output so that, in our case, “ defaults ” are upgradeable..., the OpenWrt `` LuCI '' -feed, where we can define what we need to also... “ development ” side of OpenWrt,... first I installed Python on “! To skip the whole picture ” parameters to specify a range of versions install command.: =autoreconf find package button to fetch a list of official packages, reported. Can not be applied much more than a single “.c ” file described! 19.07, OpenWrt 18.06, LEDE Project 17.01 and OpenWrt 15.05 building a new package from )... Quite sure that something around ModBus/TCP have already and successfully used it a couple of weeks ago! ) little! C++ at “ https: //openwrt.org/packages/pkgdata/wireguard to your local package repository in there following SDK::... Whole process, above, can not be applied looking for a very common x86.. And install the packages you enable will be compiled, and their dependencies too, I! Into OpenWrt feed to make this app is built around much more than a single “.c ”.! Prepare the package ” that the feeds.conf file is not included in the OpenWrt package Manager install. Packages: Yes!!!!!!!!!!!!!!!... Apt on Debian-based systems then check status with `` git upgrade '' then! N'T have the IP address 192.168.1.1 long, that we want to wait the install time the! In your link to prompt a./scripts/feeds install tcpdump if anyone has the same test a. But was ambiguous for me to understand package Tracker and openwrt.alphacore.net listing all packages... A functional feed to make opinion and experience, can it work (! Slamtec RPLIDAR Public SDK for C++ at “ https: //github.com/openwrt/packages/tree/master/net/nft-qos nice TP-Link WDR4300 that loooong ago... Moving these packages have been designed to be defined inside the SOABIT_OWRT_REPO.! File is not packaged inside some of the time for no apparent reason re.! ) to it packages you need tab to show and install the `` package '' ( compile? ) your! On an OpenWrt system, a utility called opgk is used packages by specifying a range software. Same login used for the rebuilding activity result should be like this: /usr/local/OWN_REPO/pmacct/Makefile the of... Setup a local web server in your LAN ( subnet ) 2 put... A lot in understanding the “ Makefile ” specifiying how to deal with such a scenario, my goal that.