Re: [PATCH 0/2 v2] add bpkfs support
On Tue, Oct 08, 2013 at 02:51:24PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: On 13:34 Sun 06 Oct , Sascha Hauer wrote: On Thu, Oct 03, 2013 at 11:59:57AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: Hi, v2 update comment and fix comment typo and rebase next The following changes since commit 705dbd7c795bbdfb448e1d0ace89d98cbceaaec1: Merge branch 'for-next/tegra' into next (2013-10-02 11:07:14 +0200) are available in the git repository at: git://git.jcrosoft.org/barebox.git delivery/bpkfs for you to fetch changes up to 6edfa631c4aafd71d0508b94c7cdea87695dd492: Applied, thanks. Please only post patches against -next when you know there are dependencies to patches in -next. Otherwise always post them against master as this is the branch I'll apply them on. here there is conflict with uimagefs I'll resolve those trivial conflicts here on my side. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: bootloader specification for barebox
Hi, On Mon, 2013-09-30 at 11:43 +0200, Sascha Hauer wrote: Sascha Hauer (4): add function to read single line files cdev: store dos partition type in struct cdev Implement bootloader spec support for barebox add kernel-install tool for bootloader Spec I've tried these patches on my BeagleBones and they work as described. Regards, Jan -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: bootloader specification for barebox
On Mon, 14 Oct 2013, Jan Lübbe wrote: Hi, On Mon, 2013-09-30 at 11:43 +0200, Sascha Hauer wrote: Sascha Hauer (4): add function to read single line files cdev: store dos partition type in struct cdev Implement bootloader spec support for barebox add kernel-install tool for bootloader Spec I've tried these patches on my BeagleBones and they work as described. oooh ... i'd like to test replacing u-boot with barebox on my beaglebone black, is there any magic involved? rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: bootloader specification for barebox
On Mon, 2013-10-14 at 05:43 -0400, Robert P. J. Day wrote: On Mon, 14 Oct 2013, Jan Lübbe wrote: Hi, On Mon, 2013-09-30 at 11:43 +0200, Sascha Hauer wrote: Sascha Hauer (4): add function to read single line files cdev: store dos partition type in struct cdev Implement bootloader spec support for barebox add kernel-install tool for bootloader Spec I've tried these patches on my BeagleBones and they work as described. oooh ... i'd like to test replacing u-boot with barebox on my beaglebone black, is there any magic involved? You should just need to use am335x_beaglebone_mlo_small_defconfig for MLO and am335x_beaglebone_defconfig for barebox.bin. Then you place them in the FAT partition (same procedure as with u-boot). Regards, Jan -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: bootloader specification for barebox
On Mon, 14 Oct 2013, Jan Lübbe wrote: On Mon, 2013-10-14 at 05:43 -0400, Robert P. J. Day wrote: On Mon, 14 Oct 2013, Jan Lübbe wrote: Hi, On Mon, 2013-09-30 at 11:43 +0200, Sascha Hauer wrote: Sascha Hauer (4): add function to read single line files cdev: store dos partition type in struct cdev Implement bootloader spec support for barebox add kernel-install tool for bootloader Spec I've tried these patches on my BeagleBones and they work as described. oooh ... i'd like to test replacing u-boot with barebox on my beaglebone black, is there any magic involved? You should just need to use am335x_beaglebone_mlo_small_defconfig for MLO and am335x_beaglebone_defconfig for barebox.bin. Then you place them in the FAT partition (same procedure as with u-boot). excellent, i may give that a shot later today, thanks. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
barebox.lds.S, why _edata not follows the end of .data section?
Hi, in the linker script, _sdata = .; . = ALIGN(4); .data : { *(.data*) } ? why _edata is not here? . = .; __barebox_cmd_start = .; .barebox_cmd : { KEEP(*(SORT_BY_NAME(.barebox_cmd*))) } more __dynsym_start = .; *(.dynsym) __dynsym_end = .; } _edata = .; . = ALIGN(4); __bss_start = .; why _edata is there? other sections between _sdata and _edata, are they needed to be modified? duhuanpeng ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: barebox.lds.S, why _edata not follows the end of .data section?
Hi, On Mon, Oct 14, 2013 at 09:02:49PM +0800, Kevin Du Huanpeng wrote: Hi, in the linker script, _sdata = .; . = ALIGN(4); .data : { *(.data*) } ? why _edata is not here? Yes it could be there. I added this to the linker script because I needed all sdram_regions for barebox to jump over all barebox memory regions in memtest. Another solution would be to add a another region for barebox_cmds or something else, but I though that can be located in data, too. - Alex ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH] common: fix possible build problem without password support
In the case where CONFIG_PASSWORD is off, CONFIG_PASSWORD_DEFAULT is undefined. As undefined is not , this causes make to call find -type f. If there is a filename containing a :, make will complain about having multiple target patterns Signed-off-by: Jan Luebbe j...@pengutronix.de --- common/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/Makefile b/common/Makefile index 75d924e..6f6e360 100644 --- a/common/Makefile +++ b/common/Makefile @@ -116,6 +116,7 @@ $(obj)/barebox_default_env.h: $(obj)/barebox_default_env$(barebox_default_env_co $(call if_changed,env_h) quiet_cmd_pwd_h = PWDH$@ +ifdef CONFIG_PASSWORD ifneq ($(CONFIG_PASSWORD_DEFAULT),) PASSWD_FILE := $(shell cd $(srctree); find $(CONFIG_PASSWORD_DEFAULT) -type f) cmd_pwd_h = echo -n const char default_passwd[] = \ $@; \ @@ -134,6 +135,7 @@ endif targets += include/generated/passwd.h $(obj)/password.o: include/generated/passwd.h +endif # dependencies on generated files need to be listed explicitly $(obj)/version.o: include/generated/compile.h -- 1.8.4.rc3 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [SPAM] [PATCH] common: fix possible build problem without password support
On 17:39 Mon 14 Oct , Jan Luebbe wrote: In the case where CONFIG_PASSWORD is off, CONFIG_PASSWORD_DEFAULT is undefined. As undefined is not , this causes make to call find -type f. If there is a filename containing a :, make will complain about having multiple target patterns Signed-off-by: Jan Luebbe j...@pengutronix.de --- common/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/Makefile b/common/Makefile index 75d924e..6f6e360 100644 --- a/common/Makefile +++ b/common/Makefile @@ -116,6 +116,7 @@ $(obj)/barebox_default_env.h: $(obj)/barebox_default_env$(barebox_default_env_co $(call if_changed,env_h) quiet_cmd_pwd_h = PWDH$@ +ifdef CONFIG_PASSWORD ?? so if no password then it do cmd_pwd_h = echo const char default_passwd[] = \\; $@ that's all so we do not need to check CONFIG_PASSSORD ifneq ($(CONFIG_PASSWORD_DEFAULT),) PASSWD_FILE := $(shell cd $(srctree); find $(CONFIG_PASSWORD_DEFAULT) -type f) cmd_pwd_h = echo -n const char default_passwd[] = \ $@; \ @@ -134,6 +135,7 @@ endif targets += include/generated/passwd.h $(obj)/password.o: include/generated/passwd.h +endif # dependencies on generated files need to be listed explicitly $(obj)/version.o: include/generated/compile.h -- 1.8.4.rc3 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [SPAM] [PATCH] common: fix possible build problem without password support
Hi, On Mon, 2013-10-14 at 17:46 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: quiet_cmd_pwd_h = PWDH$@ +ifdef CONFIG_PASSWORD ?? so if no password then it do cmd_pwd_h = echo const char default_passwd[] = \\; $@ that's all so we do not need to check CONFIG_PASSSORD No. Try adding 'set -x;' to the shell call and building without CONFIG_PASSWORD. In that case CONFIG_PASSWORD_DEFAULT is not set. An unset Kconfig variable is not equal to . ifneq ($(CONFIG_PASSWORD_DEFAULT),) PASSWD_FILE := $(shell cd $(srctree); find $(CONFIG_PASSWORD_DEFAULT) -type f) Try with: PASSWD_FILE := $(shell set -x; cd $(srctree); echo `find $(CONFIG_PASSWORD_DEFAULT) -type f`) cmd_pwd_h = echo -n const char default_passwd[] = \ $@; \ @@ -134,6 +135,7 @@ endif targets += include/generated/passwd.h -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH] at91: fix typo in Kconfig description
Signed-off-by: Jan Luebbe j...@pengutronix.de --- arch/arm/mach-at91/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 5fb3ead..6ab374e 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -549,7 +549,7 @@ config AT91_BOOTSTRAP select BOOTSTRAP config AT91_LOAD_BAREBOX_SRAM - bool at91 laad barebox in sram + bool at91 load barebox in sram depends on SHELL_NONE || HAVE_AT91_LOAD_BAREBOX_SRAM default y if SHELL_NONE -- 1.8.4.rc3 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 1/2] of: simplify phandle lookup
From: Sascha Hauer s.ha...@pengutronix.de Instead of populating an extra list containing all phandles just iterate over the whole tree. This is done as preparation for more dynamic devicetrees where parts are loaded at runtime. Here we don't want to keep the list of phandles in sync. Signed-off-by: Sascha Hauer s.ha...@pengutronix.de --- drivers/of/base.c | 11 +++ include/of.h | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 116dd0c..ba929bc 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -67,8 +67,6 @@ struct alias_prop { static LIST_HEAD(aliases_lookup); -static LIST_HEAD(phandle_list); - struct device_node *root_node; struct device_node *of_aliases; @@ -274,9 +272,10 @@ struct device_node *of_find_node_by_phandle(phandle phandle) { struct device_node *node; - list_for_each_entry(node, phandle_list, phandles) + of_tree_for_each_node_from(node, root_node) if (node-phandle == phandle) return node; + return NULL; } EXPORT_SYMBOL(of_find_node_by_phandle); @@ -1719,7 +1718,7 @@ const struct of_device_id of_default_bus_match_table[] = { int of_probe(void) { - struct device_node *memory, *node; + struct device_node *memory; if(!root_node) return -ENODEV; @@ -1730,10 +1729,6 @@ int of_probe(void) if (of_model) barebox_set_model(of_model); - of_tree_for_each_node_from(node, root_node) - if (node-phandle) - list_add_tail(node-phandles, phandle_list); - memory = of_find_node_by_path(/memory); if (memory) of_add_memory(memory, false); diff --git a/include/of.h b/include/of.h index e5cd750..3381e69 100644 --- a/include/of.h +++ b/include/of.h @@ -30,7 +30,6 @@ struct device_node { struct list_head children; struct list_head parent_list; struct list_head list; - struct list_head phandles; phandle phandle; }; -- 1.8.4.rc3 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 2/2] of: implement overlay support
This implements device tree overlay support as described in http://thread.gmane.org/gmane.linux.ports.arm.omap/91556 and used on BeagleBone boards. It can be used to load DT overlays at runtime, which are then passed as a resolved tree to the kernel. Signed-off-by: Jan Luebbe j...@pengutronix.de --- commands/oftree.c | 59 - drivers/of/Kconfig| 6 + drivers/of/Makefile | 1 + drivers/of/overlay.c | 272 +++ drivers/of/resolver.c | 345 ++ include/of.h | 71 +++ 6 files changed, 752 insertions(+), 2 deletions(-) create mode 100644 drivers/of/overlay.c create mode 100644 drivers/of/resolver.c diff --git a/commands/oftree.c b/commands/oftree.c index 475f019..7c55edf 100644 --- a/commands/oftree.c +++ b/commands/oftree.c @@ -50,11 +50,14 @@ static int do_oftree(int argc, char *argv[]) int probe = 0; int load = 0; int save = 0; + int overlay = 0; int free_of = 0; int ret; struct device_node *n, *root; + int ovinfo_cnt; + struct of_overlay_info *ovinfo; - while ((opt = getopt(argc, argv, dpfn:ls)) 0) { + while ((opt = getopt(argc, argv, dpfn:los)) 0) { switch (opt) { case 'l': load = 1; @@ -79,6 +82,9 @@ static int do_oftree(int argc, char *argv[]) case 's': save = 1; break; + case 'o': + overlay = 1; + break; } } @@ -94,7 +100,7 @@ static int do_oftree(int argc, char *argv[]) if (optind argc) file = argv[optind]; - if (!dump !probe !load !save) + if (!dump !probe !load !save !overlay) return COMMAND_ERROR_USAGE; if (save) { @@ -153,6 +159,54 @@ static int do_oftree(int argc, char *argv[]) } } + if (overlay) { + if (!fdt) { + printf(no fdt given\n); + ret = -ENOENT; + + goto out; + } + + root = of_get_root_node(); + if (!root) { + printf(no oftree loaded\n); + goto out; + } + + n = of_unflatten_dtb(NULL, fdt); + if (IS_ERR(n)) + ret = PTR_ERR(n); + else + ret = 0; + if (ret) { + printf(parse oftree: %s\n, strerror(-ret)); + goto out; + } + + ret = of_resolve(n); + if (ret) { + printf(resolve oftree overlay: %s\n, strerror(-ret)); + of_delete_node(n); + goto out; + } + + ret = of_build_overlay_info(n, ovinfo_cnt, ovinfo); + if (ret) { + printf(prepare oftree overlay: %s\n, strerror(-ret)); + of_delete_node(n); + goto out; + } + + ret = of_overlay(ovinfo_cnt, ovinfo); + if (ret) { + printf(apply oftree overlay: %s\n, strerror(-ret)); + of_delete_node(n); + goto out; + } + + of_delete_node(n); + } + if (dump) { if (fdt) { root = of_unflatten_dtb(NULL, fdt); @@ -194,6 +248,7 @@ out: BAREBOX_CMD_HELP_START(oftree) BAREBOX_CMD_HELP_USAGE(oftree [OPTIONS] [DTB]\n) BAREBOX_CMD_HELP_OPT (-l, Load [DTB] to internal devicetree\n) +BAREBOX_CMD_HELP_OPT (-o, Overlay [DTB] to internal devicetree\n) BAREBOX_CMD_HELP_OPT (-p, probe devices from stored devicetree\n) BAREBOX_CMD_HELP_OPT (-d, dump oftree from [DTB] or the parsed tree if no dtb is given\n) BAREBOX_CMD_HELP_OPT (-f, free stored devicetree\n) diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index 6b893d7..fb2c480 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -7,6 +7,12 @@ config OFTREE_MEM_GENERIC depends on PPC || ARM def_bool y +config OFTREE_OVERLAY + bool OF tree overlay support + depends on OFTREE + help + Allows you to modify the live tree using overlays. + config DTC bool diff --git a/drivers/of/Makefile b/drivers/of/Makefile index a19a8af..f56db61 100644 --- a/drivers/of/Makefile +++ b/drivers/of/Makefile @@ -5,3 +5,4 @@ obj-y += partition.o obj-y += of_net.o obj-$(CONFIG_MTD) += of_mtd.o obj-$(CONFIG_OF_BAREBOX_DRIVERS) += barebox.o of_path.o +obj-$(CONFIG_OFTREE_OVERLAY) += resolver.o overlay.o diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c new file mode 100644 index 000..8e5a705 --- /dev/null +++ b/drivers/of/overlay.c @@
Re: [SPAM] [PATCH] common: fix possible build problem without password support
On 18:01 Mon 14 Oct , Jan L??bbe wrote: Hi, On Mon, 2013-10-14 at 17:46 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: quiet_cmd_pwd_h = PWDH$@ +ifdef CONFIG_PASSWORD ?? so if no password then it do cmd_pwd_h = echo const char default_passwd[] = \\; $@ that's all so we do not need to check CONFIG_PASSSORD No. Try adding 'set -x;' to the shell call and building without CONFIG_PASSWORD. In that case CONFIG_PASSWORD_DEFAULT is not set. An unset Kconfig variable is not equal to . ifneq ($(CONFIG_PASSWORD_DEFAULT),) PASSWD_FILE := $(shell cd $(srctree); find $(CONFIG_PASSWORD_DEFAULT) -type f) Try with: PASSWD_FILE := $(shell set -x; cd $(srctree); echo `find $(CONFIG_PASSWORD_DEFAULT) -type f`) with set -x I've the issue ok Best Regards, J. cmd_pwd_h = echo -n const char default_passwd[] = \ $@; \ @@ -134,6 +135,7 @@ endif targets += include/generated/passwd.h -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox