Skip to content

Instantly share code, notes, and snippets.

View jjmcdn's full-sized avatar

Joe MacDonald jjmcdn

  • Mentor Graphics
  • Ottawa, ON
  • X @jjmcdn
View GitHub Profile

Keybase proof

I hereby claim:

  • I am joeythesaint on github.
  • I am jjm (https://keybase.io/jjm) on keybase.
  • I have a public key whose fingerprint is 63A9 1849 9271 300A AAD6 557C C05B DC96 5A20 D17C

To claim this, I am signing this object:

@jjmcdn
jjmcdn / bb#620
Last active August 29, 2015 14:11
log from nvidia-smi test for bumblebee issue #620
root@burninator:~# lsmod | grep bbs
bbswitch 12866 0
root@burninator:~# ps aux | grep bumb
root 3355 0.0 0.0 7848 1872 pts/0 S+ 14:34 0:00 grep bumb
root@burninator:~# modprobe -rv bbswitch
rmmod bbswitch
root@burninator:~# nvidia-smi
NVIDIA: could not open the device file /dev/nvidiactl (No such device or address).
NVIDIA-SMI has failed because it couldn't communicate with NVIDIA driver. Make sure that latest NVIDIA driver is installed and running.
@jjmcdn
jjmcdn / bumblebeed log
Created December 18, 2014 04:21
bumblebee issue #620: kernel 3.9 boot and logs
root@burninator:~# bumblebeed --debug
[ 241.116113] [INFO]PM is disabled, not performing detection.
[ 241.116181] [DEBUG]Active configuration:
[ 241.116211] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 241.116241] [DEBUG] X display: :8
[ 241.116270] [DEBUG] LD_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
[ 241.116320] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 241.116351] [DEBUG] pidfile: /var/run/bumblebeed.pid
[ 241.116381] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.nvidia
[ 241.116412] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
@jjmcdn
jjmcdn / acpidump.txt
Created December 19, 2014 22:59
bb#620: acpidump
DSDT @ 0xcab4f200
0000: 44 53 44 54 d6 dc 00 00 02 6f 44 45 4c 4c 00 00 DSDT.....oDELL..
0010: 43 4c 30 39 00 00 00 00 00 00 00 00 49 4e 54 4c CL09........INTL
0020: 11 07 12 20 08 53 4d 42 53 0b 80 05 08 53 4d 42 ... .SMBS....SMB
0030: 4c 0a 20 08 50 4d 42 53 0b 00 18 08 47 50 42 53 L. .PMBS....GPBS
0040: 0b 00 1c 08 41 50 43 42 0c 00 00 c0 fe 08 41 50 ....APCB......AP
0050: 43 4c 0b 00 10 08 53 4d 43 52 0b 30 18 08 48 50 CL....SMCR.0..HP
0060: 54 42 0c 00 00 d0 fe 08 48 50 54 43 0c 04 f4 d1 TB......HPTC....
0070: fe 08 46 4c 53 5a 0c 00 00 68 00 08 53 52 43 42 ..FLSZ...h..SRCB
0080: 0c 00 c0 d1 fe 08 52 43 4c 4e 0b 00 40 08 50 45 ......RCLN..@.PE
@jjmcdn
jjmcdn / dmesg
Created December 19, 2014 23:02
bb#620: 3.9.0 logs
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.9.0-burny-rcu-fast-y (root@burninator) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP Wed Dec 17 09:40:52 EST 2014
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.9.0-burny-rcu-fast-y root=/dev/mapper/sdb3_crypt ro rcutree.rcu_idle_gp_delay=1
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000b9fabfff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000b9fac000-0x00000000b9fb2fff] ACPI NVS
@jjmcdn
jjmcdn / dmesg
Created December 19, 2014 23:04
bb#620: 3.16.0 logs
[ 0.000000] CPU0 microcode updated early to revision 0x1c, date = 2014-07-03
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.16.0-0.bpo.4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.16.7-ckt2-1~bpo70+1 (2014-12-08)
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.16.0-0.bpo.4-amd64 root=/dev/mapper/sdb3_crypt ro rcutree.rcu_idle_gp_delay=1
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
@jjmcdn
jjmcdn / gist:2c4272240ff6318e11b0
Last active August 29, 2015 14:11
#bb620: patch
From 82d809e2b6bd087a7d0e0691aa40566fab44d8ac Mon Sep 17 00:00:00 2001
From: Joe MacDonald <joe@deserted.net>
Date: Mon, 22 Dec 2014 11:50:24 -0500
Subject: [PATCH] ACPI: replace DEVICE_ACPI_HANDLE with ACPI_HANDLE
Mainline commit 3a83f992490f8235661b768e53bd5f14915420ac eliminated
DEVICE_ACPI_HANDLE. Since the NV dkms code protects calls with an #ifdef,
it won't fail to compile, however all of the other ACPI infrastructure is
in place to use it, so the driver also fails to load with a message
similar to:
@jjmcdn
jjmcdn / 6lowpan.md
Last active August 12, 2017 21:18
Attempts at using 6LowPAN with TI devices

Objective

I have two objectives with this project.

  • Reproduce the setup (I think I see) here with a single BeagleBone Black using a CC2531EMK and able to ping a CC2650 SensorTag using 6lowPAN over 802.15.4.

  • Connect two devices (eg. two BeagleBone Blacks), both running Linux, via

copied from http://www.lorier.net/docs/ssh-ca - all credit there.

Using a CA with SSH

Using a CA with ssh means you can sign a key for a user, and everywhere that the user trusts the CA you can login, without having to copy your SSH key everywhere again. This allows for things like fast rollover of keys (eg: daily), or trusting the fingerprint of a machine that you're logging into, which can be very useful when you're managing large numbers of machines, or machines that get new host keys (eg by reinstalling) regularly.

You'll probably want at least openssh 5.6, although some of the functionality is available in 5.3. Creating the CA key

ssh-keygen -f /etc/ssh/ca

@jjmcdn
jjmcdn / using-a-tpm.md
Created October 21, 2016 16:53
Using a TPM

copied from http://www.lorier.net/docs/tpm, all credit there:

Using a TPM

A TPM is designed to hold private keys and do operations on them. This means that you can avoid the private key ever being unencrypted in memory on your machine which makes stealing the private key, even with access to the machine hopefully impossible. Hopefully, even with physical access to the machine the worst the attacker can do is destroy the key material, unless they go to rather extreme lengths.

The downside of this is that it's complicated (hence the long list of things to do below), and the TPM is also quite slow. NOTES

Before we begin: