├── .gitignore ├── README ├── conf ├── bblayers.conf └── local.conf ├── oebb.sh ├── scripts ├── layerman ├── layers.awk ├── listpatches.sh └── listpending.sh └── sources └── layers.txt /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | sources/* 3 | !sources/layers.txt 4 | conf/auto.conf 5 | conf/bblayers.conf 6 | conf/sanity_info 7 | conf/site.conf 8 | pseudodone 9 | git_config 10 | subversion_config/ 11 | package-depends.dot 12 | pn-depends.dot 13 | task-depends.dot 14 | tags 15 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | These are the setup scripts for the Angstrom buildsystem. If you want to (re)build packages or images for Angstrom, this is the thing to use. 2 | The Angstrom buildsystem is using various components from the Yocto Project, most importantly the Openembedded buildsystem, the bitbake task executor and various application and BSP layers. 3 | 4 | This Angstrom release (v2012.12) is officially Yocto Project Compatible with the Yocto Project release 1.3 ("Danny"). 5 | 6 | To configure the scripts and download the build metadata, do: 7 | 8 | $ MACHINE=socfpga_cyclone5 ./oebb.sh config socfpga_cyclone5 9 | 10 | You can change the 'socfpga_cyclone5' in the commandline above with socfpga_arria5. 11 | 12 | To start a build of the kernel, source the environment file and do: 13 | 14 | $ . ~/.oe/environment-angstromv2012.12 15 | $ MACHINE=socfpga_cyclone5 bitbake linux-altera-ltsi 16 | 17 | 18 | To build the latest stable kernel, run the following: 19 | $ export KERNEL_PROVIDER="linux-altera" 20 | $ export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} KERNEL_PROVIDER" 21 | $ MACHINE=socpfga_cyclone5 bitbake linux-altera 22 | 23 | To build the root file system: 24 | 25 | 26 | $ MACHINE=socpfga_cyclone5 bitbake console-image 27 | 28 | 29 | -------------------------------------------------------------------------------- /conf/bblayers.conf: -------------------------------------------------------------------------------- 1 | # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf 2 | # changes incompatibly 3 | LCONF_VERSION = "5" 4 | TOPDIR := "${@os.path.dirname(os.path.dirname(d.getVar('FILE', True)))}" 5 | 6 | BBPATH = "${TOPDIR}" 7 | 8 | BBFILES = "" 9 | 10 | # These layers hold recipe metadata not found in OE-core, but lack any machine or distro content 11 | BASELAYERS ?= " \ 12 | ${TOPDIR}/sources/meta-openembedded/meta-oe \ 13 | ${TOPDIR}/sources/meta-openembedded/meta-systemd \ 14 | ${TOPDIR}/sources/meta-openembedded/meta-efl \ 15 | ${TOPDIR}/sources/meta-openembedded/meta-gpe \ 16 | ${TOPDIR}/sources/meta-openembedded/meta-gnome \ 17 | ${TOPDIR}/sources/meta-openembedded/meta-xfce \ 18 | ${TOPDIR}/sources/meta-openembedded/meta-initramfs \ 19 | ${TOPDIR}/sources/meta-openembedded/toolchain-layer \ 20 | ${TOPDIR}/sources/meta-openembedded/meta-multimedia \ 21 | ${TOPDIR}/sources/meta-openembedded/meta-networking \ 22 | ${TOPDIR}/sources/meta-openembedded/meta-webserver \ 23 | ${TOPDIR}/sources/meta-openembedded/meta-ruby \ 24 | ${TOPDIR}/sources/meta-kde \ 25 | ${TOPDIR}/sources/meta-opie \ 26 | ${TOPDIR}/sources/meta-java \ 27 | ${TOPDIR}/sources/meta-browser \ 28 | ${TOPDIR}/sources/meta-mono \ 29 | ${TOPDIR}/sources/meta-ros \ 30 | ${TOPDIR}/sources/meta-altera \ 31 | " 32 | 33 | # These layers hold machine specific content, aka Board Support Packages 34 | BSPLAYERS ?= " \ 35 | ${TOPDIR}/sources/meta-beagleboard/common-bsp \ 36 | ${TOPDIR}/sources/meta-ti \ 37 | ${TOPDIR}/sources/meta-efikamx \ 38 | ${TOPDIR}/sources/meta-nslu2 \ 39 | ${TOPDIR}/sources/meta-smartphone/meta-htc \ 40 | ${TOPDIR}/sources/meta-smartphone/meta-nokia \ 41 | ${TOPDIR}/sources/meta-smartphone/meta-openmoko \ 42 | ${TOPDIR}/sources/meta-smartphone/meta-palm \ 43 | ${TOPDIR}/sources/meta-handheld \ 44 | ${TOPDIR}/sources/meta-intel \ 45 | ${TOPDIR}/sources/meta-intel/meta-sugarbay \ 46 | ${TOPDIR}/sources/meta-intel/meta-crownbay \ 47 | ${TOPDIR}/sources/meta-intel/meta-emenlow \ 48 | ${TOPDIR}/sources/meta-intel/meta-fri2 \ 49 | ${TOPDIR}/sources/meta-intel/meta-jasperforest \ 50 | ${TOPDIR}/sources/meta-intel/meta-n450 \ 51 | ${TOPDIR}/sources/meta-allwinner \ 52 | ${TOPDIR}/sources/meta-raspberrypi \ 53 | ${TOPDIR}/sources/meta-minnow \ 54 | ${TOPDIR}/sources/meta-altera \ 55 | " 56 | 57 | # Add your overlay location to EXTRALAYERS 58 | # Make sure to have a conf/layers.conf in there 59 | EXTRALAYERS ?= " \ 60 | ${TOPDIR}/sources/meta-linaro \ 61 | " 62 | 63 | BBLAYERS = " \ 64 | ${TOPDIR}/sources/meta-angstrom \ 65 | ${BASELAYERS} \ 66 | ${BSPLAYERS} \ 67 | ${EXTRALAYERS} \ 68 | ${TOPDIR}/sources/openembedded-core/meta \ 69 | " 70 | -------------------------------------------------------------------------------- /conf/local.conf: -------------------------------------------------------------------------------- 1 | 2 | # CONF_VERSION is increased each time build/conf/ changes incompatibly 3 | CONF_VERSION = "1" 4 | 5 | INHERIT += "rm_work" 6 | 7 | # Which files do we want to parse: 8 | BBMASK = "" 9 | 10 | # What kind of images do we want? 11 | IMAGE_FSTYPES_append = " tar.xz" 12 | 13 | # Make use of SMP: 14 | # PARALLEL_MAKE specifies how many concurrent compiler threads are spawned per bitbake process 15 | # BB_NUMBER_THREADS specifies how many concurrent bitbake tasks will be run 16 | PARALLEL_MAKE = "-j2" 17 | BB_NUMBER_THREADS = "2" 18 | 19 | DISTRO = "angstrom-v2012.12" 20 | 21 | # Don't generate the mirror tarball for SCM repos, the snapshot is enough 22 | BB_GENERATE_MIRROR_TARBALLS = "0" 23 | 24 | # Disable build time patch resolution. This would lauch a devshell 25 | # and wait for manual intervention. We disable it. 26 | PATCHRESOLVE = "noop" 27 | 28 | # 29 | # Shared-state files from other locations 30 | # 31 | # Shared state files are prebuilt cache data objects which can 32 | # used to accelerate build time. This variable can be used to configure the system 33 | # to search other mirror locations for these objects before it builds the data itself. 34 | # 35 | # This can be a filesystem directory, or a remote url such as http or ftp. These 36 | # would contain the sstate-cache results from previous builds (possibly from other 37 | # machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the 38 | # cache locations to check for the shared objects. 39 | #SSTATE_MIRRORS ?= "\ 40 | #file://.* http://someserver.tld/share/sstate/ \n \ 41 | #file://.* file:///some/local/dir/sstate/" 42 | 43 | #SSTATE_MIRRORS ?= "\ 44 | #file://.* http://dominion.thruhere.net/angstrom/sstate-mirror/ \n " 45 | 46 | -------------------------------------------------------------------------------- /oebb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Original script done by Don Darling 4 | # Later changes by Koen Kooi and Brijesh Singh 5 | 6 | # Revision history: 7 | # 20090902: download from twiki 8 | # 20090903: Weakly assign MACHINE and DISTRO 9 | # 20090904: * Don't recreate local.conf is it already exists 10 | # * Pass 'unknown' machines to OE directly 11 | # 20090918: Fix /bin/env location 12 | # Don't pass MACHINE via env if it's not set 13 | # Changed 'build' to 'bitbake' to prepare people for non-scripted usage 14 | # Print bitbake command it executes 15 | # 20091012: Add argument to accept commit id. 16 | # 20091202: Fix proxy setup 17 | # 18 | # For further changes consult 'git log' or browse to: 19 | # http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/setup-scripts/ 20 | # to see the latest revision history 21 | 22 | # Use this till we get a maintenance branch based of the release tag 23 | 24 | ############################################################################### 25 | # User specific vars like proxy servers 26 | ############################################################################### 27 | 28 | #PROXYHOST=wwwgate.ti.com 29 | #PROXYPORT=80 30 | PROXYHOST="" 31 | 32 | ############################################################################### 33 | # OE_BASE - The root directory for all OE sources and development. 34 | ############################################################################### 35 | OE_BASE=${PWD} 36 | # incremement this to force recreation of config files 37 | BASE_VERSION=9 38 | OE_ENV_FILE=~/.oe/environment-angstromv2012.12 39 | 40 | GITMINOR="$(git --version | awk '{print $3}' | awk -F. '{print $2}')" 41 | 42 | if [ ${GITMINOR} -lt 8 ] ; then 43 | if ! git help log | grep -q no-abbrev ; then 44 | echo "Your installed version of git is too old, it lacks --no-abbrev. Please install 1.7.6 or newer" 45 | exit 1 46 | fi 47 | fi 48 | 49 | ############################################################################### 50 | # CONFIG_OE() - Configure OpenEmbedded 51 | ############################################################################### 52 | function config_oe() 53 | { 54 | 55 | MACHINE="${CL_MACHINE}" 56 | 57 | #-------------------------------------------------------------------------- 58 | # Write out the OE bitbake configuration file. 59 | #-------------------------------------------------------------------------- 60 | mkdir -p ${OE_BUILD_DIR}/conf 61 | 62 | # There's no need to rewrite site.conf when changing MACHINE 63 | if [ ! -e ${OE_BUILD_DIR}/conf/site.conf ]; then 64 | cat > ${OE_BUILD_DIR}/conf/site.conf <<_EOF 65 | 66 | SCONF_VERSION = "1" 67 | 68 | # Where to store sources 69 | DL_DIR = "${OE_SOURCE_DIR}/downloads" 70 | 71 | # Where to save shared state 72 | SSTATE_DIR = "${OE_BUILD_DIR}/build/sstate-cache" 73 | 74 | # Which files do we want to parse: 75 | BBFILES ?= "${OE_SOURCE_DIR}/openembedded-core/meta/recipes-*/*/*.bb" 76 | 77 | TMPDIR = "${OE_BUILD_TMPDIR}" 78 | 79 | # Go through the Firewall 80 | #HTTP_PROXY = "http://${PROXYHOST}:${PROXYPORT}/" 81 | 82 | _EOF 83 | fi 84 | if [ ! -e ${OE_BUILD_DIR}/conf/auto.conf ]; then 85 | cat > ${OE_BUILD_DIR}/conf/auto.conf <<_EOF 86 | MACHINE ?= "${MACHINE}" 87 | _EOF 88 | else 89 | eval "sed -i -e 's/^MACHINE.*$/MACHINE ?= \"${MACHINE}\"/g' ${OE_BUILD_DIR}/conf/auto.conf" 90 | fi 91 | } 92 | 93 | ############################################################################### 94 | # SET_ENVIRONMENT() - Setup environment variables for OE development 95 | ############################################################################### 96 | function set_environment() 97 | { 98 | 99 | # Workaround for differences between yocto bitbake and vanilla bitbake 100 | export BBFETCH2=True 101 | 102 | export TAG 103 | 104 | #-------------------------------------------------------------------------- 105 | # If an env already exists, use it, otherwise generate it 106 | #-------------------------------------------------------------------------- 107 | 108 | if [ -e ${OE_ENV_FILE} ] ; then 109 | . ${OE_ENV_FILE} 110 | fi 111 | 112 | if [ x"${BASE_VERSION}" != x"${SCRIPTS_BASE_VERSION}" ] ; then 113 | echo "BASE_VERSION mismatch, recreating ${OE_ENV_FILE}" 114 | rm -f ${OE_ENV_FILE} ${OE_BUILD_DIR}/conf/site.conf 115 | fi 116 | 117 | if [ -e ${OE_ENV_FILE} ] ; then 118 | . ${OE_ENV_FILE} 119 | else 120 | 121 | mkdir -p ~/.oe/ 122 | 123 | #-------------------------------------------------------------------------- 124 | # Specify distribution information 125 | #-------------------------------------------------------------------------- 126 | DISTRO=$(grep -w DISTRO conf/local.conf | grep -v '^#' | awk -F\" '{print $2}') 127 | DISTRO_DIRNAME=`echo $DISTRO | sed s#[.-]#_#g` 128 | 129 | echo "export SCRIPTS_BASE_VERSION=${BASE_VERSION}" > ${OE_ENV_FILE} 130 | echo "export BBFETCH2=True" >> ${OE_ENV_FILE} 131 | 132 | echo "export DISTRO=\"${DISTRO}\"" >> ${OE_ENV_FILE} 133 | echo "export DISTRO_DIRNAME=\"${DISTRO_DIRNAME}\"" >> ${OE_ENV_FILE} 134 | 135 | #-------------------------------------------------------------------------- 136 | # Specify the root directory for your OpenEmbedded development 137 | #-------------------------------------------------------------------------- 138 | OE_BUILD_DIR=${OE_BASE} 139 | OE_BUILD_TMPDIR="${OE_BUILD_DIR}/build/tmp-${DISTRO_DIRNAME}" 140 | OE_SOURCE_DIR=${OE_BASE}/sources 141 | OE_LAYERS_TXT="${OE_SOURCE_DIR}/layers.txt" 142 | 143 | export BUILDDIR=${OE_BUILD_DIR} 144 | mkdir -p ${OE_BUILD_DIR} 145 | mkdir -p ${OE_SOURCE_DIR} 146 | export OE_BASE 147 | 148 | echo "export OE_BUILD_DIR=\"${OE_BUILD_DIR}\"" >> ${OE_ENV_FILE} 149 | echo "export BUILDDIR=\"${OE_BUILD_DIR}\"" >> ${OE_ENV_FILE} 150 | echo "export OE_BUILD_TMPDIR=\"${OE_BUILD_TMPDIR}\"" >> ${OE_ENV_FILE} 151 | echo "export OE_SOURCE_DIR=\"${OE_SOURCE_DIR}\"" >> ${OE_ENV_FILE} 152 | echo "export OE_LAYERS_TXT=\"${OE_LAYERS_TXT}\"" >> ${OE_ENV_FILE} 153 | 154 | echo "export OE_BASE=\"${OE_BASE}\"" >> ${OE_ENV_FILE} 155 | 156 | #-------------------------------------------------------------------------- 157 | # Include up-to-date bitbake in our PATH. 158 | #-------------------------------------------------------------------------- 159 | export PATH=${OE_SOURCE_DIR}/openembedded-core/scripts:${OE_SOURCE_DIR}/bitbake/bin:${PATH} 160 | 161 | echo "export PATH=\"${PATH}\"" >> ${OE_ENV_FILE} 162 | 163 | #-------------------------------------------------------------------------- 164 | # Make sure Bitbake doesn't filter out the following variables from our 165 | # environment. 166 | #-------------------------------------------------------------------------- 167 | export BB_ENV_EXTRAWHITE="MACHINE DISTRO TCLIBC TCMODE GIT_PROXY_COMMAND http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS" 168 | 169 | echo "export BB_ENV_EXTRAWHITE=\"${BB_ENV_EXTRAWHITE}\"" >> ${OE_ENV_FILE} 170 | 171 | #-------------------------------------------------------------------------- 172 | # Specify proxy information 173 | #-------------------------------------------------------------------------- 174 | if [ "x$PROXYHOST" != "x" ] ; then 175 | export http_proxy=http://${PROXYHOST}:${PROXYPORT}/ 176 | export ftp_proxy=http://${PROXYHOST}:${PROXYPORT}/ 177 | 178 | export SVN_CONFIG_DIR=${OE_BUILD_DIR}/subversion_config 179 | export GIT_CONFIG_DIR=${OE_BUILD_DIR}/git_config 180 | 181 | echo "export http_proxy=\"${http_proxy}\"" >> ${OE_ENV_FILE} 182 | echo "export ftp_proxy=\"${ftp_proxy}\"" >> ${OE_ENV_FILE} 183 | echo "export SVN_CONFIG_DIR=\"${SVN_CONFIG_DIR}\"" >> ${OE_ENV_FILE} 184 | echo "export GIT_CONFIG_DIR=\"${GIT_CONFIG_DIR}\"" >> ${OE_ENV_FILE} 185 | echo "export GIT_PROXY_COMMAND=\"\${GIT_CONFIG_DIR}/git-proxy.sh\"" >> ${OE_ENV_FILE} 186 | 187 | config_svn_proxy 188 | config_git_proxy 189 | fi 190 | 191 | #-------------------------------------------------------------------------- 192 | # Set up the bitbake path to find the OpenEmbedded recipes. 193 | #-------------------------------------------------------------------------- 194 | export BBPATH=${OE_BUILD_DIR}:${OE_SOURCE_DIR}/openembedded-core/meta${BBPATH_EXTRA} 195 | 196 | echo "export BBPATH=\"${BBPATH}\"" >> ${OE_ENV_FILE} 197 | 198 | #-------------------------------------------------------------------------- 199 | # Look for dash 200 | #-------------------------------------------------------------------------- 201 | if [ "$(readlink /bin/sh)" = "dash" ] ; then 202 | echo "/bin/sh is a symlink to dash, please point it to bash instead" 203 | exit 1 204 | fi 205 | 206 | echo "There now is a sourceable script in ~/.oe/enviroment. You can do '. ${OE_ENV_FILE}' and run 'bitbake something' without using $0 as wrapper" 207 | fi # if -e ${OE_ENV_FILE} 208 | 209 | if ! [ -e ${OE_BUILD_DIR}/conf/site.conf ] ; then 210 | config_oe 211 | fi 212 | 213 | } 214 | 215 | ############################################################################### 216 | # UPDATE_ALL() - Make sure everything is up to date 217 | ############################################################################### 218 | function update_all() 219 | { 220 | set_environment 221 | update_oe 222 | } 223 | 224 | ############################################################################### 225 | # CLEAN_OE() - Delete TMPDIR 226 | ############################################################################### 227 | function clean_oe() 228 | { 229 | set_environment 230 | echo "Cleaning ${OE_BUILD_TMPDIR}" 231 | rm -rf ${OE_BUILD_TMPDIR} 232 | } 233 | 234 | 235 | ############################################################################### 236 | # OE_BUILD() - Build an OE package or image 237 | ############################################################################### 238 | function oe_build() 239 | { 240 | if [ ! -e ${OE_BUILD_DIR}/conf/auto.conf ] ; then 241 | if [ -z $MACHINE ] ; then 242 | echo "No config found, please run $0 config first" 243 | else 244 | CL_MACHINE=$MACHINE 245 | set_environment 246 | config_oe && update_all 247 | fi 248 | fi 249 | 250 | set_environment 251 | if [ -e ${OE_ENV_FILE} ] ; then 252 | echo "Using ${OE_ENV_FILE} to setup needed variables. It is recommended to do '. ${OE_ENV_FILE}' and run 'bitbake something' without using $0 as wrapper" 253 | fi 254 | cd ${OE_BUILD_DIR} 255 | if [ -z $MACHINE ] ; then 256 | echo "Executing: bitbake" $* 257 | bitbake $* 258 | rc=$? 259 | if [[ $rc != 0 ]] ; then 260 | exit $rc 261 | fi 262 | else 263 | echo "Executing: MACHINE=${MACHINE} bitbake" $* 264 | MACHINE=${MACHINE} bitbake $* 265 | rc=$? 266 | if [[ $rc != 0 ]] ; then 267 | exit $rc 268 | fi 269 | fi 270 | } 271 | 272 | 273 | ############################################################################### 274 | # OE_CONFIG() - Configure OE for a target 275 | ############################################################################### 276 | function oe_config() 277 | { 278 | set_environment 279 | config_oe 280 | update_all 281 | 282 | echo "" 283 | echo "Setup for ${CL_MACHINE} completed" 284 | } 285 | 286 | ############################################################################### 287 | # UPDATE_OE() - Update OpenEmbedded distribution. 288 | ############################################################################### 289 | function update_oe() 290 | { 291 | if [ "x$PROXYHOST" != "x" ] ; then 292 | config_git_proxy 293 | fi 294 | 295 | #manage meta-openembedded and meta-angstrom with layerman 296 | env gawk -v command=update -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 297 | } 298 | 299 | ############################################################################### 300 | # CONFIG_SVN_PROXY() - Configure subversion proxy information 301 | ############################################################################### 302 | function config_svn_proxy() 303 | { 304 | if [ ! -f ${SVN_CONFIG_DIR}/servers ] 305 | then 306 | mkdir -p ${SVN_CONFIG_DIR} 307 | cat >> ${SVN_CONFIG_DIR}/servers <<_EOF 308 | [global] 309 | http-proxy-host = ${PROXYHOST} 310 | http-proxy-port = ${PROXYPORT} 311 | _EOF 312 | fi 313 | } 314 | 315 | 316 | ############################################################################### 317 | # CONFIG_GIT_PROXY() - Configure GIT proxy information 318 | ############################################################################### 319 | function config_git_proxy() 320 | { 321 | if [ ! -f ${GIT_CONFIG_DIR}/git-proxy.sh ] 322 | then 323 | mkdir -p ${GIT_CONFIG_DIR} 324 | cat > ${GIT_CONFIG_DIR}/git-proxy.sh <<_EOF 325 | if [ -x /bin/env ] ; then 326 | exec /bin/env corkscrew ${PROXYHOST} ${PROXYPORT} \$* 327 | else 328 | exec /usr/bin/env corkscrew ${PROXYHOST} ${PROXYPORT} \$* 329 | fi 330 | _EOF 331 | chmod +x ${GIT_CONFIG_DIR}/git-proxy.sh 332 | export GIT_PROXY_COMMAND=${GIT_CONFIG_DIR}/git-proxy.sh 333 | fi 334 | } 335 | 336 | ############################################################################### 337 | # tag_layers - Tag all layers with a given tag 338 | ############################################################################### 339 | function tag_layers() 340 | { 341 | set_environment 342 | env gawk -v command=tag -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 343 | echo $TAG >> ${OE_BASE}/tags 344 | } 345 | 346 | ############################################################################### 347 | # reset_layers - Remove all local changes including stash and ignored files 348 | ############################################################################### 349 | function reset_layers() 350 | { 351 | set_environment 352 | env gawk -v command=reset -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 353 | } 354 | 355 | ############################################################################### 356 | # changelog - Display changelog for all layers with a given tag 357 | ############################################################################### 358 | function changelog() 359 | { 360 | set_environment 361 | env gawk -v command=changelog -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 362 | } 363 | 364 | ############################################################################### 365 | # layer_info - Get layer info 366 | ############################################################################### 367 | function layer_info() 368 | { 369 | set_environment 370 | rm -f ${OE_SOURCE_DIR}/info.txt 371 | env gawk -v command=info -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 372 | echo 373 | echo "Showing contents of ${OE_SOURCE_DIR}/info.txt:" 374 | echo 375 | cat ${OE_SOURCE_DIR}/info.txt 376 | echo 377 | } 378 | 379 | ############################################################################### 380 | # checkout - Checkout all layers with a given tag 381 | ############################################################################### 382 | function checkout() 383 | { 384 | set_environment 385 | env gawk -v command=checkout -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 386 | } 387 | 388 | 389 | ############################################################################### 390 | # Build the specified OE packages or images. 391 | ############################################################################### 392 | 393 | # FIXME: convert to case/esac 394 | 395 | if [ $# -gt 0 ] 396 | then 397 | if [ $1 = "update" ] 398 | then 399 | update_all 400 | exit 0 401 | fi 402 | 403 | if [ $1 = "info" ] 404 | then 405 | layer_info 406 | exit 0 407 | fi 408 | 409 | if [ $1 = "reset" ] 410 | then 411 | reset_layers 412 | exit 0 413 | fi 414 | 415 | if [ $1 = "tag" ] 416 | then 417 | if [ -n "$2" ] ; then 418 | TAG="$2" 419 | else 420 | TAG="$(date -u +'%Y%m%d-%H%M')" 421 | fi 422 | tag_layers $TAG 423 | exit 0 424 | fi 425 | 426 | if [ $1 = "changelog" ] 427 | then 428 | if [ -z $2 ] ; then 429 | echo "Changelog needs an argument" 430 | exit 1 431 | else 432 | TAG="$2" 433 | fi 434 | changelog 435 | exit 0 436 | fi 437 | 438 | if [ $1 = "checkout" ] 439 | then 440 | if [ -z $2 ] ; then 441 | echo "Checkout needs an argument" 442 | exit 1 443 | else 444 | TAG="$2" 445 | fi 446 | checkout 447 | exit 0 448 | fi 449 | if [ $1 = "bitbake" ] 450 | then 451 | shift 452 | oe_build $* 453 | exit 0 454 | fi 455 | 456 | if [ $1 = "config" ] 457 | then 458 | shift 459 | CL_MACHINE=$1 460 | shift 461 | oe_config $* 462 | exit 0 463 | fi 464 | 465 | if [ $1 = "clean" ] 466 | then 467 | clean_oe 468 | exit 0 469 | fi 470 | fi 471 | 472 | # Help Screen 473 | echo "" 474 | echo "Usage: $0 config " 475 | echo " $0 update" 476 | echo " $0 reset" 477 | echo " $0 tag [tagname]" 478 | echo " $0 changelog " 479 | echo " $0 checkout " 480 | echo " $0 clean" 481 | echo "" 482 | echo " Not recommended, but also possible:" 483 | echo " $0 bitbake " 484 | echo " It is recommended to do '. ${OE_ENV_FILE}' and run 'bitbake something' inside ${BUILDDIR} without using oebb.sh as wrapper" 485 | echo "" 486 | echo "You must invoke \"$0 config \" and then \"$0 update\" prior" 487 | echo "to your first bitbake command" 488 | echo "" 489 | echo "The argument can be one of the following" 490 | echo " beagleboard: BeagleBoard" 491 | echo " qemuarm Emulated ARM machine" 492 | echo " qemumips: Emulated MIPS machine" 493 | echo " fri2-noemgd: Intel FRI2 machine without graphics" 494 | echo "" 495 | echo "Other machines are valid as well, but listing those would make this message way too long" 496 | -------------------------------------------------------------------------------- /scripts/layerman: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LAYERNAME=$1 4 | LAYERURI=$2 5 | BRANCH=$3 6 | REV=$4 7 | COMMAND=$5 8 | COMMANDARG=$6 9 | 10 | LAYERDIR="${OE_SOURCE_DIR}/${LAYERNAME}" 11 | 12 | LAYERINFO="layer repository name: ${LAYERNAME}\nlayer uri: ${LAYERURI}\nlayer branch/revision: ${BRANCH}/${REV}\n" 13 | 14 | function check_layer() { 15 | if ! [ -e ${LAYERDIR} ] ; then 16 | echo -e ${LAYERINFO} 17 | echo "Layer checkout missing at ${LAYERDIR}, creating one" 18 | git clone ${LAYERURI} ${LAYERDIR} 19 | cd ${LAYERDIR} 20 | 21 | if [ "${BRANCH}" != "master" ] ; then 22 | git checkout origin/${BRANCH} -b ${BRANCH} 23 | fi 24 | 25 | if [ "${REV}" != "HEAD" ] ; then 26 | git reset --hard ${REV} 27 | fi 28 | 29 | echo "Layers present in repository:" 30 | find ${LAYERDIR} -name "layer.conf" | sed -e s:${LAYERDIR}:${LAYERNAME}:g -e s:/conf/layer\.conf::g 31 | echo 32 | 33 | else 34 | cd ${LAYERDIR} 35 | CURRENTCOMMIT="$(git log --oneline --no-abbrev -1 | awk '{print $1}')" 36 | CURRENTBRANCH="$(git branch | grep '*' | awk '{print $2}')" 37 | CURRENTURI="$(git config remote.origin.url)" 38 | 39 | if [ "${CURRENTURI}" != "${LAYERURI}" ] ; then 40 | echo "WARNING!!!!" 41 | echo "WARNING: ${LAYERNAME} is using a different uri '${CURRENTURI}' than configured in layers.txt '${LAYERURI}'" 42 | echo "WARNING: Changing uri to: '${LAYERURI}'" 43 | echo "WARNING!!!!" 44 | git remote set-url origin ${LAYERURI} 45 | git remote update 46 | fi 47 | if [ "${CURRENTBRANCH}" != "${BRANCH}" ] ; then 48 | #echo -e ${LAYERINFO} 49 | echo "WARNING!!!!" 50 | echo "WARNING: ${LAYERNAME} is using a different branch '${CURRENTBRANCH}' than configured in layers.txt '${BRANCH}'" 51 | echo "WARNING: Changing branch to: '${BRANCH}'" 52 | echo "WARNING!!!!" 53 | git checkout origin/${BRANCH} -b ${BRANCH} >/dev/null || git checkout ${BRANCH} 54 | fi 55 | fi 56 | } 57 | 58 | 59 | function get_info() { 60 | check_layer 61 | 62 | cd ${LAYERDIR} 63 | CURRENTCOMMIT="$(git log --oneline --no-abbrev -1 | awk '{print $1}')" 64 | CURRENTBRANCH="$(git branch | grep '*' | awk '{print $2}')" 65 | 66 | echo "${LAYERNAME},${LAYERURI},${CURRENTBRANCH},${CURRENTCOMMIT}" >> ${OE_SOURCE_DIR}/info.txt 67 | } 68 | 69 | function update_layers() { 70 | check_layer 71 | 72 | echo -n "Processing ${LAYERNAME}: " 73 | 74 | if [ "${REV}" = "HEAD" ] ; then 75 | cd ${LAYERDIR} || exit 1 76 | git stash >&/dev/null && git pull --rebase && git stash pop >& /dev/null 77 | else 78 | cd ${LAYERDIR} || exit 1 79 | CURRENTCOMMIT="$(git log --oneline --no-abbrev -1 | awk '{print $1}')" 80 | CURRENTBRANCH="$(git branch | grep '*' | awk '{print $2}')" 81 | 82 | if [ "${BRANCH}" != "${CURRENTBRANCH}" ] ; then 83 | if [ "${REV}" != "${CURRENTCOMMIT}" ] ; then 84 | echo "WARNING!!!!" 85 | echo "WARNING: ${LAYERNAME} is using a different revision and branch than configured in layers.txt" 86 | echo "WARNING!!!!" 87 | fi 88 | else 89 | if [ "${REV}" != "${CURRENTCOMMIT}" ] ; then 90 | git remote update 91 | echo "updating to ${REV}" 92 | git stash >&/dev/null && git reset --hard ${REV} && git stash pop >& /dev/null 93 | else 94 | echo "Fixed to revision ${REV}, skipping update" 95 | fi 96 | fi 97 | fi 98 | } 99 | 100 | function tag_layers() { 101 | check_layer 102 | cd ${LAYERDIR} && echo "Tagging layer with $COMMANDARG" && git tag $COMMANDARG 103 | echo "" 104 | } 105 | 106 | function reset_layers() { 107 | check_layer 108 | if [ -e ${LAYERDIR} ] ; then 109 | echo "WARNING!!!!" 110 | echo "WARNING: ${LAYERNAME}: Removing local changes including stash and ignored files!!" 111 | echo "WARNING!!!!" 112 | git stash clear 113 | git clean -fdx 114 | if [ "${REV}" != "HEAD" ] ; then 115 | git reset --hard ${REV} 116 | else 117 | git reset --hard ${BRANCH} 118 | fi 119 | fi 120 | echo "" 121 | } 122 | 123 | function diff_tags() { 124 | check_layer 125 | cd ${LAYERDIR} && LOG="$(git shortlog $COMMANDARG)" 126 | if [ -n "$LOG" ] ; then 127 | echo "Changes to ${LAYERNAME} in between $COMMANDARG" && echo "" && echo "$LOG" 128 | echo "" 129 | fi 130 | } 131 | 132 | function checkout_tag() { 133 | check_layer 134 | cd ${LAYERDIR} && echo "Checking out $COMMANDARG" && git checkout $COMMANDARG 135 | echo "" 136 | } 137 | 138 | case $COMMAND in 139 | tag) 140 | tag_layers;; 141 | reset) 142 | reset_layers;; 143 | changelog) 144 | diff_tags;; 145 | info) 146 | get_info;; 147 | checkout) 148 | checkout_tag;; 149 | *) 150 | update_layers;; 151 | esac 152 | -------------------------------------------------------------------------------- /scripts/layers.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | FS =","; 3 | } 4 | 5 | $1 !~ "^#" { system("${OE_BASE}/scripts/layerman " $1 " " $2 " " $3 " " $4 " " command " " commandarg);} 6 | -------------------------------------------------------------------------------- /scripts/listpatches.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if ! [ -r layers.txt ] 6 | then 7 | cd sources 8 | fi 9 | 10 | sed -e '/^#\|^$/d' -e 's/,/ /g' layers.txt | while read dir repo branch rev 11 | do 12 | if [ $rev = "HEAD" ] 13 | then 14 | rev="origin/$branch" 15 | fi 16 | 17 | echo "Layer $dir" 18 | cd $dir 19 | git log --pretty=oneline $rev..HEAD 20 | git diff --stat HEAD 21 | git status -s 22 | cd - >/dev/null 23 | done 24 | -------------------------------------------------------------------------------- /scripts/listpending.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if ! [ -r layers.txt ] 6 | then 7 | cd sources 8 | fi 9 | 10 | sed -e '/^#\|^$/d' -e 's/,/ /g' layers.txt | while read dir repo branch rev 11 | do 12 | if [ $rev = "HEAD" ] 13 | then 14 | rev="origin/$branch" 15 | fi 16 | 17 | echo "Layer $dir" 18 | cd $dir 19 | git fetch origin 20 | git log --pretty=oneline HEAD..$rev 21 | cd - >/dev/null 22 | done 23 | -------------------------------------------------------------------------------- /sources/layers.txt: -------------------------------------------------------------------------------- 1 | bitbake,git://github.com/openembedded/bitbake.git,master,7e3a99949358f4362876df5a82f8aeaae72c3c97 2 | meta-angstrom,git://github.com/Angstrom-distribution/meta-angstrom,angstrom-v2012.12-yocto1.3,HEAD 3 | meta-openembedded,git://github.com/Angstrom-distribution/meta-oe.git,angstrom-staging-yocto1.3,HEAD 4 | meta-beagleboard,git://github.com/beagleboard/meta-beagleboard.git,danny,HEAD 5 | meta-ti,git://github.com/Angstrom-distribution/meta-ti.git,angstrom-staging-yocto1.3,HEAD 6 | meta-ettus,git://github.com/balister/meta-ettus.git,master,5a6a642f6707dc42a5210dbbf01d2bdfd869d4b0 7 | meta-efikamx,git://github.com/kraj/meta-efikamx.git,master,07f2a5c777b4f866985735303bc6d696592760a9 8 | meta-nslu2,git://github.com/kraj/meta-nslu2.git,master,8948458fe3ec2b3c713b2a13a87123b64e22b0d9 9 | meta-smartphone,http://git.shr-project.org/repo/meta-smartphone.git,danny,HEAD 10 | meta-intel,git://git.yoctoproject.org/meta-intel,danny,98342e9e685ac8066f7fe2517fd382127a286648 11 | meta-xilinx,git://git.yoctoproject.org/meta-xilinx-community,master,d196fa93c7ff5e080d4c44e2b83aed472f32b2c7 12 | meta-openpandora,git://github.com/openpandora/meta-openpandora.git,master,bdd973321efabf9da4ac7bbc5e18ecab257841a3 13 | meta-raspberrypi,git://github.com/djwillis/meta-raspberrypi.git,danny,HEAD 14 | meta-handheld,git://git.openembedded.org/meta-handheld,danny,HEAD 15 | meta-opie,git://github.com/bluelightning/meta-opie.git,master,c242efc6ca55772a88602f1f8f94dff697b38430 16 | meta-java,git://github.com/woglinde/meta-java.git,master,75dee76c7cfbf1418e5c581f50bb57b3282013f7 17 | meta-browser,git://github.com/Angstrom-distribution/meta-browser.git,angstrom-staging-yocto1.3,HEAD 18 | meta-mono,git://git.yoctoproject.org/meta-mono.git,master,adf47f078dbf788a80ff1398a15a4fd5a334d320 19 | meta-kde,https://git.gitorious.org/openembedded-core-layers/meta-kde.git,master,316d9c27e72cfebc7618268f8766624ee3f5e18e 20 | meta-linaro,git://github.com/Angstrom-distribution/meta-linaro.git,danny,HEAD 21 | meta-minnow,git://git.yoctoproject.org/meta-minnow,danny,HEAD 22 | meta-allwinner,git://github.com/naguirre/meta-allwinner.git,danny,HEAD 23 | meta-ros,git://github.com/bmwcarit/meta-ros.git,master,7e2cd2c0952ee35e30c8e3f9dc57f277d58419b8 24 | openembedded-core,git://github.com/Angstrom-distribution/oe-core.git,angstrom-staging-yocto1.3,HEAD 25 | meta-altera,git://git.rocketboards.org/meta-altera,angstrom-v2012.12-yocto1.3,HEAD 26 | --------------------------------------------------------------------------------