GithubHelp home page GithubHelp logo

lk-overlay's Introduction

Everything is licensed under the GPLv2 or later unless stated otherwise

developing with this lk overlay:

[clever@system76:~/apps/rpi]$ git clone --recurse-submodules [email protected]:librerpi/lk-overlay.git
[clever@system76:~/apps/rpi]$ cd lk-overlay/
[clever@system76:~/apps/rpi/lk-overlay]$ nix-shell -A shell
[nix-shell:~/apps/rpi/lk-overlay]$ make PROJECT=rpi3-bootcode
[nix-shell:~/apps/rpi/lk-overlay]$ ls -lh build-rpi3-bootcode/lk.bin
-rwxr-xr-x 1 clever users 113K Mar 31 23:27 build-rpi3-bootcode/lk.bin

what features work

Feature rpi1 rpi2 rpi3 rpi4
composite NTSC video [x] [x] [x] ?
DSI video [ ] [ ] [ ] [ ]
HDMI video [ ] [ ] [ ] [ ]
DPI video, partially tested [x] [x] [x] ?
v3d partially working [x] [x] [x] ?
full 2d composition under firmware control [x] [x] [x] ?
CSI, untested [ ] [ ] [ ] [ ]
i2c host (under linux) ? [x] [x] ?
SPI, untested [ ] [ ] [ ] [ ]
ISP, lacking code [ ] [ ] [ ] [ ]
video decode accel, lacking code [ ] [ ] [ ] [ ]
PWM audio, lacking code [ ] [ ] [ ] [ ]
booting Linux ? [x] ? ?
Ethernet (including mac address from rpi serial number) ? [x] ? ?
USB host (under linux) ? [x] ? ?
SD/MicroSD: works 95% of the time ? [x] ? ?

projects:

rpi1-test

builds LK for the armv6 found on the pi0 and pi1

currently not working on this overlay

rpi2-test

builds LK for the cortex-A7 found in a pi2

use lk.bin as your kernel.img file, with the official firmware

rpi3-test

builds LK in aarch64 mode for the cortex-A53 found in a pi3

use lk.bin as your kernel.img file, with the official firmware

rpi3-bootcode

builds LK for the VPU on any VC4 pi (pi0 to pi3), use lk.bin as bootcode.bin

rpi3-start

buids LK for the VPU on any VC4 pi (pi0 to pi3), use lk.elf as start.elf, with either the official bootcode.bin or vc4-stage1

rpi4-recovery

builds LK for the VPU on a VC6 pi (pi4, pi400, CM4), use lk.bin as recovery.bin or bootcode.bin in spi flash, must be signed with https://github.com/librerpi/rpi-tools/tree/master/signing-tool

rpi4-start4

builds LK for the VPU on a VC6 pi (pi4, pi400, CM4), use lk.elf as start4.elf, with the official SPI firmware

vc4-stage1

builds LK as a bootcode.bin replacement, loads lk.elf from either an ext2 partition or xmodem over the uart

vc4-stage2

a test stage2 for use with vc4-stage1, currently it just brings the DPI online

vc4-start

a test stage2, that will embed rpi1-test into itself, and run LK on both the VPU and ARM

lk-overlay's People

Contributors

cleverca22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lk-overlay's Issues

nix-shell error: attribute 'shell' in selection path 'shell' not found

I've run $ sh <(curl -L https://nixos.org/nix/install) --no-daemon as per https://nixos.org/download/

Then I followed README but got stuck at

bullseye:~/lk-overlay$ nix-shell -A shell
error: attribute 'shell' in selection path 'shell' not found

So without understanding anything I've run just nix-shell and it downloaded and compiled bunch of stuff and dropped me into [nix-shell:~/lk-overlay]$ shell and then make PROJECT=rpi3-bootcode worked.

So looks like everything is fine but I still don't get what -A shell is supposed to do :-)

If you will change the readme then maybe add also first step how to install nix-shell. Thanks.

Unable to run LK on Raspberry Pi 3 Model B Rev 1.2

I'm trying to run LK on Raspberry Pi 3 Model B Rev 1.2.
Using official ARM64 bare metal compiler gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.
Here is what I did:

make rpi3-test TOOLCHAIN_PREFIX=$HOME/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin/aarch64-none-elf-

After successful compilation, I had rpi3-build/lk.elf and rpi3-build/lk.bin.
But after replacing lk.bin as kernel7.img in Raspberry Pi boot partition, It didn't boot or print any log message over UART.
A little investigation on lk.elf indicate that it's entry point address is set to 0xffff000000000000.
Here is the result.

$HOME/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin/aarch64-none-elf-readelf -h lk.elf
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           AArch64
  Version:                           0x1
  Entry point address:               0xffff000000000000
  Start of program headers:          64 (bytes into file)
  Start of section headers:          2230000 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         2
  Size of section headers:           64 (bytes)
  Number of section headers:         21
  Section header string table index: 20

As of my understanding raspberry pi original bootloader (start.elf) loads the kernel file (set via kernel property in config.txt) into address 0x8000.
So how lk.bin is supposed to boot while it's entry address is set to 0xffff000000000000 but it's binary is loaded into address 0x8000?
Besides, address 0xffff000000000000 looks like virtual address than a physical address.
How virtual address is available before even lk boots?
Thanks in advance ๐Ÿ‘

[TODO] Move away from GitHub

Hello!
We're here to announce that we have plans to move away from GitHub to Notabug.org.

Why are we doing this?

GitHub is non-libre git hosting owned by Microsoft.
We don't want to force people to use a non-libre tool just to send issues or pull requests.

What will change with the GitHub repos?

GitHub repos won't be deleted, they're gonna be used as mirrors.
Pull Requests and issues will still be accepted however. We'll still encourage to use Notabug.org
for those tasks.

What is Notabug.org?

Notabug.org is the Peers Community's instance of their modified version of Gogs. Gogs is libre software, unlike GitHub.
It works similarily like GitHub and looks like GitHub.

...

If you have questions about that, feel free to ask them and we'll happily respond to them.

Have a nice day!

~vitali64

Missing LICENSE

I see you have no LICENSE file for this project. The default is copyright.

I would suggest releasing the code under the GPL-2.0-or-later or GPL-3.0-or-later license so that others are encouraged to contribute changes back to your project.

add salt address for pi 400

the program does not dump the salt correctly on my pi 400,
for info at boot the following is sent over the UART:
OTP boardrev c03130 bootrom 8b0 8b0
and i found that the salt address is at 60006e18
ive tested by removing the last 20 bytes of a recovery.bin and running the sign tool on it, then diffing it.

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.