Monday, April 16, 2018

glibc broken on openSUSE Tumbleweed aarch64 201803

The glibc on Tumbleweed was broken since the March 2018 release.  Any call to resolve IPv4 will cause core dump.  Seems to be hitting an ARM erratum.  Details discussion can be found here.

The glibc RPMs released on 2018-04-10 seems resolved the issue.  Since DNS won't work on the affected machine, will need to manually specify IP addresses in the hosts file or copy the files to the machine and run zypper to install updates.

Here are the steps for the second approach:

- Download the RPMs from repository to another machine
glibc-2.27-4.2.aarch64.rpm
glibc-devel-2.27-4.2.aarch64.rpm
glibc-extra-2.27-4.2.aarch64.rpm
glibc-locale-2.27-4.2.aarch64.rpm

- Copy the files to the affected machine via scp.  Then remote to the affected machine and execute the followings.

- Temporarily disable remote repositories to avoid auto refresh that will cause core dump when running zypper install.
sudo zypper lr  # list repositories
sudo zypper mr -d 1  # disable the first repository
sudo zypper mr -d 2  # disable the rest
......

- Install the RPMs
sudo zypper in glibc-2.27-4.2.aarch64.rpm glibc-devel-2.27-4.2.aarch64.rpm glibc-extra-2.27-4.2.aarch64.rpm glibc-locale-2.27-4.2.aarch64.rpm

- Re-enable remote repositories

sudo zypper mr -e 1  # disable the first repository
sudo zypper mr -e 2  # disable the rest
......
- Reboot and check.  Run "sudo zypper dup" to update other packages

Wednesday, March 28, 2018

Generate noise

Found this interesting post on generating noise using Linux command line.  Great way to burn-in headphone?

play -n synth brownnoise synth pinknoise mix synth sine amod 0.3 10

Monday, February 12, 2018

Running Monero miner with Mesa clover

Try to run Monero miner with OpenCL on my old Linux rig.  The xmr-stak supports the official AMD APP SDK.  But since I only have access to the relatively old hardware (AMD Kabini) running Mesa clover, a quick patch is needed to make it works.

Code changes available on github.  Basically the changes are:

(1) add detection for Mesa platform vendor
(2) modify the OpenCL kernel.  Mesa clover supports OpenCL 1.1 only.  Also, although cl_amd_media_ops and cl_amd_media_ops2 are defined, some functions are missing and need definitions.

Just for reference, on my AMD Kabini 5350, the hash rate on GPU is around 18H/s when running GPU only.  Once added CPU mining, the GPU hash rate drops to about 12H/s.  And the CPU hash rate is round 28H/s.

This rig definitely not suitable if mining for profit.  But OK to support the Monero network.

Config for GPU:
gpu_threads_conf" : [
  // gpu: AMD KABINI (DRM 2.50.0 / 4.14.15-2-default, LLVM 5.0.1) memory:1302
  // compute units: 2
  { "index" : 0,
    "intensity" : 128, "worksize" : 8,
    "affine_to_cpu" : true, "strided_index" : true
  },

],

Also note that the radeon module may complain about lockup when executing long running OpenCL kernels. Add "radeon.lockup_timeout=0" Linux kernel parameter to disable the watchdog.

Monday, January 29, 2018

User LEDs on Beaglebone Black running FreeBSD

According to the DTS, the GPIO pins for the four user LEDS are pin 21-24 under gpioc1.

So, to turn them on:

sudo gpioctl -f /dev/gpioc1 21 1
sudo gpioctl -f /dev/gpioc1 22 1
sudo gpioctl -f /dev/gpioc1 23 1
sudo gpioctl -f /dev/gpioc1 24 1

Or, access them via the led driver under /dev/led

% ls -lA /dev/led
total 0
crw-------  1 root  wheel  0x33 Feb  3 15:58 beaglebone:green:heartbeat
crw-------  1 root  wheel  0x34 Feb  3 15:58 beaglebone:green:mmc0
crw-------  1 root  wheel  0x35 Feb  3 23:44 beaglebone:green:usr2
crw-------  1 root  wheel  0x36 Feb  3 15:58 beaglebone:green:usr3

Thursday, January 18, 2018

Running openSUSE Tumbleweed on Odroid C2

Testing out arm64 with openSUSE Tumbleweed on Odroid C2.  The installation is pretty simple.  Follow the steps to prepare the micro-sd card.  The latest image can be found here.

The device tree of openSUSE seems a bit different from other distributions.  e.g.:

- temperature: /sys/devices/platform/scpi/scpi:sensors/hwmon/hwmon0
- blue LED: /sys/devices/platform/leds/leds/c2:blue:alive