Skip to content

Commit

Permalink
Merge pull request torvalds#116 from staalmannen/lkl_win
Browse files Browse the repository at this point in the history
minor changes and documentation to build on Windows host
  • Loading branch information
Octavian Purdila committed Mar 5, 2016
2 parents c07714a + ef4a71c commit 0cfb248
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Documentation/lkl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,44 @@ following command:

$ make CROSS_COMPILE=i686-w64-mingw32- tools/lkl



Building LKL on Windows
------------------------

To build on Windows, certain GNU tools need to be installed. These tools can come
from several different projects, such as cygwin, unxutils, gnu-win32 or busybox-w32.
Below is one minimal/modular set-up based on msys2.

Common build dependencies:
MSYS2 (provides GNU bash and many other utilities)
https://sourceforge.net/projects/msys2/
Extra utilities from MSYS2/pacman:
bc, base-devel

General considerations:
No spaces in pathnames (source, prefix, destination,...)!
Make sure that all utilities are in the PATH.
Win64 (and MinGW 64-bit crt) is LLP64, which causes conflicts in size of "long" in the
Linux source. Cygwin (and msys2) are LP64, like linux. Linux (and lkl) can (currently) not
be built on LLP64.

For MSYS2 (and Cygwin):
Msys2 will install a gcc tool chain as part of the base-devel bundle.
Binutils need to be re-built with patches for weak symbols as described above.
Using the msys2 shell, cd to the lkl sources.
and run:

$ make tools/lkl

For MinGW:
Install mingw-w64-i686-toolchain via pacman, mingw-w64-i686-binutils need to be re-built with the
weak symbols patches. Start a MinGW Win32 shell (64-bit will not work, see above)
and run:

$ make tools/lkl


LKL hijack library
------------------

Expand Down
1 change: 1 addition & 0 deletions lib/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
# Generated files
#
gen_crc32table
gen_crc32table.exe
crc32table.h
oid_registry_data.c
1 change: 1 addition & 0 deletions lib/raid6/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mktables
mktables.exe
altivec*.c
int*.c
tables.c
Expand Down
1 change: 1 addition & 0 deletions scripts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
conmakehash
kallsyms
kallsyms.exe
pnmtologo
unifdef
ihex2fw
Expand Down
2 changes: 2 additions & 0 deletions scripts/basic/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
fixdep
fixdep.exe
bin2c
bin2c.exe
1 change: 1 addition & 0 deletions scripts/kconfig/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ gconf.glade.h
# configuration programs
#
conf
conf.exe
mconf
nconf
qconf
Expand Down
1 change: 1 addition & 0 deletions scripts/mod/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
elfconfig.h
mk_elfconfig
modpost
modpost.exe
devicetable-offsets.h

0 comments on commit 0cfb248

Please sign in to comment.