Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luca/makefile-improvements #128

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

lucaceresoli
Copy link

Dear Larry,

here are a few cleanups and additions to Makefile.

I'm integrating rtl8188eu in Buildroot, for use on embedded systems with old kernels that have no mainline driver. But the 'install' target is specifically tailored for native building and installing, so I had to add a new 'modules_install' target that nicely integrate with a build system.

Patches are roughly in order from those that I believe to be "obviously OK" to those for which you might have comments, change requests or simply rejects.

When using a CROSS_COMPILE value that contains a whitespace, such as
"ccache arm-linux-", building fails because only the first word is passed down
to the kernel Makefile as CROSS_COMPILE. Successive words are interpreted as
targets.

Fix by quoting CROSS_COMPILE.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Allows to cleanly install the module in the standard way, as suggested by
Documentation/kbuild/modules.txt in the kernel sources.

This is needed when installing from within a build system (such as Buildroot)
that implement depmod on its own, and does not need the blacklist and other
fixups that are implemented by the 'install' target.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
When installing using the modules_install target, the firmware is not
installed. Add an ad-hoc target that just installs the firmware into
$(INSTALL_MOD_PATH)/lib/firmware/rtlwifi/.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Now there is a specific target to install the firmware, use it everywhere.

Note: this does not change the behaviour if INSTALL_MOD_PATH is undefined.
Otherwise the firmware is now installed under the INSTALL_MOD_PATH prefix.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
The firmware is already installed in /lib/firmware/rtlwifi, no need to
install it also in /lib/firmware.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants