Repository: sonic-net/sonic-utilities

Issue:
sonic-installer install fails in armhf
<!--
    If you are reporting a new issue, make sure that we do not have any duplicates
    already open. You can ensure this by searching the issue list for this
    repository. If there is a duplicate, please close your issue and add a comment
    to the existing issue instead.

    If you suspect your issue is a bug, please edit your issue description to
    include the BUG REPORT INFORMATION shown below. If you fail to provide this
    information within 7 days, we cannot debug your issue and will close it. We
    will, however, reopen it if you later provide the information.

    For more information about reporting issues, see
    https://github.com/Azure/SONiC/wiki#report-issues

    ---------------------------------------------------
    GENERAL SUPPORT INFORMATION
    ---------------------------------------------------

    The GitHub issue tracker is for bug reports and feature requests.
    General support can be found at the following locations:

    - SONiC Support Forums - https://groups.google.com/forum/#!forum/sonicproject

    ---------------------------------------------------
    BUG REPORT INFORMATION
    ---------------------------------------------------
    Use the commands below to provide key information from your environment:
    You do NOT have to include this information if this is a FEATURE REQUEST
-->

#### Description

<!--
     Briefly describe the problem you are having in a few paragraphs.
-->
Sonic-installer failure log using install operation.

File “/usr/local/lib/python3.9/dist-packages/click/core.py”, line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File “/usr/local/lib/python3.9/dist-packages/click/core.py”, line 555, in invoke
    return callback(*args, **kwargs)
  File “/usr/local/lib/python3.9/dist-packages/sonic_installer/main.py”, line 543, in install
    if not skip_platform_check and not bootloader.verify_image_platform(image_path):
  File “/usr/local/lib/python3.9/dist-packages/sonic_installer/bootloader/uboot.py”, line 81, in verify_image_platform
    return os.path.isfile(image_path)
NameError: name ‘os’ is not defined

## Steps to reproduce the issue
1. sonic-installer install <image>


#### Describe the results you received


#### Describe the results you expected
sonic-installer to work seamlessly.

#### Additional information you deem important (e.g. issue happens only occasionally)


#### Output of `show version`

```
# show version

SONiC Software Version: SONiC.HEAD.0-dirty-20220302.124544
Distribution: Debian 11.2
Kernel: 5.10.0-8-2-armmp
Build commit: 94b778c39
Build date: Wed Mar  2 08:25:34 UTC 2022
Built by: marvell@cpss-build1

Platform: armhf-nokia_ixs7215_52x-r0
HwSKU: Nokia-7215
ASIC: marvell
ASIC Count: 1
Serial Number: NK203110011
Model Number: 3HE16794AARA01
Hardware Revision: N/A
Uptime: 16:49:12 up 33 min,  1 user,  load average: 0.21, 0.69, 0.82

Docker images:
REPOSITORY                 TAG                            IMAGE ID       SIZE
docker-dhcp-relay          latest                         39c289f394ba   484MB
docker-teamd               HEAD.0-dirty-20220302.124544   897670943f24   483MB
docker-teamd               latest                         897670943f24   483MB
docker-syncd-mrvl          HEAD.0-dirty-20220302.124544   ded0f3c5116c   607MB
docker-syncd-mrvl          latest                         ded0f3c5116c   607MB
docker-snmp                HEAD.0-dirty-20220302.124544   50b2af07aa43   514MB
docker-snmp                latest                         50b2af07aa43   514MB
docker-sflow               HEAD.0-dirty-20220302.124544   80d19598c760   484MB
docker-sflow               latest                         80d19598c760   484MB
docker-router-advertiser   HEAD.0-dirty-20220302.124544   ff951f4fa02e   474MB
docker-router-advertiser   latest                         ff951f4fa02e   474MB
docker-platform-monitor    HEAD.0-dirty-20220302.124544   87406f9f212c   695MB
docker-platform-monitor    latest                         87406f9f212c   695MB
docker-orchagent           HEAD.0-dirty-20220302.124544   fafd5ae1c574   571MB
docker-orchagent           latest                         fafd5ae1c574   571MB
docker-nat                 HEAD.0-dirty-20220302.124544   c6a2c3a9d794   485MB
docker-nat                 latest                         c6a2c3a9d794   485MB
docker-mux                 HEAD.0-dirty-20220302.124544   e1246be5c510   492MB
docker-mux                 latest                         e1246be5c510   492MB
docker-macsec              HEAD.0-dirty-20220302.124544   87fbc786165c   485MB
docker-macsec              latest                         87fbc786165c   485MB
docker-lldp                HEAD.0-dirty-20220302.124544   498091e0d9f6   478MB
docker-lldp                latest                         498091e0d9f6   478MB
docker-fpm-frr             HEAD.0-dirty-20220302.124544   95d1d947a343   497MB
docker-fpm-frr             latest                         95d1d947a343   497MB
docker-database            HEAD.0-dirty-20220302.124544   3e5047261b1c   471MB
docker-database            latest                         3e5047261b1c   471MB

```

<!--
     Also attach debug file produced by `sudo generate_dump`
-->




Discussion:

Resolving patch:
diff --git a/sonic_installer/bootloader/uboot.py b/sonic_installer/bootloader/uboot.py
--- a/sonic_installer/bootloader/uboot.py
+++ b/sonic_installer/bootloader/uboot.py
@@ -4,6 +4,7 @@
 
 import platform
 import subprocess
+import os
 
 import click
 


Test patch: