Skip to content

Instantly share code, notes, and snippets.

View fallen's full-sized avatar

Yann Sionneau fallen

View GitHub Profile
The following verilog file gives this error:
Info: constraining clock net 'clk25' to 25.00 MHz
Info: Logic utilisation before packing:
Info: Total LUT4s: 1905/24288 7%
Info: logic LUTs: 1445/24288 5%
Info: carry LUTs: 436/24288 1%
Info: RAM LUTs: 16/ 3036 0%
Info: RAMW LUTs: 8/ 6072 0%
@fallen
fallen / build.log
Created March 31, 2019 09:40
lm32 NetBSD build log
This file has been truncated, but you can view the full file.
fallen@fallen-ThinkPad-X260:~/dev/NetBSD$ ./build.sh -m milkymist -u -U -j 1 tools
===> build.sh command: ./build.sh -m milkymist -u -U -j 1 tools
===> build.sh started: Sun Mar 31 11:08:57 CEST 2019
===> NetBSD version: 6.99.16
===> MACHINE: milkymist
===> MACHINE_ARCH: lm32
===> Build platform: Linux 4.18.0-16-generic x86_64
===> HOST_SH: /bin/sh
===> No $TOOLDIR/bin/nbmake, needs building.
===> Bootstrapping nbmake
@fallen
fallen / main.c
Created June 19, 2015 11:27
hidapi segmentation faults on hid_open with non-NULL 3rd arg and running as a user who don't have access to USB device
/*
* On Linux, compile with:
* $ gcc main.c -o main -lhidapi-libusb
*
* Example adapted from the one on http://www.signal11.us/oss/hidapi/
* When running as root the 2 hid_open work (print OK)
* When running as non-root the first one just fails, and the second one causes segmentation fault
* This seems to be due to serial_number being NULL when you don't have access to USB device
* And hidapi does a wcscmp() without checking cur_dev->serial_number is non-NULL https://github.com/signal11/hidapi/blob/master/libusb/hid.c#L709
*/

Keybase proof

I hereby claim:

  • I am fallen on github.
  • I am yannsionneau (https://keybase.io/yannsionneau) on keybase.
  • I have a public key whose fingerprint is 98C2 925C E10C 11D4 2621 24DA C207 2B2C 63C7 D52A

To claim this, I am signing this object:

@fallen
fallen / gcc-core-4.5.4.patch
Created November 8, 2013 22:45
Patch which fix errors in documentation generation of gcc-4.5.4 when compiled on modern systems having texinfo >= 5 where @item/@itemx issues are not warning anymore but errors.
diff -rup dl/gcc-4.5.4/gcc/doc/cppopts.texi gcc-4.5.4/gcc/doc/cppopts.texi
--- dl/gcc-4.5.4/gcc/doc/cppopts.texi 2010-04-02 21:54:46.000000000 +0200
+++ gcc-4.5.4/gcc/doc/cppopts.texi 2013-11-08 19:41:47.284525238 +0100
@@ -760,7 +760,7 @@ Replacement: [ ] @{ @}
Enable special code to work around file systems which only permit very
short file names, such as MS-DOS@.
-@itemx --help
+@item --help
@itemx --target-help
@fallen
fallen / cron.sh
Last active December 25, 2015 10:59
test script to synchronize with a remote repository which rewrites history to change commit messages.
#!/bin/sh
echo "Fetching"
git fetch --all
echo "Creating \"temp\" branch"
git checkout -b temp origin/master
echo "Rebasing temp branch on top of local master"
git rebase master temp
echo "Updating local master branch"
git checkout master
git reset --hard temp