From patchwork Wed May 27 08:50:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kovalivskyi X-Patchwork-Id: 1298804 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=globallogic.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=globallogic.com header.i=@globallogic.com header.a=rsa-sha256 header.s=google header.b=aInK4qfQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49X7WS1qJYz9sSg for ; Wed, 27 May 2020 21:14:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BC549813BF; Wed, 27 May 2020 13:14:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=globallogic.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=globallogic.com header.i=@globallogic.com header.b="aInK4qfQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5ED0880670; Wed, 27 May 2020 10:50:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A155E80670 for ; Wed, 27 May 2020 10:50:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=globallogic.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=roman.kovalivskyi@globallogic.com Received: by mail-lj1-x244.google.com with SMTP id w10so27975797ljo.0 for ; Wed, 27 May 2020 01:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=globallogic.com; s=google; h=from:to:cc:subject:date:message-id; bh=SyAfdA0YGIt1Ah8bzW9iPEkS9pjX8nv0pH2cHSBi+ag=; b=aInK4qfQ0EEPiL/dgrsvndbToFuOdtybIr0vQCukcDtoFqhP189F5SxuphfrUfDgb9 76BpjQRGK3MrbrH+CUiBJDHpUQiXLX8vwY+Ogz3CXa2ifFGoEaguKDBXvjRT/wQCuuuN wyhIEzPSG/QuCUeYi/tZ6ks445vZZYJ4DZTmwyuXMZ/No7JxbbSTiCgMd3R2Jqb7GsO6 kObDdup3VLwUxg/oFrAPMKRzQ0/niq2ey732l7GYzdmwvLmt29L5rssvZ33O+Y6H5k+R U9GgIe2gEaCKfk7OQfh+Ua97P/JMQm2l5JS1d5QRDDl3ViiwIaNJ1cS0I4j9SN/HAH1M vQAA== 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; bh=SyAfdA0YGIt1Ah8bzW9iPEkS9pjX8nv0pH2cHSBi+ag=; b=LYV6jatEOmt875gtVOyuf2nZmwAxwubk1uSa/O5OfWGq16aDMlvopfVK5TDggS8qcI lGSkjCWidn1tznaU2ZwYJTLZmSlUirNfoEoHmILR24ImeWaHCKV02G8hJ49o3vSsn1+R 7rycnSonGVd49521wbQ6mUUqcx/Gpd/3PYgY2hfPHw/1rLM9LFuW2MtmSTkdgwZCyW3N dPAglApuscVdWXbJoyhfAq53zo9KKP4T5YC90MninwhIpZQV1hUiaXNeLDrjkhCyuq4L CGg2LRq/hDC+nCn1LhTWfbc7739+rM3Ij+kOWkq9RfFT2byQWgMOyNcwctSdMplwMKRp D8WQ== X-Gm-Message-State: AOAM533SQsJF8NyEEpiXnLKASl11cslGGhYuM7OWu2OBcY+ivvJ+1k+u c/rEe8757j8nhWoqoEiwo7HdlOHpXBA= X-Google-Smtp-Source: ABdhPJzVPZPta9oD+gVJL/Zz8u+56pA4EMRjSR/FjUb6HvXNTmYFMiJ0Tj0Vk9dk/jJR/OElImAakg== X-Received: by 2002:a05:651c:2de:: with SMTP id f30mr2606684ljo.450.1590569416628; Wed, 27 May 2020 01:50:16 -0700 (PDT) Received: from localhost.localdomain ([159.224.5.60]) by smtp.googlemail.com with ESMTPSA id y28sm559955ljn.4.2020.05.27.01.50.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 01:50:16 -0700 (PDT) From: Roman Kovalivskyi To: u-boot@lists.denx.de Cc: Roman Stratiienko , Joe Hershberger , Roman Kovalivskyi , Simon Glass , Marek Vasut , Lukasz Majewski , Eugeniu Rosca Subject: [PATCH 0/1] Add support for booting into userspace fastboot Date: Wed, 27 May 2020 11:50:06 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Wed, 27 May 2020 13:14:05 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Android 10 adds support for dynamic partitions and in order to support them userspace fastboot must be used[1]. New tool called fastbootd is included into recovery image. Userspace fastboot works from recovery and is launched if: 1) - Dynamic partitioning is enabled 2) - Boot control block has 'boot-fastboot' value into command field The bootloader is expected[2] to load and boot into the recovery image upon seeing boot-fastboot in the BCB command. Recovery then parses the BCB message and switches to fastbootd mode. Please note that boot script is expected to handle 'boot-fastboot' command in BCB and load into recovery mode. Bootloader must support[3] 'reboot fastboot' command which should reboot device into userspace fastboot to accomodate those changes. Another command that bootloader must support[3] is 'reboot recovery'. This command should simply reboot device into recovery mode. [1] - https://source.android.com/devices/bootloader/fastbootd [2] - https://source.android.com/devices/bootloader/fastbootd#unified_fastboot_and_recovery [3] - https://source.android.com/devices/bootloader/fastbootd#modifications_to_the_bootloader Roman Stratiienko (1): fastboot: add support for 'reboot fastboot' command drivers/fastboot/fb_command.c | 42 +++++++++++++++++++++++++++++++++ drivers/fastboot/fb_common.c | 31 ++++++++++++++++++++++++ drivers/usb/gadget/f_fastboot.c | 2 ++ include/fastboot.h | 9 +++++++ 4 files changed, 84 insertions(+)