mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Update project README
Update compile.sh to use dialog for KERNEL_ONLY Update configuration.sh
This commit is contained in:
36
README.md
36
README.md
@@ -1,39 +1,39 @@
|
|||||||
## How to build my own image? ##
|
# Armbian
|
||||||
|
|
||||||
|
Ubuntu/Debian images for ARM based single-board computers
|
||||||
|
http://www.armbian.com
|
||||||
|
|
||||||
|
## How to build my own image or kernel?
|
||||||
|
|
||||||
**Preparation**
|
**Preparation**
|
||||||
|
|
||||||
- x86 machine running any OS, 4G ram, SSD, quad core (recommended),
|
- x86/x64 machine running any OS; 4G ram, SSD, quad core (recommended),
|
||||||
- [virtual box](https://www.virtualbox.org/wiki/Downloads) or similar virtualization software, **(highly recommended)**
|
- [VirtualBox](https://www.virtualbox.org/wiki/Downloads) or similar virtualization software **(highly recommended)**,
|
||||||
- host system is **highly recommended** to be [Ubuntu 14.04](http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/mini.iso) (**some but not all** sources can also compile on Ubuntu 15.04, Mint 17.2 and Debian Jessie),
|
- alternatively - [Docker](https://github.com/igorpecovnik/lib/pull/255#issuecomment-205045273), [systemd-nspawn](https://www.freedesktop.org/software/systemd/man/systemd-nspawn.html) or other containerization software,
|
||||||
|
- compilation environment is **highly recommended** to be [Ubuntu Trusty 14.04](http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/mini.iso) or Ubuntu Xenial 16.04 (other releases are **not officially supported**),
|
||||||
- installed basic system, OpenSSH and Samba (optional),
|
- installed basic system, OpenSSH and Samba (optional),
|
||||||
- gain root access.
|
- superuser rights (configured `sudo` or root shell).
|
||||||
|
|
||||||
**Execution**
|
**Execution**
|
||||||
|
|
||||||
apt-get -y install git
|
apt-get -y install git
|
||||||
git clone https://github.com/igorpecovnik/lib --depth 1
|
git clone https://github.com/igorpecovnik/lib --depth 1
|
||||||
cp lib/compile.sh .
|
cp lib/compile.sh .
|
||||||
./compile.sh
|
./compile.sh
|
||||||
|
|
||||||
This will download all necessary sources, execute compilation and build an bootable image. Most of things will be cached so next run will be extremly faster!
|
This will download all necessary sources, execute compilation and/or build a bootable image. Most of things will be cached so next run will be extremely faster!
|
||||||
|
|
||||||
## How to build my own kernel? ##
|
## How to edit kernel configuration?
|
||||||
|
|
||||||
**Prerequisition are the same as building an image!**
|
Edit `compile.sh` and set
|
||||||
|
|
||||||
Edit *compile.sh* prior to running and alter switch:
|
|
||||||
|
|
||||||
KERNEL_ONLY="yes"
|
|
||||||
|
|
||||||
In directory (output/debs) you will find deb packed kernel, together with headers, firmware and u-boot.
|
|
||||||
|
|
||||||
|
|
||||||
If you want to invoke menu configuration:
|
|
||||||
|
|
||||||
KERNEL_CONFIGURE="yes"
|
KERNEL_CONFIGURE="yes"
|
||||||
|
|
||||||
|
to display kernel configuration menu prior to compilation
|
||||||
|
|
||||||
More info:
|
More info:
|
||||||
|
|
||||||
- [Documentation](http://www.armbian.com/using-armbian-tools/)
|
- [Documentation](http://www.armbian.com/using-armbian-tools/)
|
||||||
|
- [Prebuilt images](http://www.armbian.com/download/)
|
||||||
- [Support forums](http://forum.armbian.com/ "Armbian support forum")
|
- [Support forums](http://forum.armbian.com/ "Armbian support forum")
|
||||||
- [Project at Github](https://github.com/igorpecovnik/lib)
|
- [Project at Github](https://github.com/igorpecovnik/lib)
|
||||||
@@ -213,9 +213,7 @@ compile_kernel (){
|
|||||||
# hack for deb builder. To pack what's missing in headers pack.
|
# hack for deb builder. To pack what's missing in headers pack.
|
||||||
cp $SRC/lib/patch/misc/headers-debian-byteshift.patch /tmp
|
cp $SRC/lib/patch/misc/headers-debian-byteshift.patch /tmp
|
||||||
|
|
||||||
export LOCALVERSION="-"$LINUXFAMILY
|
export LOCALVERSION="-$LINUXFAMILY"
|
||||||
|
|
||||||
if [[ $ARCH == *64* ]]; then ARCHITECTURE=arm64; else ARCHITECTURE=arm; fi
|
|
||||||
|
|
||||||
# We can use multi threading here but not later since it's not working. This way of compilation is much faster.
|
# We can use multi threading here but not later since it's not working. This way of compilation is much faster.
|
||||||
if [ "$KERNEL_CONFIGURE" != "yes" ]; then
|
if [ "$KERNEL_CONFIGURE" != "yes" ]; then
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
# for detailed explanation of these parameters
|
# for detailed explanation of these parameters
|
||||||
|
|
||||||
# method
|
# method
|
||||||
KERNEL_ONLY="no" # build only kernel
|
KERNEL_ONLY="" # leave empty to select each time, set to "yes" or "no" to skip dialog prompt
|
||||||
KERNEL_CONFIGURE="no" # want to change my default configuration
|
KERNEL_CONFIGURE="no" # want to change my default configuration
|
||||||
CLEAN_LEVEL="make,debs" # comma-separated list of clean targets: "make" = make clean for selected kernel and u-boot,
|
CLEAN_LEVEL="make,debs" # comma-separated list of clean targets: "make" = make clean for selected kernel and u-boot,
|
||||||
# "debs" = delete pckages in "./output/debs" for current branch and family,
|
# "debs" = delete pckages in "./output/debs" for current branch and family,
|
||||||
@@ -27,9 +27,10 @@ CONSOLE_CHAR="UTF-8"
|
|||||||
|
|
||||||
# advanced
|
# advanced
|
||||||
KERNEL_KEEP_CONFIG="no" # overwrite kernel config before compilation
|
KERNEL_KEEP_CONFIG="no" # overwrite kernel config before compilation
|
||||||
EXTERNAL="yes" # install extra applications and drivers
|
EXTERNAL="yes" # build and install extra applications and drivers
|
||||||
FORCE_CHECKOUT="yes" # ignore manual changes to source
|
FORCE_CHECKOUT="yes" # ignore manual changes to source
|
||||||
BUILD_ALL="no" # cycle through available boards and make images or kernel/u-boot packages
|
BUILD_ALL="no" # cycle through available boards and make images or kernel/u-boot packages.
|
||||||
|
# set KERNEL_ONLY to "yes" or "no" to build all kernels/all images
|
||||||
|
|
||||||
# build script version to use
|
# build script version to use
|
||||||
LIB_TAG="" # empty for latest version,
|
LIB_TAG="" # empty for latest version,
|
||||||
@@ -101,4 +102,4 @@ fi
|
|||||||
|
|
||||||
# If you are committing new version of this file, increment VERSION
|
# If you are committing new version of this file, increment VERSION
|
||||||
# Only integers are supported
|
# Only integers are supported
|
||||||
# VERSION=17
|
# VERSION=18
|
||||||
|
|||||||
@@ -45,19 +45,16 @@ case $LINUXFAMILY in
|
|||||||
KERNEL_NEXT_SOURCE="linux-vanilla"
|
KERNEL_NEXT_SOURCE="linux-vanilla"
|
||||||
# U-boot
|
# U-boot
|
||||||
BOOTLOADER="git://git.denx.de/u-boot.git"
|
BOOTLOADER="git://git.denx.de/u-boot.git"
|
||||||
|
BOOTSOURCE="u-boot"
|
||||||
# latest stable v2016.03 broken gmac on sun7i, fixing it for DEFAULT and NEXT
|
# latest stable v2016.03 broken gmac on sun7i, fixing it for DEFAULT and NEXT
|
||||||
#UBOOT_DEFAULT_BRANCH="v"$(git ls-remote git://git.denx.de/u-boot.git | grep -v rc | grep -v "\^" | tail -1 | cut -d "v" -f 2)
|
#UBOOT_DEFAULT_BRANCH="v"$(git ls-remote git://git.denx.de/u-boot.git | grep -v rc | grep -v "\^" | tail -1 | cut -d "v" -f 2)
|
||||||
UBOOT_DEFAULT_BRANCH="v2016.01"
|
UBOOT_DEFAULT_BRANCH="v2016.01"
|
||||||
UBOOT_DEFAULT_SOURCE="u-boot"
|
|
||||||
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
|
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
|
||||||
UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
|
|
||||||
UBOOT_DEV_BRANCH=""
|
UBOOT_DEV_BRANCH=""
|
||||||
UBOOT_DEV_SOURCE="u-boot-dev"
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
sun8i)
|
sun8i)
|
||||||
[[ -z $LINUXCONFIG ]] && LINUXCONFIG="linux-"$LINUXFAMILY-"$BRANCH"
|
[[ -z $LINUXCONFIG ]] && LINUXCONFIG="linux-"$LINUXFAMILY-"$BRANCH"
|
||||||
|
|
||||||
#KERNEL_DEFAULT="https://github.com/O-Computers/linux-sunxi"
|
#KERNEL_DEFAULT="https://github.com/O-Computers/linux-sunxi"
|
||||||
#KERNEL_DEFAULT_BRANCH="h3-wip"
|
#KERNEL_DEFAULT_BRANCH="h3-wip"
|
||||||
#KERNEL_DEFAULT_SOURCE="linux-sun8i"
|
#KERNEL_DEFAULT_SOURCE="linux-sun8i"
|
||||||
@@ -68,10 +65,9 @@ case $LINUXFAMILY in
|
|||||||
KERNEL_DEV_BRANCH=h3-emac
|
KERNEL_DEV_BRANCH=h3-emac
|
||||||
KERNEL_DEV_SOURCE="linux-sun8i-mainline"
|
KERNEL_DEV_SOURCE="linux-sun8i-mainline"
|
||||||
BOOTLOADER="git://git.denx.de/u-boot.git"
|
BOOTLOADER="git://git.denx.de/u-boot.git"
|
||||||
|
BOOTSOURCE="u-boot"
|
||||||
UBOOT_DEFAULT_BRANCH="v"$(git ls-remote git://git.denx.de/u-boot.git | grep -v rc | grep -v "\^" | tail -1 | cut -d "v" -f 2)
|
UBOOT_DEFAULT_BRANCH="v"$(git ls-remote git://git.denx.de/u-boot.git | grep -v rc | grep -v "\^" | tail -1 | cut -d "v" -f 2)
|
||||||
UBOOT_DEFAULT_SOURCE="u-boot"
|
|
||||||
UBOOT_DEV_BRANCH=""
|
UBOOT_DEV_BRANCH=""
|
||||||
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
odroidxu4)
|
odroidxu4)
|
||||||
|
|||||||
Reference in New Issue
Block a user