Code Monkey home page Code Monkey logo

raspberry-pi's Introduction

Raspberry Pi

Experiments with my Raspberry Pi 4 Model B with a 3.5" TFT display.

The original goal was to build a PipBoy for my boy. I may still end up there, but now the focus is on learning, and to build a small system with my own kernel and rootfs (no distro). Since experimenting with kernel builds includes re-build and re-load perhaps 50 times in a day, building on RPi, or using a SD-card is not feasible. Instead cross-compilation and network booting is used. The basic installation is described in the RPi documentation and is not repeated here.

Recommended use:

  1. Clone this repo, and setup the environment as described below
  2. Cross compile - Build on your Linux PC rather than on the RPi simplifies and saves a lot of time
  3. Kernel build - Build a small kernel
  4. Initrd - Build an initrd with a custom rootfs
  5. Network boot - Removes the need of an SD-card. Your PC is used as a dhcp+tftp server

The raspberry-pi.sh script and environment setup

The raspberry-pi.sh script is used for most tasks.

./raspberry-pi.sh             # Invoke without parameters for a help printout
./raspberry-pi.sh env         # Shows the environment that will be used
./raspberry-pi.sh versions    # Shows sw versions and download status
eval $(./raspberry-pi.sh env) # Define the variables in your shell

The $RASPBERRYPI_WORKSPACE variable points to a directory where all stuff is stored by default. Files that are supposed to be downloaded are searched for in $HOME/Downloads/ and $ARCHIVE.

Options to raspberry-pi.sh can be specified on the command line, like --kver=linux-6.8 or as an environment variable like export __kver=linux-6.8.

Example:

export RASPBERRYPI_WORKSPACE=$HOME/tmp/raspberrypi  # (or something better)
#export ARCHIVE=$HOME/archive       # (optional)
# For network boot:
export __id=...                       # The serial number of your rpi4
export __local_addr='192.168.40.1/24' # Local address of your tftp server

The "id" can be found on your RPi with:

grep Serial /proc/cpuinfo | cut -d ' ' -f 2 | cut -c 9-16

raspberry-pi's People

Contributors

uablrek avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.