[Gnuk-users] udev rules for Ubuntu 14.04
NIIBE Yutaka
gniibe at fsij.org
Mon Mar 14 02:23:11 UTC 2016
Hello,
Sorry, I was busy for my paper works to tax agency. Now is the season
in Japan for filing such forms.
On 03/14/2016 08:23 AM, Julio Lajara wrote:
> Does anyone know if its advised for me to upgrade to a newer neug
> version that the one I got from below in step 2.3?
No, I don't put binaries now.
When gitorious.org was in service, I put the binaries there. But I
didn't got any positive feedback for that. Perhaps, I just couldn't
catch the voice from silent users.
Now, I don't put the binaries on the net. That's because:
(1) GNU Toolchain (binaries) are now easier to install.
In 2010, we need a specific patch set. Now, we have
gcc-arm-embedded project. On Debian, we have
gcc-arm-none-eabi package to just install by apt-get.
(2) I'm not sure how users can be sure for the authenticity of
the code. I assumed a user wants the souce code when she
install the binary, but I might be wrong.
It would be possible for me to prepare a GPG key for binary release
and privide GPG signature for binaries, so that users can check.
> neug firmware installation steps:
Thank you for the documentation. FWIW, my documentation is here:
http://www.gniibe.org/FST-01/q_and_a/neug_overrides_gnuk.html
Let me comment yours.
> 1. Identify if your FST-01 is running gnuk or neug by running 'lsusb':
This is good recommendation.
> 2. Flashing firmware to overwrite gnuk with neug:
>
> 2.1. Setup a udev rule in '/etc/udev/rules.d/90-gnukflash.rules' with
> the following content:
>
> SUBSYSTEMS=="usb", ATTRS{idVendor}=="234b", ATTRS{idProduct}=="0000",
> ENV{ID_USB_INTERFACES}=="*:ff0000:*", GROUP="pcscd"
Yes, something like this is needed. This is to recognize the reGNUal
device which is used in the firmware upgrade process.
> 2.2. Install required software for flashing firmware and reboot:
>
> $ sudo apg-get install gnupg gnupg-agent pcscd python-usb rng-tools
> $ sudo groupadd pcscd
> $ sudo useradd -G pcscd ${USER}
> $ cd /tmp
> $ sudo reboot
I don't think if you just want to use NeuG, installing gnupg,
gnupg-agent, pcscd is not the requirement here.
I think that the only mandatory tool is python-usb.
Installing rng-tools is to run the NeuG device.
> 2.4. Remove the previously created udev rule in
> '/etc/udev/rules.d/90-gnukflash.rules':
>
> $ sudo rm -f /etc/udev/rules.d/90-gnukflash.rules
Leaving this coniguration file is OK.
> 3. neug setup:
My documentation is here:
http://www.gniibe.org/FST-01/q_and_a/neug-standalone-device.html
> 3.1. Create a new neug udev rule in '/etc/udev/rules.d/90-neug.rules'
> with the following content:
>
> KERNEL=="ttyACM[0-9]*", SUBSYSTEMS=="usb", ACTION=="add",
> ATTRS{idVendor}=="234b", ATTRS{idProduct}=="0001",
> ENV{ID_MM_DEVICE_IGNORE}="1", RUN+="/etc/udev/ctrl_rng.sh"
> KERNEL=="ttyACM[0-9]*", SUBSYSTEMS=="usb", ACTION=="remove",
> ATTRS{idVendor}=="234b", ATTRS{idProduct}=="0001",
> ENV{ID_MM_DEVICE_IGNORE}="1", RUN+="/etc/udev/ctrl_rng.sh"
>
> 3.2. Create the rngd control script in '/etc/udev/ctrl_rng.sh' with the
> following content:
[...]
> 3.3 Ensure right permissions on rngd control script:
>
> $ sudo chmod 755 /etc/udev/ctrl_rng.sh
>
> 3.4 Reboot and then plugin the FST-01 and ensure you see the rngd
> instance running (it may take a few seconds to start after plugging it in):
>
> $ sudo reboot
> $ ps aux | grep rngd
I'm not sure if Ubuntu 14.04 adopted systemd or not. If it's systemd
based, it would be good to have the configuration for systemd, because
it allows multiple instances of NeuG devices to be connected.
--
More information about the gnuk-users
mailing list