Skip to content

Commit

Permalink
[Marevell] Fix armhf build failure (sonic-net#9875)
Browse files Browse the repository at this point in the history
Signed-off-by: Rajkumar Pennadam Ramamoorthy <[email protected]>
  • Loading branch information
rajkumar38 authored and qiluo-msft committed Mar 1, 2022
1 parent 4d1abbc commit 82bf3b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions platform/marvell-armhf/sonic-platform-et6448m/entropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
RNDADDENTROPY=0x40085203

def avail():
with open("/proc/sys/kernel/random/entropy_avail", mode='r') as avail:
return int(avail.read())
if path.exists("/proc/sys/kernel/random/entropy_avail"):
with open("/proc/sys/kernel/random/entropy_avail", mode='r') as avail:
return int(avail.read())
else:
return int(2048)

if path.exists("/proc/sys/kernel/random/entropy_avail"):
while 1:
Expand Down
7 changes: 5 additions & 2 deletions platform/marvell-armhf/sonic-platform-nokia/entropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
RNDADDENTROPY=0x40085203

def avail():
with open("/proc/sys/kernel/random/entropy_avail", mode='r') as avail:
return int(avail.read())
if path.exists("/proc/sys/kernel/random/entropy_avail"):
with open("/proc/sys/kernel/random/entropy_avail", mode='r') as avail:
return int(avail.read())
else:
return int(2048)

if path.exists("/proc/sys/kernel/random/entropy_avail"):
while 1:
Expand Down

0 comments on commit 82bf3b6

Please sign in to comment.