Skip to content

Instantly share code, notes, and snippets.

View olegslavkin's full-sized avatar

Slavkin Oleg olegslavkin

  • Russia, Moscow
View GitHub Profile
@olegslavkin
olegslavkin / micropython.md
Last active February 14, 2019 07:41
micropython for MIPS32

Compile

micropython for MIPS32
CC="msdk-linux-gcc" CXX="msdk-linux-gcc" ./configure --prefix=$(pwd)/lib1 --host=mips-linux --enable-static=yes --enable-shared=yes
cd ../../ports/unix && PKG_CONFIG_PATH=../../lib/libffi/mips-unknown-elf/ CROSS_COMPILE=msdk-linux- make

RUN

$ LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH ./micropython -h
usage: ./micropython [] [-X ] [-c ] []
#!/bin/bash
# Initialize variables
resolution="1024x780x24"
additional_cmd="ls -l"
x11vnc_args=""
unixsockonly=0
while getopts "h?r:a:x:fu" opt; do
printf " -%s '%s'\n" $OPTION $OPTARG
# Prefix
unbind C-b
set -g prefix `
bind ` send-prefix
set -g default-terminal "screen-256color"
set -g base-index 1
set -g mouse-select-pane on
@olegslavkin
olegslavkin / pcid_list_all_supported_chips.txt
Created October 12, 2017 08:13
Broadcom pcid help and list all supported chips
[root@bcmbuild sim]# ./pcid.sim -h
sal_config_refresh: cannot read file: config.bcm, variables not loaded
Usage: pcid [-ha] [-p port] [-vPxdilkc] [-G N] [-B N] [-W 64] [-D N] [-R N] <chip>
<chip> Chip to emulate, e.g. BCM56504_B0
-h Show help
-a List all supported chips
-v Verbose mode
-p port Specify which port to start PCID server on
-P Include PLI register R/W in verbose mode
-x Exit when first client disconnects
SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GROUP:="dialout", MODE="0666", SYMLINK+="ttyUSB.ZTEK"
@olegslavkin
olegslavkin / bootstrap.sh
Last active April 4, 2024 10:20 — forked from kukrimate/bootstrap.sh
Create a cross gcc toolchain for any target! And it only builds everything once!
#!/bin/bash
# This script builds a (hopefully) working gcc based cross compiler
# Update to latest stable release
BINUTILS_VERSION=2.28
GMP_VERSION=6.1.2
MPFR_VERSION=3.1.5
MPC_VERSION=1.0.3
ISL_VERSION=0.16.1
GCC_VERSION=6.3.0
install
text
cdrom
skipx
lang en_US.UTF-8
keyboard us
timezone UTC
rootpw vagrant
user --name=vagrant --password=vagrant
auth --enableshadow --passalgo=sha512 --kickstart
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - cwills.sys@gmail.com
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
$ qemu-system-arm -version
QEMU emulator version 2.5.0, Copyright (c) 2003-2008 Fabrice Bellard
$ qemu-system-arm -M help
Supported machines are:
akita Sharp SL-C1000 (Akita) PDA (PXA270)
borzoi Sharp SL-C3100 (Borzoi) PDA (PXA270)
canon-a1100 Canon PowerShot A1100 IS
cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310)
collie Sharp SL-5500 (Collie) PDA (SA-1110)
connex Gumstix Connex (PXA255)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<lab name="Linkmeup" version="1" author="MY">
<description>Linkmeup CCIE in one year lab</description>
<topology>
<nodes>
<node id="1" name="R1" type="iol" template="iol" image="L3-ADVENTERPRISEK9-M-15.4-2T.bin" ethernet="1" nvram="1024" ram="256" serial="1" delay="0" icon="Router.png" config="0" left="611" top="110">
<interface id="16" name="e0/1" type="ethernet" network_id="1"/>
<interface id="1" type="serial" name="s1/0" remote_id="2" remote_if="1"/>
</node>
<node id="2" name="R2" type="iol" template="iol" image="L3-ADVENTERPRISEK9-M-15.4-2T.bin" ethernet="1" nvram="1024" ram="256" serial="1" delay="0" icon="Router.png" config="0" left="261" top="120">