Code Monkey home page Code Monkey logo

build-helper's Introduction

build-helper

Common script used in other build scripts.

  • host-functions-source.sh: to be included with source in the host build script
  • container-functions-source.sh: to be included with source in the container build script

Deprecated:

  • builder-helper.sh: used in the first generation of build scripts.

Patches

The code used to download and extract archives can also be used to post-patch the downloaded files. For this a patch file must be placed in the patches folder, and the name must be passed as the third param to extract().

Memo

The code to apply the patch (common-functions-source.sh:extract()) does the following:

$ cd sources/binutils
$ patch -p0 < "binutils-2.31.patch"

The patch is applied from the library source folder, so it must be created with the library relative path.

For example, to create a binutils patch, use:

$ cd sources/binutils
$ cp bfd/ihex.c bfd/ihex-patched.c
$ vi bfd/ihex-patched.c
$ diff -u bfd/ihex.c bfd/ihex-patched.c > patches/binutils-2.31.patch

Alternatively, multiple changes can be generated by Git:

$ git init
$ git add -A
$ git commit -m all

Perform changes as usual.

To create a patch with the uncommitted changes that will be consumed with patch:

$ git diff --no-prefix -u > file.patch

For completeness, to create a patch with the uncommitted changes that will be consumeed with git apply file.git-patch.

$ git diff > file.git-patch

It is also possible to create patches with git and consume them with patch

$ git diff --no-prefix -u > file.patch

Links:

build-helper's People

Contributors

ilg-ul 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.