Re: imx-usb-image write to usb error
Hi Jason, On Wed, Sep 04, 2013 at 09:04:36PM -0400, Jason Cooper wrote: > All, > > This is the first I've messed with i.MX, so I'm a little lost. :) > > I'm putting together a patch to add support for the SanDisk Connect > Wireless Media Drive [1], code dump from SanDisk is here [2]. It turns > out when you unplug the battery, it'll show up as the Freescale hid. > > Here's what I get: > > $ ./scripts/imx/imx-image -c \ > arch/arm/boards/sandisk-connect-wmd/flash-header-lpddr1.imxcfg -f \ > barebox.bin -o barebox.imx > $ sudo ./scripts/imx/imx-usb-loader -v ./barebox.imx > found i.MX50 USB device [15a2:0052] I never tested this on an i.MX50 due to lack of hardware. Have a look at scripts/imx/imx-usb-loader.c at imx_ids. i.MX50 is very similar to i.MX51. The i.MX51 has: { .vid = 0x15a2, .pid = 0x0041, .name = "i.MX51", .header_type = HDR_MX51, .mode = MODE_BULK, .max_transfer = 64, }, The header_type, mode and max_transfer fields are missing for i.MX50. I assume that's the problem. 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
imx-usb-image write to usb error
All, This is the first I've messed with i.MX, so I'm a little lost. :) I'm putting together a patch to add support for the SanDisk Connect Wireless Media Drive [1], code dump from SanDisk is here [2]. It turns out when you unplug the battery, it'll show up as the Freescale hid. Here's what I get: $ ./scripts/imx/imx-image -c \ arch/arm/boards/sandisk-connect-wmd/flash-header-lpddr1.imxcfg -f \ barebox.bin -o barebox.imx $ sudo ./scripts/imx/imx-usb-loader -v ./barebox.imx found i.MX50 USB device [15a2:0052] report=1 report 1, wrote 0 bytes, err=0 report=3 report 3, read 0 bytes, err=-7 read=00 00 00 00 report=1 report 1, wrote 0 bytes, err=0 report=3 report 3, read 0 bytes, err=-7 read=00 00 00 00 report=1 report 1, wrote 0 bytes, err=0 report=3 report 3, read 0 bytes, err=-7 read=00 00 00 00 report=1 report 1, wrote 0 bytes, err=0 report=3 report 3, read 0 bytes, err=-7 read=00 00 00 00 report=1 report 1, wrote 0 bytes, err=0 report=3 report 3, read 0 bytes, err=-7 read=00 00 00 00 report=1 report 1, wrote 0 bytes, err=0 report=3 report 3, read 0 bytes, err=-7 read=00 00 00 00 report=4 4 in err=-7, last_trans=0 00 00 00 00 status failed Looking at the code, it looks like transfer() is always returning 0 bytes in last_trans. Has anyone seen this before? $searchengine came up blank. What simple thing am I missing? thx, Jason. [1] http://www.sandisk.com/products/wireless/media-drive/ [2] http://www.sandisk.com/products/connect/disclaimer/ ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] MIPS: qemu-malta: switch to devicetree
On Wed, Sep 04, 2013 at 09:59:19AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > how about use the compatible property? > > for me I'll just put > model = "toto toto toto" , "toto_toot_toto"; > > if no second string create a hotname on the fly by replace the forbidden char > by '_' That would be fine aswell. We should probably suggest something on the devicetree discuss list. BTW according to EPAPR the model property should be "vendor,model". Most ARM dts don't have this layout anyway. Maybe this increases the motivation to change something there. 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 2/2] defaultenv-2: add login support
request password to login is a timeout is specified and /env/etc/passwd present Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- defaultenv-2/base/bin/init | 9 + 1 file changed, 9 insertions(+) diff --git a/defaultenv-2/base/bin/init b/defaultenv-2/base/bin/init index ca02ba6..e696dce 100644 --- a/defaultenv-2/base/bin/init +++ b/defaultenv-2/base/bin/init @@ -16,11 +16,15 @@ global editcmd=sedit [ -e /env/config-board ] && /env/config-board /env/config +# request password to login is a timeout is specified and /env/etc/passwd present +[ -n ${global.login.timeout} ] && login_cmd=login + # allow to stop the boot before execute the /env/init/* # but without waiting timeout -s -a -v key 0 if [ "${key}" = "q" ]; then + ${login_cmd} exit fi @@ -38,6 +42,7 @@ timeout -a $global.autoboot_timeout -v key autoboot="$?" if [ "${key}" = "q" ]; then + ${login_cmd} exit fi @@ -48,7 +53,11 @@ fi if [ -e /env/menu ]; then if [ "${key}" != "m" ]; then echo -e "\ntype exit to get to the menu" + ${login_cmd} sh fi + ${login_cmd} /env/menu/mainmenu fi + +${login_cmd} -- 1.8.4.rc1 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 1/2] login: add globalvar timeout support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- commands/login.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/commands/login.c b/commands/login.c index fb6bb35..f5429bc 100644 --- a/commands/login.c +++ b/commands/login.c @@ -20,6 +20,10 @@ #include #include #include +#include +#include +#include +#include #define PASSWD_MAX_LENGTH (128 + 1) @@ -31,6 +35,16 @@ #define LOGIN_MODE HIDE #endif +static void login_getenv_int(const char *name, int *i) +{ + const char* str = getenv(name); + + if (!str) + return; + + *i = simple_strtoul(str, NULL, 10); +} + static int do_login(int argc, char *argv[]) { unsigned char passwd[PASSWD_MAX_LENGTH]; @@ -38,6 +52,8 @@ static int do_login(int argc, char *argv[]) int timeout = 0; char *timeout_cmd = "boot"; + login_getenv_int("global.login.timeout", &timeout); + if (!is_passwd_enable()) { puts("login: password not set\n"); return 0; @@ -80,3 +96,13 @@ BAREBOX_CMD_START(login) BAREBOX_CMD_HELP(cmd_login_help) BAREBOX_CMD_COMPLETE(empty_complete) BAREBOX_CMD_END + +static int login_global_init(void) +{ + globalvar_add_simple("login.timeout"); + + return 0; +} +late_initcall(login_global_init); + +BAREBOX_MAGICVAR_NAMED(global_login_timeout, global.login.timeout, "timeout to type the password"); -- 1.8.4.rc1 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 0/2] defaultenv-2: add login support
HI, this will allow to request password when try to interrupt barebox auto boot defaultenv-2: add login support (2013-09-04 17:55:11 +0800) Jean-Christophe PLAGNIOL-VILLARD (2): login: add globalvar timeout support defaultenv-2: add login support commands/login.c | 26 ++ defaultenv-2/base/bin/init | 9 + 2 files changed, 35 insertions(+) Best Regards, J. ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] MIPS: qemu-malta: switch to devicetree
On 08:30 Wed 04 Sep , Sascha Hauer wrote: > On Tue, Sep 03, 2013 at 01:21:56PM +0200, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > On 08:41 Tue 03 Sep , Antony Pavlov wrote: > > > On Tue, 3 Sep 2013 08:33:33 +0400 > > > > -static struct NS16550_plat serial_plat = { > > > > - .clock = 1843200, /* no matter for emulated port */ > > > > - .shift = 0, > > > > -}; > > > > - > > > > -static int malta_console_init(void) > > > > -{ > > > > - barebox_set_model("qemu malta"); > > > > barebox_set_hostname("malta"); > > > > > > > > > > May be it is reasonable to add hostname support to dts? > > > > > > The lonely barebox_set_hostname() in the malta board code looks very > > > pathetically :) > > > > we could use the model propertie for this > > The model property is already used for the verbose name of a board. I > described it as: > > /* > * The model is the verbose name of a board. It can contain > * whitespaces, uppercase/lowcer letters, digits, ',', '.' > * '-', '_' > */ > > Whereas the hostname is without whitespaces, I described it as: > > /* > * The hostname is supposed to be the shortname of a board. It should > * contain only lowercase letters, numbers, '-', '_'. No whitespaces > * allowed. > */ > > I think it is reasonable to add a hostname property to the devicetree. > The last time I thought about this I couldn't really agree with myself > how to name it. how about use the compatible property? for me I'll just put model = "toto toto toto" , "toto_toot_toto"; if no second string create a hotname on the fly by replace the forbidden char by '_' Best Regards, J. ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
v2013.09.0 and v2013.08.1
Hi All, We have a September release. See below what happened since August. Also available is a stable update for August which might be important for initrd users. Sascha Alexander Shiyan (11): blackfin: Remove unneeded assignment commands: nandtest: Fix incorrect size for memset in do_nandtest common: console: Fix possible null pointer dereference ARM: Use armlinux_bootparams address for DTB base: Transform "platform_match" into "device_match" and make this function public spi: Reuse "driver_match" for SPI bus i2c: Reuse "driver_match" for I2C bus mfd: mc13xxx: Determine used bus by "bus_type" field mfd: mc13xxx: Separate query_revision function for each supported IC mfd: mc13xxx: Add support for MC34708 Cleanup Kconfig files Alexey Galakhov (3): friendlyarm-tiny210: use LEDs for boot errors friendlyarm-tiny210: add heartbeat LED Force set console baudrate at enable time Antony Pavlov (6): MIPS: rzx50: add nmon support serial: ns16550: get clock-frequency from dt serial: ns16550: fill cdev just-in-time pbl: add generated file piggy.lz4 to .gitignore resurrect CONFIG_PANIC_HANG option CONFIG_PANIC_HANG: replace #ifdef with IS_ENABLED() Christian Hemp (1): commands: Fix memtest return value David Jander (1): of: base.c: Use correct device-tree in of_add_initrd() Jan Luebbe (1): console: fix console without CONFIG_PARAMETER Jan Weitzel (1): i2c-omap: fix am33xx and omap3 fclk_rate Jason Cooper (1): arm: mvebu: add board USI Topkick Jean-Christophe PLAGNIOL-VILLARD (6): ARM: at91: move main clock define to C ARM: at91 boards: remove empty config.h files ARM: AT91: Turn most board directories into regular build directories pbl: add lz4 support uimage: fix: always support multi image support uimage: fix: fill size when no compression is used Kyungsik Lee (2): decompressor: Add LZ4 decompressor module lib: Add support for LZ4-compressed kernel Philipp Zabel (1): ARM: gk802: Add support for Zealz GK802 Renaud Barbier (2): mpc85xx: remove local bus initialisation P2020RDB: map boot flash. Sascha Hauer (101): led: gpio: Add trigger support ARM: i.MX: External Nand boot: make 2k support nonoptional ARM: i.MX: External Nand boot: remove debug command ARM: i.MX: External Nand boot: move pagesize detection into SoC specific code ARM: i.MX: External Nand boot: remove ifdefs ARM: i.MX: External Nand boot: remove ifdefs around SoC functions ARM: dts: Add i.MX6dl dtsi and pinfunc file ARM: dts: Add more pinctrl groups for i.MX6q ARM: i.MX6: TQ tqma6x initial board support ARM: mxs: implement debug_ll support devfs: let devfs_add_partition return the new partition of: export of_default_bus_match_table of: partitions: factor out function to parse a single partition cdev: introduce partition names cdev: allow to open a struct cdev cdev: add device_find_partition mci: set partnames of eMMC boot partitions of: add mtd of helpers bus: Add imx-weim support of: partition: check for valid node of: Add convenience functions to en/disable devicenodes mtd: Add devicetree partition parsing mci: Add devicetree partition parsing Add configurability via devicetree ARM: i.MX Datamodul edmqx6: configure environment from devicetree ARM: i.MX51 babbage: configure environment from devicetree mtd: nand_imx: Add devicetree probe support mtd: nand: omap: do not set write callback if mtd write is disabled block: shortcut writebuffer_flush if writing is disabled ARM: omap4: Use writel where appropriate ARM: omap4: pcm049: register devices only when support is enabled memory_display: Change address pointer to type const void * mtd: nand: write BBM to OOB even with flash-based BBT mtd: rename MTD_OOB_* to MTD_OPS_* mtd: sync bbm.h with Linux Kernel string: introduce memchr_inv mtd: rename mtd_read_oob mtd: introduce ecc strength mtd: introduce mtd_read_oob and mtd_write_oob scripts: imx-image: allow semicolon as command delimiter scripts: run imxcfg files through cpp ARM: dts: i.MX6: Add label for ocotp nodes ARM: i.MX6: Add ocotp driver ARM: i.MX6 sabre: register MAC address from dt ARM: i.MX53 QSB: configure environment from devicetree ARM: i.MX51 efikasb: configure environment from devicetree clk: provide static inline wrappers serial: ns16550: reorder functions to avoid forward declaration serial: ns16550: introduce private struct serial: ns16550: remove f_caps from platform_data serial: ns16550: Add clk support and make platform_data optional seria
Re: [PATCH 4/4] ARM: support for CPO Science DataCollector II
On Tue, Sep 03, 2013 at 11:06:24AM -0400, Darren Garnier wrote: > Hi Jean-Christophe, > > > > > use init script for this > > ack. > > My reasoning here was not to mount the nand0 unless we were doing dfu. Now > that you point it out, > I see the error in my reasoning.. the time consuming part of the NAND is in > the initial device driver load, > not in adding the partition table. > It shouldn't be very time consuming when you use bad block tables. If it's still too long for you then we could implement the 'detect' mechanism recently introduced for SD/MMC/ATA devices. 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 3/4] small tweeks to build system for compatibility on MacOS X
Hi Darren, On Mon, Sep 02, 2013 at 10:22:49PM -0400, Darren Garnier wrote: > Signed-off-by: Darren Garnier > --- > Makefile | 6 +++--- > scripts/genenv | 3 ++- > 2 files changed, 5 insertions(+), 4 deletions(-) Applied, thanks. I had to hand edit this patch. Your mailer seems to remove leading spaces: diff --git a/Makefile b/Makefile index 397c54a..ff17d8f 100644 --- a/Makefile +++ b/Makefile @@ -577,7 +577,7 @@ define rule_barebox__ $(cmd_sysmap) $@ System.map; \ if [ $$? -ne 0 ]; then \ rm -f $@;\ - /bin/false; \ + false; \ fi; endef ^^^ There should be a space before 'endef' I won't be able to apply bigger patches this way. Consider using git-send-email, once configured to actually send something it will most likely send correct patches. 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 1/1] arm: mmu: catch NULL pointer dereferences
On Mon, Sep 02, 2013 at 12:24:06PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 11:05 Mon 02 Sep , Sascha Hauer wrote: > > On Sat, Aug 31, 2013 at 05:54:22PM +0200, Jean-Christophe PLAGNIOL-VILLARD > > wrote: > > > For high vectors if memory start at 0x0. We have to > > > live without being able to catch NULL pointer dereferences. > > > > > Why not add the check to vectors_init() instead of passing this as > > argument? > > > > I must say I'm not entirely happy with this approach. Being able to > > catch NULL pointer derefs is really a good thing. When exactly does the > > faulting zero SDRAM page become a problem for you? obviously something > > like > > > > cp /somehing /dev/ram0 > > > > does not work. Some care must probably be taken when setting up the > > kernel parameters. Are these the problems or is there something else? > yes it's get issue with uImage that get data load there :( > > as I can not control the load addr from uImage :( > > and on ux5x0 and arm board I have ddr starting at 0x0 Maybe we should add some hook which dynamically enables/disables the zero page. The bootm code could then disable it. Anyway, for now we can also apply the current patch, but please move the is_start_zero test to vectors_init(). 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox