mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Renaud Barbier <renaud.barbier@ge.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] DA923RC: enable UBI/UBIFS configuration
Date: Wed, 29 Jan 2014 11:06:52 +0000	[thread overview]
Message-ID: <1390993612-26246-4-git-send-email-renaud.barbier@ge.com> (raw)
In-Reply-To: <1390993612-26246-1-git-send-email-renaud.barbier@ge.com>

The UBI/UBIFS support is enabled and a script is added to attach
the UBI device and mount the UBIFS partition. This allows the loading
of firmware images from the NOR flash.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
---
 arch/ppc/boards/geip-da923rc/env/bin/init |   12 ++++++++++++
 arch/ppc/configs/da923rc_defconfig        |    6 ++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/ppc/boards/geip-da923rc/env/bin/init b/arch/ppc/boards/geip-da923rc/env/bin/init
index 6308999..330a435 100644
--- a/arch/ppc/boards/geip-da923rc/env/bin/init
+++ b/arch/ppc/boards/geip-da923rc/env/bin/init
@@ -2,3 +2,15 @@
 export PATH=/env/bin
 
 source /env/config
+
+#Define a 26MB partition in flash starting at offset 0x20000
+addpart -n /dev/nor0 0x1a00000@0x20000(boot)
+ubiattach /dev/boot
+
+if [ $? -ne 0 ]; then
+	echo "Fail to attach UBI device"
+	exit 1;
+fi
+
+mkdir /mnt
+mount -t ubifs /dev/ubi0.boot /mnt
diff --git a/arch/ppc/configs/da923rc_defconfig b/arch/ppc/configs/da923rc_defconfig
index a9dc0df..da1b13a 100644
--- a/arch/ppc/configs/da923rc_defconfig
+++ b/arch/ppc/configs/da923rc_defconfig
@@ -42,6 +42,12 @@ CONFIG_DRIVER_CFI_BANK_WIDTH_4=n
 CONFIG_CFI_BUFFER_WRITE=y
 CONFIG_MTD=y
 CONFIG_MTD_WRITE=y
+CONFIG_MTD_UBI=y
+CONFIG_CMD_UBI=y
+CONFIG_FS_UBIFS=y
+CONFIG_FS_UBIFS_COMPRESSION_LZO=y
+CONFIG_CMD_UNLZO=y
+CONFIG_LZO_DECOMPRESS=y
 CONFIG_MALLOC_SIZE=0x2800000
 CONFIG_PROMPT="GE> "
 CONFIG_BAUDRATE=9600
-- 
1.7.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-01-29 11:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 11:06 [PATCH 0/3] DA923RC: enable UBIFS support to allow firmware flash booting Renaud Barbier
2014-01-29 11:06 ` [PATCH 1/3] ppc: remove bit operation headers file conflict Renaud Barbier
2014-01-29 11:06 ` [PATCH 2/3] UBIFS: implement readlink entry point Renaud Barbier
2014-01-29 11:06 ` Renaud Barbier [this message]
2014-01-30  7:43 ` [PATCH 0/3] DA923RC: enable UBIFS support to allow firmware flash booting Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1390993612-26246-4-git-send-email-renaud.barbier@ge.com \
    --to=renaud.barbier@ge.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox