Git Product home page Git Product logo

riscv-linux-4.1.y's Introduction

Linux/RISC-V

This is a port of Linux kernel for the RISC-V instruction set architecture. Development is currently based on the 4.1 longterm branch.

Building the kernel image

  1. Fetch upstream sources and overlay the riscv architecture-specific subtree:

     $ curl -L https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.1.15.tar.xz | tar -xJ
     $ cd linux-4.1.15
     $ git init
     $ git remote add origin https://github.com/riscv/riscv-linux.git
     $ git fetch
     $ git checkout -f -t origin/master
    
  2. Populate ./.config with the default symbol values:

     $ make ARCH=riscv defconfig
    
  3. Optionally edit the configuration via an ncurses interface:

     $ make ARCH=riscv menuconfig
    
  4. Build the uncompressed kernel image:

     $ make ARCH=riscv -j vmlinux
    
  5. Boot the kernel in the functional simulator, optionally specifying a raw disk image for the root filesystem:

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

    bbl (the Berkeley Boot Loader) is available from the riscv-pk repository.

Exporting kernel headers

The riscv-gnu-toolchain repository includes a copy of the kernel header files. If the userspace API has changed, export the updated headers to the riscv-gnu-toolchain source directory:

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

Rebuild riscv64-unknown-linux-gnu-gcc with the linux target:

$ cd path/to/riscv-gnu-toolchain
$ make linux

riscv-linux-4.1.y's People

Contributors

torvalds avatar broonie avatar davem330 avatar tiwai avatar gregkh avatar htejun avatar bigguiness avatar kaga-koko avatar joeperches avatar pmundt avatar arndb avatar axellin avatar jmberg-intel avatar ralfbaechle avatar bzolnier avatar adrianbunk avatar danvet avatar olofj avatar larsclausen avatar rddunlap avatar acmel avatar kaber avatar dhowells avatar airlied avatar neilbrown avatar ickle avatar heicarst avatar geertu avatar ebiederm avatar morimoto avatar

Watchers

James Cloos avatar  avatar Jamey Hicks avatar  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.