Skip to content

Instantly share code, notes, and snippets.

@stvhay
stvhay / build.sh
Created December 29, 2022 15:22
manual build script for rock5b kernel
#!/bin/bash
typeset -A overlay kernel bsp
defconfig="linux-defconfig-full.config"
overlay=(
[name]="overlay"
[repo]="https://github.com/radxa/overlays.git"
[commit]="main"
)
kernel=(
@stvhay
stvhay / espressobin_ultra_build.md
Created December 17, 2022 01:54
Espressobin Ultra Build

EspressoBIN Ultra Notes

Get Connected

Initial Power On

  • Connect the MicroUSB port on the device to a computer. This is the serial UART.
  • Connect the power adapter and press the power button to turn on.
  • Connect to the serial UART via screen, minicom or other utility. One can see the UART device by monitoring /dev/tty* on the host computer and specify the device using the minicom -D option.
  • Log into the system with default password root/admin.
@stvhay
stvhay / lol_build_all_packages
Last active December 26, 2022 13:40
Build all packages (LOL)
#!/bin/bash
pkg_dir="$(pwd)/debian-packages"
mtune="cortex-a76.cortex-a55"
march="armv8.2-a+dotprod+rcpc+ssbs+sb" -mtune=cortex-a76.cortex-a55
# -march=armv8.2-a+dotprod+rcpc+ssbs+sb -mtune=cortex-a76.cortex-a55
#function get_source_packages () {
# pkg_file="$1"
# cat $pkg_file | xargs apt-cache show | grep Source: | awk '{print $2}' | sort | uniq > $pkg_file.sourcepackages
@stvhay
stvhay / Rock5B Deps.md
Created December 8, 2022 22:55
Rock 5B Deps
graph LR;
	scorp2kk_uboot(https://github.com/scorp2kk/u-boot/tree/master);
	radxa_kernel(https://github.com/radxa/kernel/tree/linux-5.10-gen-rkr3.4);
	radxa_repo_bsp(https://github.com/radxa-repo/bsp);
	radxa_uboot(https://github.com/radxa/u-boot/tree/stable-5.10-rock5);
	radxa_repo_rbuild(https://github.com/radxa-repo/rbuild);
	radxa_apt(apt repository);

	rockchip --> jeffyCN_xorg-xserver
@stvhay
stvhay / freight.md
Last active December 7, 2022 13:28
Using Freight

Configuring and Using GPG+Freight

gpg_email="[email protected]"
reponame="aptrepo"
apt_manager="apt"
apt_distro="sid"
apt_archs="arm64"
apt_origin="stvhay"
apt_label="stvhay"
@stvhay
stvhay / build-rock5b
Last active December 16, 2022 19:20
Build a Rock 5b Image
#!/bin/bash
CROSS_COMPILE="/usr/bin/"
CFLAGS="-mcpu=cortex-a76.cortex-a55"
timestamp="$(date -u +%Y%m%dT%H%MZ)"
bsp="$(pwd)/bsp/bsp"
rbuild="$(pwd)/rbuild/rbuild"
dst="out/build-$timestamp"
@stvhay
stvhay / yocto_build_notes_imx8.md
Created November 6, 2022 18:09
Yocto Build Notes (i.MX8)

Preliminaries

adduser hays
usermod -aG sudo hays
visudo # NOPASSWD

References

@stvhay
stvhay / espressobin_build_sequence.md
Created October 14, 2022 15:17
Espressobin Ultra Build Sequence

Espressobin Ultra Build Sequence

sequenceDiagram
    participant gtibuild
    participant U_boot
    participant A3700_utils
    participant atf_marvell
    participant mv_ddr_marvell
    participant linux
@stvhay
stvhay / linode_systemd-networkd.md
Created October 7, 2022 08:44
Linode Network Setup with systemd-networkd

Linode Network Setup with systemd-networkd

When you get into having multiple subnets routed to your machine, you have to turn off Linode's automatic network configuration service and do it yourself. This example is using systemd-networkd.

/etc/systemd/network/99-default.link

# This machine is most likely a virtualized guest, where the old persistent
# network interface mechanism (75-persistent-net-generator.rules) did not work.
# This file disables /lib/systemd/network/99-default.link to avoid
@stvhay
stvhay / container_dualstack.md
Last active October 7, 2022 08:32
Managing Container Subnets

Dual Stack Networking for Docker, LXC, and LXD

Premise: Maybe one day IPv6 will be here, and we can stop forwarding so many gosh darn ports and just use a firewall. So with that hope, the goal of this document is to create container networks satisfying the following:

  • Continue using private subnets for IPv4, and gain control of which subnets to use so that you can route packets on your internal network appropriately.
  • Given a public IPv6 /48 or /56 subnet, dole out /64 subnets to each container network, which is the standard IPv6 subnet size.

I'm going to use one of my Linode subnets for this doc: 2600:3c03:e002:a200::/56

Docker and LXD are going to be given both each 16 /64 subnets to play with: