[LITMUS^RT] Litmus on single-board computer

Martinez Garcia Jorge Luis (PS-EC/ESB2) JorgeLuis.MartinezGarcia at de.bosch.com
Sun Jan 14 21:50:48 CET 2018


>Note I set the variables via the shell’s environment, but that shouldn’t make a difference. For reference, here’s my env.sh script.
>
>	export PATH=/opt/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin:$PATH
>	export ARCH=arm64
>	export CROSS_COMPILE=aarch64-linux-gnu-
 
Setting the variables via the shell's environment seems to do the trick. I also renamed my vanilla kernel source litmus-rt.

osboxes at osboxes:~/playground/liblitmus$ make
cp ../litmus-rt/include/litmus/rt_param.h include/litmus/rt_param.h
cp ../litmus-rt/include/litmus/ctrlpage.h include/litmus/ctrlpage.h
cp ../litmus-rt/include/litmus/fpmath.h include/litmus/fpmath.h
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o kernel_iface.o src/kernel_iface.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o migration.o src/migration.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o syscalls.o src/syscalls.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o task.o src/task.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o litmus.o src/litmus.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o clocks.o src/clocks.c
aarch64-linux-gnu-ar rcs liblitmus.a kernel_iface.o migration.o syscalls.o task.o litmus.o clocks.o
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o cycles.o bin/cycles.c
aarch64-linux-gnu-gcc -o cycles   cycles.o   -L. -llitmus 
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o base_task.o bin/base_task.c
aarch64-linux-gnu-gcc -o base_task   base_task.o   -L. -llitmus 
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o rt_launch.o bin/rt_launch.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o common.o bin/common.c
aarch64-linux-gnu-gcc -o rt_launch   rt_launch.o common.o   -L. -llitmus 
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o rtspin.o bin/rtspin.c
aarch64-linux-gnu-gcc -o rtspin   rtspin.o common.o   -L. -llitmus -lrt
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o release_ts.o bin/release_ts.c
aarch64-linux-gnu-gcc -o release_ts   release_ts.o common.o   -L. -llitmus 
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o null_call.o bin/null_call.c
aarch64-linux-gnu-gcc -o measure_syscall   null_call.o   -L. -llitmus -lm
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o base_mt_task.o bin/base_mt_task.c
aarch64-linux-gnu-gcc -o base_mt_task  -pthread base_mt_task.o   -L. -llitmus 
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o uncache.o bin/uncache.c
aarch64-linux-gnu-gcc -o uncache   uncache.o   -L. -llitmus -lrt
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o core_api.o tests/core_api.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o nesting.o tests/nesting.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o runner.o tests/runner.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o fdso.o tests/fdso.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o sched.o tests/sched.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o pcp.o tests/pcp.c
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o locks.o tests/locks.c
aarch64-linux-gnu-gcc -o runtests   core_api.o nesting.o runner.o fdso.o sched.o pcp.o locks.o   -L. -llitmus -lrt
aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I./include -I./arch/arm64/include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi  -c -o resctl.o bin/resctl.c
aarch64-linux-gnu-gcc -o resctl   resctl.o   -L. -llitmus 

osboxes at osboxes:~/playground/feather-trace-tools$ make
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o ftcat.o src/ftcat.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o timestamp.o src/timestamp.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc   ftcat.o timestamp.o  -L../liblitmus -llitmus -o ftcat
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o ft2csv.o src/ft2csv.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o mapping.o src/mapping.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc   ft2csv.o timestamp.o mapping.o  -L../liblitmus -llitmus -o ft2csv
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o ftdump.o src/ftdump.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc   ftdump.o timestamp.o mapping.o  -L../liblitmus -llitmus -o ftdump
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o ftsort.o src/ftsort.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc   ftsort.o timestamp.o mapping.o  -L../liblitmus -llitmus -o ftsort
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o stdump.o src/stdump.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o load.o src/load.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o eheap.o src/eheap.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o util.o src/util.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc  -o st-dump stdump.o load.o eheap.o util.o  #  -L../liblitmus -llitmus
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600 -D_GNU_SOURCE  -DARCH=arm64 -I../liblitmus/include -I../liblitmus/arch/arm64/include -I../liblitmus/arch/arm64/include/uapi -I../liblitmus/arch/arm64/include/generated/uapi -Iinclude/  -c -o job_stats.o src/job_stats.c
/home/osboxes/playground/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc  -o st-job-stats job_stats.o load.o eheap.o util.o #   -L../liblitmus -llitmus

Is this output fine? It seems to me.

Once liblitmus and Feather-Trace Tools are successfully cross-compiled, by copying  both directories to my rootfs and modifying the path to add the directories:
$ export PATH=$PATH:/liblitmus
$ export PATH=$PATH:/ feather-trace-tools
 I guess I am ready to start playing around with Litmus^RT, right?
Regards,
Jorge


More information about the litmus-dev mailing list