From patchwork Fri Jul 1 20:01:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 643208 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rh6m95lswz9sCy for ; Sat, 2 Jul 2016 06:03:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1B7B797FA5; Fri, 1 Jul 2016 20:03:19 +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 GyZ37hZ7dZ0i; Fri, 1 Jul 2016 20:03:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id BFB1B97F94; Fri, 1 Jul 2016 20:03:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0F3BD1C0F5A for ; Fri, 1 Jul 2016 20:03:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0C16E94D0E for ; Fri, 1 Jul 2016 20:03:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BSLpUl1od6xg for ; Fri, 1 Jul 2016 20:03:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (us01smtprelay-2.synopsys.com [198.182.60.111]) by whitealder.osuosl.org (Postfix) with ESMTPS id A689194D0D for ; Fri, 1 Jul 2016 20:03:13 +0000 (UTC) Received: from us02secmta2.synopsys.com (us02secmta2.synopsys.com [10.12.235.98]) by smtprelay.synopsys.com (Postfix) with ESMTP id D579310C14FF; Fri, 1 Jul 2016 13:03:11 -0700 (PDT) Received: from us02secmta2.internal.synopsys.com (us02secmta2.internal.synopsys.com [127.0.0.1]) by us02secmta2.internal.synopsys.com (Service) with ESMTP id AEC8A55F13; Fri, 1 Jul 2016 13:03:11 -0700 (PDT) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by us02secmta2.internal.synopsys.com (Service) with ESMTP id 7C88055F02; Fri, 1 Jul 2016 13:03:11 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 6678999C; Fri, 1 Jul 2016 13:03:11 -0700 (PDT) Received: from abrodkin-7440l.internal.synopsys.com (unknown [10.225.15.82]) by mailhost.synopsys.com (Postfix) with ESMTP id EA498992; Fri, 1 Jul 2016 13:03:07 -0700 (PDT) From: Alexey Brodkin To: buildroot@busybox.net Date: Fri, 1 Jul 2016 23:01:57 +0300 Message-Id: <1467403317-16425-1-git-send-email-abrodkin@synopsys.com> X-Mailer: git-send-email 2.5.5 Cc: Thomas Petazzoni , Carlos Quijano , Alexey Brodkin , Andi Shyti Subject: [Buildroot] [PATCH] cubieboard2: Accommodate U-Boot environment on SD-card 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" According to current "include/configs/sunxi-common.h" U-Boot environment is stored on SD-card with offset 544 kB and its size is limited as 128 kB. Given memory layout of sunxi boards: 1. SPL 2. U-Boot 3. U-Boot environment 4. Partitions we need to make sure the first real partition starts at least with 544+128 kB offset. Adding a small safety gap let's put the first partition with offset 1Mb from the beginning of SD-card. Otherwise current setup gets broken as soon as one saves U-Boot environment with "saveenv" which basically overwrites FAT partition with zImage and board no longer boots into Linux kernel. Signed-off-by: Alexey Brodkin Cc: Erico Nunes Cc: Thomas Petazzoni Cc: Peter Korsgaard Cc: Carlos Quijano Cc: Andi Shyti --- board/cubietech/cubieboard2/genimage.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/board/cubietech/cubieboard2/genimage.cfg b/board/cubietech/cubieboard2/genimage.cfg index 8929a72..cde78e1 100644 --- a/board/cubietech/cubieboard2/genimage.cfg +++ b/board/cubietech/cubieboard2/genimage.cfg @@ -26,6 +26,7 @@ image sdcard.img { partition-type = 0xC bootable = "true" image = "boot.vfat" + offset = 1048576 } partition rootfs {