Make --host work for ./build-userland, ./build-dhrystone, etc. in addition to just ./build-modules

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-11-27 00:00:01 +00:00
parent c3f2045e1f
commit 62930b6acf
3 changed files with 26 additions and 12 deletions

View File

@@ -921,7 +921,7 @@ It has however severe limitations:
Still interested?
....
./build-modules --gcc-which host --host
./build-modules --host
....
Compilation will likely fail for some modules because of kernel or toolchain differences that we can't control on the host.
@@ -929,7 +929,7 @@ Compilation will likely fail for some modules because of kernel or toolchain dif
The best workaround is to compile just your modules with:
....
./build-modules --gcc-which host --host -- hello hello2
./build-modules --host -- hello hello2
....
which is equivalent to:
@@ -14514,6 +14514,8 @@ git submodule update --init submodules/dhrystone
./run --userland "$(./getvar userland_build_dir)/submodules/dhrystone/dhrystone"
....
TODO automate run more nicely to dispense `getvar`.
Increase the number of loops to try and reach more meaningful results:
....
@@ -14527,7 +14529,12 @@ Build and run on gem5 user mode:
./run --emulator gem5 --userland "$(./getvar --static userland_build_dir)/submodules/dhrystone/dhrystone"
....
TODO automate run more nicely.
Run natively on the host:
....
./build-dhrystone --host
"$(./getvar --host userland_build_dir)/submodules/dhrystone/dhrystone"
....
Build for <<baremetal>> execution and run it in baremetal QEMU. TODO: fix the build, just need to factor out all run arguments from link:build-baremetal[] into link:common.py[] and it should just work, no missing syscalls.