Skip to content

31z4/diy-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DIY Linux

This is a set of Linux system configurations for Buildroot intended for personal use. The motivation behind this project is the following:

  • Replace some shitty consumer electronics (e.g. wireless access point, network-attached storage) with custom solutions built on better hardware and software aiming to do one thing well.
  • Do research projects like a highly available Kubernetes cluster out of 8 Raspberry Pi or similar hardware. Or a 1024-core supercomputer for AI out of Jetson Nano.
  • Have fun ;)

I've been passionate about building embedded systems since the year 2006.

List of projects

Usage

Build the Buildroot Docker image

docker build -t buildroot .

Build a project-specific image

Run a shell within a Buildroot container

docker run -it --rm \
-v `pwd`/dl:/buildroot/dl \
-v `pwd`/projects:/buildroot/projects \
-v `pwd`/images:/buildroot/output/images \
buildroot bash

and follow project-specific instructions.

Once build is successfully done you can exit the Buildroot container. The resulting image will be within the images directory.

Flash the image to an SD card

To figure out an SD card disk name on macOS host run the following command:

diskutil list

Double-check the disk name and flash the image to it:

sudo dd bs=4m if=images/sdcard.img of=/dev/disk-name

If you get the following error

dd: /dev/disk-name: Resource busy

unmounting the disk might help:

diskutil unmountDisk /dev/disk-name

Once dd process is finished don't forget to eject the disk:

diskutil eject /dev/disk-name

Troubleshoot

If a board has a UART port it's convenient to use a USB to UART cable to connect to the serial port. PL2303HX based cable is confirmed to work on macOS. Driver can be found here. Once the driver is installed and a cable is connected use the following command.

sudo cu -s 115200 -l /dev/cu.usbserial

Known issues

The build is slow and eventually fails if Buildroot output directory is a Docker volume mounted on the macOS host.

Interesting hardware for future projects

Useful links

License

This project is licensed under the MIT License - see the LICENSE file for details.