#!/bin/bash # # scripts/mkcommon.sh # (c) Copyright 2013 # Allwinner Technology Co., Ltd. # James Deng # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. export LC_ALL=C BR_SCRIPTS_DIR=`dirname $0` BUILD_CONFIG=.buildconfig SKIP_BR=0 # source shflags . ${BR_SCRIPTS_DIR}/shflags [ -f ${BUILD_CONFIG} ] && . ${BUILD_CONFIG} # define option, format: # 'long option' 'default value' 'help message' 'short option' # WARN: Don't modify default value, because we will check it later DEFINE_string 'platform' '' 'Platform to build, e.g. sun9iw1p1' 'p' DEFINE_string 'kernel' '' 'Kernel to build, e.g. 3.3' 'k' DEFINE_string 'board' '' 'Board to build, e.g. evb' 'b' DEFINE_string 'module' 'all' 'Module to build, e.g. buildroot, kernel, uboot, clean' 'm' DEFINE_boolean 'config' false 'Config compile platfom' 'c' DEFINE_boolean 'force' false 'Force to build, clean some old files. ex, rootfs/' 'f' FLAGS_HELP="Top level build script for lichee Examples: 1. Build lichee, it maybe config platform options, if you first use it. And it will pack firmware use default argument. $ ./build.sh 2. Configurate platform option $ ./build.sh -c or $ ./build.sh config or $ ./build.sh --config 3. Pack linux, dragonboard image $ ./build.sh pack[_