From patchwork Mon Jul 10 22:14:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 786402 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x5zzc1rZrz9s7m for ; Tue, 11 Jul 2017 08:15:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gh/05wiL"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E2E5A868DF; Mon, 10 Jul 2017 22:15:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hrh3e-AWxDUQ; Mon, 10 Jul 2017 22:15:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 20F7486902; Mon, 10 Jul 2017 22:15:04 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id B24171C03E7 for ; Mon, 10 Jul 2017 22:14:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id AD717887B0 for ; Mon, 10 Jul 2017 22:14:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Im7hK6kXCPEC for ; Mon, 10 Jul 2017 22:14:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by hemlock.osuosl.org (Postfix) with ESMTPS id E47F9887AF for ; Mon, 10 Jul 2017 22:14:58 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id x23so27981530wrb.0 for ; Mon, 10 Jul 2017 15:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=6L0X8FxERknzP6EaJh370BrgasoGaGHtARYuzdsagpU=; b=gh/05wiLLqAdI+p1IqRKvu4LY0ZnUrwych5Mrt7YEKm8POCfPwLgvcMoez91W/kpJY kbRpgqU3hrCDJWFENMBJ7tRS0BaR1AeOWpxUv+G+ivFmbG91vdmecYaQGujZ0OGubbfy WPjmG1H2tsyNUPbQaCouR/DXj4SM7O+/y8ZI+8woUrEAclz4X1eyUBb9UpRs418OrKuL S73yk2tT8pjGT4OiaGI6BxHT6ejEERB3zfoJQfVRXuOAhI9Igdgcdvojk/MI3VbBFTLt 6X4SYWmsdWM9yXGBk65BzyWH7mKsEJf8Cl8e1iC7wMFZ+GABKD8cFOqpZM9/s0Rd5aHY q9AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=6L0X8FxERknzP6EaJh370BrgasoGaGHtARYuzdsagpU=; b=eHX+tnZBzhWiXlcWr1pL5rYc3YGj/Rio0dYybKq/8atQ2eElqjBIsBfclnFMREHDaJ 9NKcDV8jQbJTlZuo9OwpCp7eAMcncRjcP3jFGlBxiVS95F9r3VBFUXe+WczNcxfY2/GO wmX30rOV9U6PGmyNaUqksfvm48RRu+0z0f47ehwJXoLXHBh5mmfbvc+F5Y/fKsd2mrU9 XXcH53WkOKHci8E3JV1NYXWbHpad1hOKYscfjyb4oguuO4RnkRXpGYUfa+ytqr9DYmvI OrUG0en8ygYqmv13hGot5H2ZN4OFsvQT4nXcu6avbmJm+0mr5ou32gcC4iXTDO7aUAvE 6jgw== X-Gm-Message-State: AIVw111TT4/1YM+LSuNrcP+BO5xqWngVBonZ8BJRcfzgL8tckRg6g9q+ OUwDtHo6Lbsb2N4K X-Received: by 10.28.165.199 with SMTP id o190mr245447wme.57.1499724897244; Mon, 10 Jul 2017 15:14:57 -0700 (PDT) Received: from localhost.localdomain (2a01cb0886107300fcb50df1036df842.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:fcb5:df1:36d:f842]) by smtp.gmail.com with ESMTPSA id d91sm11321852wma.7.2017.07.10.15.14.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 15:14:56 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Tue, 11 Jul 2017 00:14:52 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH 2/3 v2] fs/squashfs: align size to 256KiB X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" By experimental evidence, the Linux kernel will refuse to mount a squashfs image/partition that is not padded to a 256kiB boundary. We already have a similar workaround in the testing infrastructure, in support/testing/tests/fs/test_squashfs.py@26. Use that workaround directly during the squashfs generation. Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni --- Changes v1 -> v2: - drop the requirements to just 256KiB --- fs/squashfs/squashfs.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk index 342c7a8a37..bf697acb3d 100644 --- a/fs/squashfs/squashfs.mk +++ b/fs/squashfs/squashfs.mk @@ -18,9 +18,12 @@ else ROOTFS_SQUASHFS_ARGS += -comp gzip endif +# Experimental evidence shows that a squashfs image size must be +# a multiple of 256KiB. define ROOTFS_SQUASHFS_CMD $(HOST_DIR)/bin/mksquashfs $(TARGET_DIR) $@ -noappend \ $(ROOTFS_SQUASHFS_ARGS) + truncate -s %256k $@ endef $(eval $(call ROOTFS_TARGET,squashfs))