Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit ddd64b98 authored by Robert Nelson's avatar Robert Nelson
Browse files

weekly: tweak memory algrothim


Signed-off-by: default avatarRobert Nelson <robertcnelson@gmail.com>
parent f24d1b83
Branches
Tags
No related merge requests found
......@@ -62,8 +62,8 @@ beagle_x15="--dtb am57xx-beagle-x15 --rootfs_label rootfs \
cat > ${DIR}/deploy/gift_wrap_final_images.sh <<-__EOF__
#!/bin/bash
wait_till_2gb_free () {
memory=2048
wait_till_Xgb_free () {
memory=3072
free_memory=\$(free --mega | grep Mem | awk '{print \$7}')
until [ "\$free_memory" -gt "\$memory" ] ; do
free_memory=\$(free --mega | grep Mem | awk '{print \$7}')
......@@ -73,6 +73,7 @@ wait_till_2gb_free () {
}
copy_base_rootfs_to_mirror () {
wait_till_Xgb_free
if [ -d ${mirror_dir}/ ] ; then
if [ ! -d ${mirror_dir}/${time}/\${blend}/ ] ; then
mkdir -p ${mirror_dir}/${time}/\${blend}/ || true
......@@ -81,7 +82,6 @@ copy_base_rootfs_to_mirror () {
if [ ! -f ${mirror_dir}/${time}/\${blend}/\${base_rootfs}.tar.xz ] ; then
cp -v \${base_rootfs}.tar ${mirror_dir}/${time}/\${blend}/
cd ${mirror_dir}/${time}/\${blend}/
wait_till_2gb_free
${xz_tar} \${base_rootfs}.tar && sha256sum \${base_rootfs}.tar.xz > \${base_rootfs}.tar.xz.sha256sum &
cd -
fi
......@@ -113,6 +113,7 @@ extract_base_rootfs () {
}
copy_img_to_mirror () {
wait_till_Xgb_free
if [ -d ${mirror_dir} ] ; then
if [ ! -d ${mirror_dir}/${time}/\${blend}/ ] ; then
mkdir -p ${mirror_dir}/${time}/\${blend}/ || true
......@@ -130,7 +131,6 @@ copy_img_to_mirror () {
sync
fi
cd ${mirror_dir}/${time}/\${blend}/
wait_till_2gb_free
${xz_img} \${wfile}.img && sha256sum \${wfile}.img.xz > \${wfile}.img.xz.sha256sum &
cd -
fi
......
......@@ -35,8 +35,8 @@ am57xx_beagle_x15="--dtb am57xx-beagle-x15 --rootfs_label rootfs"
cat > ${DIR}/deploy/gift_wrap_final_images.sh <<-__EOF__
#!/bin/bash
wait_till_2gb_free () {
memory=2048
wait_till_Xgb_free () {
memory=3072
free_memory=\$(free --mega | grep Mem | awk '{print \$7}')
until [ "\$free_memory" -gt "\$memory" ] ; do
free_memory=\$(free --mega | grep Mem | awk '{print \$7}')
......@@ -46,6 +46,7 @@ wait_till_2gb_free () {
}
copy_base_rootfs_to_mirror () {
wait_till_Xgb_free
if [ -d ${mirror_dir}/ ] ; then
if [ ! -d ${mirror_dir}/${time}/\${blend}/ ] ; then
mkdir -p ${mirror_dir}/${time}/\${blend}/ || true
......@@ -54,7 +55,6 @@ copy_base_rootfs_to_mirror () {
if [ ! -f ${mirror_dir}/${time}/\${blend}/\${base_rootfs}.tar.xz ] ; then
cp -v \${base_rootfs}.tar ${mirror_dir}/${time}/\${blend}/
cd ${mirror_dir}/${time}/\${blend}/
wait_till_2gb_free
${xz_tar} \${base_rootfs}.tar && sha256sum \${base_rootfs}.tar.xz > \${base_rootfs}.tar.xz.sha256sum &
cd -
fi
......@@ -86,6 +86,7 @@ extract_base_rootfs () {
}
copy_img_to_mirror () {
wait_till_Xgb_free
if [ -d ${mirror_dir} ] ; then
if [ ! -d ${mirror_dir}/${time}/\${blend}/ ] ; then
mkdir -p ${mirror_dir}/${time}/\${blend}/ || true
......@@ -103,7 +104,6 @@ copy_img_to_mirror () {
sync
fi
cd ${mirror_dir}/${time}/\${blend}/
wait_till_2gb_free
${xz_img} \${wfile}.img && sha256sum \${wfile}.img.xz > \${wfile}.img.xz.sha256sum &
cd -
fi
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment