From patchwork Fri Jan 20 13:43:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 644647 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp787867pvb; Fri, 20 Jan 2023 05:44:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXt9wk0Ch8bxyA6FswAEeCjZgGSzQLvPDJ7/dMx/koG0FHlLhHvhQyWGJ1Bx1mThu/Yc2/UK X-Received: by 2002:ac8:4710:0:b0:3a4:f758:fc6d with SMTP id f16-20020ac84710000000b003a4f758fc6dmr23117808qtp.46.1674222257732; Fri, 20 Jan 2023 05:44:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674222257; cv=none; d=google.com; s=arc-20160816; b=QWHh09njaOxE/5KPdBUc8IF8EuyZb/M/rRKyA9r1nKNKy18IrTZ2ud1zzIMva8Y0BW GRhKsoTngcVNmTX699PDWEqsmNaHRMp27jQIAt/9ZRrf8UnLafxsQ4db75e/Ql/pKKU+ CAElxM4CV7uIf5eEIJdec4kvajS6xwEc17MdwyUzBTGYfYtOusHYmqYvlLoHLXaFd6GC 1PvscEVGk7fjjrf6nxsj0w7F6Xt1Xgj2NJhvxGJ2LG1koyEV0tDsJII2zbtALPgbBIxt C0eNYUOw43sltxRlVomTsg/7LnzePZKXEFvGl7AN14idUUCDZikfWWFCf9qFZ96TeC1q Nl1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UNHd8/T89f0TRHea37adZgQvQ+f5+hWer7661K7hDXI=; b=m4GgQMNB0amiKMJT916dHfTbrAiR38L/MAFlHZH9J1mXzX1glM6pb35wP8CSWGCbKY 5FzhPAjRgr/yIWoKZrEcCmg7sUzAijwWKe+dFQAHJvZEAAdNOiLr24cs20XUO0j3cd72 FIHOYil0UHHTQvZkSiXlKjdFDKH5P0ljPjDJ9Mro5SOh3/0isBE2uZ//a3ApPmAIjx8e nFD5cshvjm6u+CvZFIxoouZCWaeeoeEkTuSQn3ZdVwP7QKEgk9nuQvQl6CVVxhdMYMyE LJdkQPddoNnunOINxz/1tjCqfomZ6MZN+ccG7x2vSyOrq/am8ie8uByTdLN6oZxq/RuE DX1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qHk0TYqX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k20-20020ac86054000000b003b469bc8761si11346270qtm.540.2023.01.20.05.44.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jan 2023 05:44:17 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qHk0TYqX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIrfy-00013a-3Y; Fri, 20 Jan 2023 08:43:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIrfw-000138-Bo for qemu-devel@nongnu.org; Fri, 20 Jan 2023 08:43:24 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIrfu-0007Wx-SL for qemu-devel@nongnu.org; Fri, 20 Jan 2023 08:43:24 -0500 Received: by mail-wm1-x32a.google.com with SMTP id g10so4114050wmo.1 for ; Fri, 20 Jan 2023 05:43:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UNHd8/T89f0TRHea37adZgQvQ+f5+hWer7661K7hDXI=; b=qHk0TYqXYGW8iALXaE11M3MlMIxhkCjmG4yJZismQtXQG97rzmhRqZ5r0GoMLNgsZ7 CN1qJ8bGYYWss5i1LGDomJnR+6JsKMZkqPzHOSqeAtLFWcLmHZA7akjkYXE4sqWhCqwt IdQ5sCwaQgWNmhy4XkOLQlXbU2mMvKczMjhJasZfEjXQhivjGnnALEgMqZZPrQD84rLD QBao2M9nkpE5JhiLb/vFWzUddlmrJ2/gN5Blhn9fMGz4SbOUh+NKA2hAVXREQujAiH3m bJx4SII0RkieQnjQAFpZHUOWB3zdMJ8lU78T78YQMUpCj82hSpkjIGrBIKVP6X6bWp7y Bs7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UNHd8/T89f0TRHea37adZgQvQ+f5+hWer7661K7hDXI=; b=6MRDE6uWpaNNkUdxXYOvf4oJrCcziAh32/Da135BtyYi7LkhkXO7HaQxbY8ltn1t8s VVXFrZThZn6nPaC7FM9cTylNkSTeyjaktXLb/mUx6xV9mpgi0bQ4gLIHC2w0WGAkoRdK +FXFrnCfPK9rslVbIhPFbJclprH46FPmFpCX8rj9ouy2Qf8QLWEi+Y7qvZE4ahq3Lgcm hsc353ZPo6gK+9j1Lw5mQF+Ll4/qhDs01Gq8LB1gwJBhCUMHpSupQvZvdc17g4BkIc06 s2W/miVyhJ6g/VAmaIy7L/LWaqElIocuGUNL7gjFD7WE8pI9t9yyRQwsGYhvWehdA4jJ x1gQ== X-Gm-Message-State: AFqh2kriXkRtT207ld8l6pr1XLtcPo5Y3VWTRTgH8WfD8f3ldXbynbDy w1A0oT/XeWxs8w4CEd4p9ysiZQg1wd4O7MzK X-Received: by 2002:a05:600c:1712:b0:3d9:a145:91a with SMTP id c18-20020a05600c171200b003d9a145091amr14158241wmn.28.1674222201108; Fri, 20 Jan 2023 05:43:21 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h13-20020a05600c2cad00b003cfa622a18asm2691725wmc.3.2023.01.20.05.43.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Jan 2023 05:43:20 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , qemu-arm@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= , Cleber Rosa , Peter Maydell , Subbaraya Sundeep Subject: [PATCH v2 1/2] tests/avocado: Factor file_truncate() helper out Date: Fri, 20 Jan 2023 14:43:13 +0100 Message-Id: <20230120134314.81956-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230120134314.81956-1-philmd@linaro.org> References: <20230120134314.81956-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Factor file_truncate() helper out of image_pow2ceil_expand() for reuse. Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_linux_console.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 8c1d981586..8a598be966 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -30,15 +30,16 @@ def pow2ceil(x): return 1 if x == 0 else 2**(x - 1).bit_length() +def file_truncate(path, size): + if size != os.path.getsize(path): + with open(path, 'ab+') as fd: + fd.truncate(size) + """ Expand file size to next power of 2 """ -def image_pow2ceil_expand(path): - size = os.path.getsize(path) - size_aligned = pow2ceil(size) - if size != size_aligned: - with open(path, 'ab+') as fd: - fd.truncate(size_aligned) +def image_pow2ceil_expand(path, size): + file_truncate(path, pow2ceil(size)) class LinuxKernelTest(QemuSystemTest): KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' From patchwork Fri Jan 20 13:43:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 644648 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp788015pvb; Fri, 20 Jan 2023 05:44:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXtEn7fUqSSeWnEGvtMtwgDlNjAKlN1lrvhIFwF5wbmLv6s7SqN+N7UNXvRD0UhCRSM0Wock X-Received: by 2002:ac8:4b70:0:b0:3b3:f489:5e93 with SMTP id g16-20020ac84b70000000b003b3f4895e93mr20313064qts.5.1674222278495; Fri, 20 Jan 2023 05:44:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674222278; cv=none; d=google.com; s=arc-20160816; b=vGc4ZtVgp1IADmfLJ3LHVelsk0GCBKsQQ7aBENdO0TOUxYs6ntkvAnZdHrkI6jJpmm WGBHaGm9KFEnaqwrC+bQVtueYLRZVOyACbE/lfCNNeyH9Ngc6qfSCLun3My3sUHAJbvz VcLHagmKRS2SbRr20fkpPrTWo2fuoFUi+GCo5jBN+Y8CTfUP+ntHQDFJb6WIA5bQw0nJ R8IFEr2l2EsX+ksEuCqkuvKjnv/I+hxoBCUp8SDKVoJXklCzdD7BkAjKZ6Ehz5shF/JE iaJfHRxAW7bUmRcpgrzlIvzlraBKlVYRmV9WiZlmoJ35CK6PATKop2Qry3hAD+wgLdNe sXKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s8GtNAPgyhpBwG+7nq0uxfOe9enuDqptYaOVvOfM+co=; b=yCy9KRcOHShK+M1Y4DpkHt1dmjlg5fdPHMhWJpV4tkec3Am26uf3QHSiSm0oEOf9hc kP5icRq8vssS7sS9ODwIEwFGkb9+CsCUf0DGFHNcse6g5PJHoPBFQKrbKxzCcUr3Z70L lT/kf2loHBNeEyaexOd7CHTuLQqMJeHdYeb32+3XWdctJQR4GdnBnHmqXKNoB2fbBO3o LGQMaVP3xjt6IlCOLHtrIug19DGVw+Y5q6r8D+0cAa+LvkciyUESen9Nd01eUcv1cZ9m 2G2fTSNA+qJ/NACx6TTebRDHGlOyGwDGBZZNXJozvOx2ls0K741plxgSFJg91dNbrE3m VM2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lEIwHB3u; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f7-20020ac84647000000b003b69652182fsi2051400qto.168.2023.01.20.05.44.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jan 2023 05:44:38 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lEIwHB3u; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIrg3-00018h-Pj; Fri, 20 Jan 2023 08:43:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIrg2-00018C-5X for qemu-devel@nongnu.org; Fri, 20 Jan 2023 08:43:30 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIrfz-0007Xi-M1 for qemu-devel@nongnu.org; Fri, 20 Jan 2023 08:43:29 -0500 Received: by mail-wm1-x32d.google.com with SMTP id d4-20020a05600c3ac400b003db1de2aef0so3723055wms.2 for ; Fri, 20 Jan 2023 05:43:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=s8GtNAPgyhpBwG+7nq0uxfOe9enuDqptYaOVvOfM+co=; b=lEIwHB3ugGTDTf+OxmLQetvIr4Mxakn7v4LQiSj/5uSRIZwt70Vk15vF7j5NAyfRJv M213FplsS8AHESMJhfkbsRAxkEeJhVPrVC9JhmcSx+dpDUnb2CiIj8YitCRIZbZuFM27 HJqQP3KbkO86q5iT2N6QPRwCM5DQSqCBqoqVfOKhxH+k99IqIii3WfPNFBkegQgR634V 0iJF1ba16Lkpf7yuxW9WgAT4MZOXgclsTZ44w1jqsGtHebVZ6W7KxBa4cx/VaKw1y5iV EN75CKJceupP/YAHE5jzyzBEPS2HVqpZmmFBOBmArJK09/gatJPfPZRPbE3gZK3SDCso fKZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s8GtNAPgyhpBwG+7nq0uxfOe9enuDqptYaOVvOfM+co=; b=VBf3+0t6TOcc0v8DhIuPSjRN3t+Tep/MOZWAuCJVKETzKY73vebHXTP/78Jh8UxIif FPNthlq019L53CjTIpa38USy655VM2mw0LF2D17M52MVMgFWZEvtoQvq/q4PHncGRRuY t58tZP5OM1iACqYEZELy/XuFXvYK8s27XWZmoiS0ZC+WGgjyTwuogWbocfOtw1Le5j0N p0hqQ636DvCmVAqLhx2uod5zfW/KInX9EMOp03g69ReZ2bA/RH345dXZtjJfXSiKj4kp 1MfmshROVOpjSumbifV41IURsfHOXKgxUPEjFkstubqBhYJ2ubNZlp0BP26eATiDnVG7 N7bQ== X-Gm-Message-State: AFqh2kq7DJ9BF9VbCp66vOBbI0P5d+TUrHQi/w5NeZdzZTHck9oaHCZq 5TRScSv9jqq5Bea5gg99zJjFDvry47bGIy6H X-Received: by 2002:a05:600c:540d:b0:3d9:fb59:c16b with SMTP id he13-20020a05600c540d00b003d9fb59c16bmr10559299wmb.36.1674222206112; Fri, 20 Jan 2023 05:43:26 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id f22-20020a1cc916000000b003d35acb0fd7sm2344031wmb.34.2023.01.20.05.43.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Jan 2023 05:43:25 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , qemu-arm@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= , Cleber Rosa , Peter Maydell , Subbaraya Sundeep Subject: [PATCH v2 2/2] tests/avocado: Truncate M2S-FG484 SOM SPI flash to 16MiB Date: Fri, 20 Jan 2023 14:43:14 +0100 Message-Id: <20230120134314.81956-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230120134314.81956-1-philmd@linaro.org> References: <20230120134314.81956-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The M2S-FG484 SOM uses a 16 MiB SPI flash (Spansion S25FL128SDPBHICO). Since the test asset is bigger, truncate it to the correct size to avoid when running the test_arm_emcraft_sf2 test: qemu-system-arm: device requires 16777216 bytes, block backend provides 67108864 bytes Add comment regarding the M2S-FG484 SOM hardware in hw/arm/msf2-som.c. Reported-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Tested-by: Cédric Le Goater --- hw/arm/msf2-som.c | 5 ++++- tests/avocado/boot_linux_console.py | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c index a6df473ec9..7b3106c790 100644 --- a/hw/arm/msf2-som.c +++ b/hw/arm/msf2-som.c @@ -1,6 +1,9 @@ /* * SmartFusion2 SOM starter kit(from Emcraft) emulation. * + * M2S-FG484 SOM hardware architecture specification: + * https://www.emcraft.com/jdownloads/som/m2s/m2s-som-ha.pdf + * * Copyright (c) 2017 Subbaraya Sundeep * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -87,7 +90,7 @@ static void emcraft_sf2_s2s010_init(MachineState *machine) /* Attach SPI flash to SPI0 controller */ spi_bus = qdev_get_child_bus(dev, "spi0"); - spi_flash = qdev_new("s25sl12801"); + spi_flash = qdev_new("s25sl12801"); /* Spansion S25FL128SDPBHICO */ qdev_prop_set_uint8(spi_flash, "spansion-cr2nv", 1); if (dinfo) { qdev_prop_set_drive_err(spi_flash, "drive", diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 8a598be966..9f5077c791 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -396,6 +396,8 @@ def test_arm_emcraft_sf2(self): spi_hash = '65523a1835949b6f4553be96dec1b6a38fb05501' spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash) + file_truncate(spi_path, 16 << 20) # Spansion S25FL128SDPBHICO is 16 MiB + self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE self.vm.add_args('-kernel', uboot_path,