Skip to content

Instantly share code, notes, and snippets.

@yogo1212
yogo1212 / PKGBUILD
Created January 17, 2025 14:41
ocrs PKGBUILD based on [email protected]'s AUR package (fixed build process by removing cruft)
pkgname=ocrs
pkgver=0.9.0
pkgrel=1
pkgdesc='a modern OCR engine written in Rust'
arch=(x86_64)
url="https://github.com/robertknight/$pkgname"
license=(MIT Apache-2.0)
depends=(gcc-libs
glibc)
_tag="$pkgname-cli-v$pkgver"
@yogo1212
yogo1212 / PKGBUILD
Created January 17, 2025 14:37
rxing pkgbuild
pkgname=rxing
pkgver=0.6.1
pkgrel=1
pkgdesc='pure Rust port of ZXing'
arch=(x86_64)
url="https://github.com/rxing-core/$pkgname"
license=(MIT Apache-2.0)
depends=(gcc-libs
glibc)
#makedepends=(rust)
/*
* there were a lot of warnings when decompiling (missing range/reg, unexpected values).
* the header of the dtb says it's version 11.
*/
/dts-v1/;
/ {
compatible = "starfive,jh7110";
#address-cells = <0x02>;
? - alias for 'help'
base - print or set address offset
bdinfo - print Board Info structure
blkcache - block cache diagnostics and control
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootefi - Boots an EFI payload from memory
bootelf - Boot from an ELF image in memory
booti - boot Linux kernel 'Image' format from memory
bootm - boot application image from memory
# Can't set block device
# Failed to load '/boot/uEnv.txt'
baudrate=115200
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootriscv64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
@yogo1212
yogo1212 / jh7110-pine64-star64.dts
Created February 25, 2024 13:33
Pine64 Star64 device tree for Linux v6.8-rc5-297-gf2e367d6ad3b
// not everything is tested.
// ideally, there'll be a 'no-overcurrent-detection;' for usb
/dts-v1/;
#include "jh7110.dtsi"
#include "jh7110-pinfunc.h"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>