From: <abe...@us...> - 2011-10-17 16:08:26
|
Revision: 5202 http://astlinux.svn.sourceforge.net/astlinux/?rev=5202&view=rev Author: abelbeck Date: 2011-10-17 16:08:17 +0000 (Mon, 17 Oct 2011) Log Message: ----------- add './scripts/master-build' script, to build images for all boards Modified Paths: -------------- branches/1.0/scripts/astlinux-makeimage Added Paths: ----------- branches/1.0/scripts/master-build Modified: branches/1.0/scripts/astlinux-makeimage =================================================================== --- branches/1.0/scripts/astlinux-makeimage 2011-10-17 13:07:58 UTC (rev 5201) +++ branches/1.0/scripts/astlinux-makeimage 2011-10-17 16:08:17 UTC (rev 5202) @@ -13,20 +13,6 @@ RUNFS_DIR="output/build/runfs" -make_release_version() -{ - ASTURL="$(LANG=C svn info | awk -F': ' '/^URL:/ { print $2 }')" - ASTBASE="$(basename ${ASTURL})" - ASTREV="$(LANG=C svn info | awk -F': ' '/^Last Changed Rev:/ { print $2 }')" - ASTEXTRA="" - - if [ "$(cat "project/astlinux/target_skeleton/etc/astlinux-release")" = "svn" ]; then - ASTVER="astlinux-${ASTBASE}-${ASTREV}${ASTEXTRA}" - else - ASTVER="$(cat "project/astlinux/target_skeleton/etc/astlinux-release")${ASTEXTRA}" - fi -} - # # put whatever edits you need to make to the VFAT filesystem here. # @@ -40,8 +26,6 @@ return 0 } -make_release_version - ASTRW_FORMAT= BOOT_ONLY= DUMP_PARTITIONS= @@ -97,6 +81,13 @@ exit 1 fi +ASTVER="$(cat ${RUNFS_DIR}/os/ver)" + +if [ -z "$ASTVER" ]; then + echo "astlinux-makeimage: missing runfs version file." >&2 + exit 1 +fi + if ! sudo /bin/true; then echo "astlinux-makeimage: You need to be a sudo group member to run this script" >&2 exit 1 Added: branches/1.0/scripts/master-build =================================================================== --- branches/1.0/scripts/master-build (rev 0) +++ branches/1.0/scripts/master-build 2011-10-17 16:08:17 UTC (rev 5202) @@ -0,0 +1,131 @@ +#!/bin/bash +# +# master-build output_path [ force ] +# + +FAT_SIZE=192 + +BOARDS="geni586 geni586-serial net5501 alix via via-serial viac7 viac7-serial net4801 wrap" + +RUNFS_DIR="output/build/runfs" + +output_path="$1" + +force="$2" + +if [ -z "$output_path" ]; then + echo "usage: master-build output_path [ force ]" + exit 1 +fi + +if [ -d "$output_path" ]; then + if [ "$force" = "force" ]; then + rm -rf "$output_path" + if ! mkdir "$output_path"; then + exit 1 + fi + else + echo "master-build: directory \"$output_path\" exists, use 'force' verb to override." + exit 1 + fi +else + if ! mkdir "$output_path"; then + exit 1 + fi +fi + +echo "Regenerate the initrd" +rm -f initrd.img + +# +# Build Asterisk 1.4 AstLinux +# + +echo "Cleaning out any existing builds..." +rm -rf output + +cp astlinux.config .config + +if ! mkdir "$output_path/firmware"; then + exit 1 +fi +if ! mkdir "$output_path/img"; then + exit 1 +fi + +for board in $BOARDS; do + + mkdir "$output_path/firmware/$board" + mkdir "$output_path/img/$board" + + ./scripts/build $board + + if [ $? -ne 0 ]; then + exit 1 + fi + + ASTVER="$(cat ${RUNFS_DIR}/os/ver)" + + if [ -z "$ASTVER" ]; then + echo "master-build: missing runfs version file." + exit 1 + fi + + ./scripts/astlinux-makeimage -z $FAT_SIZE $FAT_SIZE 0 + + mv "${ASTVER}.tar.gz" "$output_path/firmware/$board/${ASTVER}.tar.gz" + mv "${ASTVER}.tar.gz.sha1" "$output_path/firmware/$board/${ASTVER}.tar.gz.sha1" + mv "${ASTVER}.img.gz" "$output_path/img/$board/${ASTVER}.img.gz" + + rm -rf "${ASTVER}" +done + +# +# Build Asterisk 1.8 AstLinux +# + +echo "Cleaning out any existing builds..." +rm -rf output + +cp astlinux18.config .config + +if ! mkdir "$output_path/ast18-firmware"; then + exit 1 +fi +if ! mkdir "$output_path/ast18-img"; then + exit 1 +fi + +for board in $BOARDS; do + + mkdir "$output_path/ast18-firmware/$board" + mkdir "$output_path/ast18-img/$board" + + ./scripts/build $board + + if [ $? -ne 0 ]; then + exit 1 + fi + + ASTVER="$(cat ${RUNFS_DIR}/os/ver)" + + if [ -z "$ASTVER" ]; then + echo "master-build: missing runfs version file." + exit 1 + fi + + ./scripts/astlinux-makeimage -z $FAT_SIZE $FAT_SIZE 0 + + mv "${ASTVER}.tar.gz" "$output_path/ast18-firmware/$board/${ASTVER}.tar.gz" + mv "${ASTVER}.tar.gz.sha1" "$output_path/ast18-firmware/$board/${ASTVER}.tar.gz.sha1" + mv "${ASTVER}.img.gz" "$output_path/ast18-img/$board/${ASTVER}.img.gz" + + rm -rf "${ASTVER}" +done + +echo " +## +## Master Build Successful for ${ASTVER} +## +" + Property changes on: branches/1.0/scripts/master-build ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2012-05-21 17:44:08
|
Revision: 5543 http://astlinux.svn.sourceforge.net/astlinux/?rev=5543&view=rev Author: abelbeck Date: 2012-05-21 17:44:02 +0000 (Mon, 21 May 2012) Log Message: ----------- s3cmd scripts, add --acl-public option Modified Paths: -------------- branches/1.0/scripts/master-upload branches/1.0/scripts/upload-dl-pair branches/1.0/scripts/upload_script.sh Modified: branches/1.0/scripts/master-upload =================================================================== --- branches/1.0/scripts/master-upload 2012-05-12 00:47:12 UTC (rev 5542) +++ branches/1.0/scripts/master-upload 2012-05-21 17:44:02 UTC (rev 5543) @@ -20,7 +20,7 @@ local remote_dir="$1" files="$2" count="$3" IFS=' ' file for file in $files; do - s3cmd put "$file" "s3://astlinuxmirror/$remote_dir/${file##*/}" + s3cmd put --acl-public "$file" "s3://astlinuxmirror/$remote_dir/${file##*/}" done if [ $? -eq 0 ]; then Modified: branches/1.0/scripts/upload-dl-pair =================================================================== --- branches/1.0/scripts/upload-dl-pair 2012-05-12 00:47:12 UTC (rev 5542) +++ branches/1.0/scripts/upload-dl-pair 2012-05-21 17:44:02 UTC (rev 5543) @@ -14,6 +14,6 @@ sha1sum ${1} > ${1}.sha1 for file in ${1} ${1}.sha1; do - s3cmd put "$file" "s3://astlinuxfiles/${file##*/}" + s3cmd put --acl-public "$file" "s3://astlinuxfiles/${file##*/}" done Modified: branches/1.0/scripts/upload_script.sh =================================================================== --- branches/1.0/scripts/upload_script.sh 2012-05-12 00:47:12 UTC (rev 5542) +++ branches/1.0/scripts/upload_script.sh 2012-05-21 17:44:02 UTC (rev 5543) @@ -7,5 +7,5 @@ done if [ -z "$1" ]; then - s3cmd sync --exclude '*/*' -v dl/ s3://astlinuxfiles/ + s3cmd sync --acl-public --exclude '*/*' -v dl/ s3://astlinuxfiles/ fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2012-12-06 21:33:56
|
Revision: 5789 http://astlinux.svn.sourceforge.net/astlinux/?rev=5789&view=rev Author: abelbeck Date: 2012-12-06 21:33:48 +0000 (Thu, 06 Dec 2012) Log Message: ----------- Refactor master-build and master-upload scripts to easily specify Asterisk versions Modified Paths: -------------- branches/1.0/scripts/master-build branches/1.0/scripts/master-upload Modified: branches/1.0/scripts/master-build =================================================================== --- branches/1.0/scripts/master-build 2012-12-04 17:56:04 UTC (rev 5788) +++ branches/1.0/scripts/master-build 2012-12-06 21:33:48 UTC (rev 5789) @@ -49,6 +49,37 @@ sed -i 's:^BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="[^"]*":BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="project/astlinux/geni586/linux-smp.config":' .config } +set_asterisk_version() +{ + case $1 in + ast14) + CONFIG="astlinux.config" + ASTERISK_VERSION="$(awk -F'=' '/^ASTERISK_VERSION/ { if ($2 ~ /^ *1.4/) {print $2; exit} }' package/asterisk/asterisk.mk)" + ASTERISK_VERSION="asterisk-${ASTERISK_VERSION// /}" + FIRMWARE="firmware-1.x" + IMG="img" + ;; + ast18) + CONFIG="astlinux18.config" + ASTERISK_VERSION="$(awk -F'=' '/^ASTERISK_VERSION/ { if ($2 ~ /^ *1.8/) {print $2; exit} }' package/asterisk/asterisk.mk)" + ASTERISK_VERSION="asterisk-${ASTERISK_VERSION// /}" + FIRMWARE="ast18-firmware-1.x" + IMG="ast18-img" + ;; + ast11) + CONFIG="astlinux-ast11.config" + ASTERISK_VERSION="$(awk -F'=' '/^ASTERISK_VERSION/ { if ($2 ~ /^ *11./) {print $2; exit} }' package/asterisk/asterisk.mk)" + ASTERISK_VERSION="asterisk-${ASTERISK_VERSION// /}" + FIRMWARE="ast11-firmware-1.x" + IMG="ast11-img" + ;; + *) + echo "master-build: Unknown Asterisk Version." + exit 1 + ;; + esac +} + if [ -z "$output_path" ]; then echo "usage: master-build output_path [ force ]" exit 1 @@ -74,75 +105,42 @@ rm -f initrd.img # -# Build Asterisk 1.4 AstLinux +# Build Asterisk 1.4, 1.8 versions of AstLinux # -ASTERISK_VERSION="$(awk -F'=' '/^ASTERISK_VERSION/ { if ($2 ~ /^ *1.4/) {print $2; exit} }' package/asterisk/asterisk.mk)" -ASTERISK_VERSION="asterisk-${ASTERISK_VERSION// /}" +for asterisk in ast14 ast18; do -if ! mkdir "$output_path/firmware-1.x"; then - exit 1 -fi -if ! mkdir "$output_path/img"; then - exit 1 -fi + set_asterisk_version $asterisk -# Non-SMP Builds -echo "Cleaning out any existing builds..." -rm -rf output + if ! mkdir "$output_path/$FIRMWARE"; then + exit 1 + fi + if ! mkdir "$output_path/$IMG"; then + exit 1 + fi -cp astlinux.config .config + # Non-SMP Builds + echo "Cleaning out any existing builds..." + rm -rf output -for board in $BOARDS_NO_SMP; do - build_board "firmware-1.x" "img" -done + cp "$CONFIG" .config -# SMP Builds -echo "Cleaning out any existing builds..." -rm -rf output + for board in $BOARDS_NO_SMP; do + build_board "$FIRMWARE" "$IMG" + done -cp astlinux.config .config -set_smp_kernel + # SMP Builds + echo "Cleaning out any existing builds..." + rm -rf output -for board in $BOARDS_SMP; do - build_board "firmware-1.x" "img" -done + cp "$CONFIG" .config + set_smp_kernel -# -# Build Asterisk 1.8 AstLinux -# - -ASTERISK_VERSION="$(awk -F'=' '/^ASTERISK_VERSION/ { if ($2 ~ /^ *1.8/) {print $2; exit} }' package/asterisk/asterisk.mk)" -ASTERISK_VERSION="asterisk-${ASTERISK_VERSION// /}" - -if ! mkdir "$output_path/ast18-firmware-1.x"; then - exit 1 -fi -if ! mkdir "$output_path/ast18-img"; then - exit 1 -fi - -# Non-SMP Builds -echo "Cleaning out any existing builds..." -rm -rf output - -cp astlinux18.config .config - -for board in $BOARDS_NO_SMP; do - build_board "ast18-firmware-1.x" "ast18-img" + for board in $BOARDS_SMP; do + build_board "$FIRMWARE" "$IMG" + done done -# SMP Builds -echo "Cleaning out any existing builds..." -rm -rf output - -cp astlinux18.config .config -set_smp_kernel - -for board in $BOARDS_SMP; do - build_board "ast18-firmware-1.x" "ast18-img" -done - echo " ## ## Master Build Successful for ${ASTVER} Modified: branches/1.0/scripts/master-upload =================================================================== --- branches/1.0/scripts/master-upload 2012-12-04 17:56:04 UTC (rev 5788) +++ branches/1.0/scripts/master-upload 2012-12-06 21:33:48 UTC (rev 5789) @@ -3,12 +3,6 @@ # master-upload input_path # -MIRROR_IMG_PATH="downloads/img" - -MIRROR_FIRMWARE_PATH="firmware-1.x" - -MIRROR_FIRMWARE_PATH_18="ast18-firmware-1.x" - input_path="$1" auth_file="$HOME/.s3cfg" @@ -74,6 +68,34 @@ done } +set_asterisk_version() +{ + case $1 in + ast14) + FIRMWARE="firmware-1.x" + IMG="img" + MIRROR_FIRMWARE="$FIRMWARE" + MIRROR_IMG="downloads/img" + ;; + ast18) + FIRMWARE="ast18-firmware-1.x" + IMG="ast18-img" + MIRROR_FIRMWARE="$FIRMWARE" + MIRROR_IMG="downloads/img" + ;; + ast11) + FIRMWARE="ast11-firmware-1.x" + IMG="ast11-img" + MIRROR_FIRMWARE="$FIRMWARE" + MIRROR_IMG="downloads/img" + ;; + *) + echo "master-upload: Unknown Asterisk Version." + exit 1 + ;; + esac +} + if [ -z "$input_path" ]; then echo "Usage: master-upload input_path" exit 1 @@ -102,18 +124,22 @@ exit 1 fi -# Upload Asterisk 1.4 .tar.gz run images -upload_run_images "$input_path/firmware-1.x" "$MIRROR_FIRMWARE_PATH" +# +# Uplaod Asterisk 1.4, 1.8 versions of AstLinux +# -# Upload Asterisk 1.4 .img.gz flash images -upload_flash_images "$input_path/img" "$MIRROR_IMG_PATH" +for asterisk in ast14 ast18; do -# Upload Asterisk 1.8 .tar.gz run images -upload_run_images "$input_path/ast18-firmware-1.x" "$MIRROR_FIRMWARE_PATH_18" + set_asterisk_version $asterisk -# Upload Asterisk 1.8 .img.gz flash images -upload_flash_images "$input_path/ast18-img" "$MIRROR_IMG_PATH" + # Upload .tar.gz run images + upload_run_images "$input_path/$FIRMWARE" "$MIRROR_FIRMWARE" + # Upload .img.gz flash images + upload_flash_images "$input_path/$IMG" "$MIRROR_IMG" + +done + echo " ## ## Master Upload Finished for '$success_count' Images This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2012-12-17 17:58:03
|
Revision: 5817 http://astlinux.svn.sourceforge.net/astlinux/?rev=5817&view=rev Author: abelbeck Date: 2012-12-17 17:57:57 +0000 (Mon, 17 Dec 2012) Log Message: ----------- Darrick's master-build and master-upload scripts now support Asterisk 1.4, 1.8 and 11 Modified Paths: -------------- branches/1.0/scripts/master-build branches/1.0/scripts/master-upload Modified: branches/1.0/scripts/master-build =================================================================== --- branches/1.0/scripts/master-build 2012-12-17 17:52:36 UTC (rev 5816) +++ branches/1.0/scripts/master-build 2012-12-17 17:57:57 UTC (rev 5817) @@ -105,10 +105,10 @@ rm -f initrd.img # -# Build Asterisk 1.4, 1.8 versions of AstLinux +# Build Asterisk 1.4, 1.8 and 11 versions of AstLinux # -for asterisk in ast14 ast18; do +for asterisk in ast14 ast18 ast11; do set_asterisk_version $asterisk Modified: branches/1.0/scripts/master-upload =================================================================== --- branches/1.0/scripts/master-upload 2012-12-17 17:52:36 UTC (rev 5816) +++ branches/1.0/scripts/master-upload 2012-12-17 17:57:57 UTC (rev 5817) @@ -125,10 +125,10 @@ fi # -# Uplaod Asterisk 1.4, 1.8 versions of AstLinux +# Uplaod Asterisk 1.4, 1.8 and 11 versions of AstLinux # -for asterisk in ast14 ast18; do +for asterisk in ast14 ast18 ast11; do set_asterisk_version $asterisk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2013-02-01 15:19:56
|
Revision: 5940 http://astlinux.svn.sourceforge.net/astlinux/?rev=5940&view=rev Author: abelbeck Date: 2013-02-01 15:19:50 +0000 (Fri, 01 Feb 2013) Log Message: ----------- Change master-build and master-upload, no longer build via* boards or Asterisk 1.4 Modified Paths: -------------- branches/1.0/scripts/master-build branches/1.0/scripts/master-upload Modified: branches/1.0/scripts/master-build =================================================================== --- branches/1.0/scripts/master-build 2013-01-31 16:24:32 UTC (rev 5939) +++ branches/1.0/scripts/master-build 2013-02-01 15:19:50 UTC (rev 5940) @@ -11,7 +11,7 @@ BOARDS_SMP="geni586 geni586-serial" -BOARDS_NO_SMP="net5501 alix via via-serial viac7 viac7-serial" +BOARDS_NO_SMP="net5501 alix" RUNFS_DIR="output/build/runfs" @@ -105,10 +105,10 @@ rm -f initrd.img # -# Build Asterisk 1.4, 1.8 and 11 versions of AstLinux +# Build Asterisk 1.8 and 11 versions of AstLinux # -for asterisk in ast14 ast18 ast11; do +for asterisk in ast18 ast11; do set_asterisk_version $asterisk Modified: branches/1.0/scripts/master-upload =================================================================== --- branches/1.0/scripts/master-upload 2013-01-31 16:24:32 UTC (rev 5939) +++ branches/1.0/scripts/master-upload 2013-02-01 15:19:50 UTC (rev 5940) @@ -125,10 +125,10 @@ fi # -# Upload Asterisk 1.4, 1.8 and 11 versions of AstLinux +# Upload Asterisk 1.8 and 11 versions of AstLinux # -for asterisk in ast14 ast18 ast11; do +for asterisk in ast18 ast11; do set_asterisk_version $asterisk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-01-05 15:19:14
|
Revision: 6907 http://sourceforge.net/p/astlinux/code/6907 Author: abelbeck Date: 2015-01-05 15:19:07 +0000 (Mon, 05 Jan 2015) Log Message: ----------- Update 'master' scripts to include Asterisk 13 Modified Paths: -------------- branches/1.0/scripts/master-build branches/1.0/scripts/master-upload Modified: branches/1.0/scripts/master-build =================================================================== --- branches/1.0/scripts/master-build 2015-01-05 15:06:37 UTC (rev 6906) +++ branches/1.0/scripts/master-build 2015-01-05 15:19:07 UTC (rev 6907) @@ -66,6 +66,13 @@ FIRMWARE="ast11-firmware-1.x" IMG="ast11-img" ;; + ast13) + CONFIG="astlinux-ast13.config" + ASTERISK_VERSION="$(awk -F'=' '/^ASTERISK_VERSION/ { if ($2 ~ /^ *13./) {print $2; exit} }' package/asterisk/asterisk.mk)" + ASTERISK_VERSION="asterisk-${ASTERISK_VERSION// /}" + FIRMWARE="ast13-firmware-1.x" + IMG="ast13-img" + ;; *) echo "master-build: Unknown Asterisk Version." exit 1 @@ -98,10 +105,10 @@ rm -f initrd.img # -# Build Asterisk 1.8 and 11 versions of AstLinux +# Build Asterisk 1.8, 11 and 13 versions of AstLinux # -for asterisk in ast18 ast11; do +for asterisk in ast18 ast11 ast13; do set_asterisk_version $asterisk Modified: branches/1.0/scripts/master-upload =================================================================== --- branches/1.0/scripts/master-upload 2015-01-05 15:06:37 UTC (rev 6906) +++ branches/1.0/scripts/master-upload 2015-01-05 15:19:07 UTC (rev 6907) @@ -83,6 +83,12 @@ MIRROR_FIRMWARE="$FIRMWARE" MIRROR_IMG="downloads/img" ;; + ast13) + FIRMWARE="ast13-firmware-1.x" + IMG="ast13-img" + MIRROR_FIRMWARE="$FIRMWARE" + MIRROR_IMG="downloads/img" + ;; *) echo "master-upload: Unknown Asterisk Version." exit 1 @@ -119,10 +125,10 @@ fi # -# Upload Asterisk 1.8 and 11 versions of AstLinux +# Upload Asterisk 1.8, 11 and 13 versions of AstLinux # -for asterisk in ast18 ast11; do +for asterisk in ast18 ast11 ast13; do set_asterisk_version $asterisk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-05-20 01:43:14
|
Revision: 7073 http://sourceforge.net/p/astlinux/code/7073 Author: abelbeck Date: 2015-05-20 01:43:11 +0000 (Wed, 20 May 2015) Log Message: ----------- add php-timezonedb scripts Added Paths: ----------- branches/1.0/scripts/php-timezonedb/ branches/1.0/scripts/php-timezonedb/create-entry branches/1.0/scripts/php-timezonedb/create-entry2 branches/1.0/scripts/php-timezonedb/create-entry3 branches/1.0/scripts/php-timezonedb/create_dot_h_file branches/1.0/scripts/php-timezonedb/get-version branches/1.0/scripts/php-timezonedb/makearchive.sh branches/1.0/scripts/php-timezonedb/sort-index Added: branches/1.0/scripts/php-timezonedb/create-entry =================================================================== --- branches/1.0/scripts/php-timezonedb/create-entry (rev 0) +++ branches/1.0/scripts/php-timezonedb/create-entry 2015-05-20 01:43:11 UTC (rev 7073) @@ -0,0 +1,58 @@ +#!/usr/bin/php -qC +<?php +$zone = $argv[1]; +$path = $argv[2]; + +$dataf = "$path/$zone"; + +// obtain data from tz file +$tzdata = file_get_contents( $dataf, false, NULL, 20 ); + +if (($pos = strrpos($tzdata, 'TZif')) !== FALSE) { + $fdata = substr($tzdata, 0, $pos); +} else { + $fdata = $tzdata; +} + +// process extra info +$f = file( "$path/zone.tab" ); + +$cc = '??'; +$lat = $long = 0; +$desc = ''; + +foreach ( $f as $line ) +{ + $line = trim( $line ); + if ( strlen( $line ) < 5 || $line[0] == '#' ) + { + continue; + } + $parts = explode( "\t", $line ); + if ( $parts[2] == $zone ) + { + // format lang/lat + if ( strlen( $parts[1] ) == 11 ) + { + sscanf( $parts[1], '%c%2d%2d%c%3d%2d', $xSign, $xH, $xM, $ySign, $yH, $yM ); + $xS = $yS = 0; + } + else + { + sscanf( $parts[1], '%c%2d%2d%2d%c%3d%2d%2d', $xSign, $xH, $xM, $xS, $ySign, $yH, $yM, $yS ); + } + $lat = $xH + ( $xM / 60 ) + ( $xS / 3600 ); + $long = $yH + ( $yM / 60 ) + ( $yS / 3600 ); + $lat = $xSign == '+' ? $lat : -$lat; + $long = $ySign == '+' ? $long : -$long; + + $cc = $parts[0]; + $desc = isset( $parts[3] ) ? $parts[3] : ''; + + break; + } +} +//printf( '{ "%2s", %d, %d, "%s" },' . "\n", +// $cc, $lat * 100000, $long * 100000, addslashes( $desc ) ); +echo pack( 'a4ca2a13a*NNNa*', "PHP1", $cc != '??' || $zone == 'UTC', $cc, '', $fdata, ($lat + 90) * 100000, ($long + 180) * 100000, strlen( $desc ), $desc ); +?> Property changes on: branches/1.0/scripts/php-timezonedb/create-entry ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: branches/1.0/scripts/php-timezonedb/create-entry2 =================================================================== --- branches/1.0/scripts/php-timezonedb/create-entry2 (rev 0) +++ branches/1.0/scripts/php-timezonedb/create-entry2 2015-05-20 01:43:11 UTC (rev 7073) @@ -0,0 +1,7 @@ +#!/usr/bin/php -qC +<?php +$j = $argv[1]; +$l = $argv[2]; + +echo "\t{ ".sprintf('%-36s, 0x%06X', '"'.$j.'"', $l)." },\n"; +?> Property changes on: branches/1.0/scripts/php-timezonedb/create-entry2 ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: branches/1.0/scripts/php-timezonedb/create-entry3 =================================================================== --- branches/1.0/scripts/php-timezonedb/create-entry3 (rev 0) +++ branches/1.0/scripts/php-timezonedb/create-entry3 2015-05-20 01:43:11 UTC (rev 7073) @@ -0,0 +1,7 @@ +#!/usr/bin/php -qC +<?php +$j = $argv[1]; +$l = $argv[2]; + +echo "\t".sprintf('%s => 0x%06X', '"'.$j.'"', $l).",\n"; +?> Property changes on: branches/1.0/scripts/php-timezonedb/create-entry3 ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: branches/1.0/scripts/php-timezonedb/create_dot_h_file =================================================================== --- branches/1.0/scripts/php-timezonedb/create_dot_h_file (rev 0) +++ branches/1.0/scripts/php-timezonedb/create_dot_h_file 2015-05-20 01:43:11 UTC (rev 7073) @@ -0,0 +1,25 @@ +#!/usr/bin/php -qC +/* This is a generated file, do not modify */ +<?php + $index = include 'timezonedb.idx.php'; + $dta = file_get_contents('timezonedb.dta'); + $dta_l = strlen($dta); + $j = 0; + + echo "const unsigned char timelib_timezone_db_data_builtin[$dta_l] = {\n"; + for ($i = 0; $i < $dta_l; $i++) { + if (($key = array_search($i, $index)) !== false) { + echo "\n\n/* $key */\n"; + $j = 0; + } + if ($j % 16 != 0) { + echo " "; + } + printf("0x%02X,", ord($dta[$i])); + if ($j % 16 == 15) { + echo "\n"; + } + $j++; + } + echo "};\n"; +?> Property changes on: branches/1.0/scripts/php-timezonedb/create_dot_h_file ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: branches/1.0/scripts/php-timezonedb/get-version =================================================================== --- branches/1.0/scripts/php-timezonedb/get-version (rev 0) +++ branches/1.0/scripts/php-timezonedb/get-version 2015-05-20 01:43:11 UTC (rev 7073) @@ -0,0 +1,10 @@ +#!/usr/bin/php -qC +<?php +$ver = $argv[1]; + +if (preg_match('@([0-9]{4})([a-z])@', $ver, $a)) { + echo $a[1].'.'.(ord($a[2]) - ord('a') + 1); +} else { + echo $ver; +} +?> Property changes on: branches/1.0/scripts/php-timezonedb/get-version ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: branches/1.0/scripts/php-timezonedb/makearchive.sh =================================================================== --- branches/1.0/scripts/php-timezonedb/makearchive.sh (rev 0) +++ branches/1.0/scripts/php-timezonedb/makearchive.sh 2015-05-20 01:43:11 UTC (rev 7073) @@ -0,0 +1,77 @@ +#!/bin/bash + +## Generate version "1" PHP timezonedb.h file +## Credit: Derick Rethans +## https://github.com/derickr/timelib/tree/master/zones +## +## Adapted for AstLinux by Lonnie Abelbeck + +SCRIPTS="./scripts/php-timezonedb" + +if [ -n "$1" ]; then + TZDATA="$1" +else + TZDATA="output/target/usr/share/zoneinfo" +fi + +if [ ! -f $TZDATA/.tzversion ]; then + echo "File not found: $TZDATA/.tzversion" + exit 1 +fi +version="$($SCRIPTS/get-version "$(cat $TZDATA/.tzversion)")" + +rm -f timezonedb.idx timezonedb.idx.php timezonedb.dta +touch timezonedb.idx timezonedb.dta + +echo "Building index:" +echo "<?php return array(" >> timezonedb.idx.php +for i in $(find $TZDATA -type f | sort); do + l=$(stat -c "%s" timezonedb.dta) + j=${i#$TZDATA/} + + case $j in + .*|*.tab) + ;; + *) + $SCRIPTS/create-entry $j $TZDATA >> timezonedb.dta + $SCRIPTS/create-entry2 $j $l >> timezonedb.idx + $SCRIPTS/create-entry3 $j $l >> timezonedb.idx.php + echo "- $j" + ;; + esac +done +echo "); ?>" >> timezonedb.idx.php +echo "" + +echo "Sorting index:" +$SCRIPTS/sort-index > timezonedb.idx.tmp +mv timezonedb.idx.tmp timezonedb.idx +echo "" + +echo "Creating .h file:" +echo -n "const timelib_tzdb_index_entry timezonedb_idx_builtin[" > timezonedb.h +echo -n $(cat timezonedb.idx | wc -l ) >> timezonedb.h +echo "] = {" >> timezonedb.h +cat timezonedb.idx >> timezonedb.h +echo "};" >> timezonedb.h + +$SCRIPTS/create_dot_h_file >> timezonedb.h +echo "" >> timezonedb.h +echo -n "const timelib_tzdb timezonedb_builtin = { \"$version\", " >> timezonedb.h +echo -n $(cat timezonedb.idx | wc -l ) >> timezonedb.h +echo ", timezonedb_idx_builtin, timelib_timezone_db_data_builtin };" >> timezonedb.h +echo "" + +echo "Packaging:" +mkdir "timezonedb-$version" +mv timezonedb.h "timezonedb-$version" +tar czvf "timezonedb-$version.tar.gz" "timezonedb-$version" +echo "" + +echo "Cleanup:" +rm -rf "timezonedb-$version" +rm -f timezonedb.idx timezonedb.idx.php timezonedb.dta +echo "" + +echo "Done" + Property changes on: branches/1.0/scripts/php-timezonedb/makearchive.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: branches/1.0/scripts/php-timezonedb/sort-index =================================================================== --- branches/1.0/scripts/php-timezonedb/sort-index (rev 0) +++ branches/1.0/scripts/php-timezonedb/sort-index 2015-05-20 01:43:11 UTC (rev 7073) @@ -0,0 +1,18 @@ +#!/usr/bin/php -qC +<?php + $idx = file("timezonedb.idx"); + usort($idx, 'sortfunc'); + echo implode($idx); + + function sortfunc($a, $b) + { + /* Grep tz names */ + preg_match('@"([^"]+)"@', $a, $ma); + $na = $ma[1]; + preg_match('@"([^"]+)"@', $b, $mb); + $nb = $mb[1]; + + $val = strcasecmp($na, $nb); + return $val; + } +?> Property changes on: branches/1.0/scripts/php-timezonedb/sort-index ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2016-02-08 17:15:01
|
Revision: 7509 http://sourceforge.net/p/astlinux/code/7509 Author: abelbeck Date: 2016-02-08 17:15:00 +0000 (Mon, 08 Feb 2016) Log Message: ----------- update master-build and master-upload for ISO installer images Modified Paths: -------------- branches/1.0/scripts/master-build branches/1.0/scripts/master-upload Modified: branches/1.0/scripts/master-build =================================================================== --- branches/1.0/scripts/master-build 2016-02-05 16:17:55 UTC (rev 7508) +++ branches/1.0/scripts/master-build 2016-02-08 17:15:00 UTC (rev 7509) @@ -9,6 +9,8 @@ FAT_SIZE=256 +REQUIRED_CMDS="which sudo genisoimage sha1sum" + BOARDS_SMP64="genx86_64 genx86_64-serial" BOARDS_SMP="geni586 geni586-serial" @@ -19,11 +21,8 @@ build_board() { - local firmware="$1" img="$2" + local firmware="$1" - mkdir "$output_path/$firmware/$board" - mkdir "$output_path/$img/$board" - ./scripts/build $board if [ $? -ne 0 ]; then @@ -39,9 +38,12 @@ ./scripts/astlinux-makeimage -z $FAT_SIZE $FAT_SIZE 0 + mkdir "$output_path/$firmware/$board" + mkdir -p "$output_path/img/${ASTVER}-${board}" + mv "${ASTVER}.tar.gz" "$output_path/$firmware/$board/${ASTVER}.tar.gz" mv "${ASTVER}.tar.gz.sha1" "$output_path/$firmware/$board/${ASTVER}.tar.gz.sha1" - mv "${ASTVER}.img.gz" "$output_path/$img/$board/${board}-${ASTVER#astlinux-}-${ASTERISK_VERSION}.img.gz" + mv "${ASTVER}.img.gz" "$output_path/img/${ASTVER}-${board}/${board}-${ASTVER#astlinux-}-${ASTERISK_VERSION}.img.gz" rm -rf "${ASTVER}" } @@ -59,21 +61,18 @@ ASTERISK_VERSION="$(awk -F'=' '/^ASTERISK_VERSION/ { if ($2 ~ /^ *1.8/) {print $2; exit} }' package/asterisk/asterisk.mk)" ASTERISK_VERSION="asterisk-${ASTERISK_VERSION// /}" FIRMWARE="ast18-firmware-1.x" - IMG="ast18-img" ;; ast11) CONFIG="astlinux-ast11.config" ASTERISK_VERSION="$(awk -F'=' '/^ASTERISK_VERSION/ { if ($2 ~ /^ *11./) {print $2; exit} }' package/asterisk/asterisk.mk)" ASTERISK_VERSION="asterisk-${ASTERISK_VERSION// /}" FIRMWARE="ast11-firmware-1.x" - IMG="ast11-img" ;; ast13) CONFIG="astlinux-ast13.config" ASTERISK_VERSION="$(awk -F'=' '/^ASTERISK_VERSION/ { if ($2 ~ /^ *13./) {print $2; exit} }' package/asterisk/asterisk.mk)" ASTERISK_VERSION="asterisk-${ASTERISK_VERSION// /}" FIRMWARE="ast13-firmware-1.x" - IMG="ast13-img" ;; *) echo "master-build: Unknown Asterisk Version." @@ -103,6 +102,28 @@ fi fi +if ! mkdir "$output_path/img"; then + exit 1 +fi +if ! mkdir "$output_path/iso"; then + exit 1 +fi + +error=0 +for i in $REQUIRED_CMDS; do + if ! which $i >/dev/null 2>&1; then + error=1 + echo "master-build: Required command \"$i\" is missing in your build environment." >&2 + if [ "$i" = "which" ]; then # no use proceeding + break + fi + fi +done +if [ $error -ne 0 ]; then + echo "Missing Required Command(s)." >&2 + exit 1 +fi + echo " Trying sudo, if this prompts for a password, ^C and 'sudoedit /etc/sudoers' and add a line at the end something like: @@ -128,9 +149,6 @@ if ! mkdir "$output_path/$FIRMWARE"; then exit 1 fi - if ! mkdir "$output_path/$IMG"; then - exit 1 - fi # Non-SMP Builds echo "Cleaning out any existing builds..." @@ -139,7 +157,7 @@ cp "$CONFIG" .config for board in $BOARDS_NO_SMP; do - build_board "$FIRMWARE" "$IMG" + build_board "$FIRMWARE" done # SMP Builds @@ -150,7 +168,7 @@ set_smp_kernel for board in $BOARDS_SMP; do - build_board "$FIRMWARE" "$IMG" + build_board "$FIRMWARE" done # SMP64 Builds @@ -160,10 +178,32 @@ cp "x86_64-configs/$CONFIG" .config for board in $BOARDS_SMP64; do - build_board "$FIRMWARE" "$IMG" + build_board "$FIRMWARE" done done +# AstLinux ISO Installer +echo "Cleaning out any existing builds..." +rm -rf output + +cp runnix-iso.config .config + +for board in $BOARDS_NO_SMP $BOARDS_SMP $BOARDS_SMP64; do + if [ "${board}" != "${board%-serial}" -o "$board" = "alix" -o "$board" = "net5501" ]; then + SERIAL="serial" + else + SERIAL="" + fi + ./scripts/build-runnix-iso "$output_path/img/${ASTVER}-${board}" $SERIAL + if [ $? -ne 0 ]; then + exit 1 + fi + if [ ! -f "${ASTVER}-${board}.iso" ]; then + exit 1 + fi + mv "${ASTVER}-${board}.iso" "$output_path/iso/" +done + echo " ## ## Master Build Successful for ${ASTVER} Modified: branches/1.0/scripts/master-upload =================================================================== --- branches/1.0/scripts/master-upload 2016-02-05 16:17:55 UTC (rev 7508) +++ branches/1.0/scripts/master-upload 2016-02-08 17:15:00 UTC (rev 7509) @@ -55,15 +55,22 @@ { local local_dir="$1" firmware_path="$2" - for board in $(ls -1 "$local_dir"); do - echo "Flash Image for Board: $board" - file="$(ls -1 "$local_dir/$board/"*.img.gz | head -n1)" - if [ -n "$file" ]; then - upload_file "$firmware_path/$board" "$file" count - else - echo "master-upload: missing file(s) in \"$local_dir/$board/\"" - exit 1 - fi + for astver_board in $(ls -1 "$local_dir"); do + for file in $(ls -1 "$local_dir/$astver_board/"*.img.gz); do + echo "Flash Image: ${file##*/}" + upload_file "$firmware_path/$astver_board" "$file" count + echo "" + done + done +} + +upload_iso_images() +{ + local local_dir="$1" firmware_path="$2" + + for file in $(ls -1 "$local_dir/"*.iso); do + echo "ISO Image: ${file##*/}" + upload_file "$firmware_path" "$file" count echo "" done } @@ -73,21 +80,15 @@ case $1 in ast18) FIRMWARE="ast18-firmware-1.x" - IMG="ast18-img" MIRROR_FIRMWARE="$FIRMWARE" - MIRROR_IMG="downloads/img" ;; ast11) FIRMWARE="ast11-firmware-1.x" - IMG="ast11-img" MIRROR_FIRMWARE="$FIRMWARE" - MIRROR_IMG="downloads/img" ;; ast13) FIRMWARE="ast13-firmware-1.x" - IMG="ast13-img" MIRROR_FIRMWARE="$FIRMWARE" - MIRROR_IMG="downloads/img" ;; *) echo "master-upload: Unknown Asterisk Version." @@ -105,16 +106,18 @@ echo "master-upload: directory \"$input_path\" not found." exit 1 else + check_iso=0 check_img=0 check_firmware=0 for dir in $(ls -1 "$input_path"); do case $dir in - *img) check_img=1 ;; + iso) check_iso=1 ;; + img) check_img=1 ;; *firmware-1.x) check_firmware=1 ;; esac done - if [ $check_img -eq 0 -o $check_firmware -eq 0 ]; then - echo "master-upload: missing img/firmware-1.x directories." + if [ $check_iso -eq 0 -o $check_img -eq 0 -o $check_firmware -eq 0 ]; then + echo "master-upload: missing iso/img/firmware-1.x directories." exit 1 fi fi @@ -124,9 +127,6 @@ exit 1 fi -# -# Upload Asterisk 1.8, 11 and 13 versions of AstLinux -# for asterisk in ast18 ast11 ast13; do @@ -135,11 +135,15 @@ # Upload .tar.gz run images upload_run_images "$input_path/$FIRMWARE" "$MIRROR_FIRMWARE" - # Upload .img.gz flash images - upload_flash_images "$input_path/$IMG" "$MIRROR_IMG" - done +# Upload .img.gz flash images +upload_flash_images "$input_path/img" "downloads/img" + +# Upload .iso installer images +upload_iso_images "$input_path/iso" "downloads/iso" + + echo " ## ## Master Upload Finished for '$success_count' Images This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |