GithubHelp home page GithubHelp logo

theboxahaan / r4spberry Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20 KB

Repository containing code snippets, wikis and half baked knowledge on the Raspberry Pi 4

Python 4.01% C 61.24% Makefile 29.01% Assembly 5.74%
raspbery-pi baremetal-os

r4spberry's Introduction

r4spberry

Getting Started

This wiki basically captures my notes while fiddling around with the Raspberry Pi 4B. I will probably rewrite this many times over the course of getting something useful out of it, so bear with (เฒ _เฒ )

Rube Goldberg's Self Operating Napkin(1931)[1]

The board in question is a Raspberry Pi 4 Model B 2GB RAM[2]. This time the board is equipped with a BCM2711 Quad core Cortex-A72[6] (ARM v8) 64-bit SoCAnd they have very graciously made some documentation available.[3]. The BCM2711 contains as mentioned, quad core Cortex-A72 Arm V8 Based Soc as the processing unit with 64 bit cores. For the GPU, we have a new 32 bit VideCore[7] VI 3Dunit clocked at 500MHz, with no documentation available. ๐Ÿ‘ Note that at the time of writing, Raspberry Pi OS does not officially have a 64 bit distribution.

Installing The Raspbian Image [4]

I chose to go with the Raspberry Pi OS(32 bit) Lite based on Debian Buster at the time, because of its small size. Installing it onto a FAT32 formatted SD Card was fairly straightforward.

dd bs=4M if=2020-02-13-raspios-buster.img of=/dev/<sdX> conv=fsync status=progress

This creates two partitions, namely, boot and rootfs. The latter contains distribution specific files and the root file system. boot is mounted as \boot once Linux has booted and is what I am mostly interested in. The installation by default writes a multitude of files in the boot partition to support various Raspberry Pi models, the specifics of which are are summarised in the official docs. According to it, RPi4 basically cares about start4*.elf, kernel7l.img and the relevant(BCM2711) device tree blobs. Experimenting with removing various files confirmed the minimal requirement for a working boot to be-

boot
โ”œโ”€โ”€ bcm2711-rpi-4-b.dtb
โ”œโ”€โ”€ bootcode.bin
โ”œโ”€โ”€ cmdline.txt
โ”œโ”€โ”€ config.txt
โ”œโ”€โ”€ COPYING.linux
โ”œโ”€โ”€ fixup4*.dat
โ”œโ”€โ”€ issue.txt
โ”œโ”€โ”€ kernel7l.img
โ”œโ”€โ”€ LICENCE.broadcom
โ”œโ”€โ”€ overlays
โ”œโ”€โ”€ start4*.elf

Configuring Headless Raspberry Pi[5]

SSH access to the raspberry pi can can be configured by creating an empty ssh file and a wpa_supplicant.conf file containing the wifi credentials in the boot partition.

touch ssh

wpa_supplicant.conf example

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<Insert 2 letter ISO 3166-1 country code here>

network={
 ssid="<Name of your wireless LAN>"
 psk="<Password for your wireless LAN>"
}

Once Linux is booted, the Pi should automatically connect to the SSID specified.

Set up a mobile hotspot, so that you can monitor when the pi connects to the network. This also helps in easily retirieving the IP address assigned to the Pi. The default connection identifier is raspberrypi

Connecting via SSH

There is no point setting a VNC as this Linux distrib does not have a desktop, so SSH is the way to go. Raspberry Pi 4 supports mDNS which makes things easier as we are not bothered by the exact IP. To check the availability for connecting, make sure your client is on the same network as the Pi and ping it-

ping raspberrypi.local

If responses are successful, we can initiate an SSH connection by ssh [email protected] with the default password being raspberry. This should get an SSH session started.

References

  1. https://en.wikipedia.org/wiki/File:Rube_Goldberg%27s_%22Self-Operating_Napkin%22_(cropped).gif
  2. https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
  3. https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/README.md
  4. https://www.raspberrypi.org/documentation/installation/installing-images/linux.md
  5. https://www.raspberrypi.org/documentation/configuration/wireless/headless.md
  6. https://en.wikipedia.org/wiki/ARM_Cortex-A72
  7. https://en.wikipedia.org/wiki/VideoCore

r4spberry's People

Contributors

theboxahaan avatar

Watchers

 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.