Skip to content

Instantly share code, notes, and snippets.

View uebayasi's full-sized avatar

Masao Uebayashi uebayasi

  • Tombi Inc.
  • Yokohama, Kanagawa, Japan
View GitHub Profile

Basic

  • Don't try "unprivileged" build from start.
    • First do cross-dirs/cross-tools/cross-distrib as root (sudo).
    • Then change owner/mode of obj directories. This will make development easier.
  • Always use cross build (for development).
    • Otherwise you'll overwrite your /usr/include during build.
    • Cross build can't make release on OpenBSD, unfortunately (because of gnu/, where Makefile.bsd-wrapper is used). So cross build is only for development.
@uebayasi
uebayasi / openwrt-x86_64-nfs-root.md
Last active September 29, 2020 03:46
Mount root as NFS on OpenWrt x86_64

Summary

  • Not much info available but surely possible
  • Basically same as normal Linux NFS root
  • Except kernel configuration adjustment might be tricky

Environment

  • Target: OpenWrt 15.x on KVM
  • Host Ubuntu 16.04
@uebayasi
uebayasi / rmd2pdf.sh
Last active May 3, 2019 13:18
rmd2pdf - Convert RMD to PDF reproducibly
#!/bin/sh
#
# rmd2pdf.sh - Convert RMD to PDF reproducibly
#
# Requirements: lualatex (TeXlive)
#
set -e
rmd=$1
@uebayasi
uebayasi / openbsd-minimal-install.md
Last active March 19, 2019 05:34
OpenBSD minimal install
  1. Prepare a filesystem for a new root
  • newfs a filesystem and mount and cd there
  1. Fill the new root
  • Extract baseXX.tgz to ${root}
    • doas tar xzpf baseXX.tgz -C ${root}
  • Extract ${root}/var/sysmerge/etc.tgz
    • doas tar xzpf ${root}/var/sysmerge/etc.tgz -C ${root}
  • Copy the kernel to ${root}/bsd
  1. Configure
  • ( cd ${root}/dev && sh MAKEDEV all )
  • Apps Scriptプロジェクトのデプロイ手続きを、非対話的に行えない   - "Publish > Deploy as API executable..."に相当する処理  - REST APIとしてcreate deployが提供されており、呼び出しも成功するが、authorizationができない   - claspも同様  - 一度authorizeされたデプロイを再デプロイすることは、非対話的に行える    - clasp redeployに相当
  • Apps ScriptプロジェクトのCloud Platformへの切り替え手続きを、非対話的に行えない
  • Deployment ManagerでApp Engineのアプリを扱えない
  • そもそもApp EngineはCloud Platformのプロジェクトと1:1なので、それがDeployment Managerとしてどう見えるのかが不明
  • Clone Inkscape Git repo
  • Install brew
    • Update to the latest
  • Build Inkscape following the Wiki except:
    • Install into $HOME/.local instead of ../inst
  • If build fails, install the missing thing by brew install something
    • Repeat until build finishes
  • Fix shared-mime-info
    • mkdir -p /usr/local/share/mime/packages
  • cp /usr/local/Cellar/shared-mime-info/1.8_1/share/shared-mime-info/packages/freedesktop.org.xml /usr/local/share/mime/packages
@uebayasi
uebayasi / ubuntu-pxe-nfsroot.md
Last active September 7, 2016 10:37
Ubuntu PXE + NFS root

Summary

  • Not difficult but documentation inaccurate

Overview

  • Build PXE + NFS root environment for development
    • KVM
    • Serial console
  • Basically [1] but tweaks needed
@uebayasi
uebayasi / openwrt-x86_64-kvm.md
Last active September 6, 2016 09:26
Running OpenWrt (x86_64) on KVM

Basics

  • Ubuntu 16.04
  • Ethernet -> e1000
    • make kernel_menuconfig
    • Intel Pro 1000 (CONFIG_E1000=y)
@uebayasi
uebayasi / ubuntu-kvm.md
Last active September 5, 2016 10:44
Ubuntu + KVM

TL;DR - Use diffconfig

Initial build

  • Create .config by running make menuconfig interactively
  • Generate diffconfig by running ./script/diffconfig.sh and save it (e.g. ~/hoge.config)
  • Do build (make)

Incremental build