Skip to content

Instantly share code, notes, and snippets.

View brchiu's full-sized avatar

Bi-Ruei, Chiu brchiu

  • Taipei, Taiwan, Republic of China
View GitHub Profile
@brchiu
brchiu / gist:db0031018e34241695dbce09cc04c614
Created April 26, 2017 02:55
Edit /etc/udev/rules.d/51-usbblaster.rules for Altera Jtag on Ubuntu
# USB-Blaster
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", MODE="0666"
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6002", MODE="0666"
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6003", MODE="0666"
# USB-Blaster II
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6010", MODE="0666"
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6810", MODE="0666"
elf2hex --input=xxx.elf --base=0x00020000 --end=0x00040000 --output=xxx.hex --width=32 --no-zero-fill
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/errno.h>
#include <string.h>
#include <arpa/inet.h>
#define SERV_PORT 5134
@brchiu
brchiu / gist:ad28dea3283f3e7d39031006a7256aae
Created September 27, 2019 08:19
[devel-server] netopeer2-server print "nc_ps_poll: failed to wait for a pollsession condition"
root@xilinx-zcu111-2019_1:~# netopeer2-server -d -v 4
[INF]: LY: Plugin "/usr/lib/libyang/extensions/metadata.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/extensions/yangdata.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/extensions/nacm.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/user_types/user_yang_types.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/user_types/user_inet_types.so" successfully loaded.
[INF]: LY: Reading module "ietf-yang-metadata".
[INF]: LY: Module "ietf-yang-metadata@2016-08-05" successfully parsed as implemented.
[INF]: LY: Reading module "yang".
[INF]: LY: Resolving "yang" unresolved schema nodes and their constraints...
typedef crl {
type binary;
description
"A CertificateList structure, as specified in RFC 5280,
encoded using ASN.1 distinguished encoding rules (DER),
as specified in ITU-T X.690.";
reference
"RFC 5280:
Internet X.509 Public Key Infrastructure Certificate
and Certificate Revocation List (CRL) Profile
root@xilinx-zcu111-2019_1:~# netopeer2-server -d -c MSG
[INF]: LY: Plugin "/usr/lib/libyang/extensions/metadata.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/extensions/yangdata.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/extensions/nacm.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/user_types/user_yang_types.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/user_types/user_inet_types.so" successfully loaded.
[INF]: LY: Reading module "ietf-yang-metadata".
[INF]: LY: Module "ietf-yang-metadata@2016-08-05" successfully parsed as implemented.
[INF]: LY: Reading module "yang".
[INF]: LY: Resolving "yang" unresolved schema nodes and their constraints...
@brchiu
brchiu / gist:6b3849d81063e5b873b756dfcd0caf48
Last active October 4, 2019 03:14
gdb_thread_info.log
root@xilinx-zcu111-2019_1:~# gdb netopeer2-server
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-xilinx-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@brchiu
brchiu / gist:58f8c1c184377af0c102c8ada3026fc2
Created October 4, 2019 04:49
gdb log after increase NC_PS_QUEUE_TIMEOUT to 5000
(gdb) r -d -c MSG
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/netopeer2-server -d -c MSG
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[INF]: LY: Plugin "/usr/lib/libyang/extensions/metadata.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/extensions/yangdata.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/extensions/nacm.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang/user_types/user_yang_types.so" successfully loaded.
@brchiu
brchiu / gist:4ef178e21a27b33f84bcdd94200c474e
Created December 17, 2019 02:09
sysrepo-plugind hang due to mutex status loaded from file is already acquired
brchiu@APPASSIONATA:/media/brchiu/79918428768101F8/DocCollect/Project$ sudo sysrepo-plugind -d -v 4
[sudo] password for brchiu:
[WRN]: Removing event pipe "sr_evpipe1" after a crashed subscription.
[INF]: Applying scheduled changes.
[INF]: No scheduled changes.
[INF]: Datastore copied from <startup> to <running>.
[INF]: Session 1 (user "root") created.
[INF]: Triggering "o-ran-software-management" "done" event on enabled data.