Skip to contentSkip to conversation

how to flash barebox and set root variable?

DISCUSSION Adam Furmanczuk 3 participants 28 messages Jun 6, 2013 – Jul 4, 2013

lore
Share & tools
lore
#0 lore raw

-----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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw
Quoted 23 lines · Adam Furmanczuk

-----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"

Quoted 7 lines

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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

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

Hi Sascha,

thank you very much for your help.

Quoted 2 lines

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.

Quoted 2 lines

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.

Quoted 2 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#3 lore raw
Quoted 10 lines · Adam Furmanczuk

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

Hi Sascha,

thank you very much for your help.

Quoted 2 lines

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

Quoted 6 lines

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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw
In reply to Sascha Hauer

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

Hello Sascha,

Quoted 2 lines

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..

Quoted 2 lines

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-----

#############################################################
#
# 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

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

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#5 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

-----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)

Quoted 70 lines

Hello Sascha,

Quoted 2 lines

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..

Quoted 2 lines

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

Quoted 3 lines

_______________________________________________ barebox mailing list [email protected]
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#6 lore raw

Re[2]: how to flash barebox and set root variable? - barebox is gone :(

Quoted 4 lines

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:

...

Quoted 3 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#7 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

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

Quoted 5 lines · Alexander Shiyan
Quoted 3 lines

flashing barebox.bin to /dev/nor0.kernel

Quoted 2 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#8 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

Quoted 10 lines · Adam Furmanczuk

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

Quoted 5 lines · Alexander Shiyan
Quoted 3 lines

flashing barebox.bin to /dev/nor0.kernel

Quoted 2 lines

Unknown command 'tftp' - try 'help'

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

Quoted 7 lines

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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#9 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

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

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

Quoted 17 lines · Sascha Hauer
Quoted 9 lines · Adam Furmanczuk
Quoted 9 lines

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

Quoted 5 lines · Alexander Shiyan
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

flashing barebox.bin to /dev/nor0.kernel

Quoted 2 lines
Quoted 2 lines

Unknown command 'tftp' - try 'help'

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

Quoted 7 lines
Quoted 7 lines

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.

Quoted 4 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#10 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

In reply to Sascha Hauer

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

Quoted 8 lines · Sascha Hauer
Quoted 7 lines · Adam Furmanczuk
Quoted 4 lines · Alexander Shiyan
Quoted 2 lines

flashing barebox.bin to /dev/nor0.kernel

Quoted 1 line

Unknown command 'tftp' - try 'help'

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

Thanks Alexander,

Quoted 7 lines
Quoted 5 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#11 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

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

Quoted 17 lines · Adam Furmanczuk

********* *POCZATEK CZESCI SZYFROWANEJ / PODPISANEJ* *********

Quoted 14 lines · Sascha Hauer
Quoted 14 lines
Quoted 12 lines · Adam Furmanczuk
Quoted 12 lines · Alexander Shiyan
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

flashing barebox.bin to /dev/nor0.kernel

Quoted 1 line
Quoted 1 line

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.

Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

[...] 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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#12 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

Quoted 31 lines · Adam Furmanczuk

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

Quoted 17 lines · Adam Furmanczuk

********* *POCZATEK CZESCI SZYFROWANEJ / PODPISANEJ* *********

Quoted 14 lines · Sascha Hauer
Quoted 14 lines
Quoted 12 lines · Adam Furmanczuk
Quoted 12 lines · Alexander Shiyan
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

flashing barebox.bin to /dev/nor0.kernel

Quoted 1 line
Quoted 1 line

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.

Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

[...] 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\*

Quoted 4 lines

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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#13 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

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

Quoted 37 lines · Sascha Hauer
Quoted 31 lines · Adam Furmanczuk

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

Quoted 18 lines · Adam Furmanczuk

********* *POCZATEK CZESCI SZYFROWANEJ / PODPISANEJ* *********

Quoted 15 lines · Sascha Hauer
Quoted 15 lines
Quoted 13 lines · Adam Furmanczuk
Quoted 13 lines · Alexander Shiyan
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

flashing barebox.bin to /dev/nor0.kernel

Quoted 1 line
Quoted 1 line

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.

Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

[...] 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\*

Quoted 4 lines

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

Quoted 7 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#14 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

Quoted 21 lines · Adam Furmanczuk

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

Quoted 12 lines · Sascha Hauer
Quoted 4 lines · Adam Furmanczuk

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

Quoted 1 line · Adam Furmanczuk

********* *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

Quoted 7 lines

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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#15 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

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

Quoted 26 lines · Sascha Hauer
Quoted 25 lines · Adam Furmanczuk

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

Quoted 5 lines · Sascha Hauer
Quoted 3 lines · Adam Furmanczuk

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

On 12.06.2013 08:12, Adam Furmanczuk wrote:

Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

********* *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

Quoted 8 lines
Quoted 4 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#16 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

Quoted 9 lines · Adam Furmanczuk

-----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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#17 lore raw

Re[2]: how to flash barebox and set root variable? - barebox is gone :(

Quoted 22 lines · Adam Furmanczuk
Quoted 9 lines

-----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

Quoted 2 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#18 lore raw

Re: how to flash barebox and set root variable? - barebox is gone :(

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

Quoted 19 lines · Alexander Shiyan
Quoted 19 lines · Adam Furmanczuk
Quoted 18 lines
Quoted 10 lines
Quoted 10 lines

-----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

Quoted 6 lines
Quoted 3 lines
Quoted 3 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#19 lore raw

set root variable for uImage?

In reply to Adam Furmanczuk

-----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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#20 lore raw

set root variable for uImage?

In reply to Adam Furmanczuk

-----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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#21 lore raw

Re: set root variable for uImage?

Hi Adam,

Quoted 21 lines · Adam Furmanczuk

-----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
Quoted 8 lines

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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#22 lore raw

Re: set root variable for uImage?

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

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

Quoted 33 lines · Sascha Hauer

Hi Adam,

Quoted 18 lines · Adam Furmanczuk

-----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 
Quoted 8 lines

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:

Quoted 8 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#23 lore raw

Re[2]: set root variable for uImage?

Quoted 57 lines
Quoted 26 lines
Quoted 14 lines

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 
Quoted 8 lines

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:

Quoted 8 lines

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

Quoted 7 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#24 lore raw

Re: set root variable for uImage?

In reply to Adam Furmanczuk
Quoted 59 lines · Adam Furmanczuk

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

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

Quoted 33 lines · Sascha Hauer

Hi Adam,

Quoted 18 lines · Adam Furmanczuk

-----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 
Quoted 8 lines

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:

Quoted 8 lines

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

Quoted 4 lines

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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#25 lore raw

Re: set root variable for uImage?

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

Quoted 68 lines · Sascha Hauer
Quoted 55 lines · Adam Furmanczuk

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

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

Quoted 37 lines · Sascha Hauer

Hi Adam,

Quoted 23 lines · Adam Furmanczuk

-----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:

Quoted 6 lines

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:

Quoted 8 lines

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:

Quoted 8 lines

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?

Quoted 7 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#26 lore raw

Re: set root variable for uImage?

Quoted 9 lines · Adam Furmanczuk

-----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.

Quoted 4 lines

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.

Quoted 26 lines

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 =

Quoted 8 lines

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"

Quoted 14 lines

[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
Quoted 7 lines

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...

Quoted 8 lines

(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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#27 lore raw

Re: set root variable for uImage? - SOLVED

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

Quoted 9 lines · Sascha Hauer
Quoted 8 lines · Adam Furmanczuk

-----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.

Quoted 7 lines
Quoted 4 lines

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.

Quoted 30 lines
Quoted 12 lines

Greetings,

Adam

[1] http://pastebin.com/yyQjtpbT

barebox@Freescale i.MX53 LOCO:/ devinfo global resources: driver:
none bus: none

Quoted 7 lines

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"

Quoted 7 lines

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?

Quoted 13 lines
Quoted 13 lines

[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

Quoted 5 lines
Quoted 3 lines

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 ;).

Quoted 7 lines
Quoted 7 lines

(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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox