xymodem: select CRC16 from lib
Subsystems (3)
PATCH 1/2 xymodem: select CRC16 from lib
--- commands/Kconfig | 1 - lib/Kconfig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
commands/Kconfig +0 -1
@@ -481,7 +481,6 @@ config CMD_LOADS Load S-Record file over serial line with offset OFFS. config CMD_LOADY - select CRC16 select XYMODEM depends on !CONSOLE_NONE tristate
lib/Kconfig +1 -0
@@ -41,6 +41,7 @@ config QSORT config XYMODEM bool + select CRC16 config LIBSCAN bool
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/2 ARM: omap: Add bootsource serial to xload
If booted from serial via xmodem, also get barebox.bin per xmodem For first stage you need the .pblx file instead of MLO.
--- arch/arm/mach-omap/Kconfig | 7 +++++++ arch/arm/mach-omap/xload.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+)
arch/arm/mach-omap/Kconfig +7 -0
@@ -118,6 +118,13 @@ config OMAP4_USBBOOT You need the utility program omap4_usbboot to boot from USB. Please read omap4_usb_booting.txt for more information. +config OMAP_SERIALBOOT + bool + default y + select XYMODEM + select FS_RAMFS + depends on ARCH_AM33XX && SHELL_NONE + config OMAP_MULTI_BOARDS bool "Allow multiple boards to be selected" select HAVE_DEFAULT_ENVIRONMENT_NEW
arch/arm/mach-omap/xload.c +46 -0
64 lines not on this page · raw message
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] ARM: omap: Add bootsource serial to xload
Hi Jan,
Quoted 14 lines · Jan Weitzel
If booted from serial via xmodem, also get barebox.bin per xmodem For first stage you need the .pblx file instead of MLO.
Signed-off-by Jan Weitzel <[email protected]>--- arch/arm/mach-omap/Kconfig | 7 +++++++ arch/arm/mach-omap/xload.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+)arch/arm/mach-omap/Kconfig +0
-0
arch/arm/mach-omap/Kconfig config OMAP4_USBBOOT · line 123
Quoted 6 lines
arch/arm/mach-omap/Kconfig +3
-0@@ -118,6 +118,13 @@ config OMAP4_USBBOOT You need the utility program omap4_usbboot to boot from USB. Please read omap4_usb_booting.txt for more information. +config OMAP_SERIALBOOT + bool + default y
No default y please. Better keep it disabled by default because the OMAP4 xload configs are quiet tight I think.
Sascha
Quoted 87 lines
arch/arm/mach-omap/Kconfig +4
-0+ select XYMODEM + select FS_RAMFS + depends on ARCH_AM33XX && SHELL_NONE + config OMAP_MULTI_BOARDS bool "Allow multiple boards to be selected" select HAVE_DEFAULT_ENVIRONMENT_NEWarch/arm/mach-omap/xload.c +46
-0@@ -11,6 +11,7 @@#include <sizes.h> #include <malloc.h> #include <filetype.h> +#include <xymodem.h> #include <mach/generic.h> struct omap_barebox_part *barebox_part;@@ -184,6 +185,45 @@ static void *omap4_xload_boot_usb(void){return buf; } +static void *omap_serial_boot (void ){ +struct console_device *cdev; +int ret; +void *buf; +int len; +int fd; + +/* need temporary place to store file */ + ret =mount ("none" ,"ramfs" ,"/" ,NULL ); +if (ret <0 ) { +printf ("failed to mount ramfs\n" ); +return NULL ; + } + + cdev =console_get_first_active (); +if (!cdev) { +printf ("failed to get console\n" ); +return NULL ; + } + + fd =open ("/barebox.bin" ,O_WRONLY |O_CREAT ); +if (fd <0 ) { +printf ("could not create barebox.bin\n" ); +return NULL ; + } + + ret =do_load_serial_xmodem (cdev, fd); +if (ret <0 ) { +printf ("loadx failed\n" ); +return NULL ; + } + + buf =read_file ("/barebox.bin" , &len); +if (!buf) +printf ("could not read barebox.bin from serial\n" ); + +return buf; +} +/* * Replaces the default shell in xload configuration */ @@ -218,6 +258,12 @@ static __noreturn int omap_xload(void) func =omap_xload_boot_spi (barebox_part->nor_offset, barebox_part->nor_size);break ; +case BOOTSOURCE_SERIAL : +if (IS_ENABLED (CONFIG_OMAP_SERIALBOOT )) { +printf ("booting from serial\n" ); + func =omap_serial_boot (); +break ; + }default :printf ("unknown boot source. Fall back to nand\n" ); func = omap_xload_boot_nand(barebox_part->nand_offset,Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
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
Re: [PATCH 2/2] ARM: omap: Add bootsource serial to xload
Am 12.11.2014 um 09:22 schrieb Sascha Hauer:
Quoted 20 lines
Hi Jan,
Quoted 17 lines · Jan Weitzel
If booted from serial via xmodem, also get barebox.bin per xmodem For first stage you need the .pblx file instead of MLO.
Signed-off-by Jan Weitzel <[email protected]>--- arch/arm/mach-omap/Kconfig | 7 +++++++ arch/arm/mach-omap/xload.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+)arch/arm/mach-omap/Kconfig +0
-0@@ -118,6 +118,13 @@ config OMAP4_USBBOOT You need the utility program omap4_usbboot to boot from USB. Please read omap4_usb_booting.txt for more information.
Quoted 5 lines
arch/arm/mach-omap/Kconfig config OMAP4_USBBOOT · line 123
Quoted 3 lines
arch/arm/mach-omap/Kconfig +3
-0+config OMAP_SERIALBOOT + bool + default yNo default y please. Better keep it disabled by default because the OMAP4 xload configs are quiet tight I think.
Is adding it to am335x_mlo_defconfig ok? Because of the size I added the ARCH_AM33XX dependency.
Jan
Quoted 86 lines
Sascha
Quoted 82 lines
arch/arm/mach-omap/Kconfig +4
-0+ select XYMODEM + select FS_RAMFS + depends on ARCH_AM33XX && SHELL_NONE + config OMAP_MULTI_BOARDS bool "Allow multiple boards to be selected" select HAVE_DEFAULT_ENVIRONMENT_NEWarch/arm/mach-omap/xload.c +46
-0@@ -11,6 +11,7 @@#include <sizes.h> #include <malloc.h> #include <filetype.h> +#include <xymodem.h> #include <mach/generic.h> struct omap_barebox_part *barebox_part;@@ -184,6 +185,45 @@ static void *omap4_xload_boot_usb(void){return buf; } +static void *omap_serial_boot (void ){ +struct console_device *cdev; +int ret; +void *buf; +int len; +int fd; + +/* need temporary place to store file */ + ret =mount ("none" ,"ramfs" ,"/" ,NULL ); +if (ret <0 ) { +printf ("failed to mount ramfs\n" ); +return NULL ; + } + + cdev =console_get_first_active (); +if (!cdev) { +printf ("failed to get console\n" ); +return NULL ; + } + + fd =open ("/barebox.bin" ,O_WRONLY |O_CREAT ); +if (fd <0 ) { +printf ("could not create barebox.bin\n" ); +return NULL ; + } + + ret =do_load_serial_xmodem (cdev, fd); +if (ret <0 ) { +printf ("loadx failed\n" ); +return NULL ; + } + + buf =read_file ("/barebox.bin" , &len); +if (!buf) +printf ("could not read barebox.bin from serial\n" ); + +return buf; +} +/* * Replaces the default shell in xload configuration */ @@ -218,6 +258,12 @@ static __noreturn int omap_xload(void) func =omap_xload_boot_spi (barebox_part->nor_offset, barebox_part->nor_size);break ; +case BOOTSOURCE_SERIAL : +if (IS_ENABLED (CONFIG_OMAP_SERIALBOOT )) { +printf ("booting from serial\n" ); + func =omap_serial_boot (); +break ; + }default :printf ("unknown boot source. Fall back to nand\n" ); func = omap_xload_boot_nand(barebox_part->nand_offset,Signature · 1 line
1.9.1
Quoted 5 lines
Quoted 5 lines
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] ARM: omap: Add bootsource serial to xload
Quoted 26 lines · Jan Weitzel
Am 12.11.2014 um 09:22 schrieb Sascha Hauer:
Quoted 12 lines
Hi Jan,
Quoted 9 lines · Jan Weitzel
If booted from serial via xmodem, also get barebox.bin per xmodem For first stage you need the .pblx file instead of MLO.
Signed-off-by Jan Weitzel <[email protected]>--- arch/arm/mach-omap/Kconfig | 7 +++++++ arch/arm/mach-omap/xload.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+)Quoted 12 lines
arch/arm/mach-omap/Kconfig config OMAP4_USBBOOT · line 122
Quoted 10 lines
arch/arm/mach-omap/Kconfig +3
-0@@ -118,6 +118,13 @@ config OMAP4_USBBOOT You need the utility program omap4_usbboot to boot from USB. Please read omap4_usb_booting.txt for more information. +config OMAP_SERIALBOOT + bool + default yNo default y please. Better keep it disabled by default because the OMAP4 xload configs are quiet tight I think.
Quoted 2 lines
Is adding it to
am335x_mlo_defconfigok? Because of the size I added theARCH_AM33XXdependency.
I overlooked this dependency. So the dependency is only because of the binary size and it's otherwise usable on Omap aswell? In this case I suggest to drop the dependency. And yes, ok to add it to the am335x_mlo_defconfig.
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
PATCH v2 1/1 ARM: omap: Add bootsource serial to xload
If booted from serial via xmodem, also get barebox.bin per xmodem For first stage you need the .pblx file instead of MLO.
Add serial boot to am335x_mlo_defconfig introduce some cleanups by savedefconfig
---
v2: make serialboot configurable
select it in am335x_mlo_defconfig
arch/arm/configs/am335x_mlo_defconfig | 4 +-- arch/arm/mach-omap/Kconfig | 9 +++++++ arch/arm/mach-omap/xload.c | 46 +++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 3 deletions(-)
arch/arm/configs/am335x_mlo_defconfig +1 -3
@@ -1,12 +1,12 @@ CONFIG_ARCH_OMAP=y CONFIG_OMAP_BUILD_IFT=y +CONFIG_OMAP_SERIALBOOT=y CONFIG_OMAP_MULTI_BOARDS=y CONFIG_MACH_AFI_GF=y CONFIG_MACH_BEAGLEBONE=y CONFIG_MACH_PCM051=y CONFIG_MACH_PFLA03=y CONFIG_THUMB2_BAREBOX=y -# CONFIG_CMD_ARM_CPUINFO is not set # CONFIG_MEMINFO is not set CONFIG_MMU=y CONFIG_TEXT_BASE=0x0
@@ -37,10 +37,8 @@ CONFIG_NAND_OMAP_GPMC=y CONFIG_MCI=y # CONFIG_MCI_WRITE is not set CONFIG_MCI_OMAP_HSMMC=y -CONFIG_PINCTRL=y CONFIG_PINCTRL_SINGLE=y CONFIG_BUS_OMAP_GPMC=y -# CONFIG_FS_RAMFS is not set # CONFIG_FS_DEVFS is not set CONFIG_FS_FAT=y CONFIG_FS_FAT_LFN=y
arch/arm/mach-omap/Kconfig +9 -0
@@ -118,6 +118,15 @@ config OMAP4_USBBOOT You need the utility program omap4_usbboot to boot from USB. Please read omap4_usb_booting.txt for more information. +config OMAP_SERIALBOOT + bool "enable booting from serial" + select XYMODEM + select FS_RAMFS + depends on ARCH_AM33XX && SHELL_NONE + help + Say Y here if you want to load the 2nd stage barebox.bin with + xmodem after booting from serial line. + config OMAP_MULTI_BOARDS bool "Allow multiple boards to be selected" select HAVE_DEFAULT_ENVIRONMENT_NEW
arch/arm/mach-omap/xload.c +46 -0
64 lines not on this page · raw message
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedRe: [PATCH v2] ARM: omap: Add bootsource serial to xload
Quoted 7 lines · Jan Weitzel
If booted from serial via xmodem, also get barebox.bin per xmodem For first stage you need the .pblx file instead of MLO.
Add serial boot to
am335x_mlo_defconfigintroduce some cleanups by savedefconfigSigned-off-by Jan Weitzel <[email protected]>
Applied, thanks
Sascha
Quoted 138 lines
---
v2: make serialboot configurable
select it inam335x_mlo_defconfigarch/arm/configs/am335x_mlo_defconfig | 4 +-- arch/arm/mach-omap/Kconfig | 9 +++++++ arch/arm/mach-omap/xload.c | 46 +++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 3 deletions(-)arch/arm/configs/am335x_mlo_defconfig +1
-3@@ -1,12 +1,12 @@ CONFIG_ARCH_OMAP=y CONFIG_OMAP_BUILD_IFT=y +CONFIG_OMAP_SERIALBOOT=y CONFIG_OMAP_MULTI_BOARDS=y CONFIG_MACH_AFI_GF=y CONFIG_MACH_BEAGLEBONE=y CONFIG_MACH_PCM051=y CONFIG_MACH_PFLA03=y CONFIG_THUMB2_BAREBOX=y -# CONFIG_CMD_ARM_CPUINFO is not set # CONFIG_MEMINFO is not set CONFIG_MMU=y CONFIG_TEXT_BASE=0x0@@ -37,10 +37,8 @@ CONFIG_NAND_OMAP_GPMC=y CONFIG_MCI=y # CONFIG_MCI_WRITE is not set CONFIG_MCI_OMAP_HSMMC=y -CONFIG_PINCTRL=y CONFIG_PINCTRL_SINGLE=y CONFIG_BUS_OMAP_GPMC=y -# CONFIG_FS_RAMFS is not set # CONFIG_FS_DEVFS is not set CONFIG_FS_FAT=y CONFIG_FS_FAT_LFN=yarch/arm/mach-omap/Kconfig +9
-0@@ -118,6 +118,15 @@ config OMAP4_USBBOOT You need the utility program omap4_usbboot to boot from USB. Please read omap4_usb_booting.txt for more information. +config OMAP_SERIALBOOT + bool "enable booting from serial" + select XYMODEM + select FS_RAMFS + depends on ARCH_AM33XX && SHELL_NONE + help + Say Y here if you want to load the 2nd stage barebox.bin with + xmodem after booting from serial line. + config OMAP_MULTI_BOARDS bool "Allow multiple boards to be selected" select HAVE_DEFAULT_ENVIRONMENT_NEWarch/arm/mach-omap/xload.c +46
-0@@ -11,6 +11,7 @@#include <sizes.h> #include <malloc.h> #include <filetype.h> +#include <xymodem.h> #include <mach/generic.h> struct omap_barebox_part *barebox_part;@@ -184,6 +185,45 @@ static void *omap4_xload_boot_usb(void){return buf; } +static void *omap_serial_boot (void ){ +struct console_device *cdev; +int ret; +void *buf; +int len; +int fd; + +/* need temporary place to store file */ + ret =mount ("none" ,"ramfs" ,"/" ,NULL ); +if (ret <0 ) { +printf ("failed to mount ramfs\n" ); +return NULL ; + } + + cdev =console_get_first_active (); +if (!cdev) { +printf ("failed to get console\n" ); +return NULL ; + } + + fd =open ("/barebox.bin" ,O_WRONLY |O_CREAT ); +if (fd <0 ) { +printf ("could not create barebox.bin\n" ); +return NULL ; + } + + ret =do_load_serial_xmodem (cdev, fd); +if (ret <0 ) { +printf ("loadx failed\n" ); +return NULL ; + } + + buf =read_file ("/barebox.bin" , &len); +if (!buf) +printf ("could not read barebox.bin from serial\n" ); + +return buf; +} +/* * Replaces the default shell in xload configuration */ @@ -218,6 +258,12 @@ static __noreturn int omap_xload(void) func =omap_xload_boot_spi (barebox_part->nor_offset, barebox_part->nor_size);break ; +case BOOTSOURCE_SERIAL : +if (IS_ENABLED (CONFIG_OMAP_SERIALBOOT )) { +printf ("booting from serial\n" ); + func =omap_serial_boot (); +break ; + }default :printf ("unknown boot source. Fall back to nand\n" ); func = omap_xload_boot_nand(barebox_part->nand_offset,Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
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
Re: [PATCH 2/2] ARM: omap: Add bootsource serial to xload
In reply to Sascha HauerAm 13.11.2014 um 08:37 schrieb Sascha Hauer:
Quoted 26 lines · Jan Weitzel
Quoted 25 lines
Am 12.11.2014 um 09:22 schrieb Sascha Hauer:
Quoted 24 lines
Hi Jan,
Quoted 14 lines · Jan Weitzel
If booted from serial via xmodem, also get barebox.bin per xmodem For first stage you need the .pblx file instead of MLO.
Signed-off-by Jan Weitzel <[email protected]>--- arch/arm/mach-omap/Kconfig | 7 +++++++ arch/arm/mach-omap/xload.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+)arch/arm/mach-omap/Kconfig +0
-0arch/arm/mach-omap/Kconfig config OMAP4_USBBOOT · line 122
Quoted 5 lines
arch/arm/mach-omap/Kconfig +3
-0@@ -118,6 +118,13 @@ config OMAP4_USBBOOT You need the utility program omap4_usbboot to boot from USB. Please read omap4_usb_booting.txt for more information. +config OMAP_SERIALBOOT + bool + default yNo default y please. Better keep it disabled by default because the OMAP4 xload configs are quiet tight I think.
Quoted 6 lines
Quoted 2 lines
Is adding it to
am335x_mlo_defconfigok? Because of the size I added theARCH_AM33XXdependency.I overlooked this dependency. So the dependency is only because of the binary size and it's otherwise usable on Omap aswell? In this case I suggest to drop the dependency. And yes, ok to add it to the
am335x_mlo_defconfig.
Only AM335x set BOOTSOURCE_SERIAL by now
Jan
Quoted 3 lines
Sascha
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 5 lines · Jan Weitzel
Signed-off-by Jan Weitzel <[email protected]>--- commands/Kconfig | 1 - lib/Kconfig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
Applied this one, thanks
Sascha
Quoted 34 lines
commands/Kconfig +0
-1@@ -481,7 +481,6 @@ config CMD_LOADS Load S-Record file over serial line with offset OFFS. config CMD_LOADY - select CRC16 select XYMODEM depends on !CONSOLE_NONE tristatelib/Kconfig +1
-0@@ -41,6 +41,7 @@ config QSORT config XYMODEM bool + select CRC16 config LIBSCAN boolSignature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
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