mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [PATCH 1/4] ARM: mini2440: switch to env2
Date: Sun, 18 May 2014 16:46:27 +0200	[thread overview]
Message-ID: <1400424390-24736-2-git-send-email-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <1400424390-24736-1-git-send-email-m.olbrich@pengutronix.de>

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 arch/arm/boards/friendlyarm-mini2440/env/boot/nand |  9 ++++
 arch/arm/boards/friendlyarm-mini2440/env/config    | 54 ----------------------
 .../boards/friendlyarm-mini2440/env/config-board   | 16 +++++++
 .../friendlyarm-mini2440/env/init/mtdparts-nand    | 11 +++++
 arch/arm/mach-samsung/Kconfig                      |  1 +
 5 files changed, 37 insertions(+), 54 deletions(-)
 create mode 100644 arch/arm/boards/friendlyarm-mini2440/env/boot/nand
 delete mode 100644 arch/arm/boards/friendlyarm-mini2440/env/config
 create mode 100644 arch/arm/boards/friendlyarm-mini2440/env/config-board
 create mode 100644 arch/arm/boards/friendlyarm-mini2440/env/init/mtdparts-nand

diff --git a/arch/arm/boards/friendlyarm-mini2440/env/boot/nand b/arch/arm/boards/friendlyarm-mini2440/env/boot/nand
new file mode 100644
index 0000000..3037fd4
--- /dev/null
+++ b/arch/arm/boards/friendlyarm-mini2440/env/boot/nand
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	boot-menu-add-entry "$0" "nand (UBI)"
+	exit
+fi
+
+global.bootm.image="/dev/nand0.kernel.bb"
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rootfstype=ubifs"
diff --git a/arch/arm/boards/friendlyarm-mini2440/env/config b/arch/arm/boards/friendlyarm-mini2440/env/config
deleted file mode 100644
index f060aae..0000000
--- a/arch/arm/boards/friendlyarm-mini2440/env/config
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-
-eth0.serverip=
-user=
-
-# use 'dhcp' to do dhcp in barebox and in kernel
-# use 'none' if you want to skip kernel ip autoconfiguration
-ip=dhcp
-
-# or set your networking parameters here
-#eth0.ipaddr=a.b.c.d
-#eth0.netmask=a.b.c.d
-#eth0.gateway=a.b.c.d
-#eth0.serverip=a.b.c.d
-
-# can be either 'nfs', 'tftp' or 'nand'
-kernel_loc=tftp
-# can be either 'net', 'nand' or 'initrd'
-rootfs_loc=net
-
-# can be either 'jffs2' or 'ubifs'
-rootfs_type=ubifs
-rootfsimage=root-${global.hostname}.${rootfs_type}
-
-kernelimage=zImage-${global.hostname}
-#kernelimage=uImage-${global.hostname}
-#kernelimage=Image-${global.hostname}
-#kernelimage=Image-${global.hostname}.lzo
-
-if [ -n $user ]; then
-	kernelimage="${user}"-"${kernelimage}"
-	nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${global.hostname}"
-	rootfsimage="${user}"-"${rootfsimage}"
-else
-	nfsroot="${eth0.serverip}:/path/to/nfs/root"
-fi
-
-autoboot_timeout=3
-
-#
-# "mini2440" kernel parameter
-# 0 .. 9 = screen type
-# b = backlight enabled
-# t = touch enabled
-# c = camera enabled
-# Note: can be "minit2440= " if nothing of these components are connected
-#
-bootargs="console=ttySAC0,115200 mini2440=0tbc"
-
-# TODO NOR support
-
-nand_device="nand"
-nand_parts="256k(barebox),128k(bareboxenv),1536k(kernel),-(root)"
-rootfs_mtdblock_nand=3
diff --git a/arch/arm/boards/friendlyarm-mini2440/env/config-board b/arch/arm/boards/friendlyarm-mini2440/env/config-board
new file mode 100644
index 0000000..3e07a01
--- /dev/null
+++ b/arch/arm/boards/friendlyarm-mini2440/env/config-board
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.linux.bootargs.console="console=ttySAC0,115200"
+
+#
+# "mini2440" kernel parameter
+# 0 .. 9 = screen type
+# b = backlight enabled
+# t = touch enabled
+# c = camera enabled
+# Note: can be "minit2440= " if nothing of these components are connected
+#
+global.linux.bootargs.base="mini2440=6tb"
diff --git a/arch/arm/boards/friendlyarm-mini2440/env/init/mtdparts-nand b/arch/arm/boards/friendlyarm-mini2440/env/init/mtdparts-nand
new file mode 100644
index 0000000..7271341
--- /dev/null
+++ b/arch/arm/boards/friendlyarm-mini2440/env/init/mtdparts-nand
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	init-menu-add-entry "$0" "NAND partitions"
+	exit
+fi
+
+mtdparts="256k(nand0.barebox),128k(nand0.bareboxenv),1536k(nand0.kernel),-(nand0.root)"
+kernelname="nand"
+
+mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}
diff --git a/arch/arm/mach-samsung/Kconfig b/arch/arm/mach-samsung/Kconfig
index 562b392..13dac29 100644
--- a/arch/arm/mach-samsung/Kconfig
+++ b/arch/arm/mach-samsung/Kconfig
@@ -52,6 +52,7 @@ config MACH_MINI2440
 	select S3C_PLL_INIT
 	select S3C_SDRAM_INIT
 	select HAS_DM9000
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	help
 	  Say Y here if you are using Mini 2440 dev board equipped
 	  with a Samsung S3C2440 Processor
-- 
2.0.0.rc0


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

  reply	other threads:[~2014-05-18 14:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-18 14:46 [PATCH 0/4] some mini2440 updates Michael Olbrich
2014-05-18 14:46 ` Michael Olbrich [this message]
2014-05-18 14:46 ` [PATCH 2/4] ARM: mini2440: update defconfig Michael Olbrich
2014-05-18 14:46 ` [PATCH 3/4] ARM Samsung: fix booting from NAND with pbl Michael Olbrich
2014-05-18 14:46 ` [PATCH 4/4] net: dm9k: only read on packet for each call to dm9k_eth_rx() Michael Olbrich
2014-05-19  7:46 ` [PATCH 0/4] some mini2440 updates 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=1400424390-24736-2-git-send-email-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --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