mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 02:51:55 +00:00
uefi and tpm flags for aws push
Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
This commit is contained in:
parent
364f66a5b8
commit
82681c0333
@ -32,6 +32,8 @@ func pushAWS(args []string) {
|
|||||||
nameFlag := flags.String("img-name", "", "Overrides the name used to identify the file in Amazon S3 and the VM image. Defaults to the base of 'path' with the file extension removed.")
|
nameFlag := flags.String("img-name", "", "Overrides the name used to identify the file in Amazon S3 and the VM image. Defaults to the base of 'path' with the file extension removed.")
|
||||||
enaFlag := flags.Bool("ena", false, "Enable ENA networking")
|
enaFlag := flags.Bool("ena", false, "Enable ENA networking")
|
||||||
sriovNetFlag := flags.String("sriov", "", "SRIOV network support, set to 'simple' to enable 82599 VF networking")
|
sriovNetFlag := flags.String("sriov", "", "SRIOV network support, set to 'simple' to enable 82599 VF networking")
|
||||||
|
uefiFlag := flags.Bool("uefi", false, "Enable uefi boot mode.")
|
||||||
|
tpmFlag := flags.Bool("tpm", false, "Enable tpm device.")
|
||||||
|
|
||||||
if err := flags.Parse(args); err != nil {
|
if err := flags.Parse(args); err != nil {
|
||||||
log.Fatal("Unable to parse args")
|
log.Fatal("Unable to parse args")
|
||||||
@ -52,6 +54,10 @@ func pushAWS(args []string) {
|
|||||||
sriovNetFlag = nil
|
sriovNetFlag = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !*uefiFlag && *tpmFlag {
|
||||||
|
log.Fatal("Cannot use tpm without uefi mode")
|
||||||
|
}
|
||||||
|
|
||||||
sess := session.Must(session.NewSession())
|
sess := session.Must(session.NewSession())
|
||||||
storage := s3.New(sess)
|
storage := s3.New(sess)
|
||||||
|
|
||||||
@ -166,6 +172,12 @@ func pushAWS(args []string) {
|
|||||||
EnaSupport: enaFlag,
|
EnaSupport: enaFlag,
|
||||||
SriovNetSupport: sriovNetFlag,
|
SriovNetSupport: sriovNetFlag,
|
||||||
}
|
}
|
||||||
|
if *uefiFlag {
|
||||||
|
regParams.BootMode = aws.String("uefi")
|
||||||
|
if *tpmFlag {
|
||||||
|
regParams.TpmSupport = aws.String("v2.0")
|
||||||
|
}
|
||||||
|
}
|
||||||
log.Debugf("RegisterImage:\n%v", regParams)
|
log.Debugf("RegisterImage:\n%v", regParams)
|
||||||
regResp, err := compute.RegisterImage(regParams)
|
regResp, err := compute.RegisterImage(regParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user