9
0
Fork 0
Commit Graph

7713 Commits

Author SHA1 Message Date
Robert Jarzmik 2a38aa83f7 commands: change Y-Modem implementation
The current Y-Modem implementation has some limitations:
 - Y-Modem/G protocol is not supported
 - Multiple files (aka. batch) transfers are not supported
 - Transfer speed over fast lines (USB console) is slow
 - Code is not trivial to maintain (personnal opinion)

This implementation tries to address all these points by
introducing loady2 command.

The effects are :
 - transfer speed for Y-Modem over USB jumps from 2kBytes/s
   to 180kBytes/s
 - transfer speed for Y-Modem/G jumps to 200kBytes/s
 - multiple file transfers are possible

This command was tested on a USB console and UART 9600bps
serial line :
 - NAKs (and retransmissions) were tested for faulty
   serial lines
 - multiple file transfers were tested
 - Y-Modem, Y-Modem/G and X-Modem transfers were tested

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-12 09:35:53 +01:00
Sascha Hauer 06bc2e706c defenv-2 menu: when booting failed wait for key press
When booting fails we will be immediately be back into the menu,
so the error message can't be seen. Also, boot in verbose mode
since in interactive mode the last bit of performance is not that
necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-12 08:47:19 +01:00
Sascha Hauer d74bef2b04 mount: add compatibility to old mount command
the mount command used to have the syntax 'mount <dev> <type> <mountpoint>'.
This was changed to the more Linux like behaviour which specifies the
type with the -t <type> option. If a newer barebox is run on a device
with an older environment the mount command no longer works. This patch
adds compatibility to the old behaviour.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-02 21:26:29 +01:00
Uwe Kleine-König 56371f4e84 iomux-imx35: add missing comma in pad definition
The same issue was fixed in the Linux kernel in commit

	66ddfc6 (mx35: add a missing comma in a pad definition)

for 2.6.33-rc7.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:32:12 +01:00
Sascha Hauer 907e3ff3e6 command: return 1 on unknown command
hush now prints the error value if a command returns a value < 0,
so do not return -1 (EPERM) when we encounter an unknown command.
Instead, return 1 so that hush is quiet.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:31:07 +01:00
Jean-Christophe PLAGNIOL-VILLARD d357612bc1 at91sam9xek: fix mtd partition
barebox size is 384KiB
and for the official atmel release we need to rootfs at 8M

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:28:49 +01:00
Sascha Hauer b8d7c3a95c bootm: Do not cross 1MiB sections for the devicetree
ARM Linux only maps a single 1MiB section for the devicetree. This has
a 1Mib alignment, so we are not allowed to cross such a boundary. Align
the devicetree to the next power of two so that this never happens.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:27:21 +01:00
Sascha Hauer da7d19b9d8 bootm: Add a define for the additional devicetree size
The fixed devicetree may need more space than the original one.
We used to use 0x8000 here. Add a define for it to have the
space defined at a single place.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:27:17 +01:00
Sascha Hauer c83623d010 net usb asix: Add missing line breaks in dev_* messages
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 08:43:05 +01:00
Sascha Hauer 33068a216a Merge branch 'pu/net-fixes' 2012-10-31 21:52:03 +01:00
Sascha Hauer 51e9c42c74 net fec: call fec_init at probe time
fec_init() initializes some bits important for phy access, so do
this before the mdiobus is registered. This fixes mdiobus support
on i.MX28 boards in RMII mode.

Reported-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-31 21:51:36 +01:00
Sascha Hauer 2d1ceaff2f uimage: Fix deleting of temporary file
the uImage support may generate a temporary file which ought to be deleted
after usage. Due to the wrong filename this never happened. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 18:39:38 +01:00
Sascha Hauer 8796301447 net eth: make edev->init optional
edev->init is called at eth_register time unconditionally and is supposed
to initialize the ethernet hardware. Since it's called unconditionally
this could be done by the driver without having an additional hook.
Some drivers need their initialization done earlier since they also register
a mdiobus which does hardware accesses on registration time.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 17:17:52 +01:00
Sascha Hauer 3a17af33c0 net fec: connect phy at probe time
Several i.MX boards (all i.MX6 boards) need to do some adjustments
to phy registers. If barebox itself does not use network, networking
won't work in the kernel if the kernel does not have the fixups. Connect
the phy at probe time so that these tweaks are done during probe so that
the kernel works without phy register tweaks. Also this has the effect
that the phy device is present and introspectable without doing fake
network transfers beforehand.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 17:17:35 +01:00
Sascha Hauer e2fce6b92c of: Check for NULL pointer in of_find_property
The console layer calls of_device_is_stdout_path for a new console. When
we are booting without devicetree then of_chosen is NULL which makes barebox
crash. Check for a NULL pointer in of_find_property to prevent this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 14:42:54 +01:00
Sascha Hauer 72703410fe misc JTAG: include fixes
common.h should come first, other include files implicitely depend
on it. Also, remove unused fs.h and remove commented line.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 09:08:51 +02:00
Sascha Hauer 0fd1611291 ARM omap spi image: print error to stderr
Since the utility outputs the image on stdout we have to print the
error messages to stderr in order to see them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:16 +02:00
Sascha Hauer 3bd35b8993 ARM omap spi image: relax size constrains
The omap spi utility requires the image size to be a multiple of four
bytes. This seems unnecessary, we can just pad with a few bytes to
get the required alignment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:11 +02:00
Sascha Hauer 5b620bce2e pbl: provide hang() function for the pbl
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:07 +02:00
Sascha Hauer 5b0fc19196 of gpio: Build gpio helper only when gpiolib is selected
Otherwise the functions needed by the helper won't be available.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:01 +02:00
Sascha Hauer 0b15ebf165 mtd nand i.MX: fix compilation for unsupported SoC
Add a default case when all if(nfc_is_*) else if()
return false to prevent a compiler warning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:56 +02:00
Sascha Hauer f2513cb8b1 mtd mxs nand: select NAND_BBT
The driver won't compile without it, so select it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:48 +02:00
Sascha Hauer 7cbd1011a0 misc JTAG: Let Jtag driver depend on GENERIC_GPIO
It uses the gpio functions, so let it depend on GENERIC_GPIO.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:42 +02:00
Sascha Hauer 001404fce8 mfd stmpe: Add missing semicolons at end of EXPORT_SYMBOL
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:35 +02:00
Sascha Hauer 72b62560c0 ARM Samsung: Let Nand boot depend on ARCH_S3C24xx
It is only available on this SoC.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:24 +02:00
Sascha Hauer 89d6164660 ARM omap: pbl fixes
Omap3 pbl build may need omap3_clock.c. Also, do not use add_generic_device
in pbl

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:12 +02:00
Sascha Hauer 5696a16f10 ARM Samsung: fix pbl build for tiny210 board
The Tiny210 needs lowlevel.o and memory setup in the pbl.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:55:54 +02:00
Sascha Hauer 2a93d234e1 ARM: let THUMB2 select EABI
THUMB2 mode needs EABI to build, so select it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:55:49 +02:00
Sascha Hauer bb05186004 mtd: fix mtdraw_write/mtdraw_erase arguments
For the !CONFIG_MTD_WRITE case they still have ulong as offset
argument.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:55:43 +02:00
Sascha Hauer f849039dd2 wd: Provide default value for watchdog timeout
Otherwise barebox can't be built if the user did not specify a value.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:54:44 +02:00
Sascha Hauer a1e5e57759 pbl: Add missing FORCE
Otherwise the pbl files do not get rebuilt when the CFLAGS change.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:54:33 +02:00
Wolfram Sang c9a0beb195 mtd: ubi: fix typos in comment of build.c
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-25 17:43:11 +02:00
Sascha Hauer 8f29343d9d defenv-2: set username to 'none'
The current 'sha' setting, though admittedly very convenient for me,
was never intended to be in mainline.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-25 17:42:27 +02:00
Wolfram Sang 6cc8d05446 Makefile: disable CDPATH
CDPATH has sideeffects when generating barebox_default_env.h (printing
the directory name into the header file), causing a build failure.
Disable it for the build.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-25 08:38:03 +02:00
Sascha Hauer 975d6a0130 fs tftp: Fix possible fifo overflow
In tftp_read we send a request for a new packet without checking if we
have enough space in the FIFO. This can lead to a FIFO overflow and a
corrupt file. Add a check for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2012-10-24 09:57:51 +02:00
Sascha Hauer d2606de353 fs tftp: Only request a block once
tftp_send is called often. Each time, when in STATE_RDATA, a packet
is requested from the tftp server, even if we requested the same packet
already.
Stop this by tracking which packet we requested.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-24 09:57:44 +02:00
Jean-Christophe PLAGNIOL-VILLARD 5e46365808 pm9g45: fix config and defconfig
- add dhcp vendor_id
 - enable glob support (needed by nand)
 - enable pbl
 - enable MMU
 - enable bootm oftree support
 - enable loadb
 - enable nfs
 - use zImage by default

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-23 09:07:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD 271439fe49 pm9g45: fix nand partition in c code
enable bbt too

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-23 09:07:58 +02:00
Wolfram Sang aafca5fbd0 mtd: ubi: cdev: fix build warning for 64-bit
Got this when compiling sandbox on a 64-bit system:

drivers/mtd/ubi/cdev.c: In function ‘ubi_volume_cdev_read’:
drivers/mtd/ubi/cdev.c:26:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat]

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-23 09:06:19 +02:00
Alexander Aring 346b16ba0a devfs-core: add writesize in mtd partition ioctl
Add writesize in mtd partition MEMGETINFO ioctl.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-23 08:25:31 +02:00
Sascha Hauer a6f852d401 Merge branch 'pu/compiler-warnings' 2012-10-21 10:57:54 +02:00
Teresa Gámez f1ea7465b2 ARM OMAP: Enable gpio output
Enable output instead of disabling it.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-21 10:39:43 +02:00
Sascha Hauer c0aabaff3b net gianfar: remove unused variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 22:17:57 +02:00
Sascha Hauer b733572fa4 sandbox: only test for sdl libs when sdl is enabled
Otherwise we get the following warning when sdl is not installed
on the compile host:

Package sdl was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl' found

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 22:17:48 +02:00
Sascha Hauer 141d32f00f mips: remove unused variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 22:17:44 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4400350871 at91sam9x5ek: fix bootstrap size to 256KiB
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-17 15:05:52 +08:00
Jean-Christophe PLAGNIOL-VILLARD c49364cc37 sam9x5ek: drop uart2 as it's not always present
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-17 12:20:13 +08:00
Jean-Christophe PLAGNIOL-VILLARD 673a696cf7 at91sam9x5: udpate default ARCH_TEXT to 0x26f00000
On sam9x5 series the bootstrap load the bootloader at 0x26f00000.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-17 12:20:13 +08:00
Sascha Hauer f99ea5c9d8 ARM samsung S5P: Enable board support
This was once disabled because we had no board support. This has
changed, so enable the S5P board support in the config so that
the friendlyarm_tiny210_defconfig actually builds for the correct
machine.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:47:01 +02:00
Sascha Hauer c65edd657d ARM a9m2440: Fix lowlevel init
board_init_lowlevel is no longer called from generic code, so we can't
just return from in. Instead we have to jump to board_init_lowlevel_return
manually. For the a9m2440 board one case was missed to convert. This
is broken since:

| commit faf7b7af6e
| Author: Jan Luebbe <jlu@pengutronix.de>
| Date:   Mon Sep 24 10:18:34 2012 +0200
|
|     ARM: give boards control of the reset entry point
|
|     On some SoCs (for example AM35xx), the ROM bootloader passes useful
|     information in r0 when jumping to barebox.
|
|     To avoid overwriting this in the generic reset code, we introduce
|     common_reset as a C function and as an assembler macro. This is then
|     called form the reset entry point (either in common or in board code).
|
|     This patch is based on code by Sascha Hauer <s.hauer@pengutronix.de>.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:46:56 +02:00