Skip to content

Instantly share code, notes, and snippets.

View sergev's full-sized avatar

Serge Vakulenko sergev

View GitHub Profile
@sergev
sergev / RMHAM_RD5R_Sample_2018-10-20.conf
Last active October 24, 2018 00:32
DMR configuration by WA0DS, adapted for RD-5R by KK6ABQ
#
# This configuration was generated 2018/10/23 by dmrconfig,
# Version 0.9.141, Copyright (C) 2018 Serge Vakulenko KK6ABQ
#
Radio: Baofeng RD-5R
Last Programmed Date: 2018-10-23 17:01
# Table of digital channels.
# 1) Channel number: 1-1024
# 2) Name: up to 16 characters, use '_' instead of space
#include <setupapi.h>
#define MAX_NAME_PORTS 7
#define RegDisposition_OpenExisting (0x00000001) // open key only if exists
#define CM_REGISTRY_HARDWARE (0x00000000)
typedef DWORD WINAPI
(* CM_Open_DevNode_Key)(DWORD, DWORD, DWORD, DWORD, ::PHKEY, DWORD);
HANDLE BeginEnumeratePorts(VOID)
{
@sergev
sergev / print-systemc-version.c
Created January 8, 2019 23:01
Print SystemC version
#include <systemc>
#include <tlm.h>
using namespace std;
int sc_main(int argc, char* argv[])
{
#ifdef IEEE_1666_SYSTEMC
cout << SC_VERSION << endl;
cout << SC_VERSION_RELEASE_DATE << endl;
@sergev
sergev / debian-mips64el-on-qemu.md
Last active January 27, 2025 21:51
Installing Debian MIPS64 on QEMU

Let's install Debian 9.0 "Stretch" on QEMU MIPS64 under Ubuntu.

Step 1: Install QEMU

sudo apt install qemu-system-mips

Step 2: Download Linux kernel and installation image

wget http://ftp.debian.org/debian/dists/stretch/main/installer-mips64el/current/images/malta/netboot/vmlinux-4.9.0-8-5kc-malta
@sergev
sergev / protocol-debian-mips64el.md
Last active January 12, 2019 07:40
Protocol of booting Debian MIPS64 on QEMU

Let's start Debian MIPS64 on QEMU:

qemu-system-mips64el \
    -cpu    5KEf \
    -M      malta \
    -m      2048 \
    -hda    hda.qcow \
    -kernel vmlinux-4.9.0-8-5kc-malta \
    -initrd initrd.img-4.9.0-8-5kc-malta \
    -append root=/dev/sda1 nokaslr \
@sergev
sergev / device-tree-mips64el-on-qemu.md
Last active January 12, 2019 20:53
Device Tree of Linux MIPS64 on QEMU

Here you can see a device tree of Linux MIPS64 running on virtual QEMU Malta board:

# dtc -I fs -O dts /proc/device-tree
Warning (unit_address_vs_reg): Node /isa has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /interrupt-controller@20 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
/dts-v1/;

/ {
	compatible = "mti,malta";
Limit: 400
Load 28 words from utc_wtc.oct
(0) *** Reset
(1) *** Clear reset
(2) 0: 00000000051000000 imm=0 md=A mw=IMM w_m
(2) Write M[0] = 00000
(2) Write GIE = 0
(3) 1: 00010000100200000 imm=0 acc=REG mr=IMM w_a
(3) Write A = 0000 0000 0000 0000
(4) 2: 00000000051000001 imm=1 md=A mw=IMM w_m
@sergev
sergev / hello.trace
Created March 31, 2019 09:20
hello.pas trace on MESM-6 RTL
Limit: 1000
Load 6118 words from hello.oct
(0) *** Reset
(1) *** Clear reset
(2) 0: 0000000000051000000 imm=0 md=A mw=IMM w_m
(2) Write C = 00000
(2) Write M[0] = 00000
(2) Write GIE = 0
(3) 1: 0000010000100200000 imm=0 acc=REG mr=IMM w_a
(3) Write A = 0000 0000 0000 0000
@sergev
sergev / pcc_import_howto.txt
Last active June 7, 2019 01:30
How to import PCC sources from CVS to GIT
Download the latest version of PCC and PCC-libs sources, unpack.
$ wget http://pcc.ludd.ltu.se/ftp/pub/pcc/pcc-cvs-20190504.tgz
$ wget http://pcc.ludd.ltu.se/ftp/pub/pcc-libs/pcc-libs-cvs-20190504.tgz
$ tar xf pcc-libs-cvs-20190504.tgz
$ tar xf pcc-cvs-20190504.tgz
$ mv pcc-cvs-20190504 pcc
$ mv pcc-libs-cvs-20190504 pcc-libs
We need also the contets of CVSROOT directories. Extract them via CVS.
@sergev
sergev / le-madlen.syntax
Last active May 30, 2019 00:20
Madlen syntax description for LE editor
# BESM-6 Madlen assembler file, by Serge Vakulenko <[email protected]>
/*.madlen
c3=^[cC][^\n]*\n
c3=\.[^\n]*\n
c1,2=([^[:alnum:]а-яА-Я_.]|^)(NAME|LC|SUBP|END|TEXT|ISO|INT|LOG|BSS\
|EQU|name|lc|subp|log|bss|data|set|end|lp|entry|weq|oct|int|iso|equ\
|UTC|WTC|VTM|UTM|UZA|U1A|UJ|VJM|IJ|\*33|VZM|V1M|\*36|VLM\
|ATX|STX|MOD|XTS|A\+X|A-X|X-A|AMX|XTA|AAX|AEX|ARX|AVX|AOX|A/X|A\*X\
|APX|AUX|ACX|ANX|E\+X|E-X|ASX|XTR|RTE|YTA|\*32|EXT|E\+N|E-N|ASN|NTR\
|ATI|STI|ITA|ITS|MTJ|J\+M\