9
0
Fork 0
Commit Graph

13603 Commits

Author SHA1 Message Date
Wjatscheslaw Stoljarski eda3453331 readline: Kconfig: fix typo
Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 07:53:13 +01:00
Jan Remmet 2936579c60 state: make type check error verbose
Wrong type let state probe fail with ENOENT.

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 07:52:38 +01:00
Jan Remmet 39c858ede8 bootm: get file type before bootm_open_os_uimage
Using a  multi uimage stored in nand didn't work. Only one open for the
bb file is allowed. The file type detection after bootm_open_os_uimage
will fail. bootm_open_initrd_uimage and bootm_open_oftree_uimage already
check if they can reuse data->os.

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-20 08:35:18 +01:00
Jan Remmet 5ec644e7d8 bootm: cleanup bootm_open_oftree
Separate oftree file and uimage oftree handling.
Make fie_type checks in bootm_boot

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-20 08:35:18 +01:00
Sergey Koshechkin 33060cc675 make_directory: fix warning: no previous prototype
Signed-off-by: Sergey Koshechkin <serge.koshechkin@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-18 08:31:18 +01:00
Sergey Koshechkin 916c20fb35 crypto: crc32: fix warnings: no previous prototype for 'crc32', 'crc32_no_comp', 'file_crc'
Signed-off-by: Sergey Koshechkin <serge.koshechkin@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-18 08:30:08 +01:00
Sascha Hauer ec871a7370 ls: fix exitcode
Once ls is called with a non-existing directory it should exit with a
non-zero status. Fix that.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-17 11:57:33 +01:00
Du Huanpeng 405c6e09dd lib: readline support ctrl-l to clear screen
maybe it is easier to press ctrl-l to clear the screen than type
'clear' command.

Signed-off-by: Du Huanpeng <u74147@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-17 09:14:17 +01:00
Sergey Koshechkin 13226470af docproc: drop unused utility
Signed-off-by: Sergey Koshechkin <serge.koshechkin@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-13 07:56:02 +01:00
Sergey Koshechkin d7f29650e4 mk-omap-image: make some locally used functions static
Signed-off-by: Sergey Koshechkin <serge.koshechkin@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-10 08:41:13 +01:00
Uwe Kleine-König d9c2cfd534 usb: mx25: fix bit position of "Host power mask"
The bit MX25_H1_PM_BIT value is handled for port 1 as MX25_OTG_PM_BIT is
for port 0. The latter is called "OPM: OTG power mask" in the i.MX25
reference manual. Its description matches the description of "HPM: Host
power mask" for the host port which is bit 16, not 8.

The Linux kernel (as of 4.3) also has

	#define MX25_H1_PM_BIT                  BIT(16)

.

Fixes: a4076ddf65 ("USB i.MX: Add chipidea driver support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:33:34 +01:00
Andrey Smirnov 8f8f14f9b6 fs: smhfs: Fix return value of truncate()
Returning -ENOSYS as a result of truncate() breaks ability to write to
semihosting host's filesystem, so change the return value to 0. This
shouldn't cause any problems since all of the funcionlaity of
truncate() should is already handled by 'open' (via O_TRUNC) and
'write' (will automatically grow the file size when writing)
automatically

Unfortunately this was missed in original commit that introduced
semihosting

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:17:57 +01:00
Sascha Hauer b97ac6bd41 Merge branch 'for-next/usb' 2015-11-06 16:10:44 +01:00
Sascha Hauer 6aed170ef1 Merge branch 'for-next/net' 2015-11-06 16:10:44 +01:00
Sascha Hauer b5c7b09c8a Merge branch 'for-next/mvebu' 2015-11-06 16:10:44 +01:00
Sascha Hauer 1d9295b344 Merge branch 'for-next/misc' 2015-11-06 16:10:42 +01:00
Sascha Hauer 736a74ba7a Merge branch 'for-next/mips' 2015-11-06 16:10:37 +01:00
Sascha Hauer 3cdd30342b Merge branch 'for-next/memtest' 2015-11-06 16:10:37 +01:00
Sascha Hauer 5b476ef5e5 Merge branch 'for-next/imx' 2015-11-06 16:10:35 +01:00
Sascha Hauer 812a0fd6b8 Merge branch 'for-next/arm' 2015-11-06 16:10:29 +01:00
Sascha Hauer bc4ea539d4 Release v2015.11.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-06 15:12:43 +01:00
Aleksey Kuleshov 6face0e8ab fb: alloc or free shadowfb whether fb enabled or disabled
Resolution can't be changed anyway once fb_enable() has been called,
since no corresponding fb_disable() call appears in the code.

Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-06 07:35:11 +01:00
Aleksey Kuleshov f72056d14e fb: satisfy semantics for shadowfb's alloc/free
Console enable -> alloc shadowfb.
Console disable -> free shadowfb.
Otherwise, if resolution gets changed, shadowfb will not be affected.

Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-06 07:35:11 +01:00
Aleksey Kuleshov 769ddc6133 fbconsole: no need to copy extra line
Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-06 07:35:11 +01:00
Enrico Jorns 867b30a0a0 edit: return error when save_file failed
When writing a file failed (e.g. due to a read-only file system), no
error was reported by the 'edit' tool. To be valid (and to not confuse
the poor user) at least '1' should be returned to indicate an error.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:16:12 +01:00
Enrico Jorns 79f04b235c edit: handle write() call errors in save_file()
save_file() did ignore possible errors of its write() calls.
Now the error code is used as return code for save_file().

write_full() is used instead of write() as it does not perform partial
writes which would require to check for returned size, too.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:15:53 +01:00
Anton Bondarenko 0f0e0b4408 images: Embedsky E9: use image name like the rest of boards
Use name similar to other boards thus remove freescale from image
name since this is not a Freescale board, move SoC type after
company name.

So image name changed from barebox-freescale-imx6q-embedsky-e9.img to
barebox-embedsky-imx6q-e9.img

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:05:07 +01:00
Anton Bondarenko 080a713d31 embedsky-e9: enable barebox_update command for booter update
Simplify booter update with barebox_update command using special
IMX6 MMC BBU handler.

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:05:07 +01:00
Anton Bondarenko 9956226fbb net: phy: wait for link OK after successfull autonegotiation
It may take some time for PHY to indicate link OK status after
autonegotiation completed. This change addresses this case
and prevent network commands fails due to the delay.

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:04:24 +01:00
Trent Piepho a341b4d813 omap socfpga: Switch in flash env loading to use different config
On these systems, the base arch has code to load the in flash
environment from a file located in a FAT filesystem.  This was
controlled by the config option DEFAULT_ENVIRONMENT.  However, that
option turns on compiling the env into the barebox binary itself, as a
backup if the in flash env can't be loaded.

Most other boards have in flash env support unconditionally.  But omap
and socfpga also have xloader configurations, which aren't supposed to
have environment support, either in flash or compiled in.  If the in
flash env code were unconditional, then the xloaders would gain it.

So the code depends on ENV_HANDLING, which is only set on those boards
that are supposed to have an in flash env and not set on all the
boards that aren't supposed to have it.

If someone wanted to create a board that did have a saved env, but
used an alternate to this generic omap/socfpga file in FAT method,
then they'd probably want to create a new config option to control
this code and have it not be enabled for their board.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:03:17 +01:00
Trent Piepho dbd7190295 mci: Print versions with micro levels correctly
The version is stored as BCD, e.g. 0x40 -> ".4" and 0x41 -> ".41".
The latter was getting printed as ".65".  Simplify the logic a bit to
not split the minor into nybbles just to re-assemble it into a byte
again.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:01:17 +01:00
Teresa Remmet e6b5597ac6 ARM: am335x_defconfig: Enable SMSC phy driver
The phyCORE-AM335x has a SMSC phy mounted. Enabled the driver for it.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 08:59:43 +01:00
Teresa Remmet b3ff4794e3 dts: phyFLEX-AM335x: Disable second ethernet interface
There are phyFLEX modules with only the first eth phy mounted.
As barebox only supports the first interface anyway, disable
the second interface for now.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 08:59:43 +01:00
Sascha Hauer 664ca39628 hush: Add missing initialize_context() in some places
Before a context can be used it must be initialized. This was forgotten
in several places. Add the missing calls to initialize_context().
This fixes crashes when sourcing empty files

Reported-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 07:56:51 +01:00
Sascha Hauer ed395e4df1 fcntl: Fix O_CREAT clashing with O_RWSIZE_8
O_CREAT and O_RWSIZE_8 are both defined as 0100. Fix this by moving the
O_RWSIZE_* flags to unused bits.

This bug leads to incomplete writes when the destination file is created
and mem_write is involved, for example with the memcpy command:

memcpy -s /some/file -d /dev/ram0 0 0 10

In this case only 8 bytes will be copied and it will be done using 8
byte accesses which may not work properly if the destination is not
sufficiently aligned, i.e.:

memcpy -s /some/file -d /dev/ram0 0 1 8

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-11-04 09:31:02 +01:00
Sascha Hauer 5a5838f5cc memtest: Make cached/uncached test configurable
Add options to explicitly test cached/uncached tests. Without these
options still both cached and uncached is tested if remapping is
supported.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:43 +01:00
Sascha Hauer 8f2549abb7 memtest: By default only test biggest region
Often enough the biggest free region spans most free RAM, so
it doesn't add much value to test the remaining free regions. This
patch changes the default behaviour to only test the biggest free
region and adds the -t option to test all regions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:43 +01:00
Sascha Hauer 4ff9e28abc memtest: move error handling to end of function
Move error handling out of the test code to make the actual test
better visible.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:42 +01:00
Sascha Hauer 8f130c738e memtest: move ctrlc check / progress showing into separate function
To make the actual test a bit better visible in the code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:04 +01:00
Antony Pavlov e856be5361 MIPS: tplink-mr3020_defconfig: enable pbl; make image shorter
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 0649af6f64 MIPS: tplink-mr3020: add pbl low level init
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 36b8e0d37c MIPS: ath79: add pbl_ar9331_ddr1_config macro
See also u-boot_mod/u-boot/cpu/mips/ar7240/hornet_ddr_init.S

See also this openocd commit:

    commit f59d2d9ecfee8899df531b87b7acaa468725f238
    Author: Oleksij Rempel <linux@rempel-privat.de>
    Date:   Fri Jan 30 13:05:31 2015 +0100

        tcl/target|board: add config Atheros ar9331

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 11cea6cf71 MIPS: ath79: add black-swift_defconfig
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 770f98d3bf MIPS: ath79: add black-swift board support
Black Swift is a tiny coin-sized embedded computer based on AR9331 SoC.
See http://www.black-swift.com/ for details.

See also Black Swift kickstarter page:
  https://www.kickstarter.com/projects/1133560316/black-swift-tiny-wireless-computer

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 82bd8277f2 MIPS: ath79: add debug_ll_ar9331_init macro
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 61163945cf MIPS: ath79: add pbl_ar9331_uart_enable macro
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 50725503b3 MIPS: ath79: add pbl_ar9331_ddr2_config macro
See also u-boot_mod/u-boot/cpu/mips/ar7240/hornet_ddr_init.S

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Oleksij Rempel 0f8ddb4d53 MIPS: ath79: add pbl_ar9331_pll macro
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Peter Mamonov 23492d36be mips: cpuinfo: report secondary cache configuration
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Peter Mamonov 9c12b4ae1c mips: c-r4k: detect secondary cache
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00