Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id A9340E00AAB; Fri, 16 Oct 2015 11:11:43 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.54 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (roylee17[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 8086DE0048C for ; Fri, 16 Oct 2015 11:11:40 -0700 (PDT) Received: by padcn9 with SMTP id cn9so12104866pad.2 for ; Fri, 16 Oct 2015 11:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=phJOCf2fKB5blRT2cXv+NlbiNobc9IvCVoO1K4sxrsE=; b=QL/kFhg1SVRP6yZqENEPz5xLH2wNjpNlL9jk+79J/7TZS3R4ziyZe3Hy7NQi0hQXo7 qqiqqTbj+rnlg4EMWkvcvhoHp5vzYRNFpqFXJpvKTCcOi2yM+2z8DUihMxxYTt/+lgfH vx1+cRpGynFCry+5+DgDe+VGsl4eUujz8OwN+rru0f9E3zAIWojt2IU3n0ISWSNabgub w0sv9rTsG3blnR5xxmlssVXhoK/X9uLU3VeHBo49A+URDSnVgrvDGhjMr5p1+g8vOy5B 88BFpBPE49eOgz8bvkZGLVrrPBTFCYICkFx+3YTSrSQsalM2AeY1F6iJy6FQDwV+3TB8 yIKQ== X-Received: by 10.66.219.195 with SMTP id pq3mr17725088pac.98.1445019099846; Fri, 16 Oct 2015 11:11:39 -0700 (PDT) Received: from localhost.localdomain (c-73-222-19-194.hsd1.ca.comcast.net. [73.222.19.194]) by smtp.gmail.com with ESMTPSA id lo9sm22556094pab.19.2015.10.16.11.11.38 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Oct 2015 11:11:39 -0700 (PDT) From: Tzu-Jung Lee X-Google-Original-From: Tzu-Jung Lee To: meta-freescale@yoctoproject.org Date: Fri, 16 Oct 2015 18:12:00 +0000 Message-Id: <1445019120-9865-1-git-send-email-roylee17@currantlabs.com> X-Mailer: git-send-email 2.5.3 Cc: Tzu-Jung Lee Subject: [meta-fsl-arm][PATCH] image_types_fsl.bbclass: Use FAT 32 for images larger than 512MB X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 18:11:43 -0000 Refers to the following commit of poky for more detail. commit 722430a488f39bf583e4a557a254fb84fae4d0a7 Author: Darren Hart Date: Wed Dec 12 14:39:15 2012 -0800 bootimg: Use FAT 32 for images larger than 512MB Fixes [YOCTO #2138] Signed-off-by: Tzu-Jung Lee diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass index 77deb74..f323a7d 100644 --- a/classes/image_types_fsl.bbclass +++ b/classes/image_types_fsl.bbclass @@ -103,8 +103,15 @@ _generate_boot_image() { BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \ | awk "/ $boot_part / { print substr(\$4, 1, length(\$4 -1)) / 1024 }") + # mkdosfs will sometimes use FAT16 when it is not appropriate, + # resulting in a boot failure from SYSLINUX. Use FAT32 for + # images larger than 512MB, otherwise let mkdosfs decide. + if [ $(expr $BOOT_BLOCKS / 1024) -gt 512 ]; then + FATSIZE="-F 32" + fi + rm -f ${WORKDIR}/boot.img - mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -F 32 -C ${WORKDIR}/boot.img $BOOT_BLOCKS + mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 ${FATSIZE} -C ${WORKDIR}/boot.img $BOOT_BLOCKS mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE} -- 1.9.1