OpenWRT Cross Compiling
- CentOS 8, OpenWRT 17.07.3, Perl 5.28.1
 - Directory: The default for most of the items below is the users "home" directory ( ~ )
 - Perlbrew for matching the exact version of Perl on the router and controlling it easily: https://perlbrew.pl/
- Nice tutorial for Perlbrew basics: https://www.digitalocean.com/community/tutorials/how-to-install-perlbrew-and-manage-multiple-versions-of-perl-5-on-centos-7
 - perlbrew list
 - perlbrew list-modules
 - perlbrew use NameOfVersion
 - perl -v: Verify current version used
 - Install a Perl Module: curl -L https://cpanmin.us | perl - Name::Name
 
 - Download pre-requisites for a Cross Compile Build system: https://openwrt.org/docs/guide-developer/build-system/install-buildsystem
- EPEL repository needed for some: yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
 - yum install binutils bzip2 gcc gcc-c++ gawk gettext flex ncurses-devel zlib-devel zlib-static make patch unzip perl-ExtUtils-MakeMaker glibc glibc-devel glibc-static ncurses-libs sed sdcc intltool sharutils bison wget git-core openssl-devel xz
- And of course some of the above (zlib-static, glibc-static, sdcc, shareutils) doesn't work and is also a bit ambivalent, so;
- yum install zlib glibc-common glibc-devel glibc-headers glibc-langpack-en (sdcc (compiler for 8501 microcontroller) and shareutils (for specific encoding for paid RedHat subscribers) are not readily available for CentOS 8)
 
 
 - And of course some of the above (zlib-static, glibc-static, sdcc, shareutils) doesn't work and is also a bit ambivalent, so;
 
 - If one wants to build firmware version of OpenWRT: Download OpenWRT Files (from https://openwrt.org/docs/guide-developer/build-system/install-buildsystem)
- git clone https://git.openwrt.org/openwrt/openwrt.git
 
 - If one wants to build Perl and compile modules that include other libraries such as OpenSSL
- yum install openssl-devel
 - Download the TAR package from CPAN
 - perl Makefile.PL
 - make
 - make test
 - make dist
 
 - OpenSSL Cross Compiling
- https://stackoverflow.com/questions/15539062/cross-compiling-of-openssl-for-linux-arm-v5te-linux-gnueabi-toolchain
 - ./Configure LIST
 - Header files should be in /usr/include
 
 - Compiling
- file NameOfBinary: Shows information about binary file (opkg install file)