Re: [PATCH] Makefile: add target to produce a SPL compatible uImage
On Tue, 2012-09-25 at 14:29 +0200, Teresa Gamez wrote: > Am 24.09.2012 14:49, schrieb Jan Lübbe: > > On Mon, 2012-09-24 at 14:37 +0200, Teresa Gamez wrote: > >> I have tested it with my am335x patches. And it worked so far. > >> But I have not done anything with the pbl image, yet. > >> Could you explain me what it's actually for? And how I can test it? > > Thanks! > > > > PBL stands for Pre-Bootloader Image, which is used to have a compressed > > barebox binary. You can enable it in "General Settings -> memory layout > > -> Pre-Bootloader image". > > Do I understand this correctly that this is suppose to be used to decrease > the size of first stage bootloader binaries like the MLO on ti boards? I don't think it is useful in the current form for the MLO case. The problem there is that the SRAM would be too small to contain the decompressed image (in addition to the compressed one). It saves some time when loading from slower flash and is useful when the space for barebox in flash is limited some how (but you have enough RAM). For the MLO case we would need to have the DRAM setup in the Pre-Bootloader and then decompress to DRAM. That should be possible, but I'm not sure how much we'd gain (the compressed image would still be limited by SRAM size). 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: [PATCH] Makefile: add target to produce a SPL compatible uImage
Am 24.09.2012 14:49, schrieb Jan Lübbe: On Mon, 2012-09-24 at 14:37 +0200, Teresa Gamez wrote: I have tested it with my am335x patches. And it worked so far. But I have not done anything with the pbl image, yet. Could you explain me what it's actually for? And how I can test it? Thanks! PBL stands for Pre-Bootloader Image, which is used to have a compressed barebox binary. You can enable it in "General Settings -> memory layout -> Pre-Bootloader image". Do I understand this correctly that this is suppose to be used to decrease the size of first stage bootloader binaries like the MLO on ti boards? Regards, Teresa Regards, Jan ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] Makefile: add target to produce a SPL compatible uImage
On Thu, 2012-09-20 at 21:13 +0200, Jan Luebbe wrote: > This is mostly useful during the initial port of barebox to a new > board which is supported by u-boot. It also allows starting barebox > from a SRAM-based u-boot SPL. > > A different load address can be set like this: > make barebox.uimage UIMAGE_BASE=0x8000 > > Also add barebox.ubl to CLEAN_FILES. > > Signed-off-by: Jan Luebbe > --- > I've carried this patch for some time and adjusted it to support > PBL (compressed image), but have not had an opportunity to verify > it again. > > Teresa, if you have some time to try it out, that would be very > much appreciated. :) Sascha: As Teresa has tested this, could you apply it? 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: [PATCH] Makefile: add target to produce a SPL compatible uImage
On Mon, 2012-09-24 at 14:37 +0200, Teresa Gamez wrote: > I have tested it with my am335x patches. And it worked so far. > But I have not done anything with the pbl image, yet. > Could you explain me what it's actually for? And how I can test it? Thanks! PBL stands for Pre-Bootloader Image, which is used to have a compressed barebox binary. You can enable it in "General Settings -> memory layout -> Pre-Bootloader image". 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: [PATCH] Makefile: add target to produce a SPL compatible uImage
Hello Jan, Am 20.09.2012 21:13, schrieb Jan Luebbe: This is mostly useful during the initial port of barebox to a new board which is supported by u-boot. It also allows starting barebox from a SRAM-based u-boot SPL. A different load address can be set like this: make barebox.uimage UIMAGE_BASE=0x8000 Also add barebox.ubl to CLEAN_FILES. Signed-off-by: Jan Luebbe --- I've carried this patch for some time and adjusted it to support PBL (compressed image), but have not had an opportunity to verify it again. Teresa, if you have some time to try it out, that would be very much appreciated. :) I have tested it with my am335x patches. And it worked so far. But I have not done anything with the pbl image, yet. Could you explain me what it's actually for? And how I can test it? Regards Teresa .gitignore |1 + Makefile | 19 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4154c73..7e98a25 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ barebox.srec barebox.netx barebox.s5p barebox.ubl +barebox.uimage barebox.map System.map Module.symvers diff --git a/Makefile b/Makefile index 0f1a319..5cb4730 100644 --- a/Makefile +++ b/Makefile @@ -686,6 +686,22 @@ ifndef CONFIG_PBL_IMAGE $(call cmd,check_file_size,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE)) endif +# By default the uImage load address is 2MB below CONFIG_TEXT_BASE, +# leaving space for the compressed PBL image at 1MB below CONFIG_TEXT_BASE. +UIMAGE_BASE ?= $(shell printf "0x%08x" $$(($(CONFIG_TEXT_BASE) - 0x20))) + +# For development provide a target which makes barebox loadable by an +# unmodified u-boot +quiet_cmd_barebox_mkimage = MKIMAGE $@ + cmd_barebox_mkimage = $(srctree)/scripts/mkimage -A $(ARCH) -T firmware -C none \ + -O barebox -a $(UIMAGE_BASE) -e $(UIMAGE_BASE) \ + -n "barebox $(KERNELRELEASE)" -d $< $@ + +# barebox.uimage is build from the raw barebox binary, without any other +# headers. +barebox.uimage: $(KBUILD_BINARY) FORCE + $(call if_changed,barebox_mkimage) + ifdef CONFIG_X86 barebox.S: barebox ifdef CONFIG_X86_HDBOOT @@ -1015,7 +1031,8 @@ CLEAN_FILES +=barebox System.map include/generated/barebox_default_env.h \ .tmp_version .tmp_barebox* barebox.bin barebox.map barebox.S \ .tmp_kallsyms* barebox_default_env* barebox.ldr \ scripts/bareboxenv-target barebox-flash-image \ - Doxyfile.version barebox.srec barebox.s5p + Doxyfile.version barebox.srec barebox.s5p barebox.ubl \ + barebox.uimage # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config include2 usr/include ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] Makefile: add target to produce a SPL compatible uImage
I forgot to mention that this is based on changes in the 'next' branch. At least: ae0807392425326df7908b1d7aa92467e78931d1 kbuild: keep the barebox binary accessible -- 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] Makefile: add target to produce a SPL compatible uImage
This is mostly useful during the initial port of barebox to a new board which is supported by u-boot. It also allows starting barebox from a SRAM-based u-boot SPL. A different load address can be set like this: make barebox.uimage UIMAGE_BASE=0x8000 Also add barebox.ubl to CLEAN_FILES. Signed-off-by: Jan Luebbe --- I've carried this patch for some time and adjusted it to support PBL (compressed image), but have not had an opportunity to verify it again. Teresa, if you have some time to try it out, that would be very much appreciated. :) .gitignore |1 + Makefile | 19 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4154c73..7e98a25 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ barebox.srec barebox.netx barebox.s5p barebox.ubl +barebox.uimage barebox.map System.map Module.symvers diff --git a/Makefile b/Makefile index 0f1a319..5cb4730 100644 --- a/Makefile +++ b/Makefile @@ -686,6 +686,22 @@ ifndef CONFIG_PBL_IMAGE $(call cmd,check_file_size,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE)) endif +# By default the uImage load address is 2MB below CONFIG_TEXT_BASE, +# leaving space for the compressed PBL image at 1MB below CONFIG_TEXT_BASE. +UIMAGE_BASE ?= $(shell printf "0x%08x" $$(($(CONFIG_TEXT_BASE) - 0x20))) + +# For development provide a target which makes barebox loadable by an +# unmodified u-boot +quiet_cmd_barebox_mkimage = MKIMAGE $@ + cmd_barebox_mkimage = $(srctree)/scripts/mkimage -A $(ARCH) -T firmware -C none \ + -O barebox -a $(UIMAGE_BASE) -e $(UIMAGE_BASE) \ + -n "barebox $(KERNELRELEASE)" -d $< $@ + +# barebox.uimage is build from the raw barebox binary, without any other +# headers. +barebox.uimage: $(KBUILD_BINARY) FORCE + $(call if_changed,barebox_mkimage) + ifdef CONFIG_X86 barebox.S: barebox ifdef CONFIG_X86_HDBOOT @@ -1015,7 +1031,8 @@ CLEAN_FILES +=barebox System.map include/generated/barebox_default_env.h \ .tmp_version .tmp_barebox* barebox.bin barebox.map barebox.S \ .tmp_kallsyms* barebox_default_env* barebox.ldr \ scripts/bareboxenv-target barebox-flash-image \ - Doxyfile.version barebox.srec barebox.s5p + Doxyfile.version barebox.srec barebox.s5p barebox.ubl \ + barebox.uimage # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config include2 usr/include -- 1.7.10.4 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox