From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mx.groups.io with SMTP id smtpd.web11.3324.1595537491318212467 for ; Thu, 23 Jul 2020 13:51:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@broadcom.com header.s=google header.b=S0t/gnKe; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: broadcom.com, ip: 209.85.215.178, mailfrom: vladimir.olovyannikov@broadcom.com) Received: by mail-pg1-f178.google.com with SMTP id t6so3838081pgq.1 for ; Thu, 23 Jul 2020 13:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=75hBgXxg0Kxm7pA31Vpw8chotSjMTa6L+3fK2HSahII=; b=S0t/gnKeDAnZRyNMHYG27PyPIhQyi/bV43DHp0NUALGi+J3SNbBKzMV5ODjfqyoZf8 Kn30vKjbEXBugJijGwhGqPcIMYXL+XLBxL3gDmBBuO+2dMxK4Z2DXoeHu5qeuMQVOpND ew+mzcBXI7qJsHLaSLiWGuuV9yDaH7HteG5Gs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=75hBgXxg0Kxm7pA31Vpw8chotSjMTa6L+3fK2HSahII=; b=BnH3UjSp6oua84HbA3V9jFZHouEjrTWUxKY+ObO8dYH7F2hkTbAwXsk3kPQHxZzV7v +msaKqh3ki6DZ4t8nWLqteo4AdoMndtfO44iyB/NfiZE1IMQdEvbchWT2Mw0J83aUS/p kCy7riJOLIH501soETN+vETniOfbLVKgvZJQY0LcdHN+T/f5gz31BAbFRcvMFeJUxJDC kvCW8Xiun4en4NkzawTstGx14/EbYRVEF740TGFh5FWgRwdTrEPAro4z3sEIp+MZssjk ExBXMbkRVF1LBHnxU/EXlyM68QcGk9Z1m2nlLz0Pi2JiAGXRa8/IjYv5Rw9NV2RABfq9 Z9IQ== X-Gm-Message-State: AOAM532S61vtdFmMjhlk+3Tk5Seh+IMhwoAWn3tX18lks55bnoSs738i LvCfnN/vBOwrtWShseHnRzruVBzQqMfkd8fUT25BxKp38U4ay0wNWFfWfrOIEdBRtnsddKmG7dJ s1SjC5w6o11mTmFgqtQUTd6i1WFCfu1cZSB9cmoB1vHNixs9ZrxHOBPEewN2D4gq+e8fRWflUyD BMoeoQ1fev X-Google-Smtp-Source: ABdhPJwiWYpg6W92pVRDDseaWIpW/KKnyBhHjNVMqNlzlDtx57yZJbc2VCn+ZMB5BPYlX1c2DY88nw== X-Received: by 2002:a62:2546:: with SMTP id l67mr6031884pfl.154.1595537490263; Thu, 23 Jul 2020 13:51:30 -0700 (PDT) Return-Path: Received: from LBRMN-LNXUB114.ric.broadcom.net ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id g28sm3781369pfr.70.2020.07.23.13.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 13:51:28 -0700 (PDT) From: "Vladimir Olovyannikov" To: devel@edk2.groups.io Cc: Laszlo Ersek , Vladimir Olovyannikov , Samer El-Haj-Mahmoud , Zhichao Gao , Maciej Rabeda , Jiaxin Wu , Siyuan Fu , Ray Ni , Liming Gao , Nd Subject: [PATCH v4 0/1] ShellPkg/DynamicCommand: add HttpDynamicCommand Date: Thu, 23 Jul 2020 13:50:51 -0700 Message-Id: <20200723205052.22500-1-vladimir.olovyannikov@broadcom.com> X-Mailer: git-send-email 2.26.2.266.ge870325ee8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Signed-off-by: Vladimir Olovyannikov Tested-By: Samer El-Haj-Mahmoud Tested-By: Laszlo Ersek Cc: Zhichao Gao Cc: Maciej Rabeda Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Ray Ni Cc: Liming Gao Cc: Nd This patchset introduces an http client utilizing EDK2 HTTP protocol, to allow fast image downloading from http/https servers. HTTP download speed is usually faster than tftp. The client is based on the same approach as tftp dynamic command, and uses the same UEFI Shell command line parameters. This makes it easy integrating http into existing UEFI Shell scripts. Note that to enable HTTP download, feature Pcd gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections must be set to TRUE. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2860 PATCH v4 changes: Address comments based on Laszlo's testing: - Fix .uni help file missing "\r\n" before RETURNVALUES section; - delete the downloaded file in case of an error, unless -k ("keep bad") option is provided on command line. Allow download time measurement in seconds by providing -m parameter on command line. Vladimir Olovyannikov (1): ShellPkg/DynamicCommand: add HttpDynamicCommand .../DynamicCommand/HttpDynamicCommand/Http.c | 1730 +++++++++++++++++ .../DynamicCommand/HttpDynamicCommand/Http.h | 90 + .../HttpDynamicCommand/Http.uni | 117 ++ .../HttpDynamicCommand/HttpApp.c | 53 + .../HttpDynamicCommand/HttpApp.inf | 59 + .../HttpDynamicCommand/HttpDynamicCommand.c | 134 ++ .../HttpDynamicCommand/HttpDynamicCommand.inf | 64 + ShellPkg/Include/Guid/ShellLibHiiGuid.h | 5 + ShellPkg/ShellPkg.dec | 1 + ShellPkg/ShellPkg.dsc | 5 + 10 files changed, 2258 insertions(+) create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.h create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.uni create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.c create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.inf create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.c create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf -- 2.26.2.266.ge870325ee8