-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Added cheribsd preset #358
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #358 +/- ##
==========================================
+ Coverage 51.79% 51.99% +0.19%
==========================================
Files 139 138 -1
Lines 19315 19239 -76
==========================================
- Hits 10005 10004 -1
+ Misses 9310 9235 -75
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is referencing a CMakeModules/CMakeToolchains/cheri.cmake
file, but it's not in this PR.
Co-authored-by: Alois Klink <[email protected]>
set(CMAKE_C_COMPILER clang) | ||
set(CMAKE_CXX_COMPILER clang++) | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -target aarch64-unknown-freebsd -march=morello+c64 -mabi=purecap -Xclang -morello-vararg=new") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We many want to adapt the official recommended cheri toolchain file from https://github.com/CTSRD-CHERI/cheribuild/blob/a1bdfa225b575606f7303435c4c75ea9942d697f/pycheribuild/files/CrossToolchain.cmake.in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll trust you on that the toolchain file works properly :)
I might need to wait until Friday until I get to my home computer to test this.
conftest.c
Outdated
/* confdefs.h */ | ||
#define PACKAGE_NAME "util-linux" | ||
#define PACKAGE_TARNAME "util-linux" | ||
#define PACKAGE_VERSION "UNKNOWN" | ||
#define PACKAGE_STRING "util-linux UNKNOWN" | ||
#define PACKAGE_BUGREPORT "[email protected]" | ||
#define PACKAGE_URL "http://www.kernel.org/pub/linux/utils/util-linux/" | ||
/* end confdefs.h. */ | ||
|
||
int | ||
main (void) | ||
{ | ||
|
||
; | ||
return 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this isn't used, so we can delete it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Congratulations on getting it working.
Hmmmm, a bit weird. It looks like the Debian build is failing to the following error:
I'm not 100% sure why, since I'm pretty sure the only thing you're changing is this line Line 161 in 252d883
Edit: I've made a new branch called |
By the way, @mereacre, this is the test errors that we're getting on the me@me:~/edgesec$ ctest --preset freebsd --output-on-failure --exclude-regex "$exclude_regex"
...
2/40 Test #2: test_runctl ......................***Failed 0.04 sec
[==========] tests: Running 2 test(s).
[ RUN ] test_init_context
2022-12-13 13:50:16.697 �[36mDEBUG�[0m�[0m �[90mrunctl.c:257:�[0m Getting system commands paths
2022-12-13 13:50:16.697 �[36mDEBUG�[0m�[0m �[90mrunctl.c:321:�[0m Opening the macconn db=:memory:
2022-12-13 13:50:16.718 �[36mDEBUG�[0m�[0m �[90mrunctl.c:328:�[0m Creating subnet to interface mapper...
2022-12-13 13:50:16.718 �[36mDEBUG�[0m�[0m �[90mrunctl.c:339:�[0m Creating VLAN ID to interface mapper...
[ OK ] test_init_context
[ RUN ] test_run_engine
2022-12-13 13:50:16.718 �[36mDEBUG�[0m�[0m �[90mrunctl.c:257:�[0m Getting system commands paths
2022-12-13 13:50:16.718 �[36mDEBUG�[0m�[0m �[90mrunctl.c:321:�[0m Opening the macconn db=:memory:
2022-12-13 13:50:16.719 �[36mDEBUG�[0m�[0m �[90mrunctl.c:328:�[0m Creating subnet to interface mapper...
2022-12-13 13:50:16.719 �[36mDEBUG�[0m�[0m �[90mrunctl.c:339:�[0m Creating VLAN ID to interface mapper...
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:430:�[0m AP name:
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:431:�[0m AP interface:
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:454:�[0m Setting the ip forward os system flag...
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:461:�[0m Adding default mac mappers...
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:468:�[0m Creating subnet interfaces...
2022-12-13 13:50:16.719 �[36mDEBUG�[0m�[0m �[90miface.c:284:�[0m Commiting interface changes
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:479:�[0m Creating supervisor on with port 0
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:488:�[0m Looking for VLAN capable wifi interface...
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:520:�[0m Creating the radius server on port 0 with client ip
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:530:�[0m Running the dhcp service...
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:541:�[0m Running the mdns forwarder service thread...
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:551:�[0m ++++++++++++++++++
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:552:�[0m Running event loop
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:553:�[0m ++++++++++++++++++
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90mrunctl.c:556:�[0m Exit event loop
2022-12-13 13:50:16.719 �[32mINFO �[0m�[0m �[90meloop.c:655:�[0m eloop_get_sock_table: eloop data ptr was NULL
[ ERROR ] --- Test failed with exception: Bus error(10)
[ FAILED ] test_run_engine
[==========] tests: 2 test(s) run.
[ PASSED ] 1 test(s).
[ FAILED ] tests: 1 test(s), listed below:
[ FAILED ] test_run_engine
1 FAILED TEST(S) I'm guessing it is to do with how you changed Maybe we have an uninitialized pointer somewhere, or there are alignment issues? |
I believe that after
|
Hmmm, I think we don't actually ever test the The Lines 74 to 83 in e31c8c8
However, there is a |
The |
The tests were passing previously, though. Maybe My gut feeling is to undo the Edit: I usually use https://github.com/CTSRD-CHERI/cheribuild to do cross-compiling, so I'm probably not going to use this |
Which changes do you want to undo? The |
These changes: Essentially, we should keep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
Adds a new
cheribsd
preset with a different set of C flags specific for Cheri architecture in purecap mode.