Giter VIP home page Giter VIP logo

buildbrain's Introduction

buildbrain

This repository includes:

  • linux-brain, u-boot-brain and nkbin_maker as submodules
  • Useful build targets in Makefile
  • r3build.toml to watch changes that occur in submodules

Confirmed environments

  • Debian 10 (buster) amd64

Getting Started

  1. Install dependencies.

    $ sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi
    
  2. Clone this repository with recursive clone enabled.

    $ git clone --recursive [email protected]:puhitaku/buildbrain.git
    
    • If you've cloned it without --recursive, run following command:
    $ git submodule update --init --recursive
    
  3. Install uuu.

    • Follow the instruction and build uuu executable.
    • Put uuu where the PATH executable points to.

Build and inject U-Boot

  1. Run make udefconfig-sh* to generate .config.

    • For Sx1: make udefconfig-sh1
    • For Sx6: make udefconfig-sh6
  2. Run make ubuild to build whole repository and generate u-boot.sb.

    • i.MX283 loads a packed U-Boot executable called u-boot.sb.
  3. To inject the executable into i.MX283 in recovery mode, run make uuu.

Build and make NK.bin

  1. Run make udefconfig to generate .config.

  2. Run make ubuild to build whole repository and generate u-boot.bin.

  3. To make nk.bin, run make nkbin.

    • nkbin_maker packs u-boot.bin into nk.bin.

Build Linux

  1. Run make ldefconfig to generate .config.

  2. Run make lbuild to generate zImage.

  3. Confirm that linux-brain/arch/arm/boot/zImage exists.

Bootstrap Debian 10 (buster)

  1. Partition an SD card into two partitions.

    • 1st: FAT32 (vfat), about 100MB
    • 2st: ext4, fill the remaining area
  2. Build and copy the Linux kernel.

    • Run make ldefconfig lbuild.
    • Copy /linux-brain/arch/arm/boot/zImage and /linux-brain/arch/arm/boot/dts/imx28-evk.dtb into the 1st partition.
  3. Run APT cache in background (mandatory): make aptcache.

  4. Run make debian.

  5. Copy all contents in ./debian into the 2nd partition.

    • sudo cp -ar ./debian/* /path/to/your/sd/2nd/partition/
    • Please make sure that all attributes are preserved with -a flag.

Watch changes in submodules & auto-build

  1. Run make setup-dev to prepare a Python venv to watch code changes. Namely;

    • Python 3 venv in env
    • r3build command in the env
  2. Run r3build. It'll detect the changes you make and builds the corresponding executable automatically.

What's r3build?

r3build is a smart file watcher that aims to provide hot-reloading feature like Web frontend development.

buildbrain's People

Contributors

f0reacharr avatar pepepper avatar puhitaku 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.