#3818 closed enhancement (fixed)
New build system
Reported by: | Sebastian Huber | Owned by: | Sebastian Huber |
---|---|---|---|
Priority: | normal | Milestone: | 6.1 |
Component: | build | Version: | 6 |
Severity: | normal | Keywords: | qualification |
Cc: | Blocked By: | ||
Blocking: | #3250 |
Description (last modified by Sebastian Huber)
Replace the existing Autoconf and Automake based build system with something new. Goals:
- Easier configuration of BSPs (BSP options)
- Easier to maintain (nobody understands the details of the existing build system)
- Faster builds (especially on Windows)
- Reusable build specifications (e.g. generate documentation for BSP options for the user manual)
- Validation of built artefacts (e.g. ensure that the objects are built as specified using the DWARF debug information)
- Support building of BSPs external to the project
- Customization of the build (e.g. build only a subset of the RTEMS functions)
- Support alternative compilers such as clang instead of GCC
Proposed solution:
- Use waf for the build system
- Specify the build through build specification items maintained by Doorstop
Change History (74)
comment:1 Changed on 11/07/19 at 08:30:03 by Sebastian Huber
Description: | modified (diff) |
---|
comment:2 Changed on 11/07/19 at 08:30:40 by Sebastian Huber
Status: | assigned → accepted |
---|
comment:3 Changed on 11/12/19 at 09:07:11 by Sebastian Huber <sebastian.huber@…>
comment:14 Changed on 11/12/19 at 09:07:53 by Sebastian Huber <sebastian.huber@…>
In b88c7583/rtems:
comment:16 Changed on 11/12/19 at 09:07:59 by Sebastian Huber <sebastian.huber@…>
In 6da85f49/rtems:
comment:17 Changed on 11/12/19 at 09:08:03 by Sebastian Huber <sebastian.huber@…>
In 1e343825/rtems:
comment:20 Changed on 11/14/19 at 10:49:27 by Sebastian Huber <sebastian.huber@…>
In 984d7443/rtems:
comment:22 Changed on 11/14/19 at 14:10:40 by Sebastian Huber <sebastian.huber@…>
In 41ab50e4/rtems:
comment:23 Changed on 11/15/19 at 06:46:01 by Sebastian Huber <sebastian.huber@…>
In 9c601b00/rtems:
comment:25 Changed on 11/15/19 at 06:46:07 by Sebastian Huber <sebastian.huber@…>
In 75d9e79f/rtems:
comment:27 Changed on 11/21/19 at 07:06:04 by Sebastian Huber <sebastian.huber@…>
In a52d6174/rtems:
comment:28 Changed on 11/21/19 at 07:06:11 by Sebastian Huber <sebastian.huber@…>
In 38207a31/rtems:
comment:30 Changed on 11/25/19 at 10:45:38 by Sebastian Huber <sebastian.huber@…>
In 3e9f5a55/rtems:
comment:31 Changed on 11/25/19 at 10:45:42 by Sebastian Huber <sebastian.huber@…>
In 05a32e15/rtems:
comment:32 Changed on 11/25/19 at 10:45:45 by Sebastian Huber <sebastian.huber@…>
In a0304e8d/rtems:
comment:35 Changed on 11/25/19 at 12:02:10 by Sebastian Huber <sebastian.huber@…>
In 5c2e7104/rtems:
comment:37 Changed on 11/27/19 at 11:03:45 by Sebastian Huber <sebastian.huber@…>
In 1fca1665/rtems:
comment:39 Changed on 12/02/19 at 06:47:45 by Sebastian Huber <sebastian.huber@…>
In 8f6b7abd/rtems:
comment:41 Changed on 12/05/19 at 06:52:52 by Sebastian Huber <sebastian.huber@…>
In 1380c822/rtems:
comment:43 Changed on 02/25/20 at 07:21:40 by Sebastian Huber
Milestone: | 5.1 → 6.1 |
---|---|
Version: | 5 → 6 |
comment:44 Changed on 04/06/20 at 14:01:59 by Sebastian Huber
Blocking: | 3250 added |
---|
comment:45 Changed on 09/13/20 at 12:01:52 by Sebastian Huber <sebastian.huber@…>
comment:46 Changed on 09/13/20 at 12:01:54 by Sebastian Huber <sebastian.huber@…>
comment:47 Changed on 09/14/20 at 07:00:02 by Sebastian Huber <sebastian.huber@…>
In f3f0370f/rtems:
comment:48 follow-up: 50 Changed on 09/14/20 at 21:14:39 by kgardas
with new build system smp enabled build of pc686 fails. Linkage of samples fails with
/export/home/karel/sfw/rtems/6-tools-core2/lib/gcc/i386-rtems6/10.2.1/../../../../i386-rtems6/bin/ld: ./librtemsbsp.a(smp-imps.c.10.o): in function `boot_cpu': /export/home/karel/git/rtems/rtems-head/build/i386/pc686/../../../bsps/i386/pc386/start/smp-imps.c:274: undefined reference to `_binary_appstart_bin_start' /export/home/karel/sfw/rtems/6-tools-core2/lib/gcc/i386-rtems6/10.2.1/../../../../i386-rtems6/bin/ld: /export/home/karel/git/rtems/rtems-head/build/i386/pc686/../../../bsps/i386/pc386/start/smp-imps.c:274: undefined reference to `_binary_appstart_bin_size' collect2: error: ld returned 1 exit status
that's due to fact this part of Makefile based build was not translated to the new build system:
appcpustart.$(OBJEXT): ../../../../../../bsps/i386/pc386/start/startAP.S $(CPPASCOMPILE) $(AM_CPPFLAGS) -o $@ -c $< appstart.$(OBJEXT): appcpustart.$(OBJEXT) $(LD) -N \ -Ttext 0x70000 -e app_processor_start -nostdlib \ -o appstart_tmp.exe $< $(OBJCOPY) -O binary appstart_tmp.exe appstart.bin $(OBJCOPY) -I binary -O elf32-i386 -B i386 appstart.bin $@
besides this there is also error in files (getcpuid.c seems to be gone, bspsmp.c needs to be there:
diff --git a/spec/build/bsps/i386/pc386/objsmp.yml b/spec/build/bsps/i386/pc386/objsmp.yml index af882cb425..9e83bd7a01 100644 --- a/spec/build/bsps/i386/pc386/objsmp.yml +++ b/spec/build/bsps/i386/pc386/objsmp.yml @@ -11,6 +11,7 @@ includes: [] install: [] links: [] source: -- bsps/i386/pc386/start/getcpuid.c +#- bsps/i386/pc386/start/getcpuid.c +- bsps/i386/pc386/start/bspsmp.c - bsps/i386/pc386/start/smp-imps.c type: build
unfortunately so far I struggle with translating this to waf, probably should look for some waf doc or so. E.g. linking steps of appcpustart.o into appstart.o is what makes me trouble. Also I'm not able to find out how rtemsbsp lib is linked and its dependency specified...
comment:49 Changed on 09/15/20 at 07:20:48 by Sebastian Huber <sebastian.huber@…>
In 127c3ea5/rtems:
comment:50 follow-up: 51 Changed on 09/15/20 at 07:24:54 by Sebastian Huber
Replying to kgardas:
unfortunately so far I struggle with translating this to waf, probably should look for some waf doc or so. E.g. linking steps of appcpustart.o into appstart.o is what makes me trouble. Also I'm not able to find out how rtemsbsp lib is linked and its dependency specified...
Thanks testing the new build system and for the bug report. I checked in a fix, could you please test if this fixes the issues on this BSP.
Working with waf is also not easy for me. Fortunately, we don't have that many areas in the build which need a special treatment like this. It was the first spot which need to include a specially build object file in a library.
comment:51 follow-up: 52 Changed on 09/15/20 at 08:02:05 by kgardas
Replying to Sebastian Huber:
Replying to kgardas:
unfortunately so far I struggle with translating this to waf, probably should look for some waf doc or so. E.g. linking steps of appcpustart.o into appstart.o is what makes me trouble. Also I'm not able to find out how rtemsbsp lib is linked and its dependency specified...
Thanks testing the new build system and for the bug report. I checked in a fix, could you please test if this fixes the issues on this BSP.
Working with waf is also not easy for me. Fortunately, we don't have that many areas in the build which need a special treatment like this. It was the first spot which needed to include a specially build object file in a library.
Build builds both no-SMP and SMP BSPs fine, but neither of them runs on neither qemu nor on real hardware. If you find helpful, then qemu connected gdb shows those 3 traces over few seconds of BSP run:
Program received signal SIGINT, Interrupt. 0x00008d54 in _RBTree_Insert_inline (less=<optimized out>, key=<synthetic pointer>, the_node=0x5ccc3d04, the_rbtree=0x736f4d74) at ../../../cpukit/include/rtems/score/rbtree.h:523 523 while ( *link != NULL ) { (gdb) where #0 0x00008d54 in _RBTree_Insert_inline (less=<optimized out>, key=<synthetic pointer>, the_node=0x5ccc3d04, the_rbtree=0x736f4d74) at ../../../cpukit/include/rtems/score/rbtree.h:523 #1 _Priority_Plain_insert (priority=0, node=0x5ccc3d04, aggregation=0xc031 <vesa_realmode_bootup_init+3305>) at ../../../cpukit/include/rtems/score/priorityimpl.h:417 #2 _Thread_queue_Priority_do_enqueue (heads=0xc031 <vesa_realmode_bootup_init+3305>, queue_context=0x6c6c6544, the_thread=0x74 <_establish_stack+19>, queue=0x726f5020) at ../../../cpukit/score/src/threadqops.c:484 #3 _Thread_queue_Queue_enqueue (enqueue=<optimized out>, initialize=<optimized out>, queue_context=0x6c6c6544, the_thread=0x74 <_establish_stack+19>, queue=0x726f5020) at ../../../cpukit/score/src/threadqops.c:96 #4 _Thread_queue_Priority_enqueue (queue=0x726f5020, the_thread=0x74 <_establish_stack+19>, queue_context=0x6c6c6544) at ../../../cpukit/score/src/threadqops.c:566 #5 0x6c616972 in ?? () #6 0x00000000 in ?? () (gdb) c Continuing. ^C Program received signal SIGINT, Interrupt. 0x00008d48 in _Chain_Insert_unprotected (the_node=0x283d4 <idtHdl+2708>, after_node=0x9002d0ff) at ../../../cpukit/include/rtems/score/chainimpl.h:666 666 before_node->previous = the_node; (gdb) where #0 0x00008d48 in _Chain_Insert_unprotected (the_node=0x283d4 <idtHdl+2708>, after_node=0x9002d0ff) at ../../../cpukit/include/rtems/score/chainimpl.h:666 #1 _Chain_Prepend_unprotected (the_node=0x283d4 <idtHdl+2708>, the_chain=0x9002d0ff) at ../../../cpukit/include/rtems/score/chainimpl.h:737 #2 _Thread_queue_Queue_enqueue (enqueue=<optimized out>, initialize=<optimized out>, queue_context=0x6c6c6544, the_thread=0x74 <_establish_stack+19>, queue=0x726f5020) at ../../../cpukit/score/src/threadqops.c:95 #3 _Thread_queue_Priority_enqueue (queue=0x726f5020, the_thread=0x74 <_establish_stack+19>, queue_context=0x6c6c6544) at ../../../cpukit/score/src/threadqops.c:566 #4 0x6c616972 in ?? () #5 0x00000000 in ?? () (gdb) c Continuing. ^C Program received signal SIGINT, Interrupt. 0x00008d54 in _RBTree_Insert_inline (less=<optimized out>, key=<synthetic pointer>, the_node=0x5ccc3d04, the_rbtree=0x736f4d74) at ../../../cpukit/include/rtems/score/rbtree.h:523 523 while ( *link != NULL ) { (gdb) where #0 0x00008d54 in _RBTree_Insert_inline (less=<optimized out>, key=<synthetic pointer>, the_node=0x5ccc3d04, the_rbtree=0x736f4d74) at ../../../cpukit/include/rtems/score/rbtree.h:523 #1 _Priority_Plain_insert (priority=0, node=0x5ccc3d04, aggregation=0xc031 <vesa_realmode_bootup_init+3305>) at ../../../cpukit/include/rtems/score/priorityimpl.h:417 #2 _Thread_queue_Priority_do_enqueue (heads=0xc031 <vesa_realmode_bootup_init+3305>, queue_context=0x6c6c6544, the_thread=0x74 <_establish_stack+19>, queue=0x726f5020) at ../../../cpukit/score/src/threadqops.c:484 #3 _Thread_queue_Queue_enqueue (enqueue=<optimized out>, initialize=<optimized out>, queue_context=0x6c6c6544, the_thread=0x74 <_establish_stack+19>, queue=0x726f5020) at ../../../cpukit/score/src/threadqops.c:96 #4 _Thread_queue_Priority_enqueue (queue=0x726f5020, the_thread=0x74 <_establish_stack+19>, queue_context=0x6c6c6544) at ../../../cpukit/score/src/threadqops.c:566 #5 0x6c616972 in ?? () #6 0x00000000 in ?? () (gdb)
comment:52 follow-up: 53 Changed on 09/15/20 at 08:09:11 by Sebastian Huber
Replying to kgardas:
[...]
Build builds both no-SMP and SMP BSPs fine, but neither of them runs on neither qemu nor on real hardware. If you find helpful, then qemu connected gdb shows those 3 traces over few seconds of BSP run:
With the old build system both configuration work I guess?
What is the qemu command line to test this BSP?
comment:53 follow-up: 58 Changed on 09/15/20 at 08:26:14 by kgardas
Replying to Sebastian Huber:
Replying to kgardas:
[...]
Build builds both no-SMP and SMP BSPs fine, but neither of them runs on neither qemu nor on real hardware. If you find helpful, then qemu connected gdb shows those 3 traces over few seconds of BSP run:
With the old build system both configuration work I guess?
Yes, hello/smp works
What is the qemu command line to test this BSP?
qemu-system-i386 -m 128 -no-reboot -nographic -append "--video=off --console=/dev/com1" -kernel ./hello.exe
comment:54 Changed on 09/15/20 at 11:33:18 by Sebastian Huber <sebastian.huber@…>
In 3be23809/rtems:
comment:56 Changed on 09/15/20 at 13:14:56 by Sebastian Huber <sebastian.huber@…>
In 8f424e45/rtems:
comment:58 follow-up: 59 Changed on 09/15/20 at 13:16:33 by Sebastian Huber
Replying to kgardas:
Replying to Sebastian Huber:
Replying to kgardas:
[...]
Build builds both no-SMP and SMP BSPs fine, but neither of them runs on neither qemu nor on real hardware. If you find helpful, then qemu connected gdb shows those 3 traces over few seconds of BSP run:
With the old build system both configuration work I guess?
Yes, hello/smp works
With the recent fixes I was able to run the tests on Qemu.
What is the qemu command line to test this BSP?
qemu-system-i386 -m 128 -no-reboot -nographic -append "--video=off --console=/dev/com1" -kernel ./hello.exe
comment:59 Changed on 09/15/20 at 13:47:12 by kgardas
Replying to Sebastian Huber:
With the recent fixes I was able to run the tests on Qemu.
Thanks a lot for fast fixes! I can confirm running no-SMP hello and SMP smp01 on both qemu and real hardware. Thanks!
comment:61 Changed on 09/17/20 at 16:09:18 by Sebastian Huber <sebastian.huber@…>
In 11c1b862/rtems:
comment:63 Changed on 09/21/20 at 04:47:26 by Sebastian Huber <sebastian.huber@…>
In d110e6e3/rtems:
comment:65 Changed on 09/25/20 at 16:56:48 by Sebastian Huber <sebastian.huber@…>
comment:72 Changed on 10/07/20 at 06:06:50 by Sebastian Huber <sebastian.huber@…>
In 94b8d85b/rtems:
comment:73 Changed on 04/26/21 at 12:06:12 by Sebastian Huber
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
The new build system is operational. Issues with the new build system should use new tickets.
comment:74 Changed on 06/23/21 at 07:16:03 by Sebastian Huber
Keywords: | qualification added |
---|
In 9f3c558/rtems: