Skip to content
Snippets Groups Projects
Select Git revision
  • dd76e0898d70a123d8e7f178384fec84890e5251
  • experimental default protected
  • v2023.2.5-ffs
  • nrb/ex400-remove-wps
  • nrb/airmax-test
  • v2023.2.4-ffs
  • nrb/ar9344-reset-sequence
  • autinerd/experimental-openwrt-24.10
  • v2023.2.3-ffs
  • v2023.2.2-ffs
  • v2023.2-ffs
  • v2023.1-ffs
  • v2022.1.4-ffs
  • feature/addMikrotikwAP
  • v2022.1.3-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • master protected
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • experimental-2025-06-25
  • experimental-2025-06-25-base
  • experimental-2025-06-24
  • experimental-2025-06-24-base
  • experimental-2025-06-22
  • experimental-2025-06-22-base
  • v2023.2.5-ffs0.1
  • experimental-2025-06-08
  • experimental-2025-06-08-base
  • experimental-2025-06-06
  • experimental-2025-06-06-base
  • experimental-2025-05-27
  • experimental-2025-05-27-base
  • experimental-2025-05-18
  • experimental-2025-05-18-base
  • experimental-2025-05-15
  • experimental-2025-05-15-base
  • experimental-2025-05-13
  • experimental-2025-05-13-base
  • experimental-2025-05-08
41 results

50-gluon-setup-mode

Blame
  • 0025-sunxi-sysupgrade-don-t-write-partitions-twice.patch 1.38 KiB
    From: Matthias Schiffer <mschiffer@universe-factory.net>
    Date: Thu, 4 May 2017 07:29:58 +0200
    Subject: sunxi: sysupgrade: don't write partitions twice
    
    When existing partitions are retained, the dd call writing the uboot image
    in the space before the first partition was accidentally writing the whole
    image, making the code for individual partitions redundant. Limit the copy
    to 1016KiB (the first 8KiB are skipped, and the first partition starts at
    1024KiB).
    
    In addition, conv=notrunc is replaced with conv=fsync. It seems this was an
    oversight, as notrunc doesn't make sense for block devices and all other dd
    commands use conv=fsync.
    
    Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
    
    diff --git a/target/linux/sunxi/base-files/lib/upgrade/platform.sh b/target/linux/sunxi/base-files/lib/upgrade/platform.sh
    index f2cd970d428a780d7497d8802765c656a47ff421..776bdf53bf89c5eafc24b7b59b943e12f3fab77e 100644
    --- a/target/linux/sunxi/base-files/lib/upgrade/platform.sh
    +++ b/target/linux/sunxi/base-files/lib/upgrade/platform.sh
    @@ -43,7 +43,7 @@ platform_do_upgrade() {
     			fi
     
     			#write uboot image
    -			get_image "$@" | dd of="$diskdev" bs=1024 skip=8 seek=8 conv=notrunc
    +			get_image "$@" | dd of="$diskdev" bs=1024 skip=8 seek=8 count=1016 conv=fsync
     			#iterate over each partition from the image and write it to the boot disk
     			while read part start size; do
     				part="$(($part - 2))"