czwartek, 22 listopada 2018

Learning routers - part 2

It's been a while since I was checking router firmware(s) last time ('officially' ;] anyway... ). Today we will try to prepare a "working environment" again but this time we will use buildroot to do that. Here we go...
Copy of ('my') buildroot can be found here:



To proceed we will need:
- Ubuntu 64bit (I tried 16.x version)
- VirtualBox
- buildroot
- qemu (we will get it from apt)
- your image ;]

(...)

When your OS is ready/started on VirtualBox: log in and download buildroot package:


File grabbed and extracted, so it's time to make menuconfig. (Because I want to prepare a MIPS environment I extracted my buildroot-gz file to buildMIPS directory.) [Enter] ;]



Let's see Target options -> Target Architecture:



Next, let's go to Target Binary Format. There (*was during my install on clean Ubuntu;)) should be only one possible option to select:


Next we need to go to the Target Architecture Variant to select Generic MIPS32:


Now we will go to Build options to select "build packages with debugging symbols".

Our next move is located in Toolchain section. Here ('I used') we will need to select:
- C library (for now let's use uClibc)
- Thread library debugging (if not selected)
- Compile and install uClibc utilities (if not selected)
- Build cross gdb for the host

Now you should be ready to go to 'Save' and 'Exit'. After that we should be back again in the console window, so let's...


... and after a while, we should get our files ready (./mips*) in output directory (and go
to the host/bin/):


*(... in case of the hostname(s) - yeah, I changed VMs few times when I was creating the post/screens...;))
 So let's say you've found 'your favourite firmware' to check, and you are ready to try it (read: it's extracted and you would like to test some this-or-that binary;) ):


Let's try output/host/bin directory:


Checking if there's a file we'll need:


So are we ready to run it now?


"What's next dude?"

Questions/comments/feedback/hints: you'll know how to find me. ;)

(...tbc...)

Special thanks: Build Root Team

Cheers





Brak komentarzy:

Prześlij komentarz