Skip to content

Commit e1e74a9

Browse files
authored
Merge pull request #7 from johnnylinwiwynn/vpd
Run a shell script 'vpd.sh' for VPD customization under your project
2 parents 11d894b + b78a8fb commit e1e74a9

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

Makefile.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ $(ROM_OUT): $(COREBOOT_OUT)
119119
$(VPD_TOOL) -f "$<" -O -i RO_VPD -s internal_versions="`cat $(FINAL_CONFIG_OUT)`"
120120
[ -z "$(VERSION)" ] || $(VPD_TOOL) -f "$<" -i RO_VPD -s firmware_version=$(VERSION)
121121
$(VPD_TOOL) -f "$<" -O -i RW_VPD || true # Format RW_VPD region, if present.
122+
[ -f "$(CURDIR)/vpd.sh" ] && bash "$(CURDIR)/vpd.sh" || echo "$(CURDIR)/vpd.sh doesn't exist"
122123
cp "$<" "$@"
123124
@echo '***' >&2
124125
@echo '*** Build done, $@' >&2

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Entire build requires `PLATFORM` to be defined, this specifies the platform for
5151
* `make wipe` will wipe everything, including downloaded deps.
5252
* `make wipe-coreboot` and `make wipe-kernel` will clean just the coreboot and kernel components.
5353
* Note that toolchain cache survives wipe and will be used in the next build.
54+
* You can place a shell script vpd.sh under your project folder which would be executed for your customized actions such as setting your VPD key-value pairs to your coreboot image.
5455

5556
## License
5657

examples/qemu/vpd.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
VPD="../../tools/vpd"
3+
ROM="build/qemu-x86_64/coreboot/build/coreboot.rom"
4+
5+
#Or don't add '-O' that reformats the RO_VPD created by osf-builder/Makefile.inc
6+
$VPD -f $ROM -O -i RO_VPD -s fsp_log_enable=0
7+
$VPD -f $ROM -i RO_VPD -s test_key=123
8+
$VPD -f $ROM -O -i RW_VPD
9+

0 commit comments

Comments
 (0)