|
Edited by @lex at 2015-12-21 09:06
Just to clarify what i meant, the image provided by @loboris works with Wifi, but ethernet (GMAC) is disabled (in this specific image i linked above). I had rebuild the whole kernel with GMAC enabled for OPI-PLUS (2) using arm-linux-gnueabihf-gcc instead of arm-linux-gnueabi-gcc used by @loboris and legacy SDK. I copied uImage but not the kernel modules (.ko) that resides in /lib/modules/3.4.39/kernel. This resulted in "invalid kernel module" when linux tried to load the WIFI and others modules that are not compiled into, so i had GMAC working but WIFI not, the opposite to the original image available by @loboris.
This is the .config for the OPI-PLUS (2)
CONFIG_GMAC_PHY_POWER=y
This is the .config for the OPI-PC
# CONFIG_GMAC_PHY_POWER is not set
So basicly people who have problems with WIFI and/or Ethernet must update the kernel either using @loboris script (the easiest way) or manually as i did the second time.
And the first time you build the kernel you build the whole kernel and its module (later you can build only a specific module without building the whole kernel when you are developing).
The modules can be externaly loaded, for example when you set CONFIG_RTL8189ES=m (to build as a module and this must be loaded at run-time to work), or with CONFIG_RTL8189ES=y (built into and you don't need to explicitly load the module with insmod).
In order to build the kernel and (coff,coff) rebuild the modules you have to setup your build environment, i suggest Lubuntu 12.04 (64-bit), so we are going to cross-compile the arm kernel for the OPI-PLUS, so here is a recipe:
sudo apt-get update
sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev
git clone https://github.com/loboris/OrangePI-Kernel opi
Building using @loboris script (in our case OPI-PLUS):cd opi
./build_scripts plus
If you want to configure kernel or change something like add module or remove module you can:
or edit ./output/.config and change appropriately
and later rebuild the changes again:
The final results will be in: build directory
* replace uImage with uImage_OPI-PLUS (rename it to uImage) (SD CARD)
* copy lib.opiplus/* to /lib/ (SD CARD)
Be warned that every new build (clean) you may end up with different kernel string version like: 3.4.39-02-lobo
If you want to know more about building kernel modules: https://wiki.archlinux.org/index.php/Compile_kernel_module
Hope this help.
|
|