Re: how to flash barebox and set root variable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----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-----
#############################################################
#
# 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
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux