From aa8268256d90a6ca61160e2feba2ffa92cf992a8 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Tue, 19 Apr 2016 13:04:53 +0300 Subject: [PATCH] Update project README Update compile.sh to use dialog for KERNEL_ONLY Update configuration.sh --- README.md | 36 ++++++++++++++++++------------------ common.sh | 4 +--- compile.sh | 9 +++++---- configuration.sh | 8 ++------ 4 files changed, 26 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 20c3acd02..b1638afa7 100644 --- a/README.md +++ b/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** -- x86 machine running any OS, 4G ram, SSD, quad core (recommended), -- [virtual box](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), +- x86/x64 machine running any OS; 4G ram, SSD, quad core (recommended), +- [VirtualBox](https://www.virtualbox.org/wiki/Downloads) or similar virtualization software **(highly recommended)**, +- 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), -- gain root access. +- superuser rights (configured `sudo` or root shell). **Execution** apt-get -y install git git clone https://github.com/igorpecovnik/lib --depth 1 - cp lib/compile.sh . + cp lib/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* 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: +Edit `compile.sh` and set KERNEL_CONFIGURE="yes" +to display kernel configuration menu prior to compilation + More info: - [Documentation](http://www.armbian.com/using-armbian-tools/) +- [Prebuilt images](http://www.armbian.com/download/) - [Support forums](http://forum.armbian.com/ "Armbian support forum") - [Project at Github](https://github.com/igorpecovnik/lib) \ No newline at end of file diff --git a/common.sh b/common.sh index b84e899f7..a0ee63d94 100644 --- a/common.sh +++ b/common.sh @@ -213,9 +213,7 @@ compile_kernel (){ # hack for deb builder. To pack what's missing in headers pack. cp $SRC/lib/patch/misc/headers-debian-byteshift.patch /tmp - export LOCALVERSION="-"$LINUXFAMILY - - if [[ $ARCH == *64* ]]; then ARCHITECTURE=arm64; else ARCHITECTURE=arm; fi + export LOCALVERSION="-$LINUXFAMILY" # 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 diff --git a/compile.sh b/compile.sh index d374ceb8a..bfaa9334b 100755 --- a/compile.sh +++ b/compile.sh @@ -15,7 +15,7 @@ # for detailed explanation of these parameters # 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 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, @@ -27,9 +27,10 @@ CONSOLE_CHAR="UTF-8" # advanced 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 -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 LIB_TAG="" # empty for latest version, @@ -101,4 +102,4 @@ fi # If you are committing new version of this file, increment VERSION # Only integers are supported -# VERSION=17 +# VERSION=18 diff --git a/configuration.sh b/configuration.sh index 672de8be2..2fef796ef 100644 --- a/configuration.sh +++ b/configuration.sh @@ -45,19 +45,16 @@ case $LINUXFAMILY in KERNEL_NEXT_SOURCE="linux-vanilla" # U-boot 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 #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_SOURCE="u-boot" UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH - UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE UBOOT_DEV_BRANCH="" - UBOOT_DEV_SOURCE="u-boot-dev" ;; sun8i) [[ -z $LINUXCONFIG ]] && LINUXCONFIG="linux-"$LINUXFAMILY-"$BRANCH" - #KERNEL_DEFAULT="https://github.com/O-Computers/linux-sunxi" #KERNEL_DEFAULT_BRANCH="h3-wip" #KERNEL_DEFAULT_SOURCE="linux-sun8i" @@ -68,10 +65,9 @@ case $LINUXFAMILY in KERNEL_DEV_BRANCH=h3-emac KERNEL_DEV_SOURCE="linux-sun8i-mainline" 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_SOURCE="u-boot" UBOOT_DEV_BRANCH="" - UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE ;; odroidxu4)