Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Yana Timoshenko
coreboot-files
Commits
fa5ef159
Commit
fa5ef159
authored
Aug 13, 2018
by
Youness Alaoui
Browse files
Only fetch the serial from local machine if user wants to
parent
263497ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
build_coreboot.sh
View file @
fa5ef159
...
...
@@ -517,10 +517,6 @@ if [ "$blobs" == "1" ] || [ "$blobs" == "2" ]; then
echo
"Using 'sudo flashrom' to grab the local machine's flash content"
sudo
./flashrom/flashrom
-p
internal:laptop
=
force_I_want_a_brick,ich_spi_mode
=
hwseq
-r
../coreboot-orig.rom
fi
if
[
$SKL
-eq
1
]
;
then
echo
"Using 'sudo dmidecode' to grab the local machine's serial number"
DMIDECODE_SERIAL_NUMBER
=
$(
sudo
dmidecode
-t
1 |
grep
"Serial Number"
|
cut
-d
' '
-f
3-
)
fi
./util/ifdtool/ifdtool
-x
../coreboot-orig.rom
rm
flashregion_1_bios.bin
...
...
@@ -581,16 +577,11 @@ if [ $SKL -eq 1 ]; then
else
COREBOOT_SERIAL_OPT
=
"0"
fi
if
[
"
$DMIDECODE_SERIAL_NUMBER
"
!=
""
]
;
then
DMIDECODE_SERIAL_OPT
=
$((
COREBOOT_SERIAL_OPT
+
1
))
MANUAL_SERIAL_OPT
=
$((
DMIDECODE_SERIAL_OPT
+
1
))
echo
"
${
DMIDECODE_SERIAL_OPT
}
- Extracted from your system using 'dmidecode' (
${
DMIDECODE_SERIAL_NUMBER
}
)"
else
DMIDECODE_SERIAL_OPT
=
0
MANUAL_SERIAL_OPT
=
$((
COREBOOT_SERIAL_OPT
+
1
))
fi
echo
"
${
MANUAL_SERIAL_OPT
}
- Enter serial number manually"
DMIDECODE_SERIAL_OPT
=
$((
COREBOOT_SERIAL_OPT
+
1
))
MANUAL_SERIAL_OPT
=
$((
DMIDECODE_SERIAL_OPT
+
1
))
NO_SERIAL_OPT
=
$((
MANUAL_SERIAL_OPT
+
1
))
echo
"
${
DMIDECODE_SERIAL_OPT
}
- Fetch the serial number from your local system"
echo
"
${
MANUAL_SERIAL_OPT
}
- Enter serial number manually"
echo
"
${
NO_SERIAL_OPT
}
- Do not set a serial number"
echo
""
...
...
@@ -608,6 +599,33 @@ if [ $SKL -eq 1 ]; then
echo
"Invalid choice"
serial
=
0
fi
if
[
"
$serial
"
==
"
${
DMIDECODE_SERIAL_OPT
}
"
]
;
then
echo
"Using 'sudo dmidecode' to grab the local machine's serial number"
DMIDECODE_SERIAL_NUMBER
=
$(
sudo
dmidecode
-t
1 |
grep
"Serial Number"
|
cut
-d
' '
-f
3-
)
clear
echo
"Which serial number do you want to set : "
if
[
"
$HAVE_SERIAL
"
==
"yes"
]
;
then
COREBOOT_SERIAL_OPT
=
"1"
echo
"
${
COREBOOT_SERIAL_OPT
}
- Extracted from the coreboot image (
$(
cat
serial_number.txt
)
)"
else
COREBOOT_SERIAL_OPT
=
"0"
fi
if
[
"
$DMIDECODE_SERIAL_NUMBER
"
!=
""
]
;
then
DMIDECODE_SERIAL_OPT
=
$((
COREBOOT_SERIAL_OPT
+
1
))
MANUAL_SERIAL_OPT
=
$((
DMIDECODE_SERIAL_OPT
+
1
))
echo
"
${
DMIDECODE_SERIAL_OPT
}
- Extracted from your local system (
${
DMIDECODE_SERIAL_NUMBER
}
)"
else
DMIDECODE_SERIAL_OPT
=
0
MANUAL_SERIAL_OPT
=
$((
COREBOOT_SERIAL_OPT
+
1
))
fi
echo
"
${
MANUAL_SERIAL_OPT
}
- Enter serial number manually"
NO_SERIAL_OPT
=
$((
MANUAL_SERIAL_OPT
+
1
))
echo
"
${
NO_SERIAL_OPT
}
- Do not set a serial number"
echo
""
serial
=
0
fi
done
if
[
"
$serial
"
==
"
${
DMIDECODE_SERIAL_OPT
}
"
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment