No description
Find a file
Emil Renner Berthing 83dba1f25d [Not for upstream] Add build instructions
For convenience this also adds a small starlight_defconfig and the
firmware needed for the brcmfmac driver along with the signed regulatory
database.

The firmware is from the linux-firmware repo and the regulatory database
from the wireless-regdb Fedora package.

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Drew Fustini <drew@beagleboard.org>
2021-06-07 01:11:18 +02:00
arch [Not for upstream] Add build instructions 2021-06-07 01:11:18 +02:00
block block-5.13-2021-05-22 2021-05-22 07:40:34 -10:00
certs Kbuild updates for v5.13 (2nd) 2021-05-08 10:00:11 -07:00
crypto for-5.13/drivers-2021-04-27 2021-04-28 14:39:37 -07:00
Documentation dt-bindings: hwmon: add starfive,jh7100-temp bindings 2021-06-07 01:11:16 +02:00
drivers power: reset: Add TPS65086 restart driver 2021-06-07 01:11:18 +02:00
firmware [Not for upstream] Add build instructions 2021-06-07 01:11:18 +02:00
fs Miscellaneous ext4 bug fixes for v5.13 2021-06-06 14:24:13 -07:00
include drivers/media and video: update fb driver(flush cache) and cam sensor drivers 2021-06-07 01:11:18 +02:00
init pid: take a reference when initializing cad_pid 2021-06-05 08:58:11 -07:00
ipc ipc/mqueue, msg, sem: avoid relying on a stack reference past its expiry 2021-05-22 15:09:07 -10:00
kernel Networking fixes for 5.13-rc5, including fixes from bpf, wireless, 2021-06-04 18:25:39 -07:00
lib lib: crc64: fix kernel-doc warning 2021-06-05 08:58:12 -07:00
LICENSES LICENSES: Add the CC-BY-4.0 license 2020-12-08 10:33:27 -07:00
mm mm, hugetlb: fix simple resv_huge_pages underflow on UFFDIO_COPY 2021-06-05 08:58:12 -07:00
net Networking fixes for 5.13-rc5, including fixes from bpf, wireless, 2021-06-04 18:25:39 -07:00
samples VFIO fixes for v5.13-rc5 2021-06-03 11:52:24 -07:00
scripts kbuild: Quote OBJCOPY var to avoid a pahole call break the build 2021-05-27 11:32:56 -07:00
security trusted-keys: match tpm_get_ops on all return paths 2021-05-12 22:36:37 +03:00
sound sound fixes for 5.13-rc5 2021-06-04 10:13:20 -07:00
tools Merge branch 'akpm' (patches from Andrew) 2021-06-05 10:55:41 -07:00
usr .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
virt KVM: VMX: update vcpu posted-interrupt descriptor when assigning device 2021-05-27 07:58:23 -04:00
.clang-format cxl for 5.12 2021-02-24 09:38:36 -08:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap mailmap: use private address for Michel Lespinasse 2021-06-05 08:58:12 -07:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: move Murali Karicheri to credits 2021-04-29 15:47:30 -07:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS Networking fixes for 5.13-rc5, including fixes from bpf, wireless, 2021-06-04 18:25:39 -07:00
Makefile Linux 5.13-rc5 2021-06-06 15:47:27 -07:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
README.md [Not for upstream] Add build instructions 2021-06-07 01:11:18 +02:00

Linux kernel for the BeagleV Starlight

What is this?

The BeagleV Starlight board is a new Linux-capable 64bit RISC-V development board. It has not shipped yet, but beta versions are out to developers. Consequently the board is not yet supported by upstream Linux. This tree is meant to collect all the in-development patches for running Linux on the board.

Cross-compiling

Cross-compiling the Linux kernel is surprisingly easy since it doesn't depend on any (target) libraries and most distributions already have packages with a working cross-compiler. We'll also need a few other tools to build everything:

# Debian/Ubuntu
sudo apt-get install libncurses-dev libssl-dev bc flex bison make gcc gcc-riscv64-linux-gnu
# Fedora
sudo dnf install ncurses-devel openssl openssl-devel bc flex bison make gcc gcc-riscv64-linux-gnu
# Archlinux
sudo pacman -S --needed ncurses openssl bc flex bison make gcc riscv64-linux-gnu-gcc

The build system needs to know that we want to cross-compile a kernel for RISC-V by setting ARCH=riscv. It also needs to know the prefix of our cross-compiler using CROSS_COMPILE=riscv64-linux-gnu-. Also let's assume we're building on an 8-core machine so compilation can be greatly sped up by telling make to use all 8 cores with -j8.

First we need to configure the kernel though. Linux has a very extensive configuration system, but you can get a good baseline configuration for the board using:

make -j8 ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- starlight_defconfig

There is nothing magic about this configuration other than it has all the drivers enabled that are working for the hardware on the board. In fact it has very little extra features enabled which is great for compile times, but you are very much encouraged to add additional drivers and configure your kernel further using

make -j8 ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- nconfig

Now compile the whole thing with

make -j8 ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-

Installing

Once the build has finished the resulting kernel can be found at

arch/riscv/boot/Image

You'll also need the matching device tree at

arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dtb

These two files should be copied to the boot partition on the SD card. That is onto the same file system that contains the extlinux/extlinux.conf. On the default Fedora image this is mounted at /boot.

Now add the following entry to the extlinux/extlinux.conf file:

label My New Kernel
kernel /Image
fdt /jh7100-beaglev-starlight.dtb
append earlycon console=ttyS0,115200n8 root=/dev/mmcblk0p2 rootwait stmmac.chain_mode=1

This assumes your root file system is at /dev/mmcblk0p2 which it is on the default Fedora image. Also if your kernel is very big it might be beneficial to use the compressed Image.gz rather than the uncompressed Image.

The starlight_defconfig doesn't enable modules, but if you enabled them in your build you'll also need to install them in /lib/modules/ on the root file system. How to do that best is out of scope for this README though.

Status

SoC

  • GPIO
  • Serial port
  • I2C
  • SPI
  • MMC / SDIO / SD card
  • Random number generator
  • Temperature sensor
  • Ethernet, though a little flaky and stmmac.chain_mode=1 needed on the cmdline
  • Framebuffer, fbdev driver so not upstreamable
  • Clock tree, statically set up by u-boot, WIP clock driver
  • Pinctrl/Pinmux, statically set up by u-boot
  • Watchdog
  • USB, USB 2.0 seems to work ok, but USB 3.0 is very flaky / broken
  • Security Engine
  • MIPI-DSI
  • ISP
  • MIPI-CSI
  • Video Decode
  • Video Encode
  • NVDLA
  • NNE50
  • Vision DSP

Board

  • LED
  • PMIC / Reboot
  • Ethernet PHY
  • HDMI, working with some screens
  • AP6236 Wifi
  • AP6236 Bluetooth
  • GD25LQ256D SPI flash

Contributing

If you're working on cleaning up or upstreaming some of this or adding support for more of the SoC I'd very much like to incorporate it into this tree. Either send a pull request, mail or contact Esmil on IRC/Slack.

Also I think of this tree mostly as a collection of patches that will hopefully mature enough to be submitted upstream. So expect regular rebases.