From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mo4.mail-out.ovh.net ([178.32.228.4]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TwZyW-0001eL-NE for barebox@lists.infradead.org; Sat, 19 Jan 2013 15:04:54 +0000 Received: from mail638.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo4.mail-out.ovh.net (Postfix) with SMTP id 0E63D1050ECB for ; Sat, 19 Jan 2013 16:14:28 +0100 (CET) Date: Sat, 19 Jan 2013 16:03:27 +0100 From: Jean-Christophe PLAGNIOL-VILLARD Message-ID: <20130119150327.GA26329@game.jcrosoft.org> References: <20130119112125.GH22953@game.jcrosoft.org> <1358594814-8297-1-git-send-email-plagnioj@jcrosoft.com> <1358594814-8297-7-git-send-email-plagnioj@jcrosoft.com> <20130119113307.GJ1906@pengutronix.de> <20130119133356.GA18803@game.jcrosoft.org> <20130119135201.GM1906@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130119135201.GM1906@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 7/7] at91: usb_a9263: add bootstrap version To: Sascha Hauer Cc: barebox@lists.infradead.org On 14:52 Sat 19 Jan , Sascha Hauer wrote: > On Sat, Jan 19, 2013 at 02:33:56PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > > On 12:33 Sat 19 Jan , Sascha Hauer wrote: > > > On Sat, Jan 19, 2013 at 12:26:54PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > > > > --- > > > > arch/arm/boards/usb-a926x/Makefile | 3 +++ > > > > arch/arm/boards/usb-a926x/usb_a9263_bootstrap.c | 16 ++++++++++++ > > > > .../configs/usb_a9263_128mib_bootstrap_defconfig | 26 ++++++++++++++++++++ > > > > arch/arm/configs/usb_a9263_bootstrap_defconfig | 25 +++++++++++++++++++ > > > > 4 files changed, 70 insertions(+) > > > > create mode 100644 arch/arm/boards/usb-a926x/usb_a9263_bootstrap.c > > > > create mode 100644 arch/arm/configs/usb_a9263_128mib_bootstrap_defconfig > > > > create mode 100644 arch/arm/configs/usb_a9263_bootstrap_defconfig > > > > > > > > diff --git a/arch/arm/boards/usb-a926x/Makefile b/arch/arm/boards/usb-a926x/Makefile > > > > index 9511a76..4c8cd64 100644 > > > > --- a/arch/arm/boards/usb-a926x/Makefile > > > > +++ b/arch/arm/boards/usb-a926x/Makefile > > > > @@ -1,5 +1,8 @@ > > > > obj-y += init.o > > > > > > > > +bootstrap-$(CONFIG_MACH_USB_A9263) = usb_a9263_bootstrap.o > > > > +obj-$(CONFIG_BOOTSTRAP) += $(bootstrap-y) > > > > + > > > > lowlevel_init-$(CONFIG_MACH_USB_A9263) = usb_a9263_lowlevel_init.o > > > > > > > > obj-$(CONFIG_MACH_DO_LOWLEVEL_INIT) += $(lowlevel_init-y) > > > > diff --git a/arch/arm/boards/usb-a926x/usb_a9263_bootstrap.c b/arch/arm/boards/usb-a926x/usb_a9263_bootstrap.c > > > > new file mode 100644 > > > > index 0000000..368c677 > > > > --- /dev/null > > > > +++ b/arch/arm/boards/usb-a926x/usb_a9263_bootstrap.c > > > > @@ -0,0 +1,16 @@ > > > > +/* > > > > + * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD > > > > + * > > > > + * Under GPLv2 > > > > + */ > > > > + > > > > +#include > > > > +#include > > > > +#include > > > > + > > > > +#ifdef CONFIG_MTD_DATAFLASH > > > > +void * bootstrap_board_read_dataflash(void) > > > > +{ > > > > + return bootstrap_read_devfs("dataflash0", false, 0xffc0, 204864, 204864); > > > > +} > > > > +#endif > > > > diff --git a/arch/arm/configs/usb_a9263_128mib_bootstrap_defconfig b/arch/arm/configs/usb_a9263_128mib_bootstrap_defconfig > > > > new file mode 100644 > > > > index 0000000..e71a3c5 > > > > --- /dev/null > > > > +++ b/arch/arm/configs/usb_a9263_128mib_bootstrap_defconfig > > > > @@ -0,0 +1,26 @@ > > > > +CONFIG_ARCH_AT91SAM9263=y > > > > +CONFIG_MACH_USB_A9263=y > > > > +CONFIG_AT91_HAVE_SRAM_128M=y > > > > +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x12000 > > > > +CONFIG_AEABI=y > > > > +# CONFIG_CMD_ARM_CPUINFO is not set > > > > +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y > > > > +CONFIG_ENVIRONMENT_VARIABLES=y > > > > +CONFIG_PBL_IMAGE=y > > > > +CONFIG_MMU=y > > > > +CONFIG_MALLOC_DUMMY=y > > > > +CONFIG_PROMPT="USB-9263:" > > > > +CONFIG_SHELL_NONE=y > > > > +# CONFIG_DEFAULT_ENVIRONMENT is not set > > > > +# CONFIG_SPI is not set > > > > +CONFIG_MTD=y > > > > +# CONFIG_MTD_WRITE is not set > > > > +# CONFIG_MTD_OOB_DEVICE is not set > > > > +CONFIG_NAND=y > > > > +# CONFIG_NAND_ECC_HW is not set > > > > +# CONFIG_NAND_ECC_HW_SYNDROME is not set > > > > +# CONFIG_NAND_ECC_HW_NONE is not set > > > > +CONFIG_NAND_ATMEL=y > > > > +# CONFIG_FS_RAMFS is not set > > > > +CONFIG_BOOTSTRAP=y > > > > +CONFIG_BOOTSTRAP_DEVFS=y > > > > diff --git a/arch/arm/configs/usb_a9263_bootstrap_defconfig b/arch/arm/configs/usb_a9263_bootstrap_defconfig > > > > new file mode 100644 > > > > index 0000000..c4b31ba > > > > --- /dev/null > > > > +++ b/arch/arm/configs/usb_a9263_bootstrap_defconfig > > > > @@ -0,0 +1,25 @@ > > > > +CONFIG_ARCH_AT91SAM9263=y > > > > +CONFIG_MACH_USB_A9263=y > > > > +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x12000 > > > > +CONFIG_AEABI=y > > > > +# CONFIG_CMD_ARM_CPUINFO is not set > > > > +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y > > > > +CONFIG_ENVIRONMENT_VARIABLES=y > > > > +CONFIG_PBL_IMAGE=y > > > > +CONFIG_MMU=y > > > > +CONFIG_MALLOC_DUMMY=y > > > > +CONFIG_PROMPT="USB-9263:" > > > > +CONFIG_SHELL_NONE=y > > > > +# CONFIG_DEFAULT_ENVIRONMENT is not set > > > > +# CONFIG_SPI is not set > > > > +CONFIG_MTD=y > > > > +# CONFIG_MTD_WRITE is not set > > > > +# CONFIG_MTD_OOB_DEVICE is not set > > > > +CONFIG_NAND=y > > > > +# CONFIG_NAND_ECC_HW is not set > > > > +# CONFIG_NAND_ECC_HW_SYNDROME is not set > > > > +# CONFIG_NAND_ECC_HW_NONE is not set > > > > +CONFIG_NAND_ATMEL=y > > > > +# CONFIG_FS_RAMFS is not set > > > > +CONFIG_BOOTSTRAP=y > > > > +CONFIG_BOOTSTRAP_DEVFS=y > > > > > > These configs still fail with > > > > > > arch/arm/mach-at91/built-in.o: In function `boot_seq': > > > at91sam9263_devices.c:(.text.boot_seq+0x28): undefined reference to `bootstrap_boot' > > > > > > When CONFIG_BOOTSTRAP is disabled in make menuconfig. Should it be > > > selected? > > yes BOOTSTRAP is mandatory > > By selected I meant something like: > > config AT91_BOOTSTRAP > bool "Build bootstrap barebox" > depends on SOC_AT91SAM9263 > select HAVE_NOSHELL > select BOOTSTRAP > select SHELL_NONE > > (I haven't tested this) > > It should be possible to disable BOOTSTRAP when it's actually required > to successfully build the binary. yeah but we can build a non-shell binary without it too Best Regards, J. > > Sascha > > > > -- > 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