Compiling LEDE on Windows 10
-
I have created a guide on how to compile the LEDE project used for the Omega2 on Windows 10 Pro thanks to a feature called WSL (Windows Subsystem for Linux)
-
Outstanding!
Following your instructions worked first time. Is there was a way to mod you up or grant points?
Just a follow-up question...
In the home directory of my WSL the 'source' directory is now ~5G in size. Can I delete all but the 'staging_dir' directories and still have a working dev environment?
Since the WSL is on the drive it's cramped the available storage somewhat..
Many thanks,
Chris.
-
@Chris-H not specifically for Windows, but I'd say better use one of the "make clean" options provided by LEDE than deleting stuff manually: see here.
-
Thanks for the suggestion, however ...
"Make clean" made little/no difference to the size, so I tried "make dirclean" but this nuked most everything including the toolchain (!). It did reduce the size to ~450Mb though
Oh well, I'll just have to live with it until I work out a better way...
-
I am following your guide (which looks excellent, by the way), and get a compiler error.
Following your suggestion to try make -j1 V=s toolchain/install I see this error:
gcc -DHAVE_CONFIG_H -I. -DLOCALEDIR="/home/me/lede/source/staging_dir/host/share/locale" -I/home/me/lede/source/staging_dir/host/include -I/home/me/lede/source/staging_dir/host/usr/include -O2 -I/home/me/lede/source/staging_dir/host/include -I/home/me/lede/source/staging_dir/host/usr/include -MT stage1flex-misc.o -MD -MP -MF .deps/stage1flex-misc.Tpo -c -o stage1flex-misc.o
test -f 'misc.c' || echo './'
misc.c
misc.c: In function 'allocate_array':
misc.c:147:8: warning: implicit declaration of function 'reallocarray'; did you mean 'reallocate_array'? [-Wimplicit-function-declaration]
mem = reallocarray(NULL, (size_t) size, element_size);
^~~~~~~~~~~~
reallocate_array
misc.c:147:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
mem = reallocarray(NULL, (size_t) size, element_size);
^
misc.c: In function 'reallocate_array':
misc.c:664:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
new_array = reallocarray(array, (size_t) size, element_size);I realize that it's your code, but wondered if you know of any workaround (or where I can report the problem on GitHub).
For instance, can I download the binaries from somewhere, rather than building from source?
Thanks in advance for any help
-
SIgh! It doesn't even work on Linux
Following https://docs.onion.io/omega2-docs/cross-compiling.html I get an error - a different one. I think I have to use Raspberry Pi now even though teh Omega2 is a far better board
gcc -I. -I/home/me/source/staging_dir/host/include -I/home/me/source/staging_dir/host/usr/include -O2 -I/home/me/source/staging_dir/host/include -I/home/me/source/staging_dir/host/usr/include -MT freadahead.o -MD -MP -MF $depbase.Tpo -c -o freadahead.o freadahead.c &&
mv -f $depbase.Tpo $depbase.Po
freadahead.c: In function 'freadahead':
freadahead.c:91:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
#error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
^~~~~
-
I reported that at http://community.onion.io/topic/3446/can-t-build-lede-under-linux if anyone can help