Changes

no edit summary
Line 1: Line 1:  
A <b>software development kit</b> (<b>SDK</b>) is a set of software development tools that provides the possibility to create applications for a certain software package, software framework, computer system or similar development platform.
 
A <b>software development kit</b> (<b>SDK</b>) is a set of software development tools that provides the possibility to create applications for a certain software package, software framework, computer system or similar development platform.
   −
<b>Note:</b> The information in this page is in accordance to using SDK version <b>R_00.07.01</b>. You may read the README file for additional information if using a different SDK version.
+
<b>Note:</b> The information in this page is in accordance to using SDK version <b>R_00.07.03</b>. The included Readme file in SDK archive file contains information for each separate SDK version and might differ from the older version or information provided in this wiki page. Please always follow the provided Readme file.
    
__TOC__
 
__TOC__
Line 9: Line 9:     
<ul>
 
<ul>
     <li>A RUTOS supported router</li>
+
     <li>Teltonika Router running RutOS</li>
     <li>[http://releases.ubuntu.com/ Ubuntu 18.04 OS]</li>
+
     <li>[https://ubuntu.com/download/desktop/ Ubuntu 22.04.3 LTS OS]</li>
     <li>SDK version <b>R_00.07.01</b></li>
+
     <li>SDK version <b>R_00.07.05.x</b></li>
 
</ul>
 
</ul>
   −
The examples apply to various RUTOS routers, SDK versions and operating systems. In most cases the difference will only be that of a visual nature.
+
The examples apply to various RUTOS routers, SDK versions and operating systems. In most cases the difference will only be that of a visual nature, The availability of SDK Firmware branding begins from version 7.05, although some of these modifications may be accessible on earlier firmware versions.
    
Most examples provided in this page are independent from each other. But it is highly recommended to acquaint yourself with the basics by reading the "[[#Prerequisites|Prerequisites]]" and "[[#Compiling_a_standard_firmware|Compiling a standard firmware]]" sections first as they contain information that will be necessary in order to understand some aspects of the other examples.
 
Most examples provided in this page are independent from each other. But it is highly recommended to acquaint yourself with the basics by reading the "[[#Prerequisites|Prerequisites]]" and "[[#Compiling_a_standard_firmware|Compiling a standard firmware]]" sections first as they contain information that will be necessary in order to understand some aspects of the other examples.
   −
It should also be noted early that the first time you compile a firmware it may take <b>about two hours</b> to complete. On later attempts the duration is considerably lower.
+
It should also be noted early that the first time you compile a firmware it may take up to a few hours to complete. Once the initial compilation is complete, packages will not be re-compiled next time, therefore the duration will decrease significantly. Please be aware that this also depends on your machine.
    
==Prerequisites==
 
==Prerequisites==
Line 25: Line 25:     
<ul>
 
<ul>
     <li>A PC, laptop or virtual machine running Linux OS (We recommend using Ubuntu 18.04 LTS)</li>
+
     <li>A PC, laptop or virtual machine running Linux OS (We recommend using Ubuntu 22.04.3 LTS)</li>
 
     <li>A RUTOS supported router (version R_00.07.00 and up)</li>
 
     <li>A RUTOS supported router (version R_00.07.00 and up)</li>
 
     <li>An SDK intended for your router, which can be downloaded here: <b>[[Software Development Kit]]</b></li>
 
     <li>An SDK intended for your router, which can be downloaded here: <b>[[Software Development Kit]]</b></li>
 
</ul>
 
</ul>
 +
 +
==Ubuntu Installation and Pre-requisite==
 +
 +
Compiling the firmware should be achievable on any Linux-based machine. Alternatively, options like Oracle's VirtualBox or Windows' WSL can be used, though the setup process may vary slightly. For this example, I will be using VMWare.
 +
 +
You can download the '''VMWare''' here: [https://www.vmware.com/mena/products/workstation-pro/workstation-pro-evaluation.html VMWare]
 +
 +
1. You must download latest '''Ubuntu''' version can be found here: [https://ubuntu.com/download/desktop Ubuntu]
 +
[[File:Ubunto.png|border|class=tlt-border]]
 +
 +
2. After initiating VMware, click Create a New Virtual Machine
 +
[[File:Ubuntu2.jpg|border|class=tlt-border]]
 +
 +
3. Choose Typical -> choose the downloaded Ubuntu .iso file
 +
 +
[[File:Ubuntu3.jpg|border|class=tlt-border]]
 +
 +
then click Next.
 +
 +
4. Input Name, username, and password. Then input the Virtual Machine Name and the save path.
 +
 +
'''Note:''' allocate at least 30-50GB GB for disk size and click Store virtual disk as a single file.
 +
 +
[[File:Ubuntu4.jpg|border|class=tlt-border]]
 +
 +
Then click Next.
 +
 +
5. Select Customize Hardware. Allow for 4GB or more of memory and 2 or more processors *more is preferable* depending on your machine.
 +
[[File:Ubuntu5.jpg|border|class=tlt-border]]
 +
 +
Finally, click Finish.
 +
 +
Ubuntu will initialize. Choose your language. The example will be in English.
 +
 +
6. Choose Minimal installation and check Install third-party software for graphics and Wi-Fi hardware and additional media formats.
 +
[[File:Ubuntu6.jpg|border|class=tlt-border]]
 +
 +
Click Continue
 +
 +
7. Once installion is done, click on Restart Now.
 +
 +
8. Once Ubuntu is now running. Open a browser and download the SDK file from Teltonika Networks wiki. You can find it out here: [https://wiki.teltonika-networks.com/view/Software_Development_Kit Software Development Kit]
 +
    
==Compiling a standard firmware==
 
==Compiling a standard firmware==
Line 36: Line 79:  
  sudo apt update
 
  sudo apt update
   −
  sudo apt install -y build-essential ccache ecj fastjar file g++ gawk gettext git java-propose-classpath libelf-dev libncurses5-dev libncursesw5-dev libssl1.0-dev python python2.7-dev python3 unzip wget python3-distutils python3-setuptools rsync subversion swig time libffi-dev libtool xsltproc zlib1g-dev u-boot-tools nodejs nodejs-dev node-gyp npm jq
+
  sudo apt install nodejs
 +
 
 +
sudo apt install npm
 +
 
 +
sudo apt install build-essential ccache ecj fastjar file flex g++ gawk \ gettext git java-propose-classpath java-wrappers jq libelf-dev \ libffi-dev libncurses5-dev libncursesw5-dev libssl-dev libtool \ python python2.7-dev python3 python3-dev python3-distutils \ python3-setuptools rsync subversion swig time u-boot-tools \ unzip wget xsltproc zlib1g-dev bison
 +
 
 +
Create a new folder (for this example I'll be using a directory called <i>RUTX_R</i> found at my <b>home</b> directory) and extract the SDK archive inside it.
 +
[[File:SDK_EXTRACT.jpg|border|class=tlt-border]]
 +
 
 +
You can achieve this with drag and drop or by executing this command via Terminal:
   −
Create a new folder (for this example I'll be using a directory called <i>RUTX_R</i> found at my <b>home</b> directory) and extract the SDK archive inside it. You can achieve this with drag and drop or by executing this command via Terminal:
+
Navigate to the "Downloads" folder:
 +
cd ~/Downloads
 +
Extract the tar.gz file:
 +
tar -xzvf RUTX_R_GPL_00.07.05.X.tar.gz
   −
tar -xf ~/Downloads/RUTX_R_GPL_00.XX.YY.Y.tar.gz -C ~/RUTX_R
+
This command will extract the contents of the RUTX_R_GPL_00.07.05.X.tar.gz file into the current directory, After running this command, you should find the extracted files in the same directory where you ran the command.
    
<b>Note</b>: don't forget to replace the file name and path in accordance with your own circumstances
 
<b>Note</b>: don't forget to replace the file name and path in accordance with your own circumstances
   −
Open a Terminal inside the SDK directory. You can change the directory in your current terminal (<i>cd ~/RUTX_R/openwrt-gpl-ipq40xx.Linux-x86_64</i>).
+
Open a Terminal inside the SDK directory. You can change the directory in your current terminal (<i>cd ~/RUTX_R/openwrt-gpl-ipq40xx.Linux-x86_64</i>)
    
Once you open the Terminal, update the feeds:
 
Once you open the Terminal, update the feeds:
Line 57: Line 112:  
[[File:Make_without_jobs_v1.gif]]
 
[[File:Make_without_jobs_v1.gif]]
   −
<b>Note</b>: the first time you compile a firmware file it may take up to <b>two hours</b> before it is complete. Don't close the Terminal window up until then. Once it is finished, you will find the firmware in the <i>./bin/targets/ipq40xx/generic</i> directory. It should contain a file openwrt-ipq40xx-qcom-ipq4018-rutx-squashfs-apps.bin, it can be used to upgrade your router's firmware via its web interface.
+
<b>Note</b>: the first time you compile a firmware file it may take up to <b>30 minutes</b> before it is complete. Don't close the Terminal window up until then. Once it is finished, you will find the firmware in the <i>./bin/targets/ipq40xx/generic</i> directory. It should contain a file openwrt-ipq40xx-qcom-ipq4018-rutx-squashfs-apps.bin, it can be used to upgrade your router's firmware via its web interface.
 
----
 
----
 
You can speed up this process by passing an extra argument <b>-j</b>. This argument then compiles the necessary packages in parallel.  
 
You can speed up this process by passing an extra argument <b>-j</b>. This argument then compiles the necessary packages in parallel.  
Line 69: Line 124:     
[[File:make_with_jobs_v1.gif]]
 
[[File:make_with_jobs_v1.gif]]
 +
 +
'''Troubleshooting tips:'''
 +
 +
1. If you get error on first ‘make’, do ./scripts/feeds update -a once more.
 +
 +
2. Once you extract the SDK files, Rename rutos-ipq40xx-rutx-gpl to a different file name and move it to home directory.
 +
 +
3. Try running `make distclean` if you believe that your SDK installation is corrupt. This will recompile the firmware from scratch.
 +
 +
4. Allowing us to run command. “make -j<nproc_output> V=sc” for verbose output. This way you will see more logs that may help to troubleshoot compilation issues.
    
==Changing default settings==
 
==Changing default settings==
Line 132: Line 197:  
</li>
 
</li>
 
----
 
----
<li>When the package is selected we need to compile and install him:
+
<li>When the package is selected we need to compile and install it:
 
<ol>
 
<ol>
 
<li>While standing in root directory of the project execute this command in the terminal:
 
<li>While standing in root directory of the project execute this command in the terminal:

Navigation menu