Skip to content
Snippets Groups Projects
Select Git revision
  • fdb7303292512cdad495b65914c9d91501fb4f4a
  • v2018.2.x default protected
  • 0x4A6F-rpi4
  • 0x4A6F-master
  • master
  • v2018.2.2-ffs
  • v2016.2.4-batmanbug
  • radv-filterd
  • v2016.2.x
  • hoodselector
  • v2016.1.x
  • babel
  • v2015.1.x
  • 2014.4.x
  • 2014.3.x
  • v2018.2.2-ffs0.1
  • v2018.2.1-ffs0.1
  • v2018.2.1
  • v2018.2-ffs0.1
  • v2018.2
  • v2018.1.4
  • v2018.1.3
  • v2018.1.2
  • v2018.1.1
  • v2018.1
  • v2017.1.8
  • v2017.1.7
  • v2017.1.6
  • v2017.1.5
  • v2017.1.4
  • v2017.1.3
  • v2017.1.2
  • v2016.2.7
  • v2017.1.1
  • v2017.1
35 results

0017-x86-fix-platform_export_bootpart-for-Xen-virtual-disks.patch

Blame
  • Forked from firmware / FFS Gluon
    3666 commits behind, 40 commits ahead of the upstream repository.
    user avatar
    Matthias Schiffer authored
    fdb73032
    History
    0017-x86-fix-platform_export_bootpart-for-Xen-virtual-disks.patch 1.26 KiB
    From: Alexander Dahl <alex@netz39.de>
    Date: Thu, 17 Mar 2016 15:04:09 +0100
    Subject: x86: fix platform_export_bootpart() for Xen virtual disks
    
    Virtual disk devices in a Xen virtual machine (DomU) can be /dev/xvda,
    /dev/xvdb and so on with partitions like /dev/xdva1. Devices named like
    this where not considered before. This resulted in a non working
    sysupgrade, because the boot partition could not be found.
    
    Signed-off-by: Alexander Dahl <alex@netz39.de>
    Suggested-by: Matthias Schiffer <mschiffer@universe-factory.net>
    
    diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh b/target/linux/x86/base-files/lib/upgrade/platform.sh
    index 73ab5ef0794c942495d18865fa2c2498b84e63e6..adc119c897ed840aef17c2041a48244d0922564e 100644
    --- a/target/linux/x86/base-files/lib/upgrade/platform.sh
    +++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
    @@ -17,7 +17,7 @@ platform_export_bootpart() {
     			PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-02)
     				uuid="${disk#PARTUUID=}"
     				uuid="${uuid%-02}"
    -				for disk in /dev/[hsv]d[a-z]; do
    +				for disk in /dev/[hsv]d[a-z] /dev/xvd[a-z]; do
     					set -- $(dd if=$disk bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
     					if [ "$4$3$2$1" = "$uuid" ]; then
     						export BOOTPART="${disk}1"