Skip to content

gbraad-riscv/riscv-linux

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 

Repository files navigation

This is a port of Linux kernel for the RISC-V architecture.
Development is currently based on the 3.14 long-term support branch.

Building this kernel
====================
Obtain RISC-V architecture-dependent subtree and overlay sources from upstream:

	$ curl https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.15.tar.xz | tar -xJ
	$ cd linux-3.14.15
	$ git init
	$ git remote add origin git@github.com:ucb-bar/riscv-linux.git
	$ git fetch
	$ git checkout -f -t origin/master

Generate default kernel configuration:

	$ make ARCH=riscv defconfig

Edit configuration via an ncurses interface:

	$ make ARCH=riscv menuconfig

Build static kernel image:

	$ make ARCH=riscv -j vmlinux

Run the kernel image:

	$ spike +disk=/path/to/root.img vmlinux


Building riscv-gcc and glibc against this kernel
================================================
Linux headers are already available in the riscv-gcc repository.

If headers are changed, export them to the riscv-gcc installation directory:

	$ make ARCH=riscv headers_check
	$ make ARCH=riscv INSTALL_HDR_PATH=/path/to/riscv-gcc/linux-headers headers_install

Build riscv-gcc with the linux target:

	$ make INSTALL_DIR=/path/to/install linux

Releases

No releases published

Packages

No packages published