mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* how to flash barebox and set root variable?
@ 2013-06-06 16:03 Adam Furmanczuk
  2013-06-06 16:21 ` Sascha Hauer
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-06 16:03 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I am quite new to barebox. Before I had little bit experience in u-Boot.

My Barebox version is: barebox 2012.03.0-00162-g3f84abc-dirty (Sep 24
2012 - 10:51:42)

I can mount a Linaro freescale mx53 sd-card setup. I think it has one
Fat8 partion, because Fat32 and Fat16 are not recognized by my barebox
version.

When I boot the uImage, it complains about not setting the "root="
parameter, when I give it as an argument it does not work.

In my u-Boot setup all I need to do was write:

setenv bootcmd "fatload mmc 0:2 0x70800000 uImage;bootm"
setenv bootargs "console=tty0 console=ttymxc0,115200n8
root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro"

Maybe this is a version isuue? I managed to build the latest kernel
what is the procedure to "flash" the new barebox.bin? Can I use the cp
command for this, or do I need to flash it via OCD? If so what are
good tools in linux to achieve that task?

OK a lot of questions. Most probably already answered, but had not
found google.

Thanks for help and sorry for repeating questions already answered.

Adam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGwstYACgkQefEEI87R1DeHaQCgkNvnNfFLBBZszhb8uzAavgAn
vO4AoJZqx1U9LD6IXGmT7RiMbWL5hW/w
=uv5T
-----END PGP SIGNATURE-----

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

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

* Re: how to flash barebox and set root variable?
  2013-06-06 16:03 how to flash barebox and set root variable? Adam Furmanczuk
@ 2013-06-06 16:21 ` Sascha Hauer
  2013-06-07  5:08   ` Adam Furmanczuk
  2013-06-10 12:24   ` Adam Furmanczuk
  2013-07-03 13:32 ` set root variable for uImage? Adam Furmanczuk
  2013-07-03 15:21 ` Adam Furmanczuk
  2 siblings, 2 replies; 28+ messages in thread
From: Sascha Hauer @ 2013-06-06 16:21 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

On Thu, Jun 06, 2013 at 06:03:34PM +0200, Adam Furmanczuk wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> I am quite new to barebox. Before I had little bit experience in u-Boot.
> 
> My Barebox version is: barebox 2012.03.0-00162-g3f84abc-dirty (Sep 24
> 2012 - 10:51:42)
> 
> I can mount a Linaro freescale mx53 sd-card setup. I think it has one
> Fat8 partion, because Fat32 and Fat16 are not recognized by my barebox
> version.
> 
> When I boot the uImage, it complains about not setting the "root="
> parameter, when I give it as an argument it does not work.
> 
> In my u-Boot setup all I need to do was write:
> 
> setenv bootcmd "fatload mmc 0:2 0x70800000 uImage;bootm"
> setenv bootargs "console=tty0 console=ttymxc0,115200n8
> root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro"
> 
> Maybe this is a version isuue? I managed to build the latest kernel
> what is the procedure to "flash" the new barebox.bin? Can I use the cp
> command for this, or do I need to flash it via OCD? If so what are
> good tools in linux to achieve that task?
> 
> OK a lot of questions. Most probably already answered, but had not
> found google.

What board do you have? Is it one supported by barebox or do you have
your own patches?

Generally with i.MX5 you can write the image (barebox.bin in this old
version, barebox-flash-image in more recent versions) directly to a
MMC/SD card, under Linux with:

cat barebox.bin > /dev/sdx

or under barebox:

tftp barebox.bin /dev/mci0

Generally you also always start barebox 2nd stage. So if you have an
older barebox (Or U-Boot) on your board you can:

tftp barebox.bin /dev/ram0
go /dev/ram0

(Similar with U-Boot: tftp $loadaddr barebox.bin; go $loadaddr)

This way you can test barebox without any risk.

What to do next depends on the environment you have. Please send the
output of 'ls -l /env'.

Using a more recent version of barebox probably is a good idea. We
gained a lot of interesting features in the last year.

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

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

* Re: how to flash barebox and set root variable?
  2013-06-06 16:21 ` Sascha Hauer
@ 2013-06-07  5:08   ` Adam Furmanczuk
  2013-06-07 10:55     ` Sascha Hauer
  2013-06-10 12:24   ` Adam Furmanczuk
  1 sibling, 1 reply; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-07  5:08 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Sascha,

thank you very much for your help.

> What board do you have? Is it one supported by barebox or do you
> have your own patches?

The board is a imx536 based [1]. The expansion board for this is self
made. We connect RX, TX, Ground to a OCD-Adapter [2] and are able to
communicate with barebox.

My Barebox version is: barebox 2012.03.0-00162-g3f84abc-dirty (Sep 24
2012 - 10:51:42) it was already flashed in nor when we recieved the board.


> What to do next depends on the environment you have. Please send
> the output of 'ls -l /env'.

The module is at my work place, I will post back on monday. I also
post you the config file, which at this stage is still diffucilt for
me to read.

> Using a more recent version of barebox probably is a good idea. We 
> gained a lot of interesting features in the last year.

Exactly, I have seen in 'make menuconfig' when building the latest image.

I try to write barebox.bin to my sd-card on host with:

cat barebox.bin > /dev/sdx

and report back to barebox reaction.


Greetings,

Adam


[1] http://www.in-circuit.de/produkte/icnova-sodimm-cpu-module.html
[2]
http://shop.in-circuit.de/products/Home/Programmieradapter/16/ICprog-OpenOCD

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGxatAACgkQefEEI87R1DdcrQCfYL5nfs8K4Hsdp6GTuDWHCfXs
khoAoIa0wy08POHDy8SZeLCrhV35iZET
=M7kH
-----END PGP SIGNATURE-----

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

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

* Re: how to flash barebox and set root variable?
  2013-06-07  5:08   ` Adam Furmanczuk
@ 2013-06-07 10:55     ` Sascha Hauer
  0 siblings, 0 replies; 28+ messages in thread
From: Sascha Hauer @ 2013-06-07 10:55 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

On Fri, Jun 07, 2013 at 07:08:32AM +0200, Adam Furmanczuk wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Sascha,
> 
> thank you very much for your help.
> 
> > What board do you have? Is it one supported by barebox or do you
> > have your own patches?
> 
> The board is a imx536 based [1]. The expansion board for this is self
> made. We connect RX, TX, Ground to a OCD-Adapter [2] and are able to
> communicate with barebox.
> 
> My Barebox version is: barebox 2012.03.0-00162-g3f84abc-dirty (Sep 24
> 2012 - 10:51:42) it was already flashed in nor when we recieved the board.

I see. They should provide the source code for this. I haven't
downloaded the CD images they provide. Do you know whether there
are barebox sources provided on the CDs?

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

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

* Re: how to flash barebox and set root variable?
  2013-06-06 16:21 ` Sascha Hauer
  2013-06-07  5:08   ` Adam Furmanczuk
@ 2013-06-10 12:24   ` Adam Furmanczuk
  2013-06-10 17:01     ` how to flash barebox and set root variable? - barebox is gone :( Adam Furmanczuk
  1 sibling, 1 reply; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-10 12:24 UTC (permalink / raw)
  To: barebox

[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Sascha,

> What to do next depends on the environment you have. Please send
> the output of 'ls -l /env'.


that would be:

drwxrwxrwx          0 .
drwxrwxrwx          0 ..
- -rwxrwxrwx       1230 config
drwxrwxrwx          0 bin

contents of /env/bin is:

- -rwxrwxrwx        817 _update_help
- -rwxrwxrwx        447 update_nfs
- -rwxrwxrwx       1362 update
- -rwxrwxrwx        285 mv
- -rwxrwxrwx       3445 boot
- -rwxrwxrwx        590 init
- -rwxrwxrwx         21 hush_hack
- -rwxrwxrwx        571 _boot_help
- -rwxrwxrwx        702 _update

and ls -l /dev prints:

cr-------- 4294967295 zero
crw-------  536870912 ram0
crw-------      11108 defaultenv
crw------- 4294967295 mem
crw-------         64 phy0
crw------- 3616538624 disk0
crw-------    4193792 disk0.0
crw-------   54525952 disk0.1
crw-------    8388608 nor0
crw-------     917504 self0
crw-------     131072 env0
crw-------     917504 nor0.barebox
crw-------     131072 nor0.bareboxenv
crw-------    7340032 nor0.kernel

well, have tried to make an barebox.bin start disk with the cat
barebox.bin > /dev/sdX, but not sure how to proceed to run from sd-card.

On a different try, I copied barebox.bin on a fat12 sd partition and
tried to update on the mounted partion:

update -t barebox -d nor -f barebox.bin

but the syntax is:

type update -t barebox -d <nor|nand> [-m tftp|xmodem|nfs] [-f
imagename] to update barebox into flash

"-m" does not give my disk as source, so I guess I have to get tftp to
work..

> I haven't downloaded the CD images they provide. Do you know
> whether there are barebox sources provided on the CDs?

On CD there is basically buildroot and the config files for barebox I
have attached to this mail.


Just to recall: my problem is that i do not know how to provide
"root=" parameter to my barebox environemnt. I load the zImage by
mounting partition by hand and running "bootm".

Thanks for help, Greetings,

Adam







-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlG1xWwACgkQefEEI87R1Df8KwCgnaq0Vx4oEY8dQt4+LWDYhiF9
4rAAoMrMmDFZ1LivOBn2E2byd2MENiHB
=vSZi
-----END PGP SIGNATURE-----

[-- Attachment #2: barebox.mk --]
[-- Type: text/plain, Size: 2817 bytes --]

#############################################################
#
# Barebox
#
#############################################################

BAREBOX_VERSION    = $(call qstrip,$(BR2_TARGET_BAREBOX_VERSION))

ifeq ($(BAREBOX_VERSION),custom)
# Handle custom Barebox tarballs as specified by the configuration
BAREBOX_TARBALL = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION))
BAREBOX_SITE    = $(dir $(BAREBOX_TARBALL))
BAREBOX_SOURCE  = $(notdir $(BAREBOX_TARBALL))
else ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_GIT),y)
BAREBOX_SITE        = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL))
BAREBOX_SITE_METHOD = git
else
# Handle stable official Barebox versions
BAREBOX_SOURCE = barebox-$(BAREBOX_VERSION).tar.bz2
BAREBOX_SITE = http://www.barebox.org/download/
endif

BAREBOX_LICENSE = GPLv2
BAREBOX_LICENSE_FILES = COPYING

ifneq ($(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),)
define BAREBOX_APPLY_CUSTOM_PATCHES
	support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \
		barebox-$(BAREBOX_VERSION)-\*.patch
endef

BAREBOX_POST_PATCH_HOOKS += BAREBOX_APPLY_CUSTOM_PATCHES
endif

BAREBOX_INSTALL_IMAGES = YES
ifneq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
BAREBOX_INSTALL_TARGET = NO
endif

BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))

ifeq ($(KERNEL_ARCH),i386)
BAREBOX_ARCH=x86
else ifeq ($(KERNEL_ARCH),powerpc)
BAREBOX_ARCH=ppc
else
BAREBOX_ARCH=$(KERNEL_ARCH)
endif

BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"

define BAREBOX_CONFIGURE_CMDS
	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) $(BAREBOX_BOARD_DEFCONFIG)_defconfig
endef

ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
define BAREBOX_BUILD_BAREBOXENV_CMDS
	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \
		$(@D)/scripts/bareboxenv.c
endef
endif

define BAREBOX_BUILD_CMDS
	$(BAREBOX_BUILD_BAREBOXENV_CMDS)
	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
endef

define BAREBOX_INSTALL_IMAGES_CMDS
	cp $(@D)/barebox.bin $(BINARIES_DIR)
endef

ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
define BAREBOX_INSTALL_TARGET_CMDS
	cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin
endef
endif

$(eval $(generic-package))

ifeq ($(BR2_TARGET_BAREBOX),y)
# we NEED a board defconfig file unless we're at make source
ifeq ($(filter source,$(MAKECMDGOALS)),)
ifeq ($(BAREBOX_BOARD_DEFCONFIG),)
$(error No Barebox defconfig file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG setting)
endif
endif

barebox-menuconfig barebox-xconfig barebox-gconfig barebox-nconfig: barebox-configure
	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \
		$(subst barebox-,,$@)
	rm -f $(BAREBOX_DIR)/.stamp_{built,target_installed,images_installed}

barebox-savedefconfig: barebox-configure
	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \
		$(subst barebox-,,$@)

endif

[-- Attachment #3: Config.in --]
[-- Type: text/plain, Size: 1916 bytes --]

config BR2_TARGET_BAREBOX
	bool "Barebox"
	help
	  The Barebox bootloader, formerly known as U-Boot v2.

	  http://www.barebox.org

if BR2_TARGET_BAREBOX
choice
	prompt "version"
	default BR2_TARGET_BAREBOX_2012_07
	help
	  Select the specific Barebox version you want to use

config BR2_TARGET_BAREBOX_2012_04
	bool "2012.04"

config BR2_TARGET_BAREBOX_2012_05
	bool "2012.05"

config BR2_TARGET_BAREBOX_2012_06
	bool "2012.06"

config BR2_TARGET_BAREBOX_2012_07
	bool "2012.07"

config BR2_TARGET_BAREBOX_CUSTOM_TARBALL
	bool "Custom tarball"

config BR2_TARGET_BAREBOX_CUSTOM_GIT
	bool "Custom Git repository"

endchoice

if BR2_TARGET_BAREBOX_CUSTOM_TARBALL

config BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION
	string "URL of custom Barebox tarball"

endif

config BR2_TARGET_BAREBOX_VERSION
	string
	default "2012.04.0"	if BR2_TARGET_BAREBOX_2012_04
	default "2012.05.0"	if BR2_TARGET_BAREBOX_2012_05
	default "2012.06.0"	if BR2_TARGET_BAREBOX_2012_06
	default "2012.07.0"	if BR2_TARGET_BAREBOX_2012_07
	default "custom"	if BR2_TARGET_BAREBOX_CUSTOM_TARBALL
	default $BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION if BR2_TARGET_BAREBOX_CUSTOM_GIT

config BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR
	string "custom patch dir"
	help
	  If your board requires custom patches, add the path to the
	  directory containing the patches here. The patches must be
	  named barebox-<version>-<something>.patch.

	  Most users may leave this empty

if BR2_TARGET_BAREBOX_CUSTOM_GIT

config BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL
	string "URL of custom Git repository"

config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION
	string "Custom Git version"

endif

config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
	string "board defconfig"
	help
	  Name of the board for which Barebox should be built, without
	  the _defconfig suffix.

config BR2_TARGET_BAREBOX_BAREBOXENV
	bool "bareboxenv tool in target"
	help
	  Install bareboxenv tool in target.

endif

[-- Attachment #4: Type: text/plain, Size: 149 bytes --]

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-10 12:24   ` Adam Furmanczuk
@ 2013-06-10 17:01     ` Adam Furmanczuk
  2013-06-10 17:07       ` Re[2]: " Alexander Shiyan
  0 siblings, 1 reply; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-10 17:01 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

One thing to add:

I managed to run tftpd-hpa server on my debian box and tried to update
kernel to nor0.kernel. I run:

update -t kernel -d barebox -d nor -m tftp -f barebox.bin

Which gave me output [1], obviously tftp is wrong configured. When I
mount with filesystem tftp and copy with cp I get the files.

Well I did the same with barebox, just to make sure. It also ereased
first and then complained it cannot run tftp (I had probably an
interrupt at my brain to perform that action ;) )

With barebox still in ram I tried to rescue it somehow..

So i copied barebox.bin from my tftp drive. created empty file tftp in
/env/bin and got a promising output [2], i tried to unprotect the nor
flash just to make sure.

Now where there is supposed to be barebox loading, there is nothing :)
My barebox is gone.

Thanks for comments, Greetings,

Adam




[1] barebox output update with tftp:
phy0: Link is up - 100/Full
host 192.168.10.59 is alive
cfi_protect: unprotect 0xf0100000 (size 7340032)


erasing partition /dev/nor0.kernel

	[#################################################################]

flashing barebox.bin to /dev/nor0.kernel

Unknown command 'tftp' - try 'help'



[2] barebox output update with hack:

erasing partition /dev/nor0.barebox

	[#################################################################]

flashing barebox.bin to /dev/nor0.barebox

cfi_protect: protect 0xf0000000 (size 917504)




> Hello Sascha,
> 
>> What to do next depends on the environment you have. Please send 
>> the output of 'ls -l /env'.
> 
> 
> that would be:
> 
> drwxrwxrwx          0 . drwxrwxrwx          0 .. -rwxrwxrwx
> 1230 config drwxrwxrwx          0 bin
> 
> contents of /env/bin is:
> 
> -rwxrwxrwx        817 _update_help -rwxrwxrwx        447
> update_nfs -rwxrwxrwx       1362 update -rwxrwxrwx        285 mv 
> -rwxrwxrwx       3445 boot -rwxrwxrwx        590 init -rwxrwxrwx
> 21 hush_hack -rwxrwxrwx        571 _boot_help -rwxrwxrwx        702
> _update
> 
> and ls -l /dev prints:
> 
> cr-------- 4294967295 zero crw-------  536870912 ram0 crw-------
> 11108 defaultenv crw------- 4294967295 mem crw-------         64
> phy0 crw------- 3616538624 disk0 crw-------    4193792 disk0.0 
> crw-------   54525952 disk0.1 crw-------    8388608 nor0 crw-------
> 917504 self0 crw-------     131072 env0 crw-------     917504
> nor0.barebox crw-------     131072 nor0.bareboxenv crw-------
> 7340032 nor0.kernel
> 
> well, have tried to make an barebox.bin start disk with the cat 
> barebox.bin > /dev/sdX, but not sure how to proceed to run from
> sd-card.
> 
> On a different try, I copied barebox.bin on a fat12 sd partition
> and tried to update on the mounted partion:
> 
> update -t barebox -d nor -f barebox.bin
> 
> but the syntax is:
> 
> type update -t barebox -d <nor|nand> [-m tftp|xmodem|nfs] [-f 
> imagename] to update barebox into flash
> 
> "-m" does not give my disk as source, so I guess I have to get tftp
> to work..
> 
>> I haven't downloaded the CD images they provide. Do you know 
>> whether there are barebox sources provided on the CDs?
> 
> On CD there is basically buildroot and the config files for barebox
> I have attached to this mail.
> 
> 
> Just to recall: my problem is that i do not know how to provide 
> "root=" parameter to my barebox environemnt. I load the zImage by 
> mounting partition by hand and running "bootm".
> 
> Thanks for help, Greetings,
> 
> Adam
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________ barebox mailing
> list barebox@lists.infradead.org 
> http://lists.infradead.org/mailman/listinfo/barebox

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlG2BmkACgkQefEEI87R1DeEcgCeJixbOwIsMm82PQcLp2AmAzW5
uDkAoNg84RmdVE/n+4T28rHavEQUXjRx
=5A2e
-----END PGP SIGNATURE-----

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

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

* Re[2]: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-10 17:01     ` how to flash barebox and set root variable? - barebox is gone :( Adam Furmanczuk
@ 2013-06-10 17:07       ` Alexander Shiyan
  2013-06-10 17:23         ` Adam Furmanczuk
  0 siblings, 1 reply; 28+ messages in thread
From: Alexander Shiyan @ 2013-06-10 17:07 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

> One thing to add:
> 
> I managed to run tftpd-hpa server on my debian box and tried to update
> kernel to nor0.kernel. I run:
...
> flashing barebox.bin to /dev/nor0.kernel
> 
> Unknown command 'tftp' - try 'help'

Seems tftp command is not compiled in.
Ensure that you have CONFIG_CMD_TFTP in your .config.

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-10 17:07       ` Re[2]: " Alexander Shiyan
@ 2013-06-10 17:23         ` Adam Furmanczuk
  2013-06-10 17:29           ` Sascha Hauer
  0 siblings, 1 reply; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-10 17:23 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10.06.2013 19:07, Alexander Shiyan wrote:
>> flashing barebox.bin to /dev/nor0.kernel
>>> 
>>> Unknown command 'tftp' - try 'help'
> Seems tftp command is not compiled in. Ensure that you have 
> CONFIG_CMD_TFTP in your .config.

Thanks Alexander,

but my barebox binary is gone :(. Have been a bit careles... I would
need to flash the binary over my OCD USB controller, but do not realy
have a clue how to do this.
I am waiting for support reply for this ICnova iMX536 SODIMM module,
they should give me some steps how to proceed.

Greetings,

Adam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlG2C5UACgkQefEEI87R1DcmMQCgzewtZOLF4TdLAi423jakmXJD
z2MAn2UMQcaanApXDsN1OgG2K/MstNeS
=b4s4
-----END PGP SIGNATURE-----

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-10 17:23         ` Adam Furmanczuk
@ 2013-06-10 17:29           ` Sascha Hauer
  2013-06-11  8:10             ` Adam Furmanczuk
  2013-06-12  6:12             ` Adam Furmanczuk
  0 siblings, 2 replies; 28+ messages in thread
From: Sascha Hauer @ 2013-06-10 17:29 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

On Mon, Jun 10, 2013 at 07:23:33PM +0200, Adam Furmanczuk wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 10.06.2013 19:07, Alexander Shiyan wrote:
> >> flashing barebox.bin to /dev/nor0.kernel
> >>> 
> >>> Unknown command 'tftp' - try 'help'
> > Seems tftp command is not compiled in. Ensure that you have 
> > CONFIG_CMD_TFTP in your .config.
> 
> Thanks Alexander,
> 
> but my barebox binary is gone :(. Have been a bit careles... I would
> need to flash the binary over my OCD USB controller, but do not realy
> have a clue how to do this.
> I am waiting for support reply for this ICnova iMX536 SODIMM module,
> they should give me some steps how to proceed.

Connect your board via USB to a host. Do you see a device? If yes,
enable CONFIG_ARCH_IMX_USBLOADER in a recent barebox. After compiling
you will have scripts/imx/imx-usb-loader which you can use to recover
via USB.

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-10 17:29           ` Sascha Hauer
@ 2013-06-11  8:10             ` Adam Furmanczuk
  2013-06-12  6:12             ` Adam Furmanczuk
  1 sibling, 0 replies; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-11  8:10 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10.06.2013 19:29, Sascha Hauer wrote:
> On Mon, Jun 10, 2013 at 07:23:33PM +0200, Adam Furmanczuk wrote:
>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>> 
>>> On 10.06.2013 19:07, Alexander Shiyan wrote:
>>>>>>> flashing barebox.bin to /dev/nor0.kernel
>>>>>>>>> 
>>>>>>>>> Unknown command 'tftp' - try 'help'
>>>>> Seems tftp command is not compiled in. Ensure that you
>>>>> have CONFIG_CMD_TFTP in your .config.
>>> 
>>> Thanks Alexander,
>>> 
>>> but my barebox binary is gone :(. Have been a bit careles... I 
>>> would need to flash the binary over my OCD USB controller, but 
>>> do not realy have a clue how to do this. I am waiting for 
>>> support reply for this ICnova iMX536 SODIMM module, they
>>> should give me some steps how to proceed.
> Connect your board via USB to a host. Do you see a device? If yes,
>  enable CONFIG_ARCH_IMX_USBLOADER in a recent barebox. After 
> compiling you will have scripts/imx/imx-usb-loader which you can 
> use to recover via USB.

Hi Sascha,

thanks for the advice. I am tommorrow at work. Will perform that steps
and report back.

Thanks,

Adam
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlG2214ACgkQefEEI87R1DeQxgCgvJoqZjLVZwfEq90BUqXLmv1Y
1OcAoNPZEn7O1QYVl05081VxI0UzxqFQ
=vf6E
- -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlG223wACgkQefEEI87R1DfOiQCgwpMHl2gh0vPF5uo9QFCPboRR
zeIAoJUMmLpPjGr93he4NBfJ4dQpC3XP
=zkjp
-----END PGP SIGNATURE-----

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-10 17:29           ` Sascha Hauer
  2013-06-11  8:10             ` Adam Furmanczuk
@ 2013-06-12  6:12             ` Adam Furmanczuk
  2013-06-12  7:19               ` Adam Furmanczuk
  1 sibling, 1 reply; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-12  6:12 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10.06.2013 19:29, Sascha Hauer wrote:
> On Mon, Jun 10, 2013 at 07:23:33PM +0200, Adam Furmanczuk wrote:
>> On 10.06.2013 19:07, Alexander Shiyan wrote:
>>>> flashing barebox.bin to /dev/nor0.kernel
>>>>> Unknown command 'tftp' - try 'help'
>>> Seems tftp command is not compiled in. Ensure that you have 
>>> CONFIG_CMD_TFTP in your .config.
>> Thanks Alexander,
>> 
>> but my barebox binary is gone . Have been a bit careles... I 
>> would need to flash the binary over my OCD USB controller, but
>> do not realy have a clue how to do this. I am waiting for
>> support reply for this ICnova iMX536 SODIMM module, they should
>> give me some steps how to proceed.
> [...] CONFIG_ARCH_IMX_USBLOADER in a recent barebox. After 
> compiling you will have scripts/imx/imx-usb-loader

Hi Sascha,

I have included the option: CONFIG_ARCH_IMX_USBLOADER=y
then run make clean and then make again, but there is no such file,
tried to search recursively for similar file in barebox top directory
with: find ./ -iname \*usb-loader\*

My barebox version is 2013.06.0.

Greetings,

Adam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlG4ET8ACgkQefEEI87R1DevIACfUbLM6uGz+zbhkDdbrjQocGa5
qBAAoK1WY7dMzIARnpvBlXKSAgIrJ5Cm
=dKAZ
-----END PGP SIGNATURE-----

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-12  6:12             ` Adam Furmanczuk
@ 2013-06-12  7:19               ` Adam Furmanczuk
  2013-06-12  8:07                 ` Sascha Hauer
  0 siblings, 1 reply; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-12  7:19 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12.06.2013 08:12, Adam Furmanczuk wrote:
> ********* *POCZATEK CZESCI SZYFROWANEJ / PODPISANEJ* *********
> 
> On 10.06.2013 19:29, Sascha Hauer wrote:
>>> On Mon, Jun 10, 2013 at 07:23:33PM +0200, Adam Furmanczuk
>>> wrote:
>>>>> On 10.06.2013 19:07, Alexander Shiyan wrote:
>>>>>>>>> flashing barebox.bin to /dev/nor0.kernel
>>>>>>>>>>> Unknown command 'tftp' - try 'help'
>>>>>>> Seems tftp command is not compiled in. Ensure that you
>>>>>>> have CONFIG_CMD_TFTP in your .config.
>>>>> Thanks Alexander,
>>>>> 
>>>>> but my barebox binary is gone . Have been a bit careles...
>>>>> I would need to flash the binary over my OCD USB
>>>>> controller, but do not realy have a clue how to do this. I
>>>>> am waiting for support reply for this ICnova iMX536 SODIMM
>>>>> module, they should give me some steps how to proceed.
>>> [...] CONFIG_ARCH_IMX_USBLOADER in a recent barebox. After 
>>> compiling you will have scripts/imx/imx-usb-loader
> Hi Sascha,
> 
> I have included the option: CONFIG_ARCH_IMX_USBLOADER=y then run
> make clean and then make again, but there is no such file, tried to
> search recursively for similar file in barebox top directory with:
> find ./ -iname \*usb-loader\*
> 

My bad, i got the latest git snaphot (699-bcc9) and there is
USBLOADER.. have still some issues with compiling it.
There is "memory bank" error [1]. Have seen there was a patch
recently, but do not know the option to enable/disable


Thanks for Help,

Adam

[1]

barebox-699bcc9/drivers/of/base.c:961: undefined reference to
`of_add_memory_bank'
collect2: error: ld returned 1 exit status


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlG4IRQACgkQefEEI87R1DdyrACePOugMudNLfCdfdMlsV80V1G2
kdAAoOgUWRJtp0cUMg8V0Fcj4Aie56eB
=07oc
-----END PGP SIGNATURE-----

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-12  7:19               ` Adam Furmanczuk
@ 2013-06-12  8:07                 ` Sascha Hauer
  2013-06-12  8:22                   ` Adam Furmanczuk
  0 siblings, 1 reply; 28+ messages in thread
From: Sascha Hauer @ 2013-06-12  8:07 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

On Wed, Jun 12, 2013 at 09:19:48AM +0200, Adam Furmanczuk wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 12.06.2013 08:12, Adam Furmanczuk wrote:
> > ********* *POCZATEK CZESCI SZYFROWANEJ / PODPISANEJ* *********
> > 
> > On 10.06.2013 19:29, Sascha Hauer wrote:
> >>> On Mon, Jun 10, 2013 at 07:23:33PM +0200, Adam Furmanczuk
> >>> wrote:
> >>>>> On 10.06.2013 19:07, Alexander Shiyan wrote:
> >>>>>>>>> flashing barebox.bin to /dev/nor0.kernel
> >>>>>>>>>>> Unknown command 'tftp' - try 'help'
> >>>>>>> Seems tftp command is not compiled in. Ensure that you
> >>>>>>> have CONFIG_CMD_TFTP in your .config.
> >>>>> Thanks Alexander,
> >>>>> 
> >>>>> but my barebox binary is gone . Have been a bit careles...
> >>>>> I would need to flash the binary over my OCD USB
> >>>>> controller, but do not realy have a clue how to do this. I
> >>>>> am waiting for support reply for this ICnova iMX536 SODIMM
> >>>>> module, they should give me some steps how to proceed.
> >>> [...] CONFIG_ARCH_IMX_USBLOADER in a recent barebox. After 
> >>> compiling you will have scripts/imx/imx-usb-loader
> > Hi Sascha,
> > 
> > I have included the option: CONFIG_ARCH_IMX_USBLOADER=y then run
> > make clean and then make again, but there is no such file, tried to
> > search recursively for similar file in barebox top directory with:
> > find ./ -iname \*usb-loader\*
> > 
> 
> My bad, i got the latest git snaphot (699-bcc9) and there is
> USBLOADER.. have still some issues with compiling it.
> There is "memory bank" error [1]. Have seen there was a patch
> recently, but do not know the option to enable/disable

When CONFIG_ARCH_IMX_USBLOADER is enabled in your config you can do:

make scripts/imx/

This should build the tool only.

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-12  8:07                 ` Sascha Hauer
@ 2013-06-12  8:22                   ` Adam Furmanczuk
  2013-06-12  8:48                     ` Sascha Hauer
  0 siblings, 1 reply; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-12  8:22 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12.06.2013 10:07, Sascha Hauer wrote:
> On Wed, Jun 12, 2013 at 09:19:48AM +0200, Adam Furmanczuk wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> On 12.06.2013 08:12, Adam Furmanczuk wrote:
>>> ********* *POCZATEK CZESCI SZYFROWANEJ / PODPISANEJ* *********
>>> 
>>> On 10.06.2013 19:29, Sascha Hauer wrote:
>>>>> On Mon, Jun 10, 2013 at 07:23:33PM +0200, Adam Furmanczuk 
>>>>> wrote:
>>>>>>> On 10.06.2013 19:07, Alexander Shiyan wrote:
>>>>>>>>>>> flashing barebox.bin to /dev/nor0.kernel
>>>>>>>>>>>>> Unknown command 'tftp' - try 'help'
>>>>>>>>> Seems tftp command is not compiled in. Ensure that
>>>>>>>>> you have CONFIG_CMD_TFTP in your .config.
>>>>>>> Thanks Alexander,
>>>>>>> 
>>>>>>> but my barebox binary is gone . Have been a bit
>>>>>>> careles... I would need to flash the binary over my OCD
>>>>>>> USB controller, but do not realy have a clue how to do
>>>>>>> this. I am waiting for support reply for this ICnova
>>>>>>> iMX536 SODIMM module, they should give me some steps
>>>>>>> how to proceed.
>>>>> [...] CONFIG_ARCH_IMX_USBLOADER in a recent barebox. After
>>>>>  compiling you will have scripts/imx/imx-usb-loader
>>> Hi Sascha,
>>> 
>>> I have included the option: CONFIG_ARCH_IMX_USBLOADER=y then
>>> run make clean and then make again, but there is no such file,
>>> tried to search recursively for similar file in barebox top
>>> directory with: find ./ -iname \*usb-loader\*
>>> 
>> 
>> My bad, i got the latest git snaphot (699-bcc9) and there is 
>> USBLOADER.. have still some issues with compiling it. There is
>> "memory bank" error [1]. Have seen there was a patch recently,
>> but do not know the option to enable/disable
> 
> When CONFIG_ARCH_IMX_USBLOADER is enabled in your config you can
> do:
> 
> make scripts/imx/
> 
> This should build the tool only.
> 

In the current 699-bcc9 branch i run:

 make ARCH=arm freescale_mx53_loco_defconfig

than i edit the .config by hand and set CONFIG_ARCH_IMX_USBLOADER=y
when running: make scripts/imx

it tells me no goals. nothing to do.

I run gcc on your script file directly, but the libush.h is misssing I
should get it from the MX53 loco project?

Thanks for help,

Adam



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlG4L9gACgkQefEEI87R1DfaYACghktQZlZhmJ2hM7QNyX/g3bL7
ebcAoMvwQGN4jzzGEh1U1HpxBOPEwHAq
=dP3D
-----END PGP SIGNATURE-----

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-12  8:22                   ` Adam Furmanczuk
@ 2013-06-12  8:48                     ` Sascha Hauer
  2013-06-12  9:02                       ` Adam Furmanczuk
  0 siblings, 1 reply; 28+ messages in thread
From: Sascha Hauer @ 2013-06-12  8:48 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

On Wed, Jun 12, 2013 at 10:22:48AM +0200, Adam Furmanczuk wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 12.06.2013 10:07, Sascha Hauer wrote:
> > On Wed, Jun 12, 2013 at 09:19:48AM +0200, Adam Furmanczuk wrote:
> >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> >> 
> >> On 12.06.2013 08:12, Adam Furmanczuk wrote:
> >>> ********* *POCZATEK CZESCI SZYFROWANEJ / PODPISANEJ* *********
> > When CONFIG_ARCH_IMX_USBLOADER is enabled in your config you can
> > do:
> > 
> > make scripts/imx/
> > 
> > This should build the tool only.
> > 
> 
> In the current 699-bcc9 branch i run:
> 
>  make ARCH=arm freescale_mx53_loco_defconfig
> 
> than i edit the .config by hand and set CONFIG_ARCH_IMX_USBLOADER=y
> when running: make scripts/imx
> 
> it tells me no goals. nothing to do.
> 
> I run gcc on your script file directly, but the libush.h is misssing I
> should get it from the MX53 loco project?

You need this from the host. On debian for example the packet is named
libusb-1.0-0-dev.

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-12  8:48                     ` Sascha Hauer
@ 2013-06-12  9:02                       ` Adam Furmanczuk
  2013-06-12 15:54                         ` Sascha Hauer
  0 siblings, 1 reply; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-12  9:02 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12.06.2013 10:48, Sascha Hauer wrote:
> On Wed, Jun 12, 2013 at 10:22:48AM +0200, Adam Furmanczuk wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> On 12.06.2013 10:07, Sascha Hauer wrote:
>>> On Wed, Jun 12, 2013 at 09:19:48AM +0200, Adam Furmanczuk
>>> wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>> 
>>>> On 12.06.2013 08:12, Adam Furmanczuk wrote:
>>>>> ********* *POCZATEK CZESCI SZYFROWANEJ / PODPISANEJ*
>>>>> *********
>>> When CONFIG_ARCH_IMX_USBLOADER is enabled in your config you
>>> can do:
>>> 
>>> make scripts/imx/
>>> 
>>> This should build the tool only.
>>> 
>> 
>> In the current 699-bcc9 branch i run:
>> 
>> make ARCH=arm freescale_mx53_loco_defconfig
>> 
>> than i edit the .config by hand and set
>> CONFIG_ARCH_IMX_USBLOADER=y when running: make scripts/imx
>> 
>> it tells me no goals. nothing to do.
>> 
>> I run gcc on your script file directly, but the libush.h is
>> misssing I should get it from the MX53 loco project?
> 
> You need this from the host. On debian for example the packet is
> named libusb-1.0-0-dev.
> 

OK, I compiled with gcc imx-usb-loader.c -I/usr/include/libusb-1.0/
And had some "undefined reference" errors [1]. Probably have to adjust
some path when running in barebox/scripts/imx/ directory?

I use also debian (wheezy) as host. Details about libusb-dev package [2].

Thanks,

Adam

[1] Error Stack:
/tmp/ccdDFWFp.o: In function `find_imx_dev':
imx-usb-loader.c:(.text+0xd7): undefined reference to
`libusb_get_device_descriptor'
/tmp/ccdDFWFp.o: In function `transfer':
imx-usb-loader.c:(.text+0x54f): undefined reference to
`libusb_bulk_transfer'
imx-usb-loader.c:(.text+0x5d8): undefined reference to
`libusb_control_transfer'
imx-usb-loader.c:(.text+0x668): undefined reference to
`libusb_interrupt_transfer'
/tmp/ccdDFWFp.o: In function `main':
imx-usb-loader.c:(.text+0x2a24): undefined reference to `libusb_init'
imx-usb-loader.c:(.text+0x2a50): undefined reference to
`libusb_get_device_list'
imx-usb-loader.c:(.text+0x2afa): undefined reference to `libusb_open'
imx-usb-loader.c:(.text+0x2b6b): undefined reference to
`libusb_free_device_list'
imx-usb-loader.c:(.text+0x2b85): undefined reference to
`libusb_get_configuration'
imx-usb-loader.c:(.text+0x2b9c): undefined reference to
`libusb_kernel_driver_active'
imx-usb-loader.c:(.text+0x2bb7): undefined reference to
`libusb_detach_kernel_driver'
imx-usb-loader.c:(.text+0x2bce): undefined reference to
`libusb_claim_interface'
imx-usb-loader.c:(.text+0x2cf7): undefined reference to `libusb_close'
imx-usb-loader.c:(.text+0x2d03): undefined reference to `libusb_exit'


[2] aptitude show libusb-1.0-0-dev:

Package: libusb-1.0-0-dev
State: installed
Version: 2:1.0.11-1
[...]


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlG4OQsACgkQefEEI87R1DfhRQCdH+d0UtjGMZK2dXUNf4j20h0S
ST0An23GV2UhafnesLqZNXJQ7DkZ5yGR
=hxgi
-----END PGP SIGNATURE-----

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-12  9:02                       ` Adam Furmanczuk
@ 2013-06-12 15:54                         ` Sascha Hauer
  2013-06-12 16:01                           ` Re[2]: " Alexander Shiyan
  0 siblings, 1 reply; 28+ messages in thread
From: Sascha Hauer @ 2013-06-12 15:54 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

On Wed, Jun 12, 2013 at 11:02:03AM +0200, Adam Furmanczuk wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> OK, I compiled with gcc imx-usb-loader.c -I/usr/include/libusb-1.0/
> And had some "undefined reference" errors [1]. Probably have to adjust
> some path when running in barebox/scripts/imx/ directory?
> 
> I use also debian (wheezy) as host. Details about libusb-dev package [2].
> 

Ok, here is exactly what to do:

export ARCH=arm
export CROSS_COMPILE=/path/to/arm-linux-gcc-
make freescale_mx51_babbage_defconfig
make menuconfig
  System Type  --->
    i.MX specific settings  --->
        [*] compile imx-usb-loader
make

This should compile without errors and the imx-usb-loader tool should be
compiled, provided you have the libusb host tool installed.

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

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

* Re[2]: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-12 15:54                         ` Sascha Hauer
@ 2013-06-12 16:01                           ` Alexander Shiyan
  2013-06-12 16:14                             ` Adam Furmanczuk
  0 siblings, 1 reply; 28+ messages in thread
From: Alexander Shiyan @ 2013-06-12 16:01 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

> On Wed, Jun 12, 2013 at 11:02:03AM +0200, Adam Furmanczuk wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > OK, I compiled with gcc imx-usb-loader.c -I/usr/include/libusb-1.0/
> > And had some "undefined reference" errors [1]. Probably have to adjust
> > some path when running in barebox/scripts/imx/ directory?
> > 
> > I use also debian (wheezy) as host. Details about libusb-dev package [2].
> > 
> 
> Ok, here is exactly what to do:
> 
> export ARCH=arm
> export CROSS_COMPILE=/path/to/arm-linux-gcc-
> make freescale_mx51_babbage_defconfig
> make menuconfig
>   System Type  --->
>     i.MX specific settings  --->
>         [*] compile imx-usb-loader
> make
> 
> This should compile without errors and the imx-usb-loader tool should be
> compiled, provided you have the libusb host tool installed.

Probably some usb-related headers on Adam system placed in non-standard
directories, since tool is not builded or makes some errors.
Maybe we need to use pkg-config for these stuffs?

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

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

* Re: how to flash barebox and set root variable? - barebox is gone :(
  2013-06-12 16:01                           ` Re[2]: " Alexander Shiyan
@ 2013-06-12 16:14                             ` Adam Furmanczuk
  0 siblings, 0 replies; 28+ messages in thread
From: Adam Furmanczuk @ 2013-06-12 16:14 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12.06.2013 18:01, Alexander Shiyan wrote:
>> On Wed, Jun 12, 2013 at 11:02:03AM +0200, Adam Furmanczuk wrote:
>>>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>>> 
>>>>> OK, I compiled with gcc imx-usb-loader.c
>>>>> -I/usr/include/libusb-1.0/ And had some "undefined
>>>>> reference" errors [1]. Probably have to adjust some path
>>>>> when running in barebox/scripts/imx/ directory?
>>>>> 
>>>>> I use also debian (wheezy) as host. Details about
>>>>> libusb-dev package [2].
>>>>> 
>>> 
>>> Ok, here is exactly what to do:
>>> 
>>> export ARCH=arm export CROSS_COMPILE=/path/to/arm-linux-gcc- 
>>> make freescale_mx51_babbage_defconfig make menuconfig System
>>> Type  ---> i.MX specific settings  ---> [*] compile
>>> imx-usb-loader make
>>> 
>>> This should compile without errors and the imx-usb-loader tool
>>> should be compiled, provided you have the libusb host tool
>>> installed.
> Probably some usb-related headers on Adam system placed in
> non-standard directories, since tool is not builded or makes some
> errors. Maybe we need to use pkg-config for these stuffs?

Sorry my bad, I forgot to set CROSS_COMPILE flag. I will give it
tomorrow a try and report back.

Greetings,

Adam

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlG4nk0ACgkQefEEI87R1Dd1CwCdHu2Sb2NafGEul5avfVIeXwk7
DoUAoIft+Ik4uyQggfH095o9t1BsceN0
=eAtJ
-----END PGP SIGNATURE-----

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

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

* set root variable for uImage?
  2013-06-06 16:03 how to flash barebox and set root variable? Adam Furmanczuk
  2013-06-06 16:21 ` Sascha Hauer
@ 2013-07-03 13:32 ` Adam Furmanczuk
  2013-07-03 15:21 ` Adam Furmanczuk
  2 siblings, 0 replies; 28+ messages in thread
From: Adam Furmanczuk @ 2013-07-03 13:32 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I restate this question from my previous thread "how to flash and set
root variable". Thanks very much to Sascha and Alexander for
introducing into barebox building and flashing.

I have a basic scenario. Want to boot uImage and then hand over to the
root partition. With u-Boot this was very easy:

setenv bootargs "console=tty0 console=ttymxc0,115200n8
root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro"

With barebox however, when I boot the uImage, it complains about not
setting correct "root=".:

[ 1.718527] VFS: Cannot open root device "(null)" or
unknown-block(0,0): error -6
[ 1.726226] Please append a correct "root=" boot option; here are the
available partitions:

Now what i do in Barbox is the following;

(hint enter to go into console)
barebox@myhost:/ mkdir /media2
barebox@myhost:/ mount /dev/disk0.1 fat /media2
barebox@myhost:/ bootm /media2/uImage root=/dev/mmcblk0p3 rootfstype=ext4


I get the error with block (0,0). How can I change this? Thank you
very much for help.


Adam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlHUJ+QACgkQefEEI87R1DfOGQCePJk92+Z6RtUv9dbIq+LoG2tn
SwQAoM/xi9tVVtGjxEpmxym0FxAI+BIn
=fOuD
-----END PGP SIGNATURE-----

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

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

* set root variable for uImage?
  2013-06-06 16:03 how to flash barebox and set root variable? Adam Furmanczuk
  2013-06-06 16:21 ` Sascha Hauer
  2013-07-03 13:32 ` set root variable for uImage? Adam Furmanczuk
@ 2013-07-03 15:21 ` Adam Furmanczuk
  2013-07-03 16:58   ` Sascha Hauer
  2 siblings, 1 reply; 28+ messages in thread
From: Adam Furmanczuk @ 2013-07-03 15:21 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I restate this question from my previous thread "how to flash and set
root variable". Thanks very much to Sascha and Alexander for
introducing into barebox building and flashing.

I have a basic scenario. Want to boot uImage and then hand over to the
root partition. With u-Boot this was very easy:

setenv bootargs "console=tty0 console=ttymxc0,115200n8
root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro"

With barebox however, when I boot the uImage, it complains about not
setting correct "root=".:

[ 1.718527] VFS: Cannot open root device "(null)" or
unknown-block(0,0): error -6
[ 1.726226] Please append a correct "root=" boot option; here are the
available partitions:

Now what i do in Barbox is the following;

(hint enter to go into console)
barebox@myhost:/ mkdir /media2
barebox@myhost:/ mount /dev/disk0.1 fat /media2
barebox@myhost:/ bootm /media2/uImage root=/dev/mmcblk0p3 rootfstype=ext4


I get the error with block (0,0). How can I change this? Thank you
very much for help.


Adam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlHUQYEACgkQefEEI87R1DeRcgCfWcfsNWtj9vEjM+sTmoY/IafD
hssAnRnylX3HQAuvPM/T1TduYZlrz2W2
=Wn6A
-----END PGP SIGNATURE-----

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

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

* Re: set root variable for uImage?
  2013-07-03 15:21 ` Adam Furmanczuk
@ 2013-07-03 16:58   ` Sascha Hauer
  2013-07-03 18:30     ` Adam Furmanczuk
  0 siblings, 1 reply; 28+ messages in thread
From: Sascha Hauer @ 2013-07-03 16:58 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

Hi Adam,

On Wed, Jul 03, 2013 at 05:21:37PM +0200, Adam Furmanczuk wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> I restate this question from my previous thread "how to flash and set
> root variable". Thanks very much to Sascha and Alexander for
> introducing into barebox building and flashing.
> 
> I have a basic scenario. Want to boot uImage and then hand over to the
> root partition. With u-Boot this was very easy:
> 
> setenv bootargs "console=tty0 console=ttymxc0,115200n8
> root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro"
> 
> With barebox however, when I boot the uImage, it complains about not
> setting correct "root=".:
> 
> [ 1.718527] VFS: Cannot open root device "(null)" or
> unknown-block(0,0): error -6
> [ 1.726226] Please append a correct "root=" boot option; here are the
> available partitions:
> 
> Now what i do in Barbox is the following;
> 
> (hint enter to go into console)
> barebox@myhost:/ mkdir /media2
> barebox@myhost:/ mount /dev/disk0.1 fat /media2
> barebox@myhost:/ bootm /media2/uImage root=/dev/mmcblk0p3 rootfstype=ext4

the bootm command evaluates the 'bootargs' environment variable, so
before executing bootm do a:

export bootargs="root=/dev/mmcblk0p3 rootfstype=ext4"

(sidenote: This is not documented with 'help bootm', shame on us. Try
the 'magicvar' command instead which lists all variables with special
meanings)

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

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

* Re: set root variable for uImage?
  2013-07-03 16:58   ` Sascha Hauer
@ 2013-07-03 18:30     ` Adam Furmanczuk
  2013-07-03 18:42       ` Re[2]: " Alexander Shiyan
  2013-07-03 20:26       ` Sascha Hauer
  0 siblings, 2 replies; 28+ messages in thread
From: Adam Furmanczuk @ 2013-07-03 18:30 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03.07.2013 18:58, Sascha Hauer wrote:
> Hi Adam,
> 
> On Wed, Jul 03, 2013 at 05:21:37PM +0200, Adam Furmanczuk wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> Hi,
>> 
>> I restate this question from my previous thread "how to flash and
>> set root variable". Thanks very much to Sascha and Alexander for
>> introducing into barebox building and flashing.
>> 
>> I have a basic scenario. Want to boot uImage and then hand over 
>> to the root partition. With u-Boot this was very easy:
>> 
>> setenv bootargs "console=tty0 console=ttymxc0,115200n8 
>> root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro"
>> 
>> With barebox however, when I boot the uImage, it complains about
>>  not setting correct "root=".:
>> 
>> [ 1.718527] VFS: Cannot open root device "(null)" or 
>> unknown-block(0,0): error -6 [ 1.726226] Please append a correct
>>  "root=" boot option; here are the available partitions:
>> 
>> Now what i do in Barbox is the following;
>> 
>> (hint enter to go into console) barebox@myhost:/ mkdir /media2 
>> barebox@myhost:/ mount /dev/disk0.1 fat /media2 barebox@myhost:/
>>  bootm /media2/uImage root=/dev/mmcblk0p3 rootfstype=ext4
> 
> the bootm command evaluates the 'bootargs' environment variable,
> so before executing bootm do a:
> 
> export bootargs="root=/dev/mmcblk0p3 rootfstype=ext4"
> 
> (sidenote: This is not documented with 'help bootm', shame on us. 
> Try the 'magicvar' command instead which lists all variables with 
> special meanings)
> 
> Sascha
> 

Hi Sascha,

it does not seem to work for me, I typed:

mkdir /mnt/disk1
bootargs="root=/dev/mmcblk0p3 rootfstype=ext4"
mount /dev/disk0.1 fat /mnt/disk1
bootm /mnt/disk1/uImage


I choose different values for root, like "mmcblk0p3","/dev/mmcblk0p1",
"b303" ...

I am running MX53QSB with barebox 2013.05 build get this output:

VFS: Cannot open root device "(null)" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available
partitions:
b300         3872256 mmcblk0 driver: mmcblk
  b301             512 mmcblk0p1
  b302           16384 mmcblk0p2
  b303         3854336 mmcblk0p3
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(2,0)


Note: Unknown block is always (2,0) no matter what i try to specify.

This problem might be related to mx53 architecture only.

Greetings,

Adam



- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlHUbZoACgkQefEEI87R1DcBxQCghNrD+tFbhEy80K01AUhlgAh3
q7MAn1uAF/e06ExOqvm1h9Y9+MLOLOt6
=OrR0
- -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlHUbbIACgkQefEEI87R1DeJYwCgt14GSG8cW5qAdpxnIUTFfb+E
iDEAmwZNdo9B095CM87WVw37HlcbbONT
=2Kd5
-----END PGP SIGNATURE-----

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

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

* Re[2]: set root variable for uImage?
  2013-07-03 18:30     ` Adam Furmanczuk
@ 2013-07-03 18:42       ` Alexander Shiyan
  2013-07-03 20:26       ` Sascha Hauer
  1 sibling, 0 replies; 28+ messages in thread
From: Alexander Shiyan @ 2013-07-03 18:42 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

> >> I restate this question from my previous thread "how to flash and
> >> set root variable". Thanks very much to Sascha and Alexander for
> >> introducing into barebox building and flashing.
> >> 
> >> I have a basic scenario. Want to boot uImage and then hand over 
> >> to the root partition. With u-Boot this was very easy:
> >> 
> >> setenv bootargs "console=tty0 console=ttymxc0,115200n8 
> >> root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro"
> >> 
> >> With barebox however, when I boot the uImage, it complains about
> >>  not setting correct "root=".:
> >> 
> >> [ 1.718527] VFS: Cannot open root device "(null)" or 
> >> unknown-block(0,0): error -6 [ 1.726226] Please append a correct
> >>  "root=" boot option; here are the available partitions:
> >> 
> >> Now what i do in Barbox is the following;
> >> 
> >> (hint enter to go into console) barebox@myhost:/ mkdir /media2 
> >> barebox@myhost:/ mount /dev/disk0.1 fat /media2 barebox@myhost:/
> >>  bootm /media2/uImage root=/dev/mmcblk0p3 rootfstype=ext4
> > 
> > the bootm command evaluates the 'bootargs' environment variable,
> > so before executing bootm do a:
> > 
> > export bootargs="root=/dev/mmcblk0p3 rootfstype=ext4"
> > 
> > (sidenote: This is not documented with 'help bootm', shame on us. 
> > Try the 'magicvar' command instead which lists all variables with 
> > special meanings)
> > 
> > Sascha
> > 
> 
> Hi Sascha,
> 
> it does not seem to work for me, I typed:
> 
> mkdir /mnt/disk1
> bootargs="root=/dev/mmcblk0p3 rootfstype=ext4"
> mount /dev/disk0.1 fat /mnt/disk1
> bootm /mnt/disk1/uImage
> 
> 
> I choose different values for root, like "mmcblk0p3","/dev/mmcblk0p1",
> "b303" ...
> 
> I am running MX53QSB with barebox 2013.05 build get this output:
> 
> VFS: Cannot open root device "(null)" or unknown-block(2,0)
> Please append a correct "root=" boot option; here are the available
> partitions:
> b300         3872256 mmcblk0 driver: mmcblk
>   b301             512 mmcblk0p1
>   b302           16384 mmcblk0p2
>   b303         3854336 mmcblk0p3
> Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(2,0)
> 
> 
> Note: Unknown block is always (2,0) no matter what i try to specify.
> 
> This problem might be related to mx53 architecture only.

Probably you need "rootwait" option, same as you specify for u-boot.

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

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

* Re: set root variable for uImage?
  2013-07-03 18:30     ` Adam Furmanczuk
  2013-07-03 18:42       ` Re[2]: " Alexander Shiyan
@ 2013-07-03 20:26       ` Sascha Hauer
  2013-07-04 10:30         ` Adam Furmanczuk
  1 sibling, 1 reply; 28+ messages in thread
From: Sascha Hauer @ 2013-07-03 20:26 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

On Wed, Jul 03, 2013 at 08:30:10PM +0200, Adam Furmanczuk wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> - -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 03.07.2013 18:58, Sascha Hauer wrote:
> > Hi Adam,
> > 
> > On Wed, Jul 03, 2013 at 05:21:37PM +0200, Adam Furmanczuk wrote:
> >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> >> 
> >> Hi,
> >> 
> >> I restate this question from my previous thread "how to flash and
> >> set root variable". Thanks very much to Sascha and Alexander for
> >> introducing into barebox building and flashing.
> >> 
> >> I have a basic scenario. Want to boot uImage and then hand over 
> >> to the root partition. With u-Boot this was very easy:
> >> 
> >> setenv bootargs "console=tty0 console=ttymxc0,115200n8 
> >> root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro"
> >> 
> >> With barebox however, when I boot the uImage, it complains about
> >>  not setting correct "root=".:
> >> 
> >> [ 1.718527] VFS: Cannot open root device "(null)" or 
> >> unknown-block(0,0): error -6 [ 1.726226] Please append a correct
> >>  "root=" boot option; here are the available partitions:
> >> 
> >> Now what i do in Barbox is the following;
> >> 
> >> (hint enter to go into console) barebox@myhost:/ mkdir /media2 
> >> barebox@myhost:/ mount /dev/disk0.1 fat /media2 barebox@myhost:/
> >>  bootm /media2/uImage root=/dev/mmcblk0p3 rootfstype=ext4
> > 
> > the bootm command evaluates the 'bootargs' environment variable,
> > so before executing bootm do a:
> > 
> > export bootargs="root=/dev/mmcblk0p3 rootfstype=ext4"
> > 
> > (sidenote: This is not documented with 'help bootm', shame on us. 
> > Try the 'magicvar' command instead which lists all variables with 
> > special meanings)
> > 
> > Sascha
> > 
> 
> Hi Sascha,
> 
> it does not seem to work for me, I typed:
> 
> mkdir /mnt/disk1
> bootargs="root=/dev/mmcblk0p3 rootfstype=ext4"
> mount /dev/disk0.1 fat /mnt/disk1
> bootm /mnt/disk1/uImage
> 
> 
> I choose different values for root, like "mmcblk0p3","/dev/mmcblk0p1",
> "b303" ...
> 
> I am running MX53QSB with barebox 2013.05 build get this output:

The kernel normally prints the commandline during startup. Could you
post it?

Then, are you using some defconfig or do you you have out of tree
patches?

Also, could you post the output of 'devinfo global'?

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

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

* Re: set root variable for uImage?
  2013-07-03 20:26       ` Sascha Hauer
@ 2013-07-04 10:30         ` Adam Furmanczuk
  2013-07-04 10:39           ` Sascha Hauer
  0 siblings, 1 reply; 28+ messages in thread
From: Adam Furmanczuk @ 2013-07-04 10:30 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03.07.2013 22:26, Sascha Hauer wrote:
> On Wed, Jul 03, 2013 at 08:30:10PM +0200, Adam Furmanczuk wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> On 03.07.2013 18:58, Sascha Hauer wrote:
>>> Hi Adam,
>>> 
>>> On Wed, Jul 03, 2013 at 05:21:37PM +0200, Adam Furmanczuk
>>> wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>> 
>>>> Hi,
>>>> 
>>>> I restate this question from my previous thread "how to flash
>>>> and set root variable". Thanks very much to Sascha and
>>>> Alexander for introducing into barebox building and
>>>> flashing.
>>>> 
>>>> I have a basic scenario. Want to boot uImage and then hand
>>>> over to the root partition. With u-Boot this was very easy:
>>>> 
>>>> setenv bootargs "console=tty0 console=ttymxc0,115200n8 
>>>> root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro"
>>>> 
>>>> With barebox however, when I boot the uImage, it complains
>>>> about not setting correct "root=".:
>>>> 
>>>> [ 1.718527] VFS: Cannot open root device "(null)" or 
>>>> unknown-block(0,0): error -6 [ 1.726226] Please append a
>>>> correct "root=" boot option; here are the available
>>>> partitions:
>>>> 
>>>> Now what i do in Barbox is the following;
>>>> 
>>>> (hint enter to go into console) barebox@myhost:/ mkdir
>>>> /media2 barebox@myhost:/ mount /dev/disk0.1 fat /media2
>>>> barebox@myhost:/ bootm /media2/uImage root=/dev/mmcblk0p3
>>>> rootfstype=ext4
>>> 
>>> the bootm command evaluates the 'bootargs' environment
>>> variable, so before executing bootm do a:
>>> 
>>> export bootargs="root=/dev/mmcblk0p3 rootfstype=ext4"
>>> 
>>> (sidenote: This is not documented with 'help bootm', shame on
>>> us. Try the 'magicvar' command instead which lists all
>>> variables with special meanings)
>>> 
>>> Sascha
>>> 
>> 
>> Hi Sascha,
>> 
>> it does not seem to work for me, I typed:
>> 
>> mkdir /mnt/disk1 bootargs="root=/dev/mmcblk0p3 rootfstype=ext4" 
>> mount /dev/disk0.1 fat /mnt/disk1 bootm /mnt/disk1/uImage
>> 
>> 
>> I choose different values for root, like
>> "mmcblk0p3","/dev/mmcblk0p1", "b303" ...
>> 
>> I am running MX53QSB with barebox 2013.05 build get this output:
> 
> The kernel normally prints the commandline during startup. Could
> you post it?
> 
> Then, are you using some defconfig or do you you have out of tree 
> patches?
> 
> Also, could you post the output of 'devinfo global'?
> 
> Sascha
> 


Hi Sascha, hi Alexander,

rootwait parameter in bootargs did not helped. I compiled barebox and
kernel Image from busybox. I added in busybox extra defconfig
parameter for the imx53 board for barebox. No extra pachtes. Have sdma
module in root partion in /lib directory, but it never change-roots to
that partition anyway.

With u-Boot the same bootargs are OK. My new project requires to use
barebox.

Output of devinfo global [1] and bootlog [2]

Greetings,

Adam


[1] http://pastebin.com/yyQjtpbT
[2] http://pastebin.com/4PxUnm0Q

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlHVTrcACgkQefEEI87R1DcUNACfQ1F2Ajoj/6tHtOelMpdsasxh
6EIAnRdllUVEmaC0ebHUJj4H5RP4mN6/
=Nd2i
-----END PGP SIGNATURE-----

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

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

* Re: set root variable for uImage?
  2013-07-04 10:30         ` Adam Furmanczuk
@ 2013-07-04 10:39           ` Sascha Hauer
  2013-07-04 10:59             ` set root variable for uImage? - SOLVED Adam Furmanczuk
  0 siblings, 1 reply; 28+ messages in thread
From: Sascha Hauer @ 2013-07-04 10:39 UTC (permalink / raw)
  To: Adam Furmanczuk; +Cc: barebox

On Thu, Jul 04, 2013 at 12:30:15PM +0200, Adam Furmanczuk wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hi Sascha, hi Alexander,
> 
> rootwait parameter in bootargs did not helped. I compiled barebox and
> kernel Image from busybox. I added in busybox extra defconfig
> parameter for the imx53 board for barebox. No extra pachtes. Have sdma
> module in root partion in /lib directory, but it never change-roots to
> that partition anyway.
> 
> With u-Boot the same bootargs are OK. My new project requires to use
> barebox.
> 
> Output of devinfo global [1] and bootlog [2]

Please send these inline next time so that people digging through the
archives can see what we are talking about.

> 
> Greetings,
> 
> Adam
> 
> 
> [1] http://pastebin.com/yyQjtpbT

> barebox@Freescale i.MX53 LOCO:/ devinfo global 
> resources:
> driver: none
> bus: none
> 
> Parameters:
>     system.reset = POR
>      bootm.image = 
>     bootm.oftree = 
>     bootm.initrd = 
>    dhcp.rootpath = 
> dhcp.tftp_server_name = 
>    dhcp.bootfile = 
> dhcp.oftree_file = 
>   dhcp.vendor_id = 
>   dhcp.client_id = 
>  dhcp.user_class = 
> dhcp.client_uuid = 
>         hostname = loco
>             user = none
> autoboot_timeout = 3
>     boot.default = net
>      allow_color = true
> linux.bootargs.base = console=ttymxc0,115200
> linux.bootargs.dyn.ip = 
> linux.bootargs.dyn.root =

Ok, that's the information I was looking for.

The bootm command either uses the 'bootargs' variable or if exists, all
variables beginning with "linux.bootargs.".

So to change your bootargs do:

linux.bootargs.base="console=ttymxc0,115200 ignore_loglevel whatever"

You can also add new variables:

global linux.bootargs.debug="earlyprintk"

And what you are currently looking for:

global linux.bootargs.root="root=/dev/mmcblk0p3 rootwait"

> [2] http://pastebin.com/4PxUnm0Q

> barebox@Freescale i.MX53 LOCO:/mkdir /mnt/disk1
> barebox@Freescale i.MX53 LOCO:/ bootargs="root=/dev/mmcblk0p3 rootwait
> rootfstype=ext4"
> barebox@Freescale i.MX53 LOCO:/ mount /dev/disk0.1 fat /mnt/disk1
> barebox@Freescale i.MX53 LOCO:/ bootm /mnt/disk1/uImage
>    Image Name:   Linux-2.6.35.3
>    Created:      2013-06-13  14:17:14 UTC
>    OS:           Linux
>    Architecture: ARM
>    Type:         Kernel Image
>    Compression:  uncompressed
>    Data Size:    2945628 Bytes = 2.8 MiB
>    Load Address: 70008000
>    Entry Point:  70008000
>  
> Loading OS U-Boot uImage '/mnt/disk1/uImage'
> commandline: console=ttymxc0,115200  
> arch_number: 3273
> Linux version 2.6.35.3 (testserver@Server6) (gcc version 4.7.3

Quite an old Kernel for a new project...

> (Buildroot 2013.05) ) #1 PREEMPT Thu Jun 13 16:17:07 CEST 2013
> CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f
> CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
> Machine: Freescale MX53 LOCO Board
> Memory policy: ECC disabled, Data cache writeback
> Built 1 zonelists in Zone order, mobility grouping on.  Total pages:
> 250880
> Kernel command line: console=ttymxc0,115200

Here you see the command line.

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

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

* Re: set root variable for uImage? - SOLVED
  2013-07-04 10:39           ` Sascha Hauer
@ 2013-07-04 10:59             ` Adam Furmanczuk
  0 siblings, 0 replies; 28+ messages in thread
From: Adam Furmanczuk @ 2013-07-04 10:59 UTC (permalink / raw)
  To: barebox

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04.07.2013 12:39, Sascha Hauer wrote:
> On Thu, Jul 04, 2013 at 12:30:15PM +0200, Adam Furmanczuk wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hi Sascha, hi Alexander,
>> 
>> rootwait parameter in bootargs did not helped. I compiled barebox
>> and kernel Image from busybox. I added in busybox extra
>> defconfig parameter for the imx53 board for barebox. No extra
>> pachtes. Have sdma module in root partion in /lib directory, but
>> it never change-roots to that partition anyway.
>> 
>> With u-Boot the same bootargs are OK. My new project requires to
>> use barebox.
>> 
>> Output of devinfo global [1] and bootlog [2]
> 
> Please send these inline next time so that people digging through
> the archives can see what we are talking about.

OK, I was afraid making my message less readable. Will do that next time.

> 
>> 
>> Greetings,
>> 
>> Adam
>> 
>> 
>> [1] http://pastebin.com/yyQjtpbT
> 
>> barebox@Freescale i.MX53 LOCO:/ devinfo global resources: driver:
>> none bus: none
>> 
>> Parameters: system.reset = POR bootm.image = bootm.oftree = 
>> bootm.initrd = dhcp.rootpath = dhcp.tftp_server_name = 
>> dhcp.bootfile = dhcp.oftree_file = dhcp.vendor_id = 
>> dhcp.client_id = dhcp.user_class = dhcp.client_uuid = hostname =
>> loco user = none autoboot_timeout = 3 boot.default = net 
>> allow_color = true linux.bootargs.base = console=ttymxc0,115200 
>> linux.bootargs.dyn.ip = linux.bootargs.dyn.root =
> 
> Ok, that's the information I was looking for.
> 
> The bootm command either uses the 'bootargs' variable or if exists,
> all variables beginning with "linux.bootargs.".
> 
> So to change your bootargs do:
> 
> linux.bootargs.base="console=ttymxc0,115200 ignore_loglevel
> whatever"
> 
> You can also add new variables:
> 
> global linux.bootargs.debug="earlyprintk"
> 
> And what you are currently looking for:
> 
> global linux.bootargs.root="root=/dev/mmcblk0p3 rootwait"

Yeah! I really was looking for that. Now my environment is 100%
barebox compatible;).

As a sidenote: on other device (not MX53 QSB but Icnova SO-dimm),
flashing new barebox is not an option. I already lost one device and
try to recover by learning more openocd.

The barebox version there is September 2012. It does not have "go"
command for running newer barebox.bin and does not have "global" for
setting parameters. I should maybe restate that sidenote as a new thread?

> 
>> [2] http://pastebin.com/4PxUnm0Q
> 
>> barebox@Freescale i.MX53 LOCO:/mkdir /mnt/disk1 barebox@Freescale
>> i.MX53 LOCO:/ bootargs="root=/dev/mmcblk0p3 rootwait 
>> rootfstype=ext4" barebox@Freescale i.MX53 LOCO:/ mount
>> /dev/disk0.1 fat /mnt/disk1 barebox@Freescale i.MX53 LOCO:/ bootm
>> /mnt/disk1/uImage Image Name:   Linux-2.6.35.3 Created:
>> 2013-06-13  14:17:14 UTC OS:           Linux Architecture: ARM 
>> Type:         Kernel Image Compression:  uncompressed Data Size:
>> 2945628 Bytes = 2.8 MiB Load Address: 70008000 Entry Point:
>> 70008000
>> 
>> Loading OS U-Boot uImage '/mnt/disk1/uImage' commandline:
>> console=ttymxc0,115200 arch_number: 3273 Linux version 2.6.35.3
>> (testserver@Server6) (gcc version 4.7.3
> 
> Quite an old Kernel for a new project...

Yes, indeed. That is still default in latest buildroot defconfig.
There are of course newer kernels [3]. I even managed last year to
compile vanilla kernel 3.8.something with the provived defconfigs. Had
some USB-issues, and SDMA-module needed extra firmaware binary. USB
support was not important for our case.

I have not that much experience to embedded linux, but I learn fast ;).


>> (Buildroot 2013.05) ) #1 PREEMPT Thu Jun 13 16:17:07 CEST 2013 
>> CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f 
>> CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction
>> cache Machine: Freescale MX53 LOCO Board Memory policy: ECC
>> disabled, Data cache writeback Built 1 zonelists in Zone order,
>> mobility grouping on.  Total pages: 250880 Kernel command line:
>> console=ttymxc0,115200

Spotted that too, and was confused :)

Thanks you very much again for solving my issue.

Greetings,

Adam

[3] https://wiki.linaro.org/Cycles/1306/Release
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlHVVXYACgkQefEEI87R1DfjXQCeIYED1WvovKVdcqzFRLpRkW8N
KosAoLzjfApPSttEx4PC0nPnmSjWH54W
=FWch
-----END PGP SIGNATURE-----

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

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

end of thread, other threads:[~2013-07-04 10:59 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-06 16:03 how to flash barebox and set root variable? Adam Furmanczuk
2013-06-06 16:21 ` Sascha Hauer
2013-06-07  5:08   ` Adam Furmanczuk
2013-06-07 10:55     ` Sascha Hauer
2013-06-10 12:24   ` Adam Furmanczuk
2013-06-10 17:01     ` how to flash barebox and set root variable? - barebox is gone :( Adam Furmanczuk
2013-06-10 17:07       ` Re[2]: " Alexander Shiyan
2013-06-10 17:23         ` Adam Furmanczuk
2013-06-10 17:29           ` Sascha Hauer
2013-06-11  8:10             ` Adam Furmanczuk
2013-06-12  6:12             ` Adam Furmanczuk
2013-06-12  7:19               ` Adam Furmanczuk
2013-06-12  8:07                 ` Sascha Hauer
2013-06-12  8:22                   ` Adam Furmanczuk
2013-06-12  8:48                     ` Sascha Hauer
2013-06-12  9:02                       ` Adam Furmanczuk
2013-06-12 15:54                         ` Sascha Hauer
2013-06-12 16:01                           ` Re[2]: " Alexander Shiyan
2013-06-12 16:14                             ` Adam Furmanczuk
2013-07-03 13:32 ` set root variable for uImage? Adam Furmanczuk
2013-07-03 15:21 ` Adam Furmanczuk
2013-07-03 16:58   ` Sascha Hauer
2013-07-03 18:30     ` Adam Furmanczuk
2013-07-03 18:42       ` Re[2]: " Alexander Shiyan
2013-07-03 20:26       ` Sascha Hauer
2013-07-04 10:30         ` Adam Furmanczuk
2013-07-04 10:39           ` Sascha Hauer
2013-07-04 10:59             ` set root variable for uImage? - SOLVED Adam Furmanczuk

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