From e909503614a7fcecab6ba8fb4face6b33815ef02 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Fri, 26 Feb 2016 17:47:24 +0300 Subject: [PATCH] Templates for splitting configuration.sh and boards.sh, first attempt --- config/boards/new-board.template | 49 ++++++++++++++++++++++ config/sources/new-family.template | 67 ++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 config/boards/new-board.template create mode 100644 config/sources/new-family.template diff --git a/config/boards/new-board.template b/config/boards/new-board.template new file mode 100644 index 0000000000..79130e5cd1 --- /dev/null +++ b/config/boards/new-board.template @@ -0,0 +1,49 @@ +# Copyright (c) 2015 Igor Pecovnik, igor.pecovnik@gma**.com +# +# This file is licensed under the terms of the GNU General Public +# License version 2. This program is licensed "as is" without any +# warranty of any kind, whether express or implied. +# +# This file is a part of tool chain https://github.com/igorpecovnik/lib + +## Name ($BOARD) +NAME='template-board' + +## Display extra warning when attempting to build +STATUS_WIP=no + +## Description for board selection dialog +DESCRIPTION='Template board description' + +## Sources family +LINUXFAMILY='new-family' + +## U-boot configuration target +BOOTCONFIG='template_board' + +## U-boot boot script file name +BOOTSCRIPT='boot-template.cmd' + +## Entries in /etc/modules for default kernel branch (space-separated list) +MODULES='module1 module2' + +## Entries in /etc/modules for next and dev kernel branch (space-separated list) +MODULES_NEXT='module3 module4' + +## Packages to be removed from base image (space-separated list) +REMOVE_PACKAGES='package1 package2' + +## Name of default serial device +SERIALCON='ttyS0' + +## Kernel branches for BUILD_ALL: bitmask (dev next default) +BUILD_ALL_TARGET=0 + +## Kernel and OS releases to build desktop images +DESKTOP_TARGET='trusty,%' + +## Function to make board-specific adjustments to rootfs +install_board_specific() +{ + echo "Installing board-specific configuration" +} diff --git a/config/sources/new-family.template b/config/sources/new-family.template new file mode 100644 index 0000000000..e33a0d0df9 --- /dev/null +++ b/config/sources/new-family.template @@ -0,0 +1,67 @@ +# Copyright (c) 2015 Igor Pecovnik, igor.pecovnik@gma**.com +# +# This file is licensed under the terms of the GNU General Public +# License version 2. This program is licensed "as is" without any +# warranty of any kind, whether express or implied. +# +# This file is a part of tool chain https://github.com/igorpecovnik/lib + +## Variables: +# LINUXKERNEL, BOOTLOADER: Git repository address +# KERNELBRANCH, BOOTBRANCH: Git repository branch +# LINUXSOURCE, BOOTSOURCE: Local subdirectory name in "sources/" +# BOOTSIZE: size of boot partition if u-boot doesn't support ext4 +# CPUMIN, CPUMAX, GOVERNOR: cpufrequtils settings + +case $BRANCH in + default) + LINUXKERNEL='' + KERNELBRANCH='' + LINUXSOURCE='' + + BOOTLOADER='' + BOOTBRANCH='' + BOOTSOURCE='' + + CPUMIN='' + CPUMAX='' + GOVERNOR='' + + BOOTSIZE=0 + ;; + + next) + LINUXKERNEL='' + KERNELBRANCH='' + LINUXSOURCE='' + + BOOTLOADER='' + BOOTBRANCH='' + BOOTSOURCE='' + + CPUMIN='' + CPUMAX='' + GOVERNOR='' + + BOOTSIZE=0 + ;; + + dev) + LINUXKERNEL='' + KERNELBRANCH='' + LINUXSOURCE='' + + BOOTLOADER='' + BOOTBRANCH='' + BOOTSOURCE='' + + CPUMIN='' + CPUMAX='' + GOVERNOR='' + + BOOTSIZE=0 + ;; + + *) + # error +esac