* [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; 7+ 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] 7+ messages in thread
* [PATCH 2/2] Add support for the Crystalfontz CFA-10036 board 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 ` Maxime Ripard 2012-07-03 18:12 ` Sascha Hauer 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 2 siblings, 1 reply; 7+ messages in thread From: Maxime Ripard @ 2012-07-02 14:14 UTC (permalink / raw) To: barebox; +Cc: Brian Lilly This patch adds initial support for 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. For now, only the DUART and the MMC controller are used. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Brian Lilly <brian@crystalfontz.com> --- 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 ++++ arch/arm/boards/crystalfontz-cfa10036/env/config | 47 ++++++++++ arch/arm/configs/cfa10036_defconfig | 40 ++++++++ arch/arm/mach-mxs/Kconfig | 7 ++ 7 files changed, 218 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/config create mode 100644 arch/arm/configs/cfa10036_defconfig diff --git a/arch/arm/Makefile b/arch/arm/Makefile index bd684dc..b8280fe 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -118,6 +118,7 @@ board-$(CONFIG_MACH_MX23EVK) := freescale-mx23-evk board-$(CONFIG_MACH_CHUMBY) := chumby_falconwing board-$(CONFIG_MACH_TX28) := karo-tx28 board-$(CONFIG_MACH_MX28EVK) := freescale-mx28-evk +board-$(CONFIG_MACH_CFA10036) := crystalfontz-cfa10036 board-$(CONFIG_MACH_FREESCALE_MX51_PDK) := freescale-mx51-pdk board-$(CONFIG_MACH_FREESCALE_MX53_LOCO) := freescale-mx53-loco board-$(CONFIG_MACH_FREESCALE_MX53_SMD) := freescale-mx53-smd diff --git a/arch/arm/boards/crystalfontz-cfa10036/Makefile b/arch/arm/boards/crystalfontz-cfa10036/Makefile new file mode 100644 index 0000000..75f0020 --- /dev/null +++ b/arch/arm/boards/crystalfontz-cfa10036/Makefile @@ -0,0 +1 @@ +obj-y += cfa10036.o diff --git a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c new file mode 100644 index 0000000..e454afd --- /dev/null +++ b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2010 Juergen Beisert, Pengutronix <kernel@pengutronix.de> + * Copyright (C) 2011 Marc Kleine-Budde, Pengutronix <mkl@pengutronix.de> + * Copyright (C) 2011 Wolfram Sang, Pengutronix <w.sang@pengutronix.de> + * Copyright (C) 2012 Maxime Ripard, Free Electrons <maxime.ripard@free-electrons.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <common.h> +#include <environment.h> +#include <errno.h> +#include <fec.h> +#include <gpio.h> +#include <init.h> +#include <mci.h> +#include <io.h> + +#include <mach/clock.h> +#include <mach/imx-regs.h> +#include <mach/iomux-imx28.h> +#include <mach/mci.h> + +#include <asm/armlinux.h> +#include <asm/mmu.h> + +#include <mach/fb.h> + +#include <generated/mach-types.h> + +/* setup the CPU card internal signals */ +static const uint32_t cfa10036_pads[] = { + /* duart */ + FUNC(2) | PORTF(3, 2) | VE_3_3V, + FUNC(2) | PORTF(3, 3) | VE_3_3V, + + /* mmc0 */ + SSP0_D0 | VE_3_3V | PULLUP(1), + SSP0_D1 | VE_3_3V | PULLUP(1), + SSP0_D2 | VE_3_3V | PULLUP(1), + SSP0_D3 | VE_3_3V | PULLUP(1), + SSP0_D4 | VE_3_3V | PULLUP(1), + SSP0_D5 | VE_3_3V | PULLUP(1), + SSP0_D6 | VE_3_3V | PULLUP(1), + SSP0_D7 | VE_3_3V | PULLUP(1), + SSP0_CMD | VE_3_3V | PULLUP(1), + SSP0_CD | VE_3_3V | PULLUP(1), + SSP0_SCK | VE_3_3V | BITKEEPER(0), + /* MCI slot power control 1 = off */ + PWM3_GPIO | VE_3_3V | GPIO_OUT | GPIO_VALUE(0), +}; + +static struct mxs_mci_platform_data mci_pdata = { + .caps = MMC_MODE_8BIT, + .voltages = MMC_VDD_32_33 | MMC_VDD_33_34, /* fixed to 3.3 V */ + .f_min = 400 * 1000, + .f_max = 25000000, +}; + +static int cfa10036_mem_init(void) +{ + arm_add_mem_device("ram0", IMX_MEMORY_BASE, 128 * 1024 * 1024); + + return 0; +} +mem_initcall(cfa10036_mem_init); + +static int cfa10036_devices_init(void) +{ + int i; + + /* initizalize muxing */ + for (i = 0; i < ARRAY_SIZE(cfa10036_pads); i++) + imx_gpio_mode(cfa10036_pads[i]); + + /* enable IOCLK0 to run at the PLL frequency */ + imx_set_ioclk(0, 480000000); + /* run the SSP unit clock at 100 MHz */ + imx_set_sspclk(0, 100000000, 1); + + armlinux_set_bootparams((void *)IMX_MEMORY_BASE + 0x100); + armlinux_set_architecture(MACH_TYPE_CFA10036); + + add_generic_device("mxs_mci", 0, NULL, IMX_SSP0_BASE, 0, + IORESOURCE_MEM, &mci_pdata); + + return 0; +} +device_initcall(cfa10036_devices_init); + +static int cfa10036_console_init(void) +{ + add_generic_device("stm_serial", 0, NULL, IMX_DBGUART_BASE, 8192, + IORESOURCE_MEM, NULL); + + return 0; +} +console_initcall(cfa10036_console_init); diff --git a/arch/arm/boards/crystalfontz-cfa10036/config.h b/arch/arm/boards/crystalfontz-cfa10036/config.h new file mode 100644 index 0000000..8f18fda --- /dev/null +++ b/arch/arm/boards/crystalfontz-cfa10036/config.h @@ -0,0 +1,16 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _CONFIG_H_ +# define _CONFIG_H_ + +#endif /* _CONFIG_H_ */ diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/config b/arch/arm/boards/crystalfontz-cfa10036/env/config new file mode 100644 index 0000000..5d1bd48 --- /dev/null +++ b/arch/arm/boards/crystalfontz-cfa10036/env/config @@ -0,0 +1,47 @@ +#!/bin/sh + +hostname=cfa10036 +#user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=none + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.serverip=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.ethaddr=de:ad:be:ef:00:00 + +# can be either 'tftp', 'nfs', 'nand', 'nor', 'file' or 'disk' +kernel_loc=file +# can be either 'net', 'nand', 'nor', 'file', 'disk' or 'initrd' +rootfs_loc=disk +# can be either 'nand', 'nor', 'nfs', 'tftp', 'disk', 'file' or 'empty' +oftree_loc=file + +# for flash based rootfs: 'jffs2' or 'ubifs' +# in case of disk any regular filesystem like 'ext2', 'ext3', 'reiserfs' +rootfs_type=ext3 +# where is the rootfs in case of 'rootfs_loc=disk' (linux name) +rootfs_part_linux_dev=mmcblk0p3 +rootfsimage=rootfs-${hostname}.$rootfs_type + +# where is the kernel image in case of 'kernel_loc=disk' +kernel_part=disk0.1 +oftree_part=disk0.1 +kernel_part_type=fat +kernel_part_type=fat + +kernelimage=zImage-$hostname +oftreeimage=oftree-$hostname + +bareboxenvimage=barebox-${hostname}.bin + +autoboot_timeout=3 + +bootargs="console=ttyAMA0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " diff --git a/arch/arm/configs/cfa10036_defconfig b/arch/arm/configs/cfa10036_defconfig new file mode 100644 index 0000000..4c35c6b --- /dev/null +++ b/arch/arm/configs/cfa10036_defconfig @@ -0,0 +1,40 @@ +CONFIG_ARCH_MXS=y +CONFIG_ARCH_IMX28=y +CONFIG_MACH_CFA10036=y +CONFIG_AEABI=y +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y +CONFIG_MMU=y +CONFIG_TEXT_BASE=0x43000000 +CONFIG_MALLOC_SIZE=0x800000 +CONFIG_BROKEN=y +CONFIG_LONGHELP=y +CONFIG_GLOB=y +CONFIG_HUSH_FANCY_PROMPT=y +CONFIG_CMDLINE_EDITING=y +CONFIG_AUTO_COMPLETE=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y +CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/crystalfontz-cfa10036/env" +CONFIG_DEBUG_INFO=y +CONFIG_CMD_EDIT=y +CONFIG_CMD_SLEEP=y +CONFIG_CMD_SAVEENV=y +CONFIG_CMD_EXPORT=y +CONFIG_CMD_PRINTENV=y +CONFIG_CMD_READLINE=y +CONFIG_CMD_ECHO_E=y +CONFIG_CMD_MTEST=y +CONFIG_CMD_MTEST_ALTERNATIVE=y +CONFIG_CMD_BOOTM_SHOW_TYPE=y +CONFIG_CMD_BOOTM_OFTREE=y +CONFIG_CMD_RESET=y +CONFIG_CMD_GO=y +CONFIG_CMD_OFTREE=y +CONFIG_CMD_TIMEOUT=y +CONFIG_CMD_PARTITION=y +CONFIG_CMD_GPIO=y +# CONFIG_SPI is not set +CONFIG_MCI=y +CONFIG_MCI_STARTUP=y +CONFIG_MCI_MXS=y +CONFIG_FS_FAT=y +CONFIG_FS_FAT_LFN=y diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index 3348a3c..7502a01 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -6,12 +6,14 @@ config ARCH_TEXT_BASE default 0x42000000 if MACH_CHUMBY default 0x47000000 if MACH_TX28 default 0x47000000 if MACH_MX28EVK + default 0x47000000 if MACH_CFA10036 config BOARDINFO default "Freescale i.MX23-EVK" if MACH_MX23EVK default "Chumby Falconwing" if MACH_CHUMBY default "Karo TX28" if MACH_TX28 default "Freescale i.MX28-EVK" if MACH_MX28EVK + default "Crystalfontz CFA-10036" if MACH_CFA10036 comment "Freescale i.MX System-on-Chip" @@ -64,6 +66,11 @@ config MACH_MX28EVK help Say Y here if you are using the Freescale i.MX28-EVK board +config MACH_CFA10036 + bool "cfa-10036" + help + Say Y here if you are using the Crystalfontz CFA-10036 module + endchoice endif -- 1.7.9.5 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Add support for the Crystalfontz CFA-10036 board 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 0 siblings, 1 reply; 7+ messages in thread From: Sascha Hauer @ 2012-07-03 18:12 UTC (permalink / raw) To: Maxime Ripard; +Cc: barebox, Brian Lilly Hi Maxime, The patch looks good. I can apply it as is if you wish to or wait until you had a look at the new defenv. Sascha On Mon, Jul 02, 2012 at 04:14:54PM +0200, Maxime Ripard wrote: > This patch adds initial support for 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. > > For now, only the DUART and the MMC controller are used. > > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> > Cc: Brian Lilly <brian@crystalfontz.com> > --- > 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 ++++ > arch/arm/boards/crystalfontz-cfa10036/env/config | 47 ++++++++++ > arch/arm/configs/cfa10036_defconfig | 40 ++++++++ > arch/arm/mach-mxs/Kconfig | 7 ++ > 7 files changed, 218 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/config > create mode 100644 arch/arm/configs/cfa10036_defconfig > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile > index bd684dc..b8280fe 100644 > --- a/arch/arm/Makefile > +++ b/arch/arm/Makefile > @@ -118,6 +118,7 @@ board-$(CONFIG_MACH_MX23EVK) := freescale-mx23-evk > board-$(CONFIG_MACH_CHUMBY) := chumby_falconwing > board-$(CONFIG_MACH_TX28) := karo-tx28 > board-$(CONFIG_MACH_MX28EVK) := freescale-mx28-evk > +board-$(CONFIG_MACH_CFA10036) := crystalfontz-cfa10036 > board-$(CONFIG_MACH_FREESCALE_MX51_PDK) := freescale-mx51-pdk > board-$(CONFIG_MACH_FREESCALE_MX53_LOCO) := freescale-mx53-loco > board-$(CONFIG_MACH_FREESCALE_MX53_SMD) := freescale-mx53-smd > diff --git a/arch/arm/boards/crystalfontz-cfa10036/Makefile b/arch/arm/boards/crystalfontz-cfa10036/Makefile > new file mode 100644 > index 0000000..75f0020 > --- /dev/null > +++ b/arch/arm/boards/crystalfontz-cfa10036/Makefile > @@ -0,0 +1 @@ > +obj-y += cfa10036.o > diff --git a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c > new file mode 100644 > index 0000000..e454afd > --- /dev/null > +++ b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c > @@ -0,0 +1,106 @@ > +/* > + * Copyright (C) 2010 Juergen Beisert, Pengutronix <kernel@pengutronix.de> > + * Copyright (C) 2011 Marc Kleine-Budde, Pengutronix <mkl@pengutronix.de> > + * Copyright (C) 2011 Wolfram Sang, Pengutronix <w.sang@pengutronix.de> > + * Copyright (C) 2012 Maxime Ripard, Free Electrons <maxime.ripard@free-electrons.com> > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation; either version 2 of > + * the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include <common.h> > +#include <environment.h> > +#include <errno.h> > +#include <fec.h> > +#include <gpio.h> > +#include <init.h> > +#include <mci.h> > +#include <io.h> > + > +#include <mach/clock.h> > +#include <mach/imx-regs.h> > +#include <mach/iomux-imx28.h> > +#include <mach/mci.h> > + > +#include <asm/armlinux.h> > +#include <asm/mmu.h> > + > +#include <mach/fb.h> > + > +#include <generated/mach-types.h> > + > +/* setup the CPU card internal signals */ > +static const uint32_t cfa10036_pads[] = { > + /* duart */ > + FUNC(2) | PORTF(3, 2) | VE_3_3V, > + FUNC(2) | PORTF(3, 3) | VE_3_3V, > + > + /* mmc0 */ > + SSP0_D0 | VE_3_3V | PULLUP(1), > + SSP0_D1 | VE_3_3V | PULLUP(1), > + SSP0_D2 | VE_3_3V | PULLUP(1), > + SSP0_D3 | VE_3_3V | PULLUP(1), > + SSP0_D4 | VE_3_3V | PULLUP(1), > + SSP0_D5 | VE_3_3V | PULLUP(1), > + SSP0_D6 | VE_3_3V | PULLUP(1), > + SSP0_D7 | VE_3_3V | PULLUP(1), > + SSP0_CMD | VE_3_3V | PULLUP(1), > + SSP0_CD | VE_3_3V | PULLUP(1), > + SSP0_SCK | VE_3_3V | BITKEEPER(0), > + /* MCI slot power control 1 = off */ > + PWM3_GPIO | VE_3_3V | GPIO_OUT | GPIO_VALUE(0), > +}; > + > +static struct mxs_mci_platform_data mci_pdata = { > + .caps = MMC_MODE_8BIT, > + .voltages = MMC_VDD_32_33 | MMC_VDD_33_34, /* fixed to 3.3 V */ > + .f_min = 400 * 1000, > + .f_max = 25000000, > +}; > + > +static int cfa10036_mem_init(void) > +{ > + arm_add_mem_device("ram0", IMX_MEMORY_BASE, 128 * 1024 * 1024); > + > + return 0; > +} > +mem_initcall(cfa10036_mem_init); > + > +static int cfa10036_devices_init(void) > +{ > + int i; > + > + /* initizalize muxing */ > + for (i = 0; i < ARRAY_SIZE(cfa10036_pads); i++) > + imx_gpio_mode(cfa10036_pads[i]); > + > + /* enable IOCLK0 to run at the PLL frequency */ > + imx_set_ioclk(0, 480000000); > + /* run the SSP unit clock at 100 MHz */ > + imx_set_sspclk(0, 100000000, 1); > + > + armlinux_set_bootparams((void *)IMX_MEMORY_BASE + 0x100); > + armlinux_set_architecture(MACH_TYPE_CFA10036); > + > + add_generic_device("mxs_mci", 0, NULL, IMX_SSP0_BASE, 0, > + IORESOURCE_MEM, &mci_pdata); > + > + return 0; > +} > +device_initcall(cfa10036_devices_init); > + > +static int cfa10036_console_init(void) > +{ > + add_generic_device("stm_serial", 0, NULL, IMX_DBGUART_BASE, 8192, > + IORESOURCE_MEM, NULL); > + > + return 0; > +} > +console_initcall(cfa10036_console_init); > diff --git a/arch/arm/boards/crystalfontz-cfa10036/config.h b/arch/arm/boards/crystalfontz-cfa10036/config.h > new file mode 100644 > index 0000000..8f18fda > --- /dev/null > +++ b/arch/arm/boards/crystalfontz-cfa10036/config.h > @@ -0,0 +1,16 @@ > +/* > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation; either version 2 of > + * the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#ifndef _CONFIG_H_ > +# define _CONFIG_H_ > + > +#endif /* _CONFIG_H_ */ > diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/config b/arch/arm/boards/crystalfontz-cfa10036/env/config > new file mode 100644 > index 0000000..5d1bd48 > --- /dev/null > +++ b/arch/arm/boards/crystalfontz-cfa10036/env/config > @@ -0,0 +1,47 @@ > +#!/bin/sh > + > +hostname=cfa10036 > +#user= > + > +# use 'dhcp' to do dhcp in barebox and in kernel > +# use 'none' if you want to skip kernel ip autoconfiguration > +ip=none > + > +# or set your networking parameters here > +#eth0.ipaddr=a.b.c.d > +#eth0.netmask=a.b.c.d > +#eth0.serverip=a.b.c.d > +#eth0.gateway=a.b.c.d > +#eth0.ethaddr=de:ad:be:ef:00:00 > + > +# can be either 'tftp', 'nfs', 'nand', 'nor', 'file' or 'disk' > +kernel_loc=file > +# can be either 'net', 'nand', 'nor', 'file', 'disk' or 'initrd' > +rootfs_loc=disk > +# can be either 'nand', 'nor', 'nfs', 'tftp', 'disk', 'file' or 'empty' > +oftree_loc=file > + > +# for flash based rootfs: 'jffs2' or 'ubifs' > +# in case of disk any regular filesystem like 'ext2', 'ext3', 'reiserfs' > +rootfs_type=ext3 > +# where is the rootfs in case of 'rootfs_loc=disk' (linux name) > +rootfs_part_linux_dev=mmcblk0p3 > +rootfsimage=rootfs-${hostname}.$rootfs_type > + > +# where is the kernel image in case of 'kernel_loc=disk' > +kernel_part=disk0.1 > +oftree_part=disk0.1 > +kernel_part_type=fat > +kernel_part_type=fat > + > +kernelimage=zImage-$hostname > +oftreeimage=oftree-$hostname > + > +bareboxenvimage=barebox-${hostname}.bin > + > +autoboot_timeout=3 > + > +bootargs="console=ttyAMA0,115200" > + > +# set a fancy prompt (if support is compiled in) > +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " > diff --git a/arch/arm/configs/cfa10036_defconfig b/arch/arm/configs/cfa10036_defconfig > new file mode 100644 > index 0000000..4c35c6b > --- /dev/null > +++ b/arch/arm/configs/cfa10036_defconfig > @@ -0,0 +1,40 @@ > +CONFIG_ARCH_MXS=y > +CONFIG_ARCH_IMX28=y > +CONFIG_MACH_CFA10036=y > +CONFIG_AEABI=y > +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y > +CONFIG_MMU=y > +CONFIG_TEXT_BASE=0x43000000 > +CONFIG_MALLOC_SIZE=0x800000 > +CONFIG_BROKEN=y > +CONFIG_LONGHELP=y > +CONFIG_GLOB=y > +CONFIG_HUSH_FANCY_PROMPT=y > +CONFIG_CMDLINE_EDITING=y > +CONFIG_AUTO_COMPLETE=y > +CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y > +CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/crystalfontz-cfa10036/env" > +CONFIG_DEBUG_INFO=y > +CONFIG_CMD_EDIT=y > +CONFIG_CMD_SLEEP=y > +CONFIG_CMD_SAVEENV=y > +CONFIG_CMD_EXPORT=y > +CONFIG_CMD_PRINTENV=y > +CONFIG_CMD_READLINE=y > +CONFIG_CMD_ECHO_E=y > +CONFIG_CMD_MTEST=y > +CONFIG_CMD_MTEST_ALTERNATIVE=y > +CONFIG_CMD_BOOTM_SHOW_TYPE=y > +CONFIG_CMD_BOOTM_OFTREE=y > +CONFIG_CMD_RESET=y > +CONFIG_CMD_GO=y > +CONFIG_CMD_OFTREE=y > +CONFIG_CMD_TIMEOUT=y > +CONFIG_CMD_PARTITION=y > +CONFIG_CMD_GPIO=y > +# CONFIG_SPI is not set > +CONFIG_MCI=y > +CONFIG_MCI_STARTUP=y > +CONFIG_MCI_MXS=y > +CONFIG_FS_FAT=y > +CONFIG_FS_FAT_LFN=y > diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig > index 3348a3c..7502a01 100644 > --- a/arch/arm/mach-mxs/Kconfig > +++ b/arch/arm/mach-mxs/Kconfig > @@ -6,12 +6,14 @@ config ARCH_TEXT_BASE > default 0x42000000 if MACH_CHUMBY > default 0x47000000 if MACH_TX28 > default 0x47000000 if MACH_MX28EVK > + default 0x47000000 if MACH_CFA10036 > > config BOARDINFO > default "Freescale i.MX23-EVK" if MACH_MX23EVK > default "Chumby Falconwing" if MACH_CHUMBY > default "Karo TX28" if MACH_TX28 > default "Freescale i.MX28-EVK" if MACH_MX28EVK > + default "Crystalfontz CFA-10036" if MACH_CFA10036 > > comment "Freescale i.MX System-on-Chip" > > @@ -64,6 +66,11 @@ config MACH_MX28EVK > help > Say Y here if you are using the Freescale i.MX28-EVK board > > +config MACH_CFA10036 > + bool "cfa-10036" > + help > + Say Y here if you are using the Crystalfontz CFA-10036 module > + > endchoice > > endif > -- > 1.7.9.5 > > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Add support for the Crystalfontz CFA-10036 board 2012-07-03 18:12 ` Sascha Hauer @ 2012-07-04 12:28 ` Maxime Ripard 0 siblings, 0 replies; 7+ messages in thread From: Maxime Ripard @ 2012-07-04 12:28 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox, Brian Lilly Hi Sascha, Le 03/07/2012 20:12, Sascha Hauer a écrit : > Hi Maxime, > > The patch looks good. I can apply it as is if you wish to or wait until > you had a look at the new defenv. I began to work on the new defenv. It definitely looks more flexible :) I'll resend a new version of this patch using it once I'll be done, so I guess you'll have to wait a little :) Thanks, Maxime > On Mon, Jul 02, 2012 at 04:14:54PM +0200, Maxime Ripard wrote: >> This patch adds initial support for 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. >> >> For now, only the DUART and the MMC controller are used. >> >> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> >> Cc: Brian Lilly <brian@crystalfontz.com> >> --- >> 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 ++++ >> arch/arm/boards/crystalfontz-cfa10036/env/config | 47 ++++++++++ >> arch/arm/configs/cfa10036_defconfig | 40 ++++++++ >> arch/arm/mach-mxs/Kconfig | 7 ++ >> 7 files changed, 218 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/config >> create mode 100644 arch/arm/configs/cfa10036_defconfig >> >> diff --git a/arch/arm/Makefile b/arch/arm/Makefile >> index bd684dc..b8280fe 100644 >> --- a/arch/arm/Makefile >> +++ b/arch/arm/Makefile >> @@ -118,6 +118,7 @@ board-$(CONFIG_MACH_MX23EVK) := freescale-mx23-evk >> board-$(CONFIG_MACH_CHUMBY) := chumby_falconwing >> board-$(CONFIG_MACH_TX28) := karo-tx28 >> board-$(CONFIG_MACH_MX28EVK) := freescale-mx28-evk >> +board-$(CONFIG_MACH_CFA10036) := crystalfontz-cfa10036 >> board-$(CONFIG_MACH_FREESCALE_MX51_PDK) := freescale-mx51-pdk >> board-$(CONFIG_MACH_FREESCALE_MX53_LOCO) := freescale-mx53-loco >> board-$(CONFIG_MACH_FREESCALE_MX53_SMD) := freescale-mx53-smd >> diff --git a/arch/arm/boards/crystalfontz-cfa10036/Makefile b/arch/arm/boards/crystalfontz-cfa10036/Makefile >> new file mode 100644 >> index 0000000..75f0020 >> --- /dev/null >> +++ b/arch/arm/boards/crystalfontz-cfa10036/Makefile >> @@ -0,0 +1 @@ >> +obj-y += cfa10036.o >> diff --git a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c >> new file mode 100644 >> index 0000000..e454afd >> --- /dev/null >> +++ b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c >> @@ -0,0 +1,106 @@ >> +/* >> + * Copyright (C) 2010 Juergen Beisert, Pengutronix <kernel@pengutronix.de> >> + * Copyright (C) 2011 Marc Kleine-Budde, Pengutronix <mkl@pengutronix.de> >> + * Copyright (C) 2011 Wolfram Sang, Pengutronix <w.sang@pengutronix.de> >> + * Copyright (C) 2012 Maxime Ripard, Free Electrons <maxime.ripard@free-electrons.com> >> + * >> + * This program is free software; you can redistribute it and/or >> + * modify it under the terms of the GNU General Public License as >> + * published by the Free Software Foundation; either version 2 of >> + * the License, or (at your option) any later version. >> + * >> + * This program is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + */ >> + >> +#include <common.h> >> +#include <environment.h> >> +#include <errno.h> >> +#include <fec.h> >> +#include <gpio.h> >> +#include <init.h> >> +#include <mci.h> >> +#include <io.h> >> + >> +#include <mach/clock.h> >> +#include <mach/imx-regs.h> >> +#include <mach/iomux-imx28.h> >> +#include <mach/mci.h> >> + >> +#include <asm/armlinux.h> >> +#include <asm/mmu.h> >> + >> +#include <mach/fb.h> >> + >> +#include <generated/mach-types.h> >> + >> +/* setup the CPU card internal signals */ >> +static const uint32_t cfa10036_pads[] = { >> + /* duart */ >> + FUNC(2) | PORTF(3, 2) | VE_3_3V, >> + FUNC(2) | PORTF(3, 3) | VE_3_3V, >> + >> + /* mmc0 */ >> + SSP0_D0 | VE_3_3V | PULLUP(1), >> + SSP0_D1 | VE_3_3V | PULLUP(1), >> + SSP0_D2 | VE_3_3V | PULLUP(1), >> + SSP0_D3 | VE_3_3V | PULLUP(1), >> + SSP0_D4 | VE_3_3V | PULLUP(1), >> + SSP0_D5 | VE_3_3V | PULLUP(1), >> + SSP0_D6 | VE_3_3V | PULLUP(1), >> + SSP0_D7 | VE_3_3V | PULLUP(1), >> + SSP0_CMD | VE_3_3V | PULLUP(1), >> + SSP0_CD | VE_3_3V | PULLUP(1), >> + SSP0_SCK | VE_3_3V | BITKEEPER(0), >> + /* MCI slot power control 1 = off */ >> + PWM3_GPIO | VE_3_3V | GPIO_OUT | GPIO_VALUE(0), >> +}; >> + >> +static struct mxs_mci_platform_data mci_pdata = { >> + .caps = MMC_MODE_8BIT, >> + .voltages = MMC_VDD_32_33 | MMC_VDD_33_34, /* fixed to 3.3 V */ >> + .f_min = 400 * 1000, >> + .f_max = 25000000, >> +}; >> + >> +static int cfa10036_mem_init(void) >> +{ >> + arm_add_mem_device("ram0", IMX_MEMORY_BASE, 128 * 1024 * 1024); >> + >> + return 0; >> +} >> +mem_initcall(cfa10036_mem_init); >> + >> +static int cfa10036_devices_init(void) >> +{ >> + int i; >> + >> + /* initizalize muxing */ >> + for (i = 0; i < ARRAY_SIZE(cfa10036_pads); i++) >> + imx_gpio_mode(cfa10036_pads[i]); >> + >> + /* enable IOCLK0 to run at the PLL frequency */ >> + imx_set_ioclk(0, 480000000); >> + /* run the SSP unit clock at 100 MHz */ >> + imx_set_sspclk(0, 100000000, 1); >> + >> + armlinux_set_bootparams((void *)IMX_MEMORY_BASE + 0x100); >> + armlinux_set_architecture(MACH_TYPE_CFA10036); >> + >> + add_generic_device("mxs_mci", 0, NULL, IMX_SSP0_BASE, 0, >> + IORESOURCE_MEM, &mci_pdata); >> + >> + return 0; >> +} >> +device_initcall(cfa10036_devices_init); >> + >> +static int cfa10036_console_init(void) >> +{ >> + add_generic_device("stm_serial", 0, NULL, IMX_DBGUART_BASE, 8192, >> + IORESOURCE_MEM, NULL); >> + >> + return 0; >> +} >> +console_initcall(cfa10036_console_init); >> diff --git a/arch/arm/boards/crystalfontz-cfa10036/config.h b/arch/arm/boards/crystalfontz-cfa10036/config.h >> new file mode 100644 >> index 0000000..8f18fda >> --- /dev/null >> +++ b/arch/arm/boards/crystalfontz-cfa10036/config.h >> @@ -0,0 +1,16 @@ >> +/* >> + * This program is free software; you can redistribute it and/or >> + * modify it under the terms of the GNU General Public License as >> + * published by the Free Software Foundation; either version 2 of >> + * the License, or (at your option) any later version. >> + * >> + * This program is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + */ >> + >> +#ifndef _CONFIG_H_ >> +# define _CONFIG_H_ >> + >> +#endif /* _CONFIG_H_ */ >> diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/config b/arch/arm/boards/crystalfontz-cfa10036/env/config >> new file mode 100644 >> index 0000000..5d1bd48 >> --- /dev/null >> +++ b/arch/arm/boards/crystalfontz-cfa10036/env/config >> @@ -0,0 +1,47 @@ >> +#!/bin/sh >> + >> +hostname=cfa10036 >> +#user= >> + >> +# use 'dhcp' to do dhcp in barebox and in kernel >> +# use 'none' if you want to skip kernel ip autoconfiguration >> +ip=none >> + >> +# or set your networking parameters here >> +#eth0.ipaddr=a.b.c.d >> +#eth0.netmask=a.b.c.d >> +#eth0.serverip=a.b.c.d >> +#eth0.gateway=a.b.c.d >> +#eth0.ethaddr=de:ad:be:ef:00:00 >> + >> +# can be either 'tftp', 'nfs', 'nand', 'nor', 'file' or 'disk' >> +kernel_loc=file >> +# can be either 'net', 'nand', 'nor', 'file', 'disk' or 'initrd' >> +rootfs_loc=disk >> +# can be either 'nand', 'nor', 'nfs', 'tftp', 'disk', 'file' or 'empty' >> +oftree_loc=file >> + >> +# for flash based rootfs: 'jffs2' or 'ubifs' >> +# in case of disk any regular filesystem like 'ext2', 'ext3', 'reiserfs' >> +rootfs_type=ext3 >> +# where is the rootfs in case of 'rootfs_loc=disk' (linux name) >> +rootfs_part_linux_dev=mmcblk0p3 >> +rootfsimage=rootfs-${hostname}.$rootfs_type >> + >> +# where is the kernel image in case of 'kernel_loc=disk' >> +kernel_part=disk0.1 >> +oftree_part=disk0.1 >> +kernel_part_type=fat >> +kernel_part_type=fat >> + >> +kernelimage=zImage-$hostname >> +oftreeimage=oftree-$hostname >> + >> +bareboxenvimage=barebox-${hostname}.bin >> + >> +autoboot_timeout=3 >> + >> +bootargs="console=ttyAMA0,115200" >> + >> +# set a fancy prompt (if support is compiled in) >> +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " >> diff --git a/arch/arm/configs/cfa10036_defconfig b/arch/arm/configs/cfa10036_defconfig >> new file mode 100644 >> index 0000000..4c35c6b >> --- /dev/null >> +++ b/arch/arm/configs/cfa10036_defconfig >> @@ -0,0 +1,40 @@ >> +CONFIG_ARCH_MXS=y >> +CONFIG_ARCH_IMX28=y >> +CONFIG_MACH_CFA10036=y >> +CONFIG_AEABI=y >> +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y >> +CONFIG_MMU=y >> +CONFIG_TEXT_BASE=0x43000000 >> +CONFIG_MALLOC_SIZE=0x800000 >> +CONFIG_BROKEN=y >> +CONFIG_LONGHELP=y >> +CONFIG_GLOB=y >> +CONFIG_HUSH_FANCY_PROMPT=y >> +CONFIG_CMDLINE_EDITING=y >> +CONFIG_AUTO_COMPLETE=y >> +CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y >> +CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/crystalfontz-cfa10036/env" >> +CONFIG_DEBUG_INFO=y >> +CONFIG_CMD_EDIT=y >> +CONFIG_CMD_SLEEP=y >> +CONFIG_CMD_SAVEENV=y >> +CONFIG_CMD_EXPORT=y >> +CONFIG_CMD_PRINTENV=y >> +CONFIG_CMD_READLINE=y >> +CONFIG_CMD_ECHO_E=y >> +CONFIG_CMD_MTEST=y >> +CONFIG_CMD_MTEST_ALTERNATIVE=y >> +CONFIG_CMD_BOOTM_SHOW_TYPE=y >> +CONFIG_CMD_BOOTM_OFTREE=y >> +CONFIG_CMD_RESET=y >> +CONFIG_CMD_GO=y >> +CONFIG_CMD_OFTREE=y >> +CONFIG_CMD_TIMEOUT=y >> +CONFIG_CMD_PARTITION=y >> +CONFIG_CMD_GPIO=y >> +# CONFIG_SPI is not set >> +CONFIG_MCI=y >> +CONFIG_MCI_STARTUP=y >> +CONFIG_MCI_MXS=y >> +CONFIG_FS_FAT=y >> +CONFIG_FS_FAT_LFN=y >> diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig >> index 3348a3c..7502a01 100644 >> --- a/arch/arm/mach-mxs/Kconfig >> +++ b/arch/arm/mach-mxs/Kconfig >> @@ -6,12 +6,14 @@ config ARCH_TEXT_BASE >> default 0x42000000 if MACH_CHUMBY >> default 0x47000000 if MACH_TX28 >> default 0x47000000 if MACH_MX28EVK >> + default 0x47000000 if MACH_CFA10036 >> >> config BOARDINFO >> default "Freescale i.MX23-EVK" if MACH_MX23EVK >> default "Chumby Falconwing" if MACH_CHUMBY >> default "Karo TX28" if MACH_TX28 >> default "Freescale i.MX28-EVK" if MACH_MX28EVK >> + default "Crystalfontz CFA-10036" if MACH_CFA10036 >> >> comment "Freescale i.MX System-on-Chip" >> >> @@ -64,6 +66,11 @@ config MACH_MX28EVK >> help >> Say Y here if you are using the Freescale i.MX28-EVK board >> >> +config MACH_CFA10036 >> + bool "cfa-10036" >> + help >> + Say Y here if you are using the Crystalfontz CFA-10036 module >> + >> endchoice >> >> endif >> -- >> 1.7.9.5 >> >> >> _______________________________________________ >> barebox mailing list >> barebox@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/barebox >> > -- Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Add support for kernel and device tree images stored in a partition 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-02 17:30 ` Belisko Marek 2012-07-03 7:39 ` Sascha Hauer 2 siblings, 0 replies; 7+ messages in thread From: Belisko Marek @ 2012-07-02 17:30 UTC (permalink / raw) To: Maxime Ripard; +Cc: barebox, Brian Lilly On Mon, Jul 2, 2012 at 4:14 PM, Maxime Ripard <maxime.ripard@free-electrons.com> wrote: > 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" This really helps also pandaboard because pandaboard kernel is still on mmc and I was looking for such solution (thx). Maybe one remark there should be also update for file option in _boot_help script. > 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 regards, marek -- as simple and primitive as possible ------------------------------------------------- Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Add support for kernel and device tree images stored in a partition 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-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 2 siblings, 1 reply; 7+ messages in thread From: Sascha Hauer @ 2012-07-03 7:39 UTC (permalink / raw) To: Maxime Ripard; +Cc: barebox, Brian Lilly Hi Maxime, On Mon, Jul 02, 2012 at 04:14:53PM +0200, Maxime Ripard wrote: > 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. That was one of the major shortcomings of the default environment and one of the main reasons I created a new environment template. Have you considered using it? Sascha > > 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 > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Add support for kernel and device tree images stored in a partition 2012-07-03 7:39 ` Sascha Hauer @ 2012-07-03 11:18 ` Maxime Ripard 0 siblings, 0 replies; 7+ messages in thread From: Maxime Ripard @ 2012-07-03 11:18 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox, Brian Lilly Hi Sascha, Le 03/07/2012 09:39, Sascha Hauer a écrit : > On Mon, Jul 02, 2012 at 04:14:53PM +0200, Maxime Ripard wrote: >> 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. > > That was one of the major shortcomings of the default environment and > one of the main reasons I created a new environment template. Have you > considered using it? Ha, I think I missed it :) It looks quite useful indeed. I will drop this patch then and send an updated version once I'll be able to use it properly. Thanks! Maxime -- Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-07-04 12:29 UTC | newest] Thread overview: 7+ 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox