1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: target/reference/build.sh
3 # Copyright (C) 2004 - 2023 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 build_result
="$build_toolchain/result"
21 if [ -f "$build_root/var/adm/cache/$pkg_name" ]; then
22 dir
="$build_result/package/$pkg_tree/$pkg_name"; mkdir
-p $dir
23 cp $build_root/var
/adm
/cache
/$pkg_name $dir/$pkg_name.cache
31 echo_header
"Finishing build."
33 mkdir
-p "$build_result/scripts"
35 echo_status
"Copying error logs and t2-debug data."
36 mkdir
-p $build_result/{errors
,t2-debug
,dep-debug
}
37 cp $build_root/var
/adm
/t2-debug
/* $build_result/t2-debug
/
38 cp $build_root/var
/adm
/dep-debug
/* $build_result/dep-debug
/
39 cp $build_root/var
/adm
/logs
/*.err
$build_result/errors
/
41 echo_status
"Creating package database ..."
42 admdir
="build/${SDECFG_ID}/var/adm"
43 create_package_db
$admdir build
/${SDECFG_ID}/TOOLCHAIN
/pkgs \
44 build
/${SDECFG_ID}/TOOLCHAIN
/pkgs
/packages.db
46 echo_status
"Creating isofs.txt file .."
47 cat << EOT > build/${SDECFG_ID}/TOOLCHAIN/isofs.txt
48 DISK1 $admdir/cache/ ${SDECFG_SHORTID}/info/cache/
49 DISK1 $admdir/cksums/ ${SDECFG_SHORTID}/info/cksums/
50 DISK1 $admdir/dependencies/ ${SDECFG_SHORTID}/info/dependencies/
51 DISK1 $admdir/descs/ ${SDECFG_SHORTID}/info/descs/
52 DISK1 $admdir/flists/ ${SDECFG_SHORTID}/info/flists/
53 DISK1 $admdir/md5sums/ ${SDECFG_SHORTID}/info/md5sums/
54 DISK1 $admdir/packages/ ${SDECFG_SHORTID}/info/packages/
55 EVERY build/${SDECFG_ID}/TOOLCHAIN/pkgs/packages.db ${SDECFG_SHORTID}/pkgs/packages.db
56 SPLIT build/${SDECFG_ID}/TOOLCHAIN/pkgs/ ${SDECFG_SHORTID}/pkgs/
59 echo_header
"Reference build finished."
61 cat <<- EOT > build/${SDECFG_ID}/TOOLCHAIN/result/copy-cache.sh
63 cd $base/build/${SDECFG_ID}/TOOLCHAIN/result
64 find package -type f | while read fn
65 do [ -f ../../../\${fn%.cache}.desc ] && cp -v \$fn ../../../\$fn; done
68 chmod +x build
/${SDECFG_ID}/TOOLCHAIN
/result
/copy-cache.sh
70 echo_status
"Results are stored in the directory"
71 echo_status
"build/$SDECFG_ID/TOOLCHAIN/result/."