Home › Forums › TrueRNG Hardware random number generator › Linux mdev rules
- This topic has 9 replies, 3 voices, and was last updated 8 years, 11 months ago by Ubld.it Staff.
-
AuthorPosts
-
October 19, 2014 at 7:35 am #966dptrashMember
Hi,
Are there also mdev rules available?
My system does not use udev.Regards
October 24, 2014 at 11:53 am #969Ubld.it StaffModeratorCurrently one doesn’t exist, but we can look into helping make some.
The basics are simple,
* symlink (if you can) to /dev/TrueRNG so if you have multiple ttyACMx devices its easy to find (and start iwth rngd)
* set the serial port to RAW meaning no control characters
* maybe something else I’m missing.In some systems the udev rules aren’t needed at all, its just over time we’ve found a few quirks with different distros and the udev rules seem to help make things more consistent.
What distro are you running ? and is mdev the default or your choice ? usually mdev is used on embedded systems with busybox.
October 26, 2014 at 6:29 pm #971dptrashMemberWhat distro are you running ? and is mdev the default or your choice ? usually mdev is used on embedded systems with busybox.
You are right. My distro is Alpine Linux. mdev is there the default.
January 21, 2015 at 5:14 pm #1131giuliano77MemberAny updates in mdev rules? Embedded systems are supposed to be the main target for your product because they lack in good entropy sources. I’m interested in your product also, please make a little effort to create those mdev rules.
Thank you.- This reply was modified 9 years, 10 months ago by giuliano77.
January 22, 2015 at 11:57 am #1133Ubld.it StaffModeratorIf there is still a need for mdev rules, we’ll start going over the mdev documentation and see what we can put together. Hopefully we’ll have something in the next few days.
January 26, 2015 at 2:30 am #1135Ubld.it StaffModeratorIt took a few days to figure out a solution for mdev systems. The product page download section has been updated with a link to a tgz for mdev systems (link is also here). There are 3 files in the tgz, (with paths to make it easy to extract to /). The first file is “README” this file will explain the install in more detail. The second is “/etc/mdev.conf.truerng.addon” this file contains like 2 lines to be added to the tail end of your /etc/mdev.conf. The 3rd file is /lib/mdev/truerng which needs to be in /lib/mdev with execute permissions.
The test system was Alpine Linux, since it was referenced above and an ideal candidate for testing. I hope this works with other mdev systems correctly. The scripts will create the /dev/TrueRNG symlink when the TrueRNG is inserted just like its udev counterpart. It will also set the tty correctly to raw mode so that the terminal doesn’t interpret any codes. Lastly it will remove the symlink when the device is removed.
August 9, 2015 at 2:04 pm #1318dptrashMemberAugust 17, 2015 at 5:07 pm #1324Ubld.it StaffModeratorI must have had some other code in there that got taken out in the final version, I had gone through a few iterations of trying to implement a working system before the final version. The vid/pid check at the top is negative, since on the remove event the vid/pid doesn’t exist. So we wouldn’t want to put the add action in that branch.
The simplest thing to do would be to add a check to the bottom making sure the vid/pid are correct before doing the add [otherwise the whole script needs reworking]
which would look something like
if [ “$ACTION” = “add” ] && [“$VID” = “4d8” ] && [ “$PID” = “f5fe” ]; then
instead of
if [ “$ACTION” = “add” ]; thenI would have to test this change before updating the script in the package, but there is room for improvement there.
December 27, 2015 at 8:07 am #1565dptrashMemberBefore I buy the TrueRNGpro: Can I reuse these mdev rules for TrueRNGpro?
I could improve the mdev script – is there some interest from your side?- This reply was modified 8 years, 11 months ago by dptrash.
January 4, 2016 at 3:28 pm #1569Ubld.it StaffModeratorIt should be a few minute job to modify the mdev rules for the TrueRNGV2 to work on the pro. the Pro has a different usb PID, aside from that it functions the same way as a USB CDC serial port, except faster and the other shell scripts to put it into RAW mode and what not.
As for script contributions, we will gladly take any improvements.
-
AuthorPosts
- You must be logged in to reply to this topic.