Giter Site home page Giter Site logo

u-pine's Introduction

U-Pine

U-Pine is a ramdisk image that provides direct access to eMMC/SDCard storage, USB network and SSH connection to Pinephone.

Just like Jumpdrive but on Golang!

Features

  • eMMC/SDCard access
  • Network-over-usb
  • SSH access
  • Bootloader
  • Netboot

User Guide

  1. To get a predictable name for Pinephones usb network inteface copy and init udev rules:
$ cp configs/99-pinephone.rules
$ udevadm control --reload-rules
$ udevadm trigger
  1. Setup pine0 network connection
$ nmcli con mod pine0 ipv4.addresses 10.0.0.1/24
$ nmcli con mod pine0 ipv4.gateway 10.0.0.1/24
$ nmcli con mod pine0 connection.autoconnect yes
  1. By default ~/.ssh/id_rsa.pub key will be embedded into the boot image. To connect over SSH run the following command:
$ ssh -o PubkeyAcceptedKeyTypes=+ssh-rsa -o HostkeyAlgorithms=+ssh-rsa -p 2022 [email protected]

Boot flow | Screenshot

Boot flow |

Building

  1. Install dependecies (Fedora)
$ dnf install git gcc-aarch64-linux-gnu openssl-devel golang mtools dosfstools parted
  1. Build image
make pinephone-uroot.img
  1. Flash image into SD Card
sudo dd if=pinephone-uroot.img of=/dev/<sdcard_device> bs=1M status=progress conv=fsync

Development

jumpdrive runs as part of init process of the ramdisk and located in /jumpdrive directory.

Ramdisk is build on top of u-root - busybox with a minimal set of commands written on Go.

To become more familiar with u-root, check out it's Github page and LinuxBoot chapter.

References

  • Jumpdrive - Flash/Rescue SD Card image for PinePhone and PineTab
  • xnux - Pinephone kernel development and optimization
  • u-root - A fully Go userland with Linux bootloaders

Logos

  • PINE64 and the PINE64 pinecone logo are trademarked by Pine Store Limited. The trademark extends to the PINE64 brand name in writing, the PINE64 pinecone logo (referred to as logo in the document) and in some instances also to logo derivatives.
  • The Go gopher was designed by Renee French.
  • The u-root logo design is licensed under the Creative Commons 3.0 Attributions license.

u-pine's People

Contributors

yurinnick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

u-pine's Issues

Compile Error: undefined: io.ReadAll

`INSTALL /home/administrator/u-boot_pinephone/u-root/pinephone-uroot/output/lib/modules/5.17.0-rc5-uroot/kernel/sound/usb/snd-usbmidi-lib.ko
DEPMOD /home/administrator/u-boot_pinephone/u-root/pinephone-uroot/output/lib/modules/5.17.0-rc5-uroot
make[2]: Leaving directory '/home/administrator/u-boot_pinephone/u-root/pinephone-uroot/build/linux-arm64'
make[1]: Leaving directory '/home/administrator/u-boot_pinephone/u-root/pinephone-uroot/tmp/linux'
cp -f /home/administrator/u-boot_pinephone/u-root/pinephone-uroot/build/linux-arm64/arch/arm64/boot/Image /home/administrator/u-boot_pinephone/u-root/pinephone-uroot/output/Image
cp -f /home/administrator/u-boot_pinephone/u-root/pinephone-uroot/build/linux-arm64/.config /home/administrator/u-boot_pinephone/u-root/pinephone-uroot/output/linux.config
cp -f /home/administrator/u-boot_pinephone/u-root/pinephone-uroot/build/linux-arm64/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dtb /home/administrator/u-boot_pinephone/u-root/pinephone-uroot/output/board-1.2.dtb
GOARCH=arm64 GO111MODULE=off go get github.com/u-root/u-root

github.com/u-root/u-root/pkg/lockfile

../../../go/src/github.com/u-root/u-root/pkg/lockfile/lockfile.go:82:18: undefined: os.CreateTemp
../../../go/src/github.com/u-root/u-root/pkg/lockfile/lockfile.go:142:20: undefined: os.ReadFile

github.com/u-root/u-root/pkg/uio

../../../go/src/github.com/u-root/u-root/pkg/uio/reader.go:29:9: undefined: io.ReadAll
make: *** [Makefile:46: initramfs-uroot.cpio] Error 2`

The source tree is not clean, please run 'make ARCH=arm64 mrproper'

It won't compile. Since it redownloads with each invocation, I can't make modifications to run 'make ARCH=arm64 mrproper' as suggested.

*** The source tree is not clean, please run 'make ARCH=arm64 mrproper'
*** in /home/administrator/u-boot_pinephone/u-root/pinephone-uroot/tmp/linux

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.