build/roms: create full release tarball name
set relname from option.sh under check_project() now the release logic simply has to move a directory Signed-off-by: Leah Rowe <leah@libreboot.org>20240612_branch
parent
36d45474c0
commit
189b70ddcb
13
build
13
build
|
@ -16,8 +16,7 @@ fi
|
||||||
. "include/vendor.sh"
|
. "include/vendor.sh"
|
||||||
. "include/mrc.sh"
|
. "include/mrc.sh"
|
||||||
|
|
||||||
eval "$(setvars "" script_path aur_notice vdir relname src_dirname srcdir \
|
eval "$(setvars "" script_path aur_notice vdir src_dirname srcdir _xm mode)"
|
||||||
_xm target romdir mode)"
|
|
||||||
err="fail"
|
err="fail"
|
||||||
|
|
||||||
linkpath="${0}"
|
linkpath="${0}"
|
||||||
|
@ -140,7 +139,6 @@ mkrelease()
|
||||||
check_project
|
check_project
|
||||||
|
|
||||||
vdir="${vdir}/${version}"
|
vdir="${vdir}/${version}"
|
||||||
relname="${projectname}-${version}"
|
|
||||||
[ "${mode}" = "u-boot" ] && relname="u-boot-for-${relname}"
|
[ "${mode}" = "u-boot" ] && relname="u-boot-for-${relname}"
|
||||||
src_dirname="${relname}_src"
|
src_dirname="${relname}_src"
|
||||||
srcdir="${vdir}/${src_dirname}"
|
srcdir="${vdir}/${src_dirname}"
|
||||||
|
@ -216,14 +214,7 @@ mkrom_images()
|
||||||
./build roms all || $err "${_xm}: roms-all"
|
./build roms all || $err "${_xm}: roms-all"
|
||||||
./build roms serprog rp2040 || $err "${_xm}: rp2040"
|
./build roms serprog rp2040 || $err "${_xm}: rp2040"
|
||||||
./build roms serprog stm32 || $err "${_xm}: stm32"
|
./build roms serprog stm32 || $err "${_xm}: stm32"
|
||||||
|
x_ mv bin ../roms
|
||||||
for rombuild in bin/*.tar.xz; do
|
|
||||||
[ -f "${rombuild}" ] || continue
|
|
||||||
tarball="release/$version/roms/${relname}_${rombuild##*/}"
|
|
||||||
mv "$rombuild" "$tarball" || $err "Cannot create $tarball"
|
|
||||||
done
|
|
||||||
|
|
||||||
mv "release/${version}/roms/" ../roms || $err "${_xm}: copy roms/"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mkversion()
|
mkversion()
|
||||||
|
|
|
@ -41,7 +41,8 @@ eval "$(setvars "" CONFIG_BOARD_DELL_E6400 CONFIG_HAVE_MRC CONFIG_HAVE_ME_BIN \
|
||||||
CONFIG_VGA_BIOS_FILE CONFIG_VGA_BIOS_ID CONFIG_GBE_BIN_PATH tmpdir _nogit \
|
CONFIG_VGA_BIOS_FILE CONFIG_VGA_BIOS_ID CONFIG_GBE_BIN_PATH tmpdir _nogit \
|
||||||
CONFIG_INCLUDE_SMSC_SCH5545_EC_FW CONFIG_SMSC_SCH5545_EC_FW_FILE version \
|
CONFIG_INCLUDE_SMSC_SCH5545_EC_FW CONFIG_SMSC_SCH5545_EC_FW_FILE version \
|
||||||
CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE _dest board boarddir lbmk_release \
|
CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE _dest board boarddir lbmk_release \
|
||||||
CONFIG_HAVE_REFCODE_BLOB CONFIG_REFCODE_BLOB_FILE threads projectname)"
|
CONFIG_HAVE_REFCODE_BLOB CONFIG_REFCODE_BLOB_FILE threads projectname \
|
||||||
|
relname)"
|
||||||
|
|
||||||
# if "y": a coreboot target won't be built if target.cfg says release="n"
|
# if "y": a coreboot target won't be built if target.cfg says release="n"
|
||||||
# (this is used to exclude certain build targets from releases)
|
# (this is used to exclude certain build targets from releases)
|
||||||
|
@ -169,6 +170,8 @@ check_project()
|
||||||
eval "[ -n \"\$$p\" ] || $err \"$p unset\""
|
eval "[ -n \"\$$p\" ] || $err \"$p unset\""
|
||||||
eval "x_ printf \"%s\\n\" \"\$$p\" > $p"
|
eval "x_ printf \"%s\\n\" \"\$$p\" > $p"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
relname="${projectname}-${version}"
|
||||||
export LOCALVERSION="-${projectname}-${version%%-*}"
|
export LOCALVERSION="-${projectname}-${version%%-*}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +181,7 @@ mktar_release()
|
||||||
printf "%s\n" "${versiondate}" > "${1}/versiondate" || return 1
|
printf "%s\n" "${versiondate}" > "${1}/versiondate" || return 1
|
||||||
printf "%s\n" "${projectname}" > "${1}/projectname" || return 1
|
printf "%s\n" "${projectname}" > "${1}/projectname" || return 1
|
||||||
|
|
||||||
mktarball "$1" "${1}.tar.xz"
|
mktarball "$1" "${1%/*}/${relname}_${1##*/}.tar.xz"
|
||||||
x_ rm -Rf "$1"
|
x_ rm -Rf "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,8 @@ handle_coreboot_target()
|
||||||
|
|
||||||
[ -d "bin/${board}" ] || return 0
|
[ -d "bin/${board}" ] || return 0
|
||||||
[ "$lbmk_release" = "y" ] || targets="* bin/${board}\n${targets}"
|
[ "$lbmk_release" = "y" ] || targets="* bin/${board}\n${targets}"
|
||||||
[ "$lbmk_release" = "y" ] && targets="* bin/$board.tar.xz\n$targets"
|
[ "$lbmk_release" = "y" ] && \
|
||||||
|
targets="* bin/${relname}_$board.tar.xz\n$targets"
|
||||||
[ "$lbmk_release" = "y" ] && mktar_release "bin/$board"; return 0
|
[ "$lbmk_release" = "y" ] && mktar_release "bin/$board"; return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue