-
Notifications
You must be signed in to change notification settings - Fork 136
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
To support NetBSD and OpenBSD #1177
Comments
I think it's more important to have recent releases there rather than git main. |
Good point. Edit issue text to say |
I actally tried git main and it chocked at finding |
Indeed. For example, for libusb project, OpenBSD is only up to 1.0.23 release whereas NetBSD/pkgsrc is at the latest 1.0.26 release. However, for libusb project, I will at least do some sanity check before the release for NetBSD/OpenBSD. For example, the following is for libusb-1.0.26 (I did the same thing for 1.0.25). |
I guess they differ in that respect from FreeBSD. FreeBSD provides its own libusb implementation that covers the 0.1 and 1.0 APIs (plus one they call 2.0). What do NetBSD and OpenBSD use? Something that ships as add-on package, or did they reuse the FreeBSD implementation? |
OpenBSD and NetBSD kind of use upstream libusb with some patches. OpenBSD's Martin Pieuchot contributed the OpenBSD backend back in 2011 (commit was on 30-Jan-2012). Then I found that it also supports NetBSD and Pete added the commit to add NetBSD support here. We had to split NetBSD backend from OpenBSD backend here since no one from NetBSD jumped in to match further development from Martin. There is a ticket to improve NetBSD code from the OpenBSD code. OpenBSD libusb is now at 1.0.23 release but with some patches. NetBSD/pkgsrc is already at the latest 1.0.26 release. It seems to me they do not add any patches. |
Just tried under NetBSD and I have no problems build avrdude git main under NetBSD once I use the right build command.
|
Under OpenBSD it has some compiling issues.
Compiler errors. Sorry the clip board is not working so it is not easy for me to post the error messages.
|
The first error means OpenBSD never updated their ELF header files. The respective VCS log entry in FreeBSD dates back to 2008:
Well, we could hack around that with some #ifndef magic, but I'd prefer they adapt to the real world theirselves. 2 and 3 means they appear to no longer support the historical select(2) system interface. We could change the code to use poll(2) instead. If you want, you can open me a ticket for that, it's not going to be a major piece of work (only affects a few lines of code). |
I have created #1179. I can see that What about |
The patch from OpenBSD is here. Looks like we have to use #ifndef magic.
|
@dl8dtl |
Too bad they still don't include that after 14 years … but we could do that. |
Might make sense to include that one as well. It ensures the pointer don't dangle with old values. |
The same. Interesting that one compiles under OpenBSD, the other one doesn't. But then, neither includes (Even our Windows implementation uses select().) |
Indeed Windows provides the support from |
Great, adding the I will try to create a PR for OpenBSD support. |
CLI mode seems to work fine under OpenBSD. Terminal mode seems to work as well -- need to use the tip from @MCUdude to avoid timeout as this is inside a VM. |
No, we are supposed to add this header to our sources that want to use select(). |
@dl8dtl For I am pretty bad at git, could you please create the PR? Thanks. |
Thanks. This will fix What about the One more change could be |
I updated the PR to handle Regarding build.sh, the question is which -I and -L flags would be required for them. |
I agree.
OpenBSD -- same as FreeBSD.
NetBSD (pkgsrc) -- using the following.
|
OK, added as well. |
Thanks. Now OpenBSD will work out of the box. For NetBSD, the build works out of the box but the avrdude binary is not be able to find the libraries. Some further tuning of
|
PR #1181 has been merged. Openbsd should now work out of the box. |
I have figured out how to build avrdude under NetBSD properly. We just need to add
But I have not figured how to get my Arduino Uno USB to Serial port to appear under NetBSD VM yet. Looks like the new VirtualBox version breaks USB support for NetBSD. |
That surprises me quite a bit. It records the LD_RUNPATH attribute. |
You are right. I checked on a different NetBSD installation under PVE vitual platform and the above |
Failed run log:
Verbose linking step:
|
I think I find the reason,
|
Full build log using default
|
I think I can close this issue now. |
But again, on a system that uses pkgsrc, I'd expect that I tried looking up their pkgsrc guide, but could not find any statement about it. Well, it seems the NetBSD folks don't really like https://www.netbsd.org/docs/elf.html Consequently, your solution with adding |
Great. Now we have a simple solution. I tested the following simple patch and it works fine. Please help to update
|
Full runlog.
|
Please help to update The installation prefix is needed to get the installation working correctly.
|
Reopening to handle |
As of now. I think we can ignore that for now. The easy way is to use the following commands if one wants to follow git main.
If you want to look at the details, here is the Homebrew avrdude formula. I tend to think |
The basic fix to NetBSD build.sh is good to have before 7.1 release. Thanks. |
avrdudes#1177 (comment) This is to address issue avrdudes#1177 for NetBSD
I have merged #1241 and this issue can be closed. |
As of now NetBSD/pkgsrc only support avrdude 6.4.
https://pkgsrc.se/cross/avrdude
As of now, OpenBSD only comes with avrdude 6.3.
https://openports.se/devel/avrdude
It will be good to support avrdude 7.0 release and git main for NetBSD and OpenBSD.
This may not be high priority though.
The text was updated successfully, but these errors were encountered: