Arch Linux and the HiFive1

Maybe hold off on adding them to the package. I’ve had another go at nailing down the minimum steps, but for some reason I now seem to require even the SUBSYSTEM==“usb” udev rule. So I guess something is awry with my system, especially since you and @neo_ar don’t need any rules.

One thing I think we all do need, though, is to add ourselves to the uucp group, so maybe it’d be worth making the package recommend that we do that.

Making bsp and tools have absolute paths sounds like a good idea, I think. If possible, we may also want to make a script that runs make on the main Makefile (the one currently at /opt/hifive1-sdk/Makefile), which script could, if the AUR Packaging Guidelines permit, live in /usr/bin. That way, our dev environment would be separate from the package contents, and should hopefully still work across package updates without any manual intervention. We could still let the package recommend that we copy software somewhere, in a similar way to how other packages bundle example config files that they recommend we copy to $XDG_CONFIG_HOME/*.

There’s also a bunch of stuff in the .git that could be useful to put in the standard locations, e.g. man pages. Again, we’d have to check if the Packaging Guidelines allow AUR packages to put man pages in /usr/share/man/.

Sorry for the bombardment of suggestions! I could really do with figuring out what’s up with my system that’s preventing me from going without udev rules.

Ah, don’t be sorry, that’s fine! Please keep working on your videos. They are great :wink:

Good luck on finding the root cause!

Regarding to uucp, I didn’t mention that because it is in ArchWiki’s Arduino article. But sure, I will list the instruction in the next release of the package.

Package updated!:tada:

Eventually I did not split the whole package into pieces according to previous discussions but rather put the toolchain part in /opt. The main reason for this is that the naming of the tools, including cross compiler, binutils, openocd, etc. may conflict to some files of standard packages. I have checked how community/avr-gcc did this, they have all their executables with prefix “avr-”. However this whole toolchain is way more complicated than a specific cross compiler, so I decide not to move the toolchain part.

But the rest of the package: bsp (platform-specific settings), software (example apps), and Makefile are put together under the /usr/share/hifive1-sdk now, and the paths are patched. Users can just copy the whole directory to their space, and do make software or other commands as usual.

Any comments are welcome!

1 Like