Skip to content

Instantly share code, notes, and snippets.

@jasiek
Created January 7, 2016 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasiek/b3df65fc0ed51943c77f to your computer and use it in GitHub Desktop.
Save jasiek/b3df65fc0ed51943c77f to your computer and use it in GitHub Desktop.
Run dmesg off a ramdisk.
#!/bin/sh
DMESG=`which dmesg`
LIBS=`ldd $DMESG | cut -d ">" -f 2 | tr -d "\t " | cut -d "(" -f 1`
echo $LIBS
cp $LIBS /run/shm
cp $DMESG /run/shm
LIBS=`echo $LIBS | tr "\n" " "`
echo LD_PRELOAD=\"$LIBS\" /run/shm/ld-linux-armhf.so.3 /run/shm/dmesg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment