Skip to content
Snippets Groups Projects
Select Git revision
  • 59d4b3056f87d0a6ae9806f297dc3f945c2d9444
  • v2018.2.x default
  • experimental
  • master
  • v2021.1.2-ffs
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • v2020.2.3-ffs
  • nrbffs/fastd-remove-delay
  • v2020.2.2-ffs
  • v2020.2.1-ffs
  • v2020.2-ffs
  • v2020.2.x
  • v2020.1.3-ffs
  • v2020.1.1-ffs
  • v2020.1-ffs
  • v2019.1.2-ffs
  • v2019.1.1-ffs
  • nrb/test-radv-filter
  • v2019.1-ffs
  • nrbffs/netgear-ex6120
  • v2021.1.2-ffs0.2
  • v2021.1.2-ffs0.1
  • v2021.1.1-ffs0.4
  • v2021.1.1-ffs0.3
  • v2021.1.1-ffs0.2
  • v2021.1.1-ffs0.1
  • v2021.1-ffs0.1
  • v2020.2.3-ffs0.3
  • v2020.2.3-ffs0.2
  • v2020.2.3-ffs0.1
  • v2020.2.2-ffs0.1
  • v2020.2.1-ffs0.1
  • v2020.2-ffs0.1
  • v2020.2
  • v2020.2.x-ffs0.1
  • v2020.1.3-ffs0.1
  • v2020.1.1-ffs0.1
  • v2020.1-ffs0.1
  • v2019.1.2-ffs0.1
  • v2019.1.1-ffs0.1
42 results

0063-scripts-om-fwupgradecfg-gen.sh-Fix-u-boot-image-md5sum-check.patch

Blame
  • Forked from firmware / FFS Gluon
    3784 commits behind the upstream repository.
    user avatar
    Matthias Schiffer authored
    For some reason, the filenames of the OpenMesh support patches were
    truncated.
    59d4b305
    History
    0063-scripts-om-fwupgradecfg-gen.sh-Fix-u-boot-image-md5sum-check.patch 1.76 KiB
    From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
    Date: Mon, 14 Sep 2015 20:10:10 +0000
    Subject: scripts/om-fwupgradecfg-gen.sh: Fix u-boot image md5sum check
    
    The u-boot on Open Mesh devices checks the whole transfered image against a
    md5sum. This is stored inside the option filemd5sum inside the
    fwupgrade.cfg. The bootloader will not check it when this setting is
    missing and could therefore write invalid images to the flash.
    
    Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
    
    Backport of r46925
    
    Forwarded: https://patchwork.ozlabs.org/patch/624189/
    
    diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh
    index c790214..fab1582 100644
    --- a/scripts/om-fwupgradecfg-gen.sh
    +++ b/scripts/om-fwupgradecfg-gen.sh
    @@ -48,6 +48,7 @@ ROOTFS_FLASH_ADDR=$(addr=$(($KERNEL_FLASH_ADDR + ($KERNEL_PART_SIZE * 1024))); p
     ROOTFS_SIZE=$(stat -c%s "$ROOTFS_PATH")
     ROOTFS_CHECK_BLOCKS=$((($ROOTFS_SIZE / $CHECK_BS) - $MD5_SKIP_BLOCKS))
     ROOTFS_MD5=$(md5=$(dd if=$ROOTFS_PATH bs=$CHECK_BS count=$ROOTFS_CHECK_BLOCKS 2>&- | md5sum); echo ${md5%% *})
    +ROOTFS_MD5_FULL=$(md5=$(md5sum $ROOTFS_PATH); echo ${md5%% *})
     ROOTFS_CHECK_SIZE=$(printf '0x%x' $(($ROOTFS_CHECK_BLOCKS * $CHECK_BS)))
     ROOTFS_PART_SIZE=$(($MAX_PART_SIZE - $KERNEL_PART_SIZE))
     
    @@ -55,6 +56,7 @@ cat << EOF > $CFG_OUT
     [vmlinux]
     filename=kernel
     md5sum=$KERNEL_MD5
    +filemd5sum=$KERNEL_MD5
     flashaddr=$KERNEL_FLASH_ADDR
     checksize=0x0
     cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; saveenv
    @@ -63,6 +65,7 @@ cmd_fail=reset
     [rootfs]
     filename=rootfs
     md5sum=$ROOTFS_MD5
    +filemd5sum=$ROOTFS_MD5_FULL
     flashaddr=$ROOTFS_FLASH_ADDR
     checksize=$ROOTFS_CHECK_SIZE
     cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; setenv rootfs_size_1 $ROOTFS_PART_SIZE; saveenv