Move hacks to support compiling against the kernel built using the BCM SDK and
toolchain into a separate Makefile in the broadcom feed.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Userspace toolchain was being used to build the kernel module which
although not correct happened to work on 32-bit kernel but obviously
does not work on 64-bit kernel with 32-bit userspace.
Ideally, it should but enough to set KERNEL_CROSS if Build/Compile is
updated to use KERNEL_CROSS instead of TARGET_CROSS, but not changing
TARGET_CROSS breaks scripts/strip-kmod.sh which for some reason uses
TARGET_CROSS rather than KERNEL_CROSS.
Due to the complexity of the Broadcom build system which amongst others
puts dynamically generated symlinks into the kernel dir, we have a fake
kernel "bcmlinux" to please the OpenWrt build system. This kernel is not
used for anything but building the OpenWrt toolchain. To compile against
the right kernel that is running on the target, we need to compile the
kernel module against the kernel inside bcmkernel which is the one
compiled by the BCM SDK.
To be able to dim the LED from user-space
we need to export an API. This is done
like we currently do for setting the color,
a file which handles hexadecimal numbers.
Change-Id: I4636d16e24cdae38ccd6b501e41f71ce7012dbad