Ads 468x60px

Featured Posts

25 de julio de 2016

Four years ago ...

Four years ago I was thinking if I should open a blog or no, what would people say? What was I going to write about? But finally I took the plunge because I needed to improve my writing skills in the english language, although my main problem was I didn't have imagination to write or to speak about whatever, I went blank in my english exams and it was very difficult to make up my own story or my own content. However, I'm here, writing, and also in english because I decided to write in english last year for not forgetting my english skills.

What have I done in the last years? Apart from improving my writing skill, security and networking keep being my main fields in my job. I have taken part of many projects about audits and improvements about security information systems, like the PCI-DSS Compliance, and networking installations as well, like improving and managing an Autonomous System configuration. In addition, I have made some speeches at University, High Schools, Government, Businesses, etc about security awareness, IT Management, Web Application Firewalls, wireless networks, etc. I have also been the teacher for some courses about VPN, Metro Ethernet, Cisco ASA, Alcatel-Lucent switches, etc and in the meantime I have been studying about Certified Information Security Manager (CISM), recertification of the CCNP, load balancers, etc. What's more, I have come across old and interesting friends, and professionals, and I have met new experts, that they are people over everything, like High School friends, new young professionals working with me, and foreigners of workcamps in Turkey and Russia. All of them deserve more than any project or certification and I wish to keep in touch with them.

An overview about the most widely read posts in the last four years are the next:


With regard about from where the blog is visited, we can find the statistics next:

Posts by countries

Last and not less important, I would like to thank to everybody who read this blog and support me because they are the main reason why I have already written 196 posts with almost 83000 views. If someone has something to say for improving this blog, it is welcome.

Regards my friends and I hope to see you again back in September after holiday.

18 de julio de 2016

Cross compilation for broadband routers II

Last week, I wrote about cross compilation for broadband routers and the test result wasn't as I expected because my “Hello World” application didn't work in my router but I have been working on it for this week and I have got it. It works !!! We have to take into account some things that we'll see in this post today like the importance of bit order in memory, static and shared libraries, kernel version, etc.

First, we should check how the target processor saves words (bytes) in memory because depending on this we will compile on one way or another. There are two techniques, little-endian and big-endian, and although I have checked it, I still remember when I studied this at University. Most routers work with MIPS processors and big-endian architecture, storing the Most Significant Byte (MSB) at the lowest memory address, while most PCs and servers work with Intel and AMD processors, storing the Least Significant Byte (LSB) at the lowest memory address. Therefore, MSB, which is optimized for networking task, is the opposite of LSB. Next we can see the main difference between Little-Endian and Big-Endian:

Little-Endian vs Big-Endian
Another thing to take into account is the kernel version for compiling with the right libraries. Last post I installed the cross-development toolchain of the Universal Embedded Operating System which is right for new developments over new broadband routers but I want to make a new application for an old router, thus I have used the CodeSourcery toolchain this time, but I have downloaded an old one from 2012.

CodeSourcery Installation

Also, it is important to know about static and shared libraries. When we develop for a MIPS environment where the target device has few libraries and the file system is in read-only mode, like most routers, is much better to build applications with static libraries although it will be bigger than applications with shared libraries. Next we can see some linux commands (ldd, readelf and file) to check if an application has shared or static libraries.

Check libraries of a binary

Once our development platform is ready with the CodeSourcery toolchain, we can compile the “Hello World” application with Big-Endian, static libraries and the right kernel and libraries versions.

Developing and Compiling Hello World
Finally, we have seen that the application is a MSB executable for 32 bits MIPS microprocessor with static libraries and …. it works in my Huawei router.

Application Hello World for MIPS Architecture

Regards my friends, we'll try to build more and sophisticated applications in the future!!
Related Posts Plugin for WordPress, Blogger...

Entradas populares