Skip to content

Instantly share code, notes, and snippets.

View pdp7's full-sized avatar
💭
Linux on RISC-V

Drew Fustini pdp7

💭
Linux on RISC-V
View GitHub Profile
[238]HELLO! BOOT0 is starting!
[241]BOOT0 commit : 27369ab
[243]set pll start
[245]periph0 has been enabled
[248]set pll end
[250][pmu]: bus read error
[252]board init ok
[254]DRAM only have internal ZQ!!
[257]get_pmu_exist() = -1
[260]ddr_efuse_type: 0x0
@vegard
vegard / kernel-dev.md
Last active June 6, 2024 02:54
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.

@nickoe
nickoe / build_tips_for_kicad.txt
Last active December 16, 2021 14:25
Build tips for kicad
CC="distcc gcc" CXX="distcc g++" cmake .. -DKICAD_USE_OCC=ON -DwxWidgets_CONFIG_EXECUTABLE=$(which wx-config-gtk3) -DCMAKE_INSTALL_PREFIX=/tmp/kicad/usr/local
-DwxWidgets_CONFIG_EXECUTABLE=$(which wx-config-gtk3) -DCMAKE_INSTALL_PREFIX=/tmp/kicad/usr/local
Using ninja with multi config, see https://cmake.org/cmake/help/v3.17/generator/Ninja%20Multi-Config.html
CC="distcc gcc" CXX="distcc g++" cmake .. -DKICAD_USE_OCC=ON -DwxWidgets_CONFIG_EXECUTABLE=$(which wx-config-gtk3) -DCMAKE_INSTALL_PREFIX=/tmp/kicad/usr/local -DCMAKE_DEFAULT_BUILD_TYPE=Release -G"Ninja Multi-Config
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold
Use this one:
@mwelling
mwelling / README.txt
Created August 29, 2018 03:23
Epaper driver usage for OHSummit badge
The above code assumes that you have the driver code for the display and font built-in.
See pull request:
https://github.com/acamilo/micropython/pull/1
It also assumes that you have loaded the happy180.bmp onto the filesystem of the module.
The bitmap was taken from here:
https://github.com/ayoy/micropython-waveshare-epd/blob/master/epd/gfx/happy180.bmp
Index Register BeagleBone Blue rev A2 PocketBeagle 0 (Name) 1 2 3 4 5 6 7 ZCZ/BSP BSM
1 800 P8.25 / eMMC d0 -eMMC_DAT0 gpmc d0 mmc 1 d0 - - - - - gpio 1.00 U7 R3
2 804 P8.24 / eMMC d1 -eMMC_DAT1 gpmc d1 mmc 1 d1 - - - - - gpio 1.01 V7 R2
3 808 P8.05 / eMMC d2 -eMMC_DAT2 gpmc d2 mmc 1 d2 - - - - - gpio 1.02 R8 R1
4 80C P8.06 / eMMC d3 -eMMC_DAT3 gpmc d3 mmc 1 d3 - - - - - gpio 1.03 T8 T3
5 810 P8.23 / eMMC d4 -eMMC_DAT4 gpmc d4 mmc 1 d4 - - - - - gpio 1.04 U8 T2
6 814 P8.22 / eMMC d5 -eMMC_DAT5 gpmc d5 mmc 1 d5 - - - - - gpio 1.05 V8 T1
7 818 P8.03 / eMMC d6 -eMMC_DAT6 gpmc d6 mmc 1 d6 - - - - - gpio 1.06 R9 P4
8 81C P8.04 / eMMC d7 -eMMC_DAT7 gpmc d7 mmc 1 d7 - - - - - gpio 1.07 T9 R4
9 820 P8.19 MPWM_3 gpmc d8 lcd d23 mmc 1 d0 mmc 2 d4 pwm 2 out A pru mii 0 txclk - gpio 0.22 U10 T4
@elfgoh
elfgoh / gist:5dc11cb9d3ba1ef985fa560e9d9a6ade
Created March 9, 2017 05:31
Dmesg output from BBB debian console image reboot
# dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.48-ti-r88 (root@b1-omap5-uevm-2gb) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Sun Feb 12 01:06:00 UTC 2017
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: TI AM335x BeagleBone Black
[ 0.000000] cma: Reserved 48 MiB at 0x9c800000
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying Adafruit_I2C.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/Adafruit_BBIO
copying Adafruit_BBIO/__init__.py -> build/lib.linux-x86_64-2.7/Adafruit_BBIO
creating build/lib.linux-x86_64-2.7/overlays
copying overlays/__init__.py -> build/lib.linux-x86_64-2.7/overlays
copying overlays/builder.py -> build/lib.linux-x86_64-2.7/overlays
Nasty C tricks - shamelessly stolen from:
https://gist.github.com/aras-p/6224951
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
U-Boot SPL 2016.03-00001-gd12d09f (Mar 17 2016 - 16:16:15)
Trying to boot from MMC
bad magic
U-Boot 2016.03-00001-gd12d09f (Mar 17 2016 - 16:16:15 -0500), Build: jenkins-github_Bootloader-Builder-351
Watchdog enabled
I2C: ready
DRAM: 512 MiB