We may have some disk with MBR as a first sector. In this case, the
current FAT check returns an error. However, the FAT sector exist and
the MBR can tell us where it is.
This patch add to file_name_detect_type function the ability to find
the FAT boot sector on the first sector of the first partition in case
it is not on sector 0.
It also introduce is_fat_or_mbr to check if a buffer is a FAT boot
or MBR sector
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this will ensure the data are set to 0 (list as example)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This will crash when use registered bus with device registered to it.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
To get rid of the register definitions in the SoC header files.
platform_device_id is used to distinguish between gpt types.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
in logo/ you will found the barebox logo with color or white
in:
- png24 (transparent)
- png8 (black background)
for the following size
- 100x100
- 200x200
- 400x400
- 600x600
- 800x800
The logo are origanize in a way to be able to include them in the envfs
by just point as it.
A vector version will be published later
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJQVdRIAAoJEOrjwV5ZMRf2Q0oQAIErPCsnMigjWk2CyGI66vzH
ryd1fEq3/4FK0XByrvB/tu/NJ59fHv9ZXtwZZq5JvXJgA62I7UpCqIEz1BjbLM9n
CYAZlshCIJvOXQziwRhRDUuDEfH42mpsl/C4xdyEyD8vJTf7fWZGFN7//Ve/Urgw
63kH/tM0hsKwnNrAbEkJwvEk1H4+eUJy31xMfBc977trM9lu09CDC9Mqpdj76FIf
IJys9FZz1i85+XxtfAOEklaIp4EQZMlyqBnANWAqGf8jVkZ50yQ9M6+0rYkAl/U4
SHkDXMIkcOCRJ5q9KIWchGlbCwnxQTchYMUlj1H4k6jMtCdJu/60MGetWET7BzmH
4GFc+7TAnb3Dya1lQUJ1Am/3f0GUCYhhnOfPOtrU9T6lu8lfKJ8DVTWaZqoJNHVf
UvmR/nryUJeq20BCCmiWwzp1/923biR7LeDodnzqmFqXC43GlAl4Cj2oTbxbdAR8
W5g53ogBupNmRA7p2S0tx7/BVbjMQCuO2uNJuEc+lHu/oas060IODri4LZHpGxvL
fYoqg+T35fjyi1Cy9+HysNylhbNkkuEAjpA4mgalq2rmoAQ2MsxIVIEl1guryY9J
t5qI2RNOs4PALsPr2FMqviwsFnijKVhoU2ybsXAsO4OLuyq00Zy3CEA4IW+fL5Bu
0FUygwPvBZdUSUdnwbM3
=pKKv
-----END PGP SIGNATURE-----
Merge tag 'logo' of git://git.jcrosoft.org/barebox into for-next/logo
Barebox Logo
in logo/ you will found the barebox logo with color or white
in:
- png24 (transparent)
- png8 (black background)
for the following size
- 100x100
- 200x200
- 400x400
- 600x600
- 800x800
The logo are origanize in a way to be able to include them in the envfs
by just point as it.
A vector version will be published later
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
The call if_changed mechanism does not work when the command
contains backslashes. This basically is an issue with lzo
and bzip2 compressed kernels. The compressed binaries do not
contain the uncompressed image size, so these use size_append
to append the size. This results in backslashes in the executed
command. With this if_changed always detects a change in the
command and rebuilds the compressed image even if nothing
has changed.
Fix this by escaping backslashes in make-cmd
This was worked out together with Jan Lübbe. The same patch
has recently been accepted to the kernel.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
When reading parts of a page we have to limit the maximum bytes copied
to the remaining bytes of a page.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
in logo/ you will found the barebox logo with color or white
in:
- png24 (transparent)
- png8 (black background)
for the following size
- 100x100
- 200x200
- 400x400
- 600x600
- 800x800
The logo are origanize in a way to be able to include them in the envfs
by just point as it.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
When the i.MX28 boots from USB, the ROM code sets this bit. When
after a reset the ROM code detects that this bit is set it will
boot from USB again. This means that if we boot once from USB the
chip will continue to boot from USB until the next power cycle.
To prevent this (and boot from the configured bootsource instead)
clear this bit here. This bit is not documented in the datasheets,
it was figured out the hard way. Whether this is the same on i.MX23
is currently not known.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Some of the newer MLC devices have a 6-byte ID sequence in which
several field definitions differ from older chips in a manner that is
not backward compatible.
This method is already used in the Linux Kernel.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This has been tested by using UBI with a N25Q128 connected to
a TI McSPI controller.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This fixes the following warnings:
arch/arm/boards/freescale-mx6-sabrelite/board.c: In function 'sabrelite_ehci_init':
arch/arm/boards/freescale-mx6-sabrelite/board.c:265:2: warning: implicit declaration of function 'imx6_usb_phy1_disable_oc' [-Wimplicit-function-declaration]
arch/arm/boards/freescale-mx6-sabrelite/board.c:266:2: warning: implicit declaration of function 'imx6_usb_phy1_enable' [-Wimplicit-function-declaration]
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
mips currently uses local_irq_save and local_irq_restore
which are not defined. Drop them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Antony Pavlov <antonynpavlov@gmail.com>
Currently, the timeout when waiting for packages is smaller than the
timeout communicated to the TFTP server for retransmitting. Make sure we
wait at least for two retransmissions before giving up.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
With this the -p option is no longer for parse, but for probe instead.
Using this parses a devicetree given on the command line and probes
the devices found in this tree. Devices which already exist are not
probed again, but instead their device_node is attached to the existing
device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This adds code to probe devices from a devicetree. Most helper
functions are directly imported from Linux.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Drivers need to get their driver data either from devicetree or the platform
information. It should matter for the driver where this data comes from, so
introduce a common function for it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
It starts the switch and provides basic access to the registers.
This driver could also work with some other Micrel switches, possibly
with some small changes.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
It is common for drivers to handle multiple similar devices. On
Linux the driver can distinguish between the devices using the
platform_device_id mechanism. Introduce the same for barebox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Printing device context normally should be "driver instance:",
but instead we printed the device name twice. This patch fixes
this and as a bonus makes the binary a bit smaller. Instead of
a '@' between driver and instance this function now prints a
whitespace which is a bit more like Linux.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch adds a I2C bus on which the I2C devices and drivers register.
This makes it cleaner as I2C devices won't accidently end up probed by
a platform_device driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch adds a SPI bus on which the SPI devices and drivers register.
This makes it cleaner as SPI devices won't accidently end up probed by
a platform_device driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Upcoming patches will put I2C/SPI on their own busses with
spi_register_driver / i2c_register_driver which will only
be available if the subsystem is enabled. We could provide
static inlines, but it wouldn't make much sense to compile
a spi/i2c driver if the corresponding subsystem is disabled.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Use 512k NAND Partion for barebox in enviroment and boards code
pcm049: use 4MB for kernel
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
since 99e72c8bbd on an i.MX51 based board,
I get : "phy0: Link is up - 1000/Full". It seems miidev tries to probe
the PHY to early and gets 0x3ffff which leads to the wrong capabilities
setting.
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Use be(xx)_to_cpu function to switch endianness intelligently.
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch sync the image type list with the kernel in order to add
openrisc support.
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
In a previous patch, Sascha needed to add __ashrdi3 and then linked
to libgcc. This patch add the ashrdi3 function in the arch/openrisc/lib
directory and remove the libgcc dependency.
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
linux.bootargs.dyn.* will be cleared at the beginning of boot
This is need for boot sequence to do not have the previous boot param.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This will allow to do not check it everywhere
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This will allow to do not taint if not enabled
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>