Skip to content

Commit 2176400

Browse files
Staphylolguohan
authored andcommitted
[Aboot] Declare flash_size for all platform (#1171)
The flash_size parameter can then be used to compute the varlog_size
1 parent c5eba7d commit 2176400

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

files/Aboot/boot0.j2

+6-4
Original file line numberDiff line numberDiff line change
@@ -110,24 +110,26 @@ platform_specific() {
110110
# set varlog size to 100MB
111111
local varlog_size=100
112112

113-
# This is temporary as the platform= and sid= parameters don't provide enough
114-
# information to identify the SKU
115-
# An initramfs hook or a later processing done by the initscripts will be
116-
# required to read the system eeprom
113+
local flash_size=$(($(df | grep flash | tr -s ' ' | cut -f2 -d' ') / 1000))
114+
117115
if [ "$platform" = "raven" ]; then
118116
aboot_machine=arista_7050_qx32
117+
flash_size=2000
119118
echo "modprobe.blacklist=radeon" >>/tmp/append
120119
fi
121120
if [ "$platform" = "crow" ]; then
122121
aboot_machine=arista_7050_qx32s
122+
flash_size=3700
123123
echo "modprobe.blacklist=radeon" >>/tmp/append
124124
fi
125125
if [ "$sid" = "Upperlake" ] || [ "$sid" = "UpperlakeES" ]; then
126126
aboot_machine=arista_7060_cx32s
127+
flash_size=3700
127128
echo "amd_iommu=off" >> /tmp/append
128129
fi
129130
if [ "$sid" = "Gardena" ] || [ "$sid" = "GardenaSsd" ]; then
130131
aboot_machine=arista_7260cx3_64
132+
flash_size=28000
131133
fi
132134
if [ "$platform" = "rook" ]; then
133135
varlog_size=4096

0 commit comments

Comments
 (0)