mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] Add support for kernel and device tree images stored in a partition
@ 2012-07-02 14:14 Maxime Ripard
  2012-07-02 14:14 ` [PATCH 2/2] Add support for the Crystalfontz CFA-10036 board Maxime Ripard
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Maxime Ripard @ 2012-07-02 14:14 UTC (permalink / raw)
  To: barebox; +Cc: Brian Lilly

It is a quite common setup to have a partition with all you need to boot
from the bootloader, ie the kernel image, the device tree blob, etc.

This patch introduces a new "file" location for these two images, which
uses in turn the *_part and the new *_part_type variable specifying the
fs type used by mount.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Brian Lilly <brian@crystalfontz.com>
---
 defaultenv/bin/boot |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 61b893a..26360ed 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -114,6 +114,12 @@ elif [ x$kernel_loc = xnand ]; then
 	kdev="/dev/nand0.kernel.bb"
 elif [ x$kernel_loc = xdisk ]; then
 	kdev="/dev/$kernel_part"
+elif [ x$kernel_loc = xfile ]; then
+	if [ ! -d $kernel_part ]; then
+		mkdir $kernel_part
+		mount /dev/$kernel_part $kernel_part_type $kernel_part
+	fi
+	kdev="$kernel_part/$kernelimage"
 else
 	echo "error: set kernel_loc to one of 'tftp', 'nfs', 'nand', 'nor' or 'disk'"
 	exit 1
@@ -128,6 +134,12 @@ elif [ x$oftree_loc = xnand ]; then
 	odev="/dev/nand0.oftree.bb"
 elif [ x$oftree_loc = xdisk ]; then
 	odev="/dev/$oftree_part"
+elif [ x$oftree_loc = xfile ]; then
+	if [ ! -d $oftree_part ]; then
+		mkdir $oftree_loc
+		mount /dev/$oftree_part $oftree_part_type $oftree_part
+	fi
+	odev="$oftree_part/$oftreeimage"
 fi
 
 [ x$odev = x ] || bootm_opt="$bootm_opt -o $odev"
-- 
1.7.9.5


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

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCHv2 0/2] Add support for the Crystalfontz CFA-10036 module
@ 2012-07-04 13:07 Maxime Ripard
  2012-07-04 13:07 ` [PATCH 2/2] Add support for the Crystalfontz CFA-10036 board Maxime Ripard
  0 siblings, 1 reply; 8+ messages in thread
From: Maxime Ripard @ 2012-07-04 13:07 UTC (permalink / raw)
  To: barebox; +Cc: brian

Hi everyone,

This is the second version of the initial support of the CFA-10036 module.

The module basically has a iMX28 SoC, plus a micro-SD slot, 3 pins to
access the DUART, a USB OTG port, a OLED screen using the Solomon
SSD1307 controller over I2C and a 200-pins SODIMM port to plug an
expansion board.

Support for this board and the additional devices will come
eventually.

Changes from v1:
  * Switched to the new default environment

Maxime Ripard (2):
  Add bootargs script to boot on ext filesystems
  Add support for the Crystalfontz CFA-10036 board

 arch/arm/Makefile                                  |    1 +
 arch/arm/boards/crystalfontz-cfa10036/Makefile     |    1 +
 arch/arm/boards/crystalfontz-cfa10036/cfa10036.c   |  106 ++++++++++++++++++++
 arch/arm/boards/crystalfontz-cfa10036/config.h     |   16 +++
 .../boards/crystalfontz-cfa10036/env/boot/mmc-ext3 |   10 ++
 .../crystalfontz-cfa10036/env/init/automount       |    9 ++
 .../crystalfontz-cfa10036/env/init/bootargs-base   |    8 ++
 .../boards/crystalfontz-cfa10036/env/init/general  |   12 +++
 .../boards/crystalfontz-cfa10036/env/init/hostname |    8 ++
 arch/arm/configs/cfa10036_defconfig                |   42 ++++++++
 arch/arm/mach-mxs/Kconfig                          |    8 ++
 defaultenv-2/base/bin/bootargs-root-ext            |   12 +++
 12 files changed, 233 insertions(+)
 create mode 100644 arch/arm/boards/crystalfontz-cfa10036/Makefile
 create mode 100644 arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
 create mode 100644 arch/arm/boards/crystalfontz-cfa10036/config.h
 create mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/boot/mmc-ext3
 create mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/init/automount
 create mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/init/bootargs-base
 create mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/init/general
 create mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/init/hostname
 create mode 100644 arch/arm/configs/cfa10036_defconfig
 create mode 100644 defaultenv-2/base/bin/bootargs-root-ext

-- 
1.7.9.5


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-07-04 13:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-02 14:14 [PATCH 1/2] Add support for kernel and device tree images stored in a partition Maxime Ripard
2012-07-02 14:14 ` [PATCH 2/2] Add support for the Crystalfontz CFA-10036 board Maxime Ripard
2012-07-03 18:12   ` Sascha Hauer
2012-07-04 12:28     ` Maxime Ripard
2012-07-02 17:30 ` [PATCH 1/2] Add support for kernel and device tree images stored in a partition Belisko Marek
2012-07-03  7:39 ` Sascha Hauer
2012-07-03 11:18   ` Maxime Ripard
2012-07-04 13:07 [PATCHv2 0/2] Add support for the Crystalfontz CFA-10036 module Maxime Ripard
2012-07-04 13:07 ` [PATCH 2/2] Add support for the Crystalfontz CFA-10036 board Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox