Changeset 14838


Ignorieren:
Zeitstempel:
25.08.2018 13:08:22 (vor 4 Wochen)
Autor:
er13
Nachricht:

ensure sign_image uses tar provided by the Freetz build environment

also ensure it's exactly the same tar as used to create the unsigned image

Datei:
1 bearbeitet

Legende:

Unverändert
Hinzugefügt
Entfernt
  • trunk/fwmod

    r14613 r14838  
    17691769    fi 
    17701770 
    1771     # Pack firmware image (use old tar for compatibility) 
    1772     echo0 "packing $img_name" 
    1773     "$TAR" -C "$FIRMWARE_MOD_DIR" -cf "$img_name" ./var 
    1774     if [ $? -ne 0 ] || ! is_valid_tarball "$img_name"; then 
     1771    # Pack firmware image 
     1772    TAR_FOR_IMAGE_TARBALL="$TAR"       # use busybox tar for compatibility 
     1773#   TAR_FOR_IMAGE_TARBALL="$TAR_GNU"   # GNU tar requires --format=gnu option 
     1774    [ "$TAR_FOR_IMAGE_TARBALL" = "$TAR_GNU" ] && TAR_FOR_IMAGE_TARBALL_FORMAT_OPT="--format=gnu" 
     1775 
     1776    echo0 "packing ${img_name}" 
     1777    "${TAR_FOR_IMAGE_TARBALL}" ${TAR_FOR_IMAGE_TARBALL_FORMAT_OPT} -C "$FIRMWARE_MOD_DIR" -cf "${img_name}" ./var 
     1778    if [ $? -ne 0 ] || ! is_valid_tarball "${img_name}"; then 
    17751779        mv "${img_name}" "${img_name}.corrupted" 2>/dev/null 
    17761780        error 1 "packing of firmware image failed" 
     
    17791783 
    17801784    if [ "$DO_SIGN" -gt 0 ]; then 
    1781         echo0 "signing $img_name" 
     1785        echo0 "signing ${img_name}" 
    17821786        if [ -z "${FREETZ_FWMOD_SIGN_PRIVATE_KEY_PASSWORD}" ]; then 
    17831787            # be verbose if no private key password provided 
     1788            YF_SIGNIMAGE_TAR="${TAR_FOR_IMAGE_TARBALL}" \ 
    17841789            "${TOOLS_DIR}/yf/signimage/sign_image" "${img_name}" "${FREETZ_FWMOD_SIGN_PRIVATE_KEY_PASSWORD}"                               > "${img_name}.signed" 
    17851790        else 
     1791            YF_SIGNIMAGE_TAR="${TAR_FOR_IMAGE_TARBALL}" \ 
    17861792            "${TOOLS_DIR}/yf/signimage/sign_image" "${img_name}" "${FREETZ_FWMOD_SIGN_PRIVATE_KEY_PASSWORD}" 2>"${MOD_DIR}/sign_image.log" > "${img_name}.signed" 
    17871793        fi 
    1788         if [ $? -ne 0 ]; then 
     1794        if [ $? -ne 0 ] || ! is_valid_tarball "${img_name}.signed"; then 
    17891795            mv "${img_name}.signed" "${img_name}.signed.corrupted" 2>/dev/null 
    17901796            error 1 "signing of firmware image failed, see console output or ${MOD_DIR}/sign_image.log for details" 
Hinweis: Hilfe zur Verwendung der Changeset-Ansicht finden Sie unter TracChangeset.