If arch is riscv64, pass the QEMU_RESERVED_VA environment variable to install_root 50/316250/1
authorwangbiao <biao716.wang@samsung.com>
Thu, 12 Dec 2024 05:40:43 +0000 (14:40 +0900)
committerwangbiao <biao716.wang@samsung.com>
Thu, 12 Dec 2024 05:40:43 +0000 (14:40 +0900)
Change-Id: Ie4e8f4a3f3b875ef5f797dd2a1ef15724d60480a
Signed-off-by: wangbiao <biao716.wang@samsung.com>
mic/imager/baseimager.py

index 272ca7fd5b82f6cfcc8e4ee9ec7497d2f7cd9b69..ce4c248e12fea2bb65f66a0fd42b736d49c658bd 100644 (file)
@@ -1312,6 +1312,11 @@ class BaseImageCreator(object):
             if 'PATH' not in env:
                 env['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
 
+            #If arch is riscv64, pass the QEMU_RESERVED_VA environment variable to install_root
+            if self.target_arch == "riscv64" and 'QEMU_RESERVED_VA' in os.environ and 'QEMU_RESERVED_VA' not in env :
+                env['QEMU_RESERVED_VA'] = os.environ['QEMU_RESERVED_VA']
+                msger.debug("Set qemu environment variable QEMU_RESERVED_VA: %s for riscv64 arch" % env['QEMU_RESERVED_VA'])
+
             if not s.inChroot:
                 preexec = None
                 script = path