From patchwork Thu Oct 17 14:44:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 836145 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp361484wrt; Thu, 17 Oct 2024 07:44:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVESF2fsuYja7jD3HjpZFBmJHAHBgiE5KnrJ0J+gtWqEnhu53V4/ytOt0fDEb/UJ1NokiU+bA==@linaro.org X-Google-Smtp-Source: AGHT+IFNC5RKaPLbqyNZjzV5rEDeim1WQ4FEnHFTjbQDWLYX/ejcNaxmb1rHuC7l8sfUONj0euA2 X-Received: by 2002:a05:6e02:2141:b0:39f:5d96:1fde with SMTP id e9e14a558f8ab-3a3dc49fd6cmr76064695ab.3.1729176294954; Thu, 17 Oct 2024 07:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729176294; cv=none; d=google.com; s=arc-20240605; b=jcgFXxP18Zeo+PSNLlHyJ5dga+fWts2Xh5FfY2ax0tacb5ZW4YUoRWUeyqj35ufnEA aQqbs+8psowclPHSzDYkY+r4cALCq41TDJl2hwHyNsYg/Ir34w7/yuqBc0yOu+AXP+K/ r39qnx7fdKa7NtKmPDV8iYE/D3Uh7Bh/LPe+cHuaHT1bHHx4lEeQ+hq4x0i6g+bpELP2 7w460bj7G4ln9xQBUjHSmH64ClAbu3phCz6htfkBqz3UeXsCyfR5OaUMZr6nbjmt0ajZ woyliMO3He8W0jvmU+cjiRoUUSR5yZxvAJ0gKsX0zJj0gteb3OcLbelXzJ5nffDPaySX GZSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:content-transfer-encoding :mime-version:message-id:date:subject:from:dkim-signature; bh=I/BdCb8TlU5j0IIvNDNIZ1r46vRsfFYu95kd6yKdBEY=; fh=1gqEYwqifEnZbXpYHwknzR60hLUUOKAM0gBepRXKBwM=; b=V7943KDGjwHPAERTEQ2vSEGq/0vgU1cXOBturhcfU2Xl36OHk4jHuTyriZ9Tgg6ymd 4d5MXdAlBC31MZgINGkAhvqoh8OEjSbfLUKEllel8uyYV/E4JBnAht0NrwgUJSmWvfk+ 8Q+Rte/xpevk4xaWXh003meBkf65118RvQJnBO6xbRcjp3rWOaN31TE8DaevMNou2PPg RV9IaGpR1is1XD3mkSRypOwme1kCAk5UBbI2OG+gEvoi7Ec6u3Xt9HOHpWI8NBHRfJ3f DScYWw4QmLrqS2PL2sBSX1yMKVLQURIRukoKziddGSdT/uZ0coCXldblr3+acN2sFCe0 lxSA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q4wbFouC; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id e9e14a558f8ab-3a3d7149313si30172005ab.51.2024.10.17.07.44.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2024 07:44:54 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q4wbFouC; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 79C5788FD8; Thu, 17 Oct 2024 16:44:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="Q4wbFouC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3816589016; Thu, 17 Oct 2024 16:44:50 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 62857889EB for ; Thu, 17 Oct 2024 16:44:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-431195c3538so9407785e9.3 for ; Thu, 17 Oct 2024 07:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729176286; x=1729781086; darn=lists.denx.de; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=I/BdCb8TlU5j0IIvNDNIZ1r46vRsfFYu95kd6yKdBEY=; b=Q4wbFouCeFEKpDczhbI9H2WU+M/QnjKeBZR5H37mbzysw4xkHZL1tDXl6IQlBtZMAo rHPHTVw0SvC+3BZNndSSs9XCkUGv9ptm4fGv5QbaDb0IKLx49Pqa5q8UidozXpLbN9yX D7BgVbeVZKiSL4XbS9nqilQQh2ILRsDGZlUUiSyOYWLy5JrC7AQKAZU88B88nk72Eb// LGpOe/RnGkUTM0QnMhSaPX7DodgPGgMbkOSh3+lydAQ4wecc25dEBCWRV0i7tlRQ/M23 bg+vMAe4dDn1FTtDQKZ6uwKps2G7aviMrQ+YAVcVGsXM7Jp4qpU/Y+ZtKa/qCa5q5DPa NADg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729176286; x=1729781086; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I/BdCb8TlU5j0IIvNDNIZ1r46vRsfFYu95kd6yKdBEY=; b=URvRcCvHijRihjrxQxXmrReVzd+tR+1kGhajrzJ1JSg2UXyAf9ELEmCcMbA9w44zlu DBoOsSrArCTsBlOOwcBVAZkBfXT1sGIfq3+SI2dbtzMtHx+8tqk+fvrYXtF+b3+29Tv1 I62T/Qfs2FNNt+gqlMjzFrigIuuGsrb6DM7NBJuOg2liP7fpshi9mTk1yBzM5+QTtqfA TeFyaCdxgQnuTQ42byQWF90xh6Y+wGIhgcV5QNCNeNFDjCH177/Qn/bUXEHnPDG5iADw vy17ElTSI1T2qft/tFMJYaDCAME7WqzI156z8appxG802e3U9LIuwyhWkjH9l3cvHoUU K8kg== X-Forwarded-Encrypted: i=1; AJvYcCXhPb0XCQWjooM5l689WsCPt6cJ8VQvYEeUOtDxCQLl1CJ/hQtsEzwgBcLtGnZKlHs+AK/wxyE=@lists.denx.de X-Gm-Message-State: AOJu0YyIvYIIWUD3ayg0kGnJFbQ0oKXV6W7Ccz3MCBhObKm4coG0HrRJ GSY1ahPcnfD6aeCjp9vd31S2wZtNLHR6KLWnRyZ8i/hk2Jgxr72q0Mnhq8BLf5I= X-Received: by 2002:a05:600c:1991:b0:42c:a580:71cf with SMTP id 5b1f17b1804b1-4314a384625mr65208695e9.30.1729176285667; Thu, 17 Oct 2024 07:44:45 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43158c37fbesm28923195e9.8.2024.10.17.07.44.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2024 07:44:45 -0700 (PDT) From: Neil Armstrong Subject: [PATCH v2 0/3] image: android: misc fixes when using on Qualcomm platforms Date: Thu, 17 Oct 2024 16:44:41 +0200 Message-Id: <20241017-topic-fastboot-fixes-mkbootimg-v2-0-c3927102d931@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIANkiEWcC/43NTQ6CMBCG4auQWTumP0TEFfcwLFpaYKIwpG2Ih nB3Cydw+XyZvLNB9IF8hEexQfArReI5Q10K6EYzDx7JZYMSqpRC3jDxQh32JibLnLCnj484vQ7 QNODdVdrYWjurHeTIEvx5khvPNnukmDh8z3+rPNa/06tEgXXZu1qXolLKNm+aTeArhwHafd9/Y KkMvc0AAAA= X-Change-ID: 20241016-topic-fastboot-fixes-mkbootimg-8d73ab93db3d To: Tom Rini Cc: Mattijs Korpershoek , Guillaume La Roque , Caleb Connolly , u-boot-qcom@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1318; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=BWRWCqbDQ5ziaH7PkDVvD1eCQ9adtJZVZYD3WseykQY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBnESLbfwXZ2s+En+bE/0oxL1HMNVodcrdzazHGDYWb 3XtT38WJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZxEi2wAKCRB33NvayMhJ0ZxFEA CpEuGFG5PLIWOmhPlxFCV2p2o9O37KrrlN6U4K8ZeD/2TDRy6R5wy4ye+bVBHYSksZ8tfw0BMwcWt/ G3a3xuKGCSe0RDf0mny1TMCvkMx4R/b+avEWktMZvoK/I4I+blXJa3MKEmgh2gfWHBIVbMNGQjbjz2 nqtdhTgSifu8FT1vs13Kh03amyvDWj1h5Ps0vm0+ujgrMJ9OwoecJzqQz6+wIcfXHpsQELIcwIsygA fH4ZHW64uG1T9q/WcBAnGZOQrqDAVxNrnYpvFiCNNXyQK4qxfd3tuRo8GYBhUSHhPuEvK9EwXjSEVS Gkmblm9TDGrtZrPCsYSyRaUPCQ0h0t834ixVWENF5pIF4bFWRbt67S/sOEcl/Mwx2U/wQ5fv/svwFd TW6X+VmF+KaFkI4Uymqu9XvGIsUzD2Lb8MZz3QKNAXm05d6G7VIccgrDrv84wcVGQjgfjP4//jPIW6 Hui6SckF292YUlZfKN4pxafvf4vIxJcPSxT+T3oiOtAI0SSKAfHwrHqd8HFqqNB9SmGDf2b2iYyR44 joZvMv+77NMTGwlpdKJWNgLWbxgHl+o/1FK6igLIqiN9xiIm6JHbpq+0wdpSKMjDrzCJHuXPKm/F68 xPLzWpSArtXpfUPALNP5+MRLmCmu7CRkDm1sjaw4/VvnvVyjpSk2z9sxIsOw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean When trying to use the Android boot image with header version 2 on recent Qualcomm platforms, we get into some troubles. First the kernel in-place address can be > 32bit, then since we use the Android mkbootimg, it uses the default load address which isn't big enough to uncompress the kernel. Finally, the ramdisk also uses a default load address, and it should be taken in account like for the kernel address. Signed-off-by: Neil Armstrong Tested-by: Guillaume La Roque --- Changes in v2: - Fix patch 2 prefix - Fix patch 3 commit msg - Fix patch 3 behavior when using boot image header version > 2, use the original ramdisk_ptr - Link to v1: https://lore.kernel.org/r/20241016-topic-fastboot-fixes-mkbootimg-v1-0-94fd9340722b@linaro.org --- Neil Armstrong (3): image: android: use ulong for kernel address image: android: do not boot XIP when kernel is compressed image: android: handle ramdisk default address boot/image-android.c | 62 +++++++++++++++++++++++++++++++++++++------------ include/android_image.h | 2 +- 2 files changed, 48 insertions(+), 16 deletions(-) --- base-commit: d5cab0d6adc26ec1bbd45c2fed101184d04454ae change-id: 20241016-topic-fastboot-fixes-mkbootimg-8d73ab93db3d Best regards,