Wind-River / vxworks7-ros2-build

Build system to automate the build of VxWorks 7 and ROS2
Apache License 2.0
96 stars 22 forks source link

Patching error in Docker (branch foxy-release-21.03-python) #14

Closed MarcoValliIMA closed 2 years ago

MarcoValliIMA commented 2 years ago

Hello, Following the README.md file I am trying to building ROS2 with a VxWorks SDK (I'm using the VxWorks7 SDK for QEMU (IA)), after solved some issue (dummy.c file missing and mismatch with some file where the TGT_ARCH doesn't match with the correct one) I launched the Docker and a run the source command. After that inside the docker I ran the make command but in the "Patching" section it FAILS with the following error.

Patching
--------------------------------------------------------------------------------
for pn in utils/DynamixelSDK utils/hls_lfcd_lds_driver turtlebot3/turtlebot3; do N=$(basename $pn); if ls /work/build/ros2/patches/$N/usr_src/0001-* 1> /dev/null 2>&1; then PATCHES="/work/build/ros2/patches/$N/usr_src/*.patch"; for PATCH in $PATCHES; do cd /work/build/ros2/ros2_ws/src/$pn ; patch -p1 < $PATCH ; done; fi done;
patching file dynamixel_sdk/CMakeLists.txt
Hunk #1 succeeded at 49 with fuzz 2 (offset 2 lines).
patching file dynamixel_sdk/include/dynamixel_sdk/port_handler.h
patching file dynamixel_sdk/include/dynamixel_sdk/port_handler_vxworks.h
patching file dynamixel_sdk/src/dynamixel_sdk/group_bulk_read.cpp
patching file dynamixel_sdk/src/dynamixel_sdk/group_bulk_write.cpp
patching file dynamixel_sdk/src/dynamixel_sdk/group_sync_read.cpp
patching file dynamixel_sdk/src/dynamixel_sdk/group_sync_write.cpp
patching file dynamixel_sdk/src/dynamixel_sdk/packet_handler.cpp
patching file dynamixel_sdk/src/dynamixel_sdk/port_handler.cpp
patching file dynamixel_sdk/src/dynamixel_sdk/port_handler_vxworks.cpp
patching file dynamixel_sdk/src/dynamixel_sdk/protocol1_packet_handler.cpp
patching file dynamixel_sdk/src/dynamixel_sdk/protocol2_packet_handler.cpp
patching file dynamixel_sdk/src/dynamixel_sdk/port_handler_vxworks.cpp
patching file dynamixel_sdk/src/dynamixel_sdk/port_handler_vxworks.cpp
patching file include/hls_lfcd_lds_driver/lfcd_laser.hpp
patching file package.xml
patching file src/hlds_laser_publisher.cpp
Hunk #4 succeeded at 131 (offset -1 lines).
Hunk #5 FAILED at 151.
Hunk #6 succeeded at 188 (offset 1 line).
1 out of 6 hunks FAILED -- saving rejects to file src/hlds_laser_publisher.cpp.rej
patching file src/hlds_laser_publisher.cpp
Hunk #2 FAILED at 141.
1 out of 2 hunks FAILED -- saving rejects to file src/hlds_laser_publisher.cpp.rej
patching file CMakeLists.txt
Hunk #1 succeeded at 24 (offset 6 lines).
patching file turtlebot3_node/include/turtlebot3_node/control_table.hpp
Hunk #1 succeeded at 26 (offset -2 lines).
patching file turtlebot3_node/src/odometry.cpp
Hunk #1 succeeded at 63 with fuzz 1 (offset 1 line).
patching file turtlebot3_node/src/turtlebot3.cpp
Hunk #1 FAILED at 163.
Hunk #2 succeeded at 186 (offset 15 lines).
1 out of 2 hunks FAILED -- saving rejects to file turtlebot3_node/src/turtlebot3.cpp.rej
make[1]: *** [Makefile:73: turtlebot3.patch] Error 1
make[1]: Leaving directory '/work/pkg/turtlebot3'
make: *** [Makefile:17: all] Error 1

PS. I tried this step both with the 'master' branch and 'branch foxy-release-21.03-python' but the result is the same.

razr commented 2 years ago

thanks for reporting, I'll look into it later this week. It might be dues to the fact that the new foxy patch release was published and it is incompatible with the patches I made for the turtlebot3

enriLoniterp commented 2 years ago

Hi, i have the same issue described above by @MarcoValliIMA and i think i am stuck at the point. I am trying overpass this error and launch qemu as reported in the README file: qemu-system-x86_64 -m 512M -kernel $WIND_SDK_HOME/bsps/itl_generic_2_0_2_1/boot/vxWorks -net nic -net tap,ifname=tap0,script=no,downscript=no -display none -serial stdio -monitor none -append "bootline:fs(0,0)host:vxWorks h=192.168.200.254 e=192.168.200.1 u=target pw=boot o=gei0" -usb -device usb-ehci,id=ehci -device usb-storage,drive=fat32 -drive file=fat:ro:./export/deploy,id=fat32,format=raw,if=none

Apparently, it works fine but usb device does not appear in the listed connected devices(used 'devs' command but i can't see my device as bda0). I have also tried different settings suggested in qemu documentation but still can't overtake this issue.

it may have some correlation with the patching error?

Thanks for your attention.

razr commented 2 years ago

what SDK version do you use?

enriLoniterp commented 2 years ago

I'm using : VxWorks SDK for IA - QEMU (x86-64) Version 1.8 Available at: https://labs.windriver.com/downloads/wrsdk_labs.html

razr commented 2 years ago

@MarcoValliIMA to the second part of your issue. I have fixed the build on the master branch, it was one commit behind dashing-release-SR0640-python. Please use https://labs.windriver.com/downloads/wrsdk-vxworks7-up2-1.7.tar.bz2 as described in the README.

I'll set up a GitHub action to build it automatically. Thanks for reporting it.

MarcoValliIMA commented 2 years ago

Hi @razr After your patch I redo all the operations described in the README file using the wrsdk of UP2 and now works correctly, the simple make called in the Docker builds all in correct way; before your patch I launched make WIND_CCSYSROOT=/wrsdk/vxsdk/sysroot/ WIND_SDK_HOST_TOOLS=/wrsdk/vxsdk/host/ because that env variables didn't work well but now works.

Thanks for the support.

enriLoniterp commented 2 years ago

Hi @razr, i'm keeping updated and i have already tried the new patch, following all operations in the README with the correct skd linked above, make operation works fine! Proceeded on the next section and again followed the instructions, i have just run this command:

First attempt run:

sudo qemu-system-x86_64 -m 512M -kernel /home/rosdev/Desktop/wrsdk-vxworks7-up2/bsps/itl_generic_2_0_2_1/boot/vxWorks -net nic -net tap,ifname=tap0,script=no,downscript=no -display none -serial stdio -monitor none -append "bootline:fs(0,0)host:vxWorks h=192.168.200.254 e=192.168.200.1 u=target pw=boot o=gei0" -usb -device usb-ehci,id=ehci -device usb-storage,drive=fat32 -drive file=fat:ro:./export/deploy,id=fat32,format=raw,if=none

I have put my path to the vxWorks directory, just copied the command directly from the README and i received this error: qemu-system-x86_64: -drive file=fat:ro:./export/deploy,id=fat32,format=raw,if=none: Directory does not fit in FAT16 (capacity 516.06 MB)

After that i changed something: qemu-system-x86_64 -m 1024M -kernel /home/rosdev/Desktop/wrsdk-vxworks7-up2/bsps/itl_generic_2_0_2_1/boot/vxWorks -net nic -net tap,ifname=tap0,script=no,downscript=no -display none -serial stdio -monitor none -append "bootline:fs(0,0)host:vxWorks h=192.168.200.254 e=192.168.200.1 u=target pw=boot o=gei0" -usb -device usb-ehci,id=ehci -device usb-storage,drive=fat32 -drive file=./export/example.img,id=fat32,format=raw,if=none

I created example.img, put it on /export/ (/export/example.img) and activated VxWorks, it starts. Inside i've run devsand observed between all devices: /bd0, but i'm still not able to open /export/deploy.

I have also tried different configurations changing file=fat:ro to to file=fat:rw and so on but i can't actually make it start.

Maybe i'm missing something i can't see.

Thanks again for your attention.