<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<p style="font-family:Calibri;font-size:10pt;color:#000000;margin:5pt;" align="Left">
TCS Confidential<br>
</p>
<br>
<div>
<div class="WordSection1">
<p class="MsoPlainText">Hi Stefan,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Thanks for the information. I am trying to make use of the commands by using tpm_init() inside image-fit.c file. It compiles but gives an undefined reference error as below.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><span style="color:#843C0C;mso-style-textfill-fill-color:#843C0C;mso-style-textfill-fill-alpha:100.0%"> gcc -isystem/home/tcs/work/san/openbmc/openbmc_april/openbmc/build/evb-ast2600/tmp/work/evb_ast2600-openbmc-linux-gnueabi/u-boot-aspeed-sdk/1_v2019.04+gitAUTOINC+fd915728e1-r0/recipe-sysroot-native/usr/include
-O2 -pipe -L/home/tcs/work/san/openbmc/openbmc_april/openbmc/build/evb-ast2600/tmp/work/evb_ast2600-openbmc-linux-gnueabi/u-boot-aspeed-sdk/1_v2019.04+gitAUTOINC+fd915728e1-r0/recipe-sysroot-native/usr/lib -L/home/tcs/work/san/openbmc/openbmc_april/openbmc/build/evb-ast2600/tmp/work/evb_ast2600-openbmc-linux-gnueabi/u-boot-aspeed-sdk/1_v2019.04+gitAUTOINC+fd915728e1-r0/recipe-sysroot-native/lib
-Wl,--enable-new-dtags -Wl,-rpath-link,/home/tcs/work/san/openbmc/openbmc_april/openbmc/build/evb-ast2600/tmp/work/evb_ast2600-openbmc-linux-gnueabi/u-boot-aspeed-sdk/1_v2019.04+gitAUTOINC+fd915728e1-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath-link,/home/tcs/work/san/openbmc/openbmc_april/openbmc/build/evb-ast2600/tmp/work/evb_ast2600-openbmc-linux-gnueabi/u-boot-aspeed-sdk/1_v2019.04+gitAUTOINC+fd915728e1-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/tcs/work/san/openbmc/openbmc_april/openbmc/build/evb-ast2600/tmp/work/evb_ast2600-openbmc-linux-gnueabi/u-boot-aspeed-sdk/1_v2019.04+gitAUTOINC+fd915728e1-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath,/home/tcs/work/san/openbmc/openbmc_april/openbmc/build/evb-ast2600/tmp/work/evb_ast2600-openbmc-linux-gnueabi/u-boot-aspeed-sdk/1_v2019.04+gitAUTOINC+fd915728e1-r0/recipe-sysroot-native/lib -Wl,-O1 -o tools/fit_check_sign
tools/aisimage.o tools/atmelimage.o tools/common/image-sig.o tools/common/bootm.o tools/lib/crc32.o tools/default_image.o tools/lib/fdtdec_common.o tools/lib/fdtdec.o tools/fit_common.o tools/fit_image.o tools/common/image-fit.o tools/image-host.o tools/common/image.o
tools/imagetool.o tools/imximage.o tools/imx8image.o tools/imx8mimage.o tools/kwbimage.o tools/lib/md5.o tools/lpc32xximage.o tools/mxsimage.o tools/omapimage.o tools/os_support.o tools/pblimage.o tools/pbl_crc32.o tools/vybridimage.o tools/stm32image.o tools/lib/rc4.o
tools/rkcommon.o tools/rkimage.o tools/rksd.o tools/rkspi.o tools/socfpgaimage.o tools/lib/crc16.o tools/lib/sha1.o tools/lib/sha256.o tools/lib/sha512.o tools/common/hash.o tools/ublimage.o tools/zynqimage.o tools/zynqmpimage.o tools/zynqmpbif.o tools/libfdt/fdt.o
tools/libfdt/fdt_wip.o tools/libfdt/fdt_sw.o tools/libfdt/fdt_rw.o tools/libfdt/fdt_strerror.o tools/libfdt/fdt_empty_tree.o tools/libfdt/fdt_addresses.o tools/libfdt/fdt_overlay.o tools/lib/libfdt/fdt_ro.o tools/lib/libfdt/fdt_region.o tools/gpimage.o tools/gpimage-common.o
tools/mtk_image.o tools/lib/rsa/rsa-sign.o tools/lib/rsa/rsa-verify.o tools/lib/rsa/rsa-checksum.o tools/lib/rsa/rsa-mod-exp.o tools/fit_check_sign.o -lssl -lcrypto<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left:.5in"><span style="color:#843C0C;mso-style-textfill-fill-color:#843C0C;mso-style-textfill-fill-alpha:100.0%">/home/tcs/work/san/openbmc/openbmc_april/openbmc/build/evb-ast2600/tmp/hosttools/ld: tools/common/image-fit.o:
in function `boot_get_setup_fit':<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left:.5in"><span style="color:#843C0C;mso-style-textfill-fill-color:#843C0C;mso-style-textfill-fill-alpha:100.0%">image-fit.c:(.text+0x27e1): undefined reference to `get_tpm'<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left:.5in"><span style="color:#843C0C;mso-style-textfill-fill-color:#843C0C;mso-style-textfill-fill-alpha:100.0%">/home/tcs/work/san/openbmc/openbmc_april/openbmc/build/evb-ast2600/tmp/hosttools/ld: image-fit.c:(.text+0x280e):
undefined reference to `tpm_init'<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left:.5in"><span style="color:#843C0C;mso-style-textfill-fill-color:#843C0C;mso-style-textfill-fill-alpha:100.0%">collect2: error: ld returned 1 exit status<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left:.5in"><span style="color:#843C0C;mso-style-textfill-fill-color:#843C0C;mso-style-textfill-fill-alpha:100.0%">make[2]: *** [scripts/Makefile.host:106: tools/dumpimage] Error 1<o:p></o:p></span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Although the tpm_init() is present in tpm-common.c and image-fit.c is present in the same module as well. But still I get the above error. I have tried including the DEPENDS on libtpm in the u-boot recipe but nothing seems to work.
Any specific library/specific location to be included for TPM support? <o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<br>
From: Stefan Berger <stefanb@linux.ibm.com> <br>
Sent: Thursday, May 18, 2023 5:10 PM<br>
To: Sandeep Kumar <sandeep.pkumar@tcs.com>; Cédric Le Goater <clg@kaod.org>; openbmc@lists.ozlabs.org; Ninad Palsule <ninad@linux.ibm.com>; Joel Stanley <jms@jms.id.au>; Andrew Jeffery <andrew@aj.id.au><br>
Subject: Re: Integrating swtpm(as a software TPM) with OpenBMC on Qemu</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">"External email. Open with Caution"<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">On 5/17/23 13:13, Sandeep Kumar wrote:<o:p></o:p></p>
<p class="MsoPlainText">> TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Hi Stefan,<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Thanks for providing the information. I am able to make use of it. But is it possible to make use of this stack at the bootloader(inside u-boot) level ?<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">There are quite a few commands in u-boot:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">ast# tpm2<o:p></o:p></p>
<p class="MsoPlainText">tpm2 - Issue a TPMv2.x command<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Usage:<o:p></o:p></p>
<p class="MsoPlainText">tpm2 <command> [<arguments>]<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">device [num device]<o:p></o:p></p>
<p class="MsoPlainText"> Show all devices or set the specified device info<o:p></o:p></p>
<p class="MsoPlainText"> Show information about the TPM.<o:p></o:p></p>
<p class="MsoPlainText">state<o:p></o:p></p>
<p class="MsoPlainText"> Show internal state from the TPM (if available) init<o:p></o:p></p>
<p class="MsoPlainText"> Initialize the software stack. Always the first command to issue.<o:p></o:p></p>
<p class="MsoPlainText">startup <mode><o:p></o:p></p>
<p class="MsoPlainText"> Issue a TPM2_Startup command.<o:p></o:p></p>
<p class="MsoPlainText"> <mode> is one of:<o:p></o:p></p>
<p class="MsoPlainText"> * TPM2_SU_CLEAR (reset state)<o:p></o:p></p>
<p class="MsoPlainText"> * TPM2_SU_STATE (preserved state) self_test <type><o:p></o:p></p>
<p class="MsoPlainText"> Test the TPM capabilities.<o:p></o:p></p>
<p class="MsoPlainText"> <type> is one of:<o:p></o:p></p>
<p class="MsoPlainText"> * full (perform all tests)<o:p></o:p></p>
<p class="MsoPlainText"> * continue (only check untested tests) clear <hierarchy><o:p></o:p></p>
<p class="MsoPlainText"> Issue a TPM2_Clear command.<o:p></o:p></p>
<p class="MsoPlainText"> <hierarchy> is one of:<o:p></o:p></p>
<p class="MsoPlainText"> * TPM2_RH_LOCKOUT<o:p></o:p></p>
<p class="MsoPlainText"> * TPM2_RH_PLATFORM<o:p></o:p></p>
<p class="MsoPlainText">pcr_extend <pcr> <digest_addr><o:p></o:p></p>
<p class="MsoPlainText"> Extend PCR #<pcr> with digest at <digest_addr>.<o:p></o:p></p>
<p class="MsoPlainText"> <pcr>: index of the PCR<o:p></o:p></p>
<p class="MsoPlainText"> <digest_addr>: address of a 32-byte SHA256 digest pcr_read <pcr> <digest_addr><o:p></o:p></p>
<p class="MsoPlainText"> Read PCR #<pcr> to memory address <digest_addr>.<o:p></o:p></p>
<p class="MsoPlainText"> <pcr>: index of the PCR<o:p></o:p></p>
<p class="MsoPlainText"> <digest_addr>: address to store the a 32-byte SHA256 digest get_capability <capability> <property> <addr> <count><o:p></o:p></p>
<p class="MsoPlainText"> Read and display <count> entries indexed by <capability>/<property>.<o:p></o:p></p>
<p class="MsoPlainText"> Values are 4 bytes long and are written at <addr>.<o:p></o:p></p>
<p class="MsoPlainText"> <capability>: capability<o:p></o:p></p>
<p class="MsoPlainText"> <property>: property<o:p></o:p></p>
<p class="MsoPlainText"> <addr>: address to store <count> entries of 4 bytes<o:p></o:p></p>
<p class="MsoPlainText"> <count>: number of entries to retrieve dam_reset [<password>]<o:p></o:p></p>
<p class="MsoPlainText"> If the TPM is not in a LOCKOUT state, reset the internal error counter.<o:p></o:p></p>
<p class="MsoPlainText"> <password>: optional password<o:p></o:p></p>
<p class="MsoPlainText">dam_parameters <max_tries> <recovery_time> <lockout_recovery> [<password>]<o:p></o:p></p>
<p class="MsoPlainText"> If the TPM is not in a LOCKOUT state, set the DAM parameters<o:p></o:p></p>
<p class="MsoPlainText"> <maxTries>: maximum number of failures before lockout,<o:p></o:p></p>
<p class="MsoPlainText"> 0 means always locking<o:p></o:p></p>
<p class="MsoPlainText"> <recoveryTime>: time before decrement of the error counter,<o:p></o:p></p>
<p class="MsoPlainText"> 0 means no lockout<o:p></o:p></p>
<p class="MsoPlainText"> <lockoutRecovery>: time of a lockout (before the next try),<o:p></o:p></p>
<p class="MsoPlainText"> 0 means a reboot is needed<o:p></o:p></p>
<p class="MsoPlainText"> <password>: optional password of the LOCKOUT hierarchy change_auth <hierarchy> <new_pw> [<old_pw>]<o:p></o:p></p>
<p class="MsoPlainText"> <hierarchy>: the hierarchy<o:p></o:p></p>
<p class="MsoPlainText"> <new_pw>: new password for <hierarchy><o:p></o:p></p>
<p class="MsoPlainText"> <old_pw>: optional previous password of <hierarchy> pcr_setauthpolicy|pcr_setauthvalue <pcr> <key> [<password>]<o:p></o:p></p>
<p class="MsoPlainText"> Change the <key> to access PCR #<pcr>.<o:p></o:p></p>
<p class="MsoPlainText"> hierarchy and may be empty.<o:p></o:p></p>
<p class="MsoPlainText"> /!\WARNING: untested function, use at your own risks !<o:p></o:p></p>
<p class="MsoPlainText"> <pcr>: index of the PCR<o:p></o:p></p>
<p class="MsoPlainText"> <key>: secret to protect the access of PCR #<pcr><o:p></o:p></p>
<p class="MsoPlainText"> <password>: optional password of the PLATFORM hierarchy<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Regards,<o:p></o:p></p>
<p class="MsoPlainText"> Stefan<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> Thanks,<o:p></o:p></p>
<p class="MsoPlainText">> Sandeep.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> -----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">> From: Stefan Berger <<a href="mailto:stefanb@linux.ibm.com"><span style="color:windowtext;text-decoration:none">stefanb@linux.ibm.com</span></a>><o:p></o:p></p>
<p class="MsoPlainText">> Sent: Tuesday, May 9, 2023 10:01 PM<o:p></o:p></p>
<p class="MsoPlainText">> To: Sandeep Kumar <<a href="mailto:sandeep.pkumar@tcs.com"><span style="color:windowtext;text-decoration:none">sandeep.pkumar@tcs.com</span></a>>; Cédric Le Goater
<o:p></o:p></p>
<p class="MsoPlainText">> <<a href="mailto:clg@kaod.org"><span style="color:windowtext;text-decoration:none">clg@kaod.org</span></a>>;
<a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">openbmc@lists.ozlabs.org</span></a>; Ninad Palsule
<o:p></o:p></p>
<p class="MsoPlainText">> <<a href="mailto:ninad@linux.ibm.com"><span style="color:windowtext;text-decoration:none">ninad@linux.ibm.com</span></a>>; Joel Stanley <<a href="mailto:jms@jms.id.au"><span style="color:windowtext;text-decoration:none">jms@jms.id.au</span></a>>;
Andrew Jeffery <o:p></o:p></p>
<p class="MsoPlainText">> <<a href="mailto:andrew@aj.id.au"><span style="color:windowtext;text-decoration:none">andrew@aj.id.au</span></a>><o:p></o:p></p>
<p class="MsoPlainText">> Subject: Re: Integrating swtpm(as a software TPM) with OpenBMC on Qemu<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> "External email. Open with Caution"<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> On 5/9/23 08:06, Sandeep Kumar wrote:<o:p></o:p></p>
<p class="MsoPlainText">>> TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> Hi Stefan,<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> Thanks for the help.<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> 'MACHINE_FEATURES:append = " tpm2" => this worked for me as well. Could you please also point to the API's which can be used for communicating with swtpm? Any sample code which can be used for reading and writing data to and from
the block device ?<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> TPM 2 has character devices /dev/tpm0 and /dev/tpmrm0 that can for example be used with either one of the tss2 stacks:<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> meta-security/meta-tpm/recipes-tpm2/ibmtpm2tss<o:p></o:p></p>
<p class="MsoPlainText">> meta-security/meta-tpm/recipes-tpm2/ibmtpm2tss/ibmtpm2tss<o:p></o:p></p>
<p class="MsoPlainText">> meta-security/meta-tpm/recipes-tpm2/ibmtpm2tss/ibmtpm2tss/0001-utils-1<o:p></o:p></p>
<p class="MsoPlainText">> 2-Makefile.am-expand-wildcards-in-prereqs.patch<o:p></o:p></p>
<p class="MsoPlainText">> meta-security/meta-tpm/recipes-tpm2/ibmtpm2tss/ibmtpm2tss_1661.bb<o:p></o:p></p>
<p class="MsoPlainText">> meta-security/meta-tpm/recipes-tpm2/tpm2-tss-engine<o:p></o:p></p>
<p class="MsoPlainText">> meta-security/meta-tpm/recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.<o:p></o:p></p>
<p class="MsoPlainText">> 1.0.bb meta-security/meta-tpm/recipes-tpm2/tpm2-tss<o:p></o:p></p>
<p class="MsoPlainText">> meta-security/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss<o:p></o:p></p>
<p class="MsoPlainText">> meta-security/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/fixup_hosttools.<o:p></o:p></p>
<p class="MsoPlainText">> patch meta-security/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_4.0.1.bb<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Intel: <a href="https://github.com/tpm2-software/tpm2-tss#overview">
<span style="color:windowtext;text-decoration:none">https://github.com/tpm2-software/tpm2-tss#overview</span></a><o:p></o:p></p>
<p class="MsoPlainText">> IBM: <a href="https://github.com/kgoldman/ibmtss"><span style="color:windowtext;text-decoration:none">https://github.com/kgoldman/ibmtss</span></a><o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Stefan<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> Thanks,<o:p></o:p></p>
<p class="MsoPlainText">>> Sandeep.<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> -----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">>> From: Stefan Berger <<a href="mailto:stefanb@linux.ibm.com"><span style="color:windowtext;text-decoration:none">stefanb@linux.ibm.com</span></a>><o:p></o:p></p>
<p class="MsoPlainText">>> Sent: Saturday, May 6, 2023 2:08 AM<o:p></o:p></p>
<p class="MsoPlainText">>> To: Sandeep Kumar <<a href="mailto:sandeep.pkumar@tcs.com"><span style="color:windowtext;text-decoration:none">sandeep.pkumar@tcs.com</span></a>>; Cédric Le Goater
<o:p></o:p></p>
<p class="MsoPlainText">>> <<a href="mailto:clg@kaod.org"><span style="color:windowtext;text-decoration:none">clg@kaod.org</span></a>>;
<a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">openbmc@lists.ozlabs.org</span></a>; Ninad Palsule
<o:p></o:p></p>
<p class="MsoPlainText">>> <<a href="mailto:ninad@linux.ibm.com"><span style="color:windowtext;text-decoration:none">ninad@linux.ibm.com</span></a>>; Joel Stanley <<a href="mailto:jms@jms.id.au"><span style="color:windowtext;text-decoration:none">jms@jms.id.au</span></a>>;
Andrew Jeffery <o:p></o:p></p>
<p class="MsoPlainText">>> <<a href="mailto:andrew@aj.id.au"><span style="color:windowtext;text-decoration:none">andrew@aj.id.au</span></a>><o:p></o:p></p>
<p class="MsoPlainText">>> Subject: Re: Integrating swtpm(as a software TPM) with OpenBMC on
<o:p></o:p></p>
<p class="MsoPlainText">>> Qemu<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> "External email. Open with Caution"<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> On 5/5/23 13:36, Sandeep Kumar wrote:<o:p></o:p></p>
<p class="MsoPlainText">>>> TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> Hi Stefan,<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> I have these options set in<o:p></o:p></p>
<p class="MsoPlainText">>>> /home/tcs/work/san/openbmc/openbmc_april/openbmc/meta-aspeed/recipes<o:p></o:p></p>
<p class="MsoPlainText">>>> - k ernel/linux/linux-aspeed/tpm/tpm2.cfg<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> CONFIG_HW_RANDOM=y<o:p></o:p></p>
<p class="MsoPlainText">>>> CONFIG_HW_RANDOM_TPM=y<o:p></o:p></p>
<p class="MsoPlainText">>>> CONFIG_TCG_TPM=y<o:p></o:p></p>
<p class="MsoPlainText">>>> CONFIG_TCG_TIS_CORE=y<o:p></o:p></p>
<p class="MsoPlainText">>>> CONFIG_TCG_TIS=y<o:p></o:p></p>
<p class="MsoPlainText">>>> CONFIG_TCG_TIS_SPI=y<o:p></o:p></p>
<p class="MsoPlainText">>>> CONFIG_TCG_TIS_I2C=y<o:p></o:p></p>
<p class="MsoPlainText">>>> CONFIG_SECURITYFS=y<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> I added 'MACHINE_FEATURES:append = " tpm2"' and this works for me.<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> As long as these symbols are built into the kernel it should work:<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>>> root@evb-ast2600:~# grep tpm_tis_i2c /proc/kallsyms 8056318c t
<o:p></o:p></p>
<p class="MsoPlainText">>>> tpm_tis_i2c_remove<o:p></o:p></p>
<p class="MsoPlainText">>>> 805631b0 t tpm_tis_i2c_retry_transfer_until_ack<o:p></o:p></p>
<p class="MsoPlainText">>>> 8056323c t tpm_tis_i2c_write_bytes<o:p></o:p></p>
<p class="MsoPlainText">>>> 80563334 t tpm_tis_i2c_verify_crc<o:p></o:p></p>
<p class="MsoPlainText">>>> 805633e0 t tpm_tis_i2c_read_bytes<o:p></o:p></p>
<p class="MsoPlainText">>>> 80563604 t tpm_tis_i2c_probe<o:p></o:p></p>
<p class="MsoPlainText">>>> 80d23964 t tpm_tis_i2c_driver_init<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> and in<o:p></o:p></p>
<p class="MsoPlainText">>>> /home/tcs/work/san/openbmc/openbmc_april/openbmc/meta-aspeed/recipes<o:p></o:p></p>
<p class="MsoPlainText">>>> - k ernel/linux/linux-aspeed.inc I have these,<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> SRC_URI += " \<o:p></o:p></p>
<p class="MsoPlainText">>>> <a href="file://defconfig"><span style="color:windowtext;text-decoration:none">file://defconfig</span></a> \<o:p></o:p></p>
<p class="MsoPlainText">>>> <a href="file://rsa_oem_fitimage_key.key;sha256sum=eeb4ff2ebbfbd97b6254fe6dbaeea41067e54c65176c233ec7b2ab2decf1ddcd">
<span style="color:windowtext;text-decoration:none">file://rsa_oem_fitimage_key.key;sha256sum=eeb4ff2ebbfbd97b6254fe6dbaeea41067e54c65176c233ec7b2ab2decf1ddcd</span></a> \<o:p></o:p></p>
<p class="MsoPlainText">>>> <a href="file://rsa_oem_fitimage_key.crt;sha256sum=45f5a55497cce8040999bf9f3214d471ac7b83ab7acef41c4425a34662e8372e">
<span style="color:windowtext;text-decoration:none">file://rsa_oem_fitimage_key.crt;sha256sum=45f5a55497cce8040999bf9f3214d471ac7b83ab7acef41c4425a34662e8372e</span></a> \<o:p></o:p></p>
<p class="MsoPlainText">>>> <a href="mailto:$%7b@bb.utils.contains('MACHINE_FEATURES">
<span style="color:windowtext;text-decoration:none">${@bb.utils.contains('MACHINE_FEATURES</span></a>', 'tpm2', 'file://tpm/tpm2.scc
<a href="file://tpm/tpm2.cfg"><span style="color:windowtext;text-decoration:none">file://tpm/tpm2.cfg</span></a>', '', d)} \<o:p></o:p></p>
<p class="MsoPlainText">>>> <a href="mailto:$%7b@bb.utils.contains_any('DISTRO_FEATURES">
<span style="color:windowtext;text-decoration:none">${@bb.utils.contains_any('DISTRO_FEATURES</span></a>', \<o:p></o:p></p>
<p class="MsoPlainText">>>> 'obmc-static-norootfs obmc-ubi-fs', \<o:p></o:p></p>
<p class="MsoPlainText">>>> 'file://ubi/ubi.scc <a href="file://ubi/ubi.cfg">
<span style="color:windowtext;text-decoration:none">file://ubi/ubi.cfg</span></a>', '', d)} \<o:p></o:p></p>
<p class="MsoPlainText">>>> "<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> Anything else needs to be done to enable TPM ?<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> Apart from having to use the latest QEMU with the TPM TIS I2C support (from git repo) I don't know of anything else.<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> Stefan<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> Thanks,<o:p></o:p></p>
<p class="MsoPlainText">>>> Sandeep.<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> -----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">>>> From: Stefan Berger <<a href="mailto:stefanb@linux.ibm.com"><span style="color:windowtext;text-decoration:none">stefanb@linux.ibm.com</span></a>><o:p></o:p></p>
<p class="MsoPlainText">>>> Sent: Friday, May 5, 2023 9:41 PM<o:p></o:p></p>
<p class="MsoPlainText">>>> To: Sandeep Kumar <<a href="mailto:sandeep.pkumar@tcs.com"><span style="color:windowtext;text-decoration:none">sandeep.pkumar@tcs.com</span></a>>; Cédric Le Goater
<o:p></o:p></p>
<p class="MsoPlainText">>>> <<a href="mailto:clg@kaod.org"><span style="color:windowtext;text-decoration:none">clg@kaod.org</span></a>>;
<a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">openbmc@lists.ozlabs.org</span></a>; Ninad Palsule
<o:p></o:p></p>
<p class="MsoPlainText">>>> <<a href="mailto:ninad@linux.ibm.com"><span style="color:windowtext;text-decoration:none">ninad@linux.ibm.com</span></a>>; Joel Stanley <<a href="mailto:jms@jms.id.au"><span style="color:windowtext;text-decoration:none">jms@jms.id.au</span></a>>;
Andrew Jeffery <o:p></o:p></p>
<p class="MsoPlainText">>>> <<a href="mailto:andrew@aj.id.au"><span style="color:windowtext;text-decoration:none">andrew@aj.id.au</span></a>><o:p></o:p></p>
<p class="MsoPlainText">>>> Subject: Re: Integrating swtpm(as a software TPM) with OpenBMC on
<o:p></o:p></p>
<p class="MsoPlainText">>>> Qemu<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> "External email. Open with Caution"<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> I enable the following kernel build options for OpenBMC Linux kernel:<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> CONFIG_TCG_TPM=y<o:p></o:p></p>
<p class="MsoPlainText">>>> CONFIG_TCG_TIS_CORE=y<o:p></o:p></p>
<p class="MsoPlainText">>>> CONFIG_TCG_TIS=y<o:p></o:p></p>
<p class="MsoPlainText">>>> CONFIG_TCG_TIS_I2C=y<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> With swtpm running in another terminal:<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> while :; do swtpm socket --tpmstate dir=/tmp/mytpm1 --ctrl type=unixio,path=/tmp/mytpm1/swtpm-sock --tpm2 --log level=20; done<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> I start qemu built from qemu git master branch tip:<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> /tmp/qemu-system-arm -machine ast2600-evb -nographic -no-reboot -net nic -net user,hostfwd=:127.0.0.1:5722-:22,hostfwd=:127.0.0.1:5743-:443,hostfwd=udp:127.0.0.1:5723-:623 -drive file=./tmp/deploy/images/evb-ast2600/obmc-phosphor-image-evb-ast2600.static.mtd,format=raw,if=mtd
-chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis-i2c,tpmdev=tpm0,bus=aspeed.i2c.bus.12,address=0x2e<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> root@evb-ast2600:~# echo tpm_tis_i2c 0x2e > /sys/bus/i2c/devices/i2c-12/new_device<o:p></o:p></p>
<p class="MsoPlainText">>>> [ 63.771200] tpm_tis_i2c 12-002e: 2.0 TPM (device-id 0x1, rev-id 1)<o:p></o:p></p>
<p class="MsoPlainText">>>> [ 63.783927] tpm tpm0: A TPM error (256) occurred attempting the self test<o:p></o:p></p>
<p class="MsoPlainText">>>> [ 63.784256] tpm tpm0: starting up the TPM manually<o:p></o:p></p>
<p class="MsoPlainText">>>> [ 63.851474] i2c i2c-12: new_device: Instantiated device tpm_tis_i2c at 0x2e<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> root@evb-ast2600:~# uname -a<o:p></o:p></p>
<p class="MsoPlainText">>>> Linux evb-ast2600 6.1.15-580639a-dirty-c56bfb7-00123-gc56bfb70ebfa
<o:p></o:p></p>
<p class="MsoPlainText">>>> #1 SMP Thu Apr 6 00:55:09 UTC 2023 armv7l GNU/Linux<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> root@evb-ast2600:~# grep tpm_tis_i2c /proc/kallsyms> 8056318c t
<o:p></o:p></p>
<p class="MsoPlainText">>>> tpm_tis_i2c_remove<o:p></o:p></p>
<p class="MsoPlainText">>>> 805631b0 t tpm_tis_i2c_retry_transfer_until_ack<o:p></o:p></p>
<p class="MsoPlainText">>>> 8056323c t tpm_tis_i2c_write_bytes<o:p></o:p></p>
<p class="MsoPlainText">>>> 80563334 t tpm_tis_i2c_verify_crc<o:p></o:p></p>
<p class="MsoPlainText">>>> 805633e0 t tpm_tis_i2c_read_bytes<o:p></o:p></p>
<p class="MsoPlainText">>>> 80563604 t tpm_tis_i2c_probe<o:p></o:p></p>
<p class="MsoPlainText">>>> 80d23964 t tpm_tis_i2c_driver_init<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> root@evb-ast2600:~# find /sys/class/tpm /sys/class/tpm<o:p></o:p></p>
<p class="MsoPlainText">>>> /sys/class/tpm/tpm0<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> root@evb-ast2600:~# ls -l /dev/tpm*<o:p></o:p></p>
<p class="MsoPlainText">>>> crw------- 1 root root 10, 224 May 5 16:03 /dev/tpm0<o:p></o:p></p>
<p class="MsoPlainText">>>> crw------- 1 root root 252, 65536 May 5 16:03 /dev/tpmrm0<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> root@evb-ast2600:~# find /sys/ | grep pcr <o:p></o:p></p>
<p class="MsoPlainText">>>> /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a680.i2c-<o:p></o:p></p>
<p class="MsoPlainText">>>> b<o:p></o:p></p>
<p class="MsoPlainText">>>> u<o:p></o:p></p>
<p class="MsoPlainText">>>> s/i2c-12/12-002e/tpm/tpm0/pcr-sha1<o:p></o:p></p>
<p class="MsoPlainText">>>> /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a680.i2c-<o:p></o:p></p>
<p class="MsoPlainText">>>> b<o:p></o:p></p>
<p class="MsoPlainText">>>> u<o:p></o:p></p>
<p class="MsoPlainText">>>> s/i2c-12/12-002e/tpm/tpm0/pcr-sha1/17<o:p></o:p></p>
<p class="MsoPlainText">>>> [... lots more entries also for sha256, sha384, and sha512 ]<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> It seems to work as expected<o:p></o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> On 5/5/23 11:08, Sandeep Kumar wrote:<o:p></o:p></p>
<p class="MsoPlainText">>>>> TCS Confidential Hi Stefan, Please find below my answers inline.<o:p></o:p></p>
<p class="MsoPlainText">>>>> Thanks, Sandeep. -----Original Message----- From: Stefan Berger
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <stefanb@ linux. ibm. com> Sent: Friday, May 5, 2023 6: 56 PM To:<o:p></o:p></p>
<p class="MsoPlainText">>>>> Sandeep Kumar <sandeep. pkumar@ tcs. com>; ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization.<o:p></o:p></p>
<p class="MsoPlainText">>>>> ZjQcmQRYFpfptBannerEnd<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> Hi Stefan,<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> Please find below my answers inline.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> Thanks,<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> Sandeep.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> -----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">>>>> From: Stefan Berger <<a href="mailto:stefanb@linux.ibm.com"><span style="color:windowtext;text-decoration:none">stefanb@linux.ibm.com</span></a>><o:p></o:p></p>
<p class="MsoPlainText">>>>> Sent: Friday, May 5, 2023 6:56 PM<o:p></o:p></p>
<p class="MsoPlainText">>>>> To: Sandeep Kumar <<a href="mailto:sandeep.pkumar@tcs.com"><span style="color:windowtext;text-decoration:none">sandeep.pkumar@tcs.com</span></a>>; Cédric Le Goater
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:clg@kaod.org"><span style="color:windowtext;text-decoration:none">clg@kaod.org</span></a>>;
<a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">openbmc@lists.ozlabs.org</span></a>; Ninad Palsule
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:ninad@linux.ibm.com"><span style="color:windowtext;text-decoration:none">ninad@linux.ibm.com</span></a>>; Joel Stanley <<a href="mailto:jms@jms.id.au"><span style="color:windowtext;text-decoration:none">jms@jms.id.au</span></a>>;
Andrew Jeffery <o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:andrew@aj.id.au"><span style="color:windowtext;text-decoration:none">andrew@aj.id.au</span></a>><o:p></o:p></p>
<p class="MsoPlainText">>>>> Subject: Re: Integrating swtpm(as a software TPM) with OpenBMC on
<o:p></o:p></p>
<p class="MsoPlainText">>>>> Qemu<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> "External email. Open with Caution"<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> On 5/5/23 01:40, Sandeep Kumar wrote:<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Hi Stefan,<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Stefan: Is the kernel configured in the same way? Are you using the same kernel version?<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Ans:<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > I am using the Kernel version coming with the latest openBMC without any changes.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Kernel version used : Linux evb-ast2600 6.1.15-580639a #1<o:p></o:p></p>
<p class="MsoPlainText">>>>> SMP<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Thu Apr 6 00:55:09 UTC 2023 armv71 GNU/Linux<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Stefan: What is the output of this? find /sys/class/tpm |
<o:p></o:p></p>
<p class="MsoPlainText">>>>> grep pcr<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Ams: find: /sys/class/tpm: No such file or directory.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Could you please point to the right version of kernel which has all these changes ?<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> I am not aware of changes in the Linux kernel for TPM I2C and why it would not work in this kernel version.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> Does this show any files?<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> find /sys | grep pcr<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *Sandeep: It doesn't show any files. *<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~# echo tpm_tis_i2c 0x2e ><o:p></o:p></p>
<p class="MsoPlainText">>>>> /sys/bus/i2c/devices/i2c-12/new_device*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *[ 273.273089] i2c i2c-12: new_device: Instantiated device
<o:p></o:p></p>
<p class="MsoPlainText">>>>> tpm_tis_i2c at 0x2e*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~# find /sys | grep pcr*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> Do /dev/tpm0 and /dev/tpmrm0 appear after the echo ? What does dmesg show related to tpm (dmesg | grep -i tpm)?<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *Sandeep: I don’t see /dev/tpm0 and /dev/tpmrm0 after the echo.<o:p></o:p></p>
<p class="MsoPlainText">>>>> Output as below, *<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> **<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~# echo tpm_tis_i2c 0x2e ><o:p></o:p></p>
<p class="MsoPlainText">>>>> /sys/bus/i2c/devices/i2c-12/new_device*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *[ 273.273089] i2c i2c-12: new_device: Instantiated device
<o:p></o:p></p>
<p class="MsoPlainText">>>>> tpm_tis_i2c at 0x2e*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~# find /sys | grep pcr*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~# ls /dev/tpm**<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *ls: /dev/tpm*: No such file or directory*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~# dmesg | grep -i tpm*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *[ 6.290898] systemd[1]: systemd 253.1^ running in system mode<o:p></o:p></p>
<p class="MsoPlainText">>>>> (+PAM -AUDIT -SELINUX -APPARMOR -IMA -SMACK +SECCOMP -GCRYPT
<o:p></o:p></p>
<p class="MsoPlainText">>>>> -GNUTLS -OPENSSL -ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN
<o:p></o:p></p>
<p class="MsoPlainText">>>>> -IPTC -KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT
<o:p></o:p></p>
<p class="MsoPlainText">>>>> -QRENCODE -TPM2<o:p></o:p></p>
<p class="MsoPlainText">>>>> -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON -UTMP
<o:p></o:p></p>
<p class="MsoPlainText">>>>> -SYSVINIT<o:p></o:p></p>
<p class="MsoPlainText">>>>> default-hierarchy=unified)*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *[ 273.273089] i2c i2c-12: new_device: Instantiated device
<o:p></o:p></p>
<p class="MsoPlainText">>>>> tpm_tis_i2c at 0x2e*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> *root@evb-ast2600:~#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> Stefan<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Thanks,<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Sandeep.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > -----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > From: Stefan Berger <stefanb@linux.ibm.com <o:p>
</o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:stefanb@linux.ibm.com"><span style="color:windowtext;text-decoration:none">mailto:stefanb@linux.ibm.com</span></a>>><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Sent: Thursday, May 4, 2023 7:30 PM<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > To: Sandeep Kumar <sandeep.pkumar@tcs.com <o:p>
</o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:sandeep.pkumar@tcs.com"><span style="color:windowtext;text-decoration:none">mailto:sandeep.pkumar@tcs.com</span></a>>>; Cédric Le Goater<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > <<a href="mailto:clg@kaod.org%20%3cmailto:clg@kaod.org"><span style="color:windowtext;text-decoration:none">clg@kaod.org <mailto:clg@kaod.org</span></a>>>;
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">openbmc@lists.ozlabs.org</span></a> <<a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">mailto:openbmc@lists.ozlabs.org</span></a>>;
Ninad <o:p></o:p></p>
<p class="MsoPlainText">>>>> Palsule<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > <<a href="mailto:ninad@linux.ibm.com%20%3cmailto:ninad@linux.ibm.com"><span style="color:windowtext;text-decoration:none">ninad@linux.ibm.com <mailto:ninad@linux.ibm.com</span></a>>>; Joel
<o:p></o:p></p>
<p class="MsoPlainText">>>>> Stanley <<a href="mailto:jms@jms.id.au%20%3cmailto:jms@jms.id.au"><span style="color:windowtext;text-decoration:none">jms@jms.id.au <mailto:jms@jms.id.au</span></a>>>; Andrew Jeffery<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > <<a href="mailto:andrew@aj.id.au%20%3cmailto:andrew@aj.id.au"><span style="color:windowtext;text-decoration:none">andrew@aj.id.au <mailto:andrew@aj.id.au</span></a>>><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Subject: Re: Integrating swtpm(as a software TPM) with
<o:p></o:p></p>
<p class="MsoPlainText">>>>> OpenBMC on Qemu<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > "External email. Open with Caution"<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > On 5/4/23 05:12, Sandeep Kumar wrote:<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> TCS Confidential Hi C, I was able to build and run the
<o:p></o:p></p>
<p class="MsoPlainText">>>>> image(for<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> evb-ast2600) with swtpm. Few issues observed, If I run with
<o:p></o:p></p>
<p class="MsoPlainText">>>>> the<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> flash. img provided in your github link(https: //github.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> com/legoater/qemu-aspeed-boot/tree/master/images) everything ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> ZjQcmQRYFpfptBannerEnd<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Hi C,<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> I was able to build and run the image(for evb-ast2600) with swtpm.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Few issues observed,<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> 1. If I run with the flash.img provided in your github link(_https://github.com/legoater/qemu-aspeed-boot/tree/master/images_ <<a href="https://github.com/legoater/qemu-aspeed-boot/tree/master/images%20%3chttps:/github.com/legoater/qemu-aspeed-boot/tree/master/images"><span style="color:windowtext;text-decoration:none">https://github.com/legoater/qemu-aspeed-boot/tree/master/images
<https://github.com/legoater/qemu-aspeed-boot/tree/master/images</span></a>>>) everything works as expected, i.e I get the below output.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *# echo tpm_tis_i2c 0x2e ><o:p></o:p></p>
<p class="MsoPlainText">>>>> /sys/bus/i2c/devices/i2c-12/new_device*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *[ 182.735902] tpm_tis_i2c 12-002e: 2.0 TPM (device-id 0x1,
<o:p></o:p></p>
<p class="MsoPlainText">>>>> rev-id<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> 1)* *[ 182.773885] i2c i2c-12: new_device: Instantiated
<o:p></o:p></p>
<p class="MsoPlainText">>>>> device<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> tpm_tis_i2c at 0x2e*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *# cat /sys/class/tpm/tpm0/pcr-sha256/0*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >><o:p></o:p></p>
<p class="MsoPlainText">>>>> *B804724EA13F52A9072BA87FE8FDCC497DFC9DF9AA15B9088694639C431688E0*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> 2. If I run it with the locally built image, I get this error,<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Is the kernel configured in the same way? Are you using the same kernel version?<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *root@evb-ast2600:~# echo tpm_tis_i2c 0x2e ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> /sys/bus/i2c/devices/i2c-12/new_device*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *[ 174.063597] i2c i2c-12: new_device: Instantiated device<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> tpm_tis_i2c at 0x2e*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > What is the output of this?<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > find /sys/class/tpm | grep pcr<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > Stefan<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *root@evb-ast2600:~# cat /sys/class/tpm/tpm0/pcr-sha256/0*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *cat: can't open '/sys/class/tpm/tpm0/pcr-sha256/0': No such
<o:p></o:p></p>
<p class="MsoPlainText">>>>> file or<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> directory*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *root@evb-ast2600:~#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *root@evb-ast2600:~#*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Please do let me know about what has been done to write the
<o:p></o:p></p>
<p class="MsoPlainText">>>>> values<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> into “*/sys/class/tpm/tpm0/pcr-sha256/0**” . * Thanks, Sandeep.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> _____________________________________________<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *From:* Sandeep Kumar<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *Sent:* Thursday, April 20, 2023 5:45 PM<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *To:* Cédric Le Goater <<a href="mailto:clg@kaod.org%20%3cmailto:clg@kaod.org"><span style="color:windowtext;text-decoration:none">clg@kaod.org <mailto:clg@kaod.org</span></a>>>;
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">openbmc@lists.ozlabs.org</span></a> <<a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">mailto:openbmc@lists.ozlabs.org</span></a>>;<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Ninad Palsule <ninad@linux.ibm.com <o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:ninad@linux.ibm.com"><span style="color:windowtext;text-decoration:none">mailto:ninad@linux.ibm.com</span></a>>>; Joel Stanley <jms@jms.id.au
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:jms@jms.id.au"><span style="color:windowtext;text-decoration:none">mailto:jms@jms.id.au</span></a>>>;<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Andrew Jeffery <<a href="mailto:andrew@aj.id.au%20%3cmailto:andrew@aj.id.au"><span style="color:windowtext;text-decoration:none">andrew@aj.id.au <mailto:andrew@aj.id.au</span></a>>><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *Subject:* RE: Integrating swtpm(as a software TPM) with
<o:p></o:p></p>
<p class="MsoPlainText">>>>> OpenBMC on<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Qemu Hi C, How to build this image =><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> *obmc-phosphor-image.rootfs.wic.qcow2* ? In openBmc build directory we don’t get this image built.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Also, remaining image formats used while running on qemu are available in the build directory. i.e fitImage-linux.bin, aspeed-bmc-ibm-rainier.dtb and obmc-phosphor-initramfs.rootfs.cpio.xz .<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Please advise if we have to build openbmc stack in a
<o:p></o:p></p>
<p class="MsoPlainText">>>>> different way<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> than the standard procedure. We follow the below steps for build, 1. .<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> setup Romulus 2. bitbake obmc-phosphor-image Thanks, Sandeep.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> -----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> From: Sandeep Kumar<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Sent: Wednesday, April 19, 2023 3:00 PM<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> To: Cédric Le Goater <_clg@kaod.org_ <mailto:clg@kaod.org
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:_clg@kaod.org_%20%3cmailto:clg@kaod.org"><span style="color:windowtext;text-decoration:none">mailto:_clg@kaod.org_%20%3cmailto:clg@kaod.org</span></a>>>>;<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> <a href="mailto:_openbmc@lists.ozlabs.org_"><span style="color:windowtext;text-decoration:none">_openbmc@lists.ozlabs.org_</span></a>
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:_openbmc@lists.ozlabs.org_"><span style="color:windowtext;text-decoration:none">mailto:_openbmc@lists.ozlabs.org_</span></a>><o:p></o:p></p>
<p class="MsoPlainText">>>>> <mailto:openbmc@lists.ozlabs.org <o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">mailto:openbmc@lists.ozlabs.org</span></a>>>;<o:p></o:p></p>
<p class="MsoPlainText">>>>> Ninad<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Palsule <_ninad@linux.ibm.com_ <mailto:ninad@linux.ibm.com
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:_ninad@linux.ibm.com_%20%3cmailto:ninad@linux.ibm.com"><span style="color:windowtext;text-decoration:none">mailto:_ninad@linux.ibm.com_%20%3cmailto:ninad@linux.ibm.com</span></a>>>>;<o:p></o:p></p>
<p class="MsoPlainText">>>>> Joel<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Stanley <_jms@jms.id.au_ <mailto:jms@jms.id.au
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:_jms@jms.id.au_%20%3cmailto:jms@jms.id.au"><span style="color:windowtext;text-decoration:none">mailto:_jms@jms.id.au_%20%3cmailto:jms@jms.id.au</span></a>>>>; Andrew
<o:p></o:p></p>
<p class="MsoPlainText">>>>> Jeffery<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> <_andrew@aj.id.au_ <mailto:andrew@aj.id.au <o:p>
</o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:_andrew@aj.id.au_%20%3cmailto:andrew@aj.id.au"><span style="color:windowtext;text-decoration:none">mailto:_andrew@aj.id.au_%20%3cmailto:andrew@aj.id.au</span></a>>>><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Subject: RE: Integrating swtpm(as a software TPM) with
<o:p></o:p></p>
<p class="MsoPlainText">>>>> OpenBMC on<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Qemu Hi C, Got it working. Looks like slirp is no longer
<o:p></o:p></p>
<p class="MsoPlainText">>>>> supported on<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> ubnutu 18.04. have upgraded to a newer version and is working now.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Thanks,<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Sandeep.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> -----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> From: Cédric Le Goater <clg@kaod.org <mailto:clg@kaod.org
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:clg@kaod.org%20%3cmailto:clg@kaod.org"><span style="color:windowtext;text-decoration:none">mailto:clg@kaod.org%20%3cmailto:clg@kaod.org</span></a>>>><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Sent: Wednesday, April 19, 2023 2:26 PM<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> To: Sandeep Kumar <sandeep.pkumar@tcs.com<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> <mailto:sandeep.pkumar@tcs.com <o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:sandeep.pkumar@tcs.com"><span style="color:windowtext;text-decoration:none">mailto:sandeep.pkumar@tcs.com</span></a>>>>;<o:p></o:p></p>
<p class="MsoPlainText">>>>> <a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">openbmc@lists.ozlabs.org</span></a> <<a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">mailto:openbmc@lists.ozlabs.org</span></a>><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> <mailto:openbmc@lists.ozlabs.org <o:p></o:p></p>
<p class="MsoPlainText">>>>> <<a href="mailto:openbmc@lists.ozlabs.org"><span style="color:windowtext;text-decoration:none">mailto:openbmc@lists.ozlabs.org</span></a>>>; Ninad Palsule
<o:p></o:p></p>
<p class="MsoPlainText">>>>> <ninad@linux.ibm.com<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> <<a href="mailto:ninad@linux.ibm.com%20%3cmailto:ninad@linux.ibm.com"><span style="color:windowtext;text-decoration:none">mailto:ninad@linux.ibm.com <mailto:ninad@linux.ibm.com</span></a>>>>;
<o:p></o:p></p>
<p class="MsoPlainText">>>>> Joel Stanley <jms@jms.id.au<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> <<a href="mailto:jms@jms.id.au%20%3cmailto:jms@jms.id.au"><span style="color:windowtext;text-decoration:none">mailto:jms@jms.id.au <mailto:jms@jms.id.au</span></a>>>>; Andrew
<o:p></o:p></p>
<p class="MsoPlainText">>>>> Jeffery <andrew@aj.id.au<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> <<a href="mailto:andrew@aj.id.au%20%3cmailto:andrew@aj.id.au"><span style="color:windowtext;text-decoration:none">mailto:andrew@aj.id.au <mailto:andrew@aj.id.au</span></a>>>><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Subject: Re: Integrating swtpm(as a software TPM) with
<o:p></o:p></p>
<p class="MsoPlainText">>>>> OpenBMC on<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Qemu "External email. Open with Caution"<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Hello Sandeep<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> On 4/18/23 09:45, Sandeep Kumar wrote:<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> Hi C,<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> Built the qemu from your branch. Few issues, *$
<o:p></o:p></p>
<p class="MsoPlainText">>>>> ./qemu-system-arm -m<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> 256 -M romulus-bmc -nographic -drive<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>><o:p></o:p></p>
<p class="MsoPlainText">>>>> file=./obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd<o:p></o:p></p>
<p class="MsoPlainText">>>>> -net<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> nic -net<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>><o:p></o:p></p>
<p class="MsoPlainText">>>>> user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:4443-:443,hostf<o:p></o:p></p>
<p class="MsoPlainText">>>>> w<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> d<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> =<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> tcp:127.0.0.1:8880-:80,hostfwd=tcp:127.0.0.1:2200-:2200,hostfwd=udp:<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> 1<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> 2<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>><o:p></o:p></p>
<p class="MsoPlainText">>>>> 7.0.0.1:6623-:623,hostfwd=udp:127.0.0.1:6664-:664,hostname=qemu*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> *qemu-system-arm: -net<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>><o:p></o:p></p>
<p class="MsoPlainText">>>>> user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:4443-:443,hostf<o:p></o:p></p>
<p class="MsoPlainText">>>>> w<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> d<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> =<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> tcp:127.0.0.1:8880-:80,hostfwd=tcp:127.0.0.1:2200-:2200,hostfwd=udp:<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> 1<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> 2<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> 7.0.0.1:6623-:623,hostfwd=udp:127.0.0.1:6664-:664,hostname=qemu:<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> network backend 'user' is not compiled into this binary* I
<o:p></o:p></p>
<p class="MsoPlainText">>>>> didn’t<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> enable the slirp package I guess. So enabled it while
<o:p></o:p></p>
<p class="MsoPlainText">>>>> running<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> configure, *$ ../configure --enable-slirp*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> *........*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> *Run-time dependency slirp found: NO (tried pkgconfig)*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> *../meson.build:681:2: ERROR: Dependency "slirp" not found,
<o:p></o:p></p>
<p class="MsoPlainText">>>>> tried<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> pkgconfig* *A full log can be found at<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>><o:p></o:p></p>
<p class="MsoPlainText">>>>> /home/tcs/work/sandeep/measured_boot/ibm_qemu/qemu/build/meson-logs<o:p></o:p></p>
<p class="MsoPlainText">>>>> /<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> m<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> e<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> son-log.txt*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> *NOTICE: You are using Python 3.6 which is EOL. Starting
<o:p></o:p></p>
<p class="MsoPlainText">>>>> with<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> v0.62.0, Meson will require Python 3.7 or newer*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> *ERROR: meson setup failed*<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >>> I have already installed slirp locally, but still getting the above error.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Did you install the libslirp-dev or libslirp-devel package ?<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> C.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> =====-----=====-----=====<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> Notice: The information contained in this e-mail message
<o:p></o:p></p>
<p class="MsoPlainText">>>>> and/or<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> attachments to it may contain confidential or privileged information.<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> If you are not the intended recipient, any dissemination,
<o:p></o:p></p>
<p class="MsoPlainText">>>>> use,<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> review, distribution, printing or copying of the information<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> contained in this e-mail message and/or attachments to it
<o:p></o:p></p>
<p class="MsoPlainText">>>>> are<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> strictly prohibited. If you have received this communication
<o:p></o:p></p>
<p class="MsoPlainText">>>>> in<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> error, please notify us by reply e-mail or telephone and
<o:p></o:p></p>
<p class="MsoPlainText">>>>> immediately<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >> and permanently delete the message and any attachments.
<o:p></o:p></p>
<p class="MsoPlainText">>>>> Thank you<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> >><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> ><o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> > TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>>> TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">>>>><o:p> </o:p></p>
<p class="MsoPlainText">>>><o:p> </o:p></p>
<p class="MsoPlainText">>>> TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">>><o:p> </o:p></p>
<p class="MsoPlainText">>> TCS Confidential<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> TCS Confidential<o:p></o:p></p>
</div>
</div>
<br>
<p style="font-family:Calibri;font-size:10pt;color:#000000;margin:5pt;" align="Left">
TCS Confidential<br>
</p>
</body>
</html>