Skip to content

Instantly share code, notes, and snippets.

View bradfa's full-sized avatar

Andrew Bradford bradfa

View GitHub Profile
bradfa / debian install
Last active August 29, 2015 13:58
Install Debian Wheezy from rescue CD rather than installer to avoid bullshit
Create boot (sda1), root (sda3), and swap (sda2) partitions, ensure root partition is "bootable"
mkfs.ext4 /dev/sda{1,3}
mkdir /mnt/rootfs
mount /dev/sda3 /mnt/rootfs
mkdir /mnt/rootfs/boot
mount /dev/sda1 /mnt/rootfs/boot
debootstrap --arch amd64 jessie /mnt/rootfs
LANG=C chroot /mnt/rootfs /bin/bash
export TERM=xterm-color
mount none /proc -t proc
bradfa /
Last active August 29, 2015 14:05
2014 Christmas List
bradfa / rfc2616bookmark
Last active August 29, 2015 14:05
RFC 2616 Bookmark
section 3.7.1
bradfa / gist:1762999dc79de352545d
Created November 4, 2014 20:54
NetBSD chapter 5 typo
5.15. Installing additional software
Using packages from pkgsrc
If you wish to install any of the software freely available for UNIX-like systems you are strongly advised to first check the NetBSD package system, pkgsrc. pkgsrc automatically handles any changes necessary to make the software run on NetBSD. This includes the retrieval and installation of any other packages on which the software may depend.
See the list of available packages
Precompiled binaries are available on the NetBSD FTP server for some ports. To install them the PKG_PATH variable needs to be adjusted in the following way (under the sh(1) shell):
bradfa / boot-output.txt
Created January 13, 2015 19:53
Toradex VF50 Stock Image Boot
andrew@boomboom:~$ picocom -b 115200 /dev/ttyS0
picocom v1.7
port is : /dev/ttyS0
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
escape is : C-a
local echo is : no
bradfa /
Last active August 29, 2015 14:13
What's needed as prereqs for pkgsrc?

What's needed for pkgsrc?

What's pkgsrc?

pkgsrc has tons of buildable software which can be added to a core *nix system in order to do useful things.

Required Infrastructure

In order to create a toolchain, you need:

bradfa /
Last active August 29, 2015 14:14
Meroot Notes

What's Aboriginal Doing?

  1. Aboriginal builds a simple cross compiler, basically the same thing musl-cross does.
  2. Aboriginal builds a statically linked native compiler (not actually Canadian, iirc, as target and host are the same) along with make, basically the same thing meroot does now.
  3. Aboriginal builds a rootfs and kernel for the target, meroot builds a busybox rootfs with a few extra tools.
  4. Aboriginal combines the rootfs, kernel, and native compiler with a bunch of other special scripts and QEMU things to make a bootable system that can build things, which isn't really needed if you're going to boot in or chroot if the arch is close enough.

What Should I Do?

  1. Use musl-cross to create a cross compiler.
bradfa /
Last active August 29, 2015 14:17
Install MEDUSA4 into a chroot

To run MEDUSA4 personal edition, it is supported only on i386 and Ubuntu 12.04 LTS probably has the best support. Be sure you install the below things. You need a web browser (to view the help files) but be aware that if you're running firefox outside a chroot and want to launch firefox inside a chroot, firefox doesn't like that, for now.

  1. Install chroot of precise.
  2. Configure universe and install csh (why csh isn't in main I have no idea, it's Ubuntu?)
  3. For the installer to run, install libgl1-mesa-glx libglu1-mesa libxt6 libfreetype6 libxrender1 libfontconfig1 firefox
  4. To run medusa, install gconf2 librsvg2-2

Launch medusa from /opt/medusa4_personal_v5_2_1/master_project/startmedusa

bradfa /
Last active August 29, 2015 14:17
Nice 0805 LEDs
  • Red 0805 LED: APT2012SURCK
  • Yellow 0805 LED: APT2012SYCK
  • Green 0805 LED: APT2012ZGCK
bradfa / kernel-package-exactsteps.txt
Last active August 29, 2015 14:20
kernel-package exactsteps
First setup your `.config` file (grab from running working kernel) and `make oldconfig`.
`make menuconfig` for customization, then:
fakeroot make-kpkg --revision $REVISION [--cross-compile arm-linux-eabi-] [--arch amd64] [--initrd] [-j 8] --uc --us kernel-image