Simple update file format developed for Somfy, tools and library are
available under LGPLv2 (https://www.gitorious.org/libbpk).
This format in the v1.0 allow you to store 6 types a binary stream for
a unique hardware id:
- bootloader
- bootloader_version
- description.gz
- kernel
- rootfs
- firmware_version
and you can easly add more binary stream type.
The fs will display you in a directory per hw id
and if a binary stream type is unknown will be display
as unknown_%08x
# mount image.bpk /tmp
# ls -l /tmp/hw_id_0/
-rwxrwxrwx 10 firmware_version
-rwxrwxrwx 8 firmware_version.crc
-rwxrwxrwx 1845968 kernel
-rwxrwxrwx 8 kernel.crc
-rwxrwxrwx 5062656 rootfs
-rwxrwxrwx 8 rootfs.crc
-rwxrwxrwx 248 bootloader
-rwxrwxrwx 8 bootloader.crc
-rwxrwxrwx 248925 description.gz
-rwxrwxrwx 8 description.gz.crc
-rwxrwxrwx 4 bootloader_version
-rwxrwxrwx 8 bootloader_version.crc
-rwxrwxrwx 4 unknown_1234567g
-rwxrwxrwx 8 unknown_1234567g.crc
Why BPK and not CPIO or uImage
1) CPIO
cpio does not handle > 4GiB image and does not have any crc checksum
2) uImage
uImage only provide one crc32 for the all data part and only a list of binary
stream with no information about what is what (in multi-image format)
3) BPK
BPK provide a crc32 for the header part and one crc32 per binary stream
so if you does not care of some data you are not force to check them
And you known exactly the binary stream type and for which hw to
use it.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Fargier Sylvain <sylvain.fargier@somfy.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
For DDR2 RAMs, regs->zq_config is not used, which causes the
AM33XX_EMIF4_0_REG(SDRAM_CONFIG) register to be left unconfigured, resulting
in boot failure.
It seems that the DDR2 case was missed during the consolidation in commit
9f122f8bf0. The actual call for the Bone was
removed in 88659d9c4a.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The function am33xx_get_cpu_rev may be called before barebox_arm_entry(),
so we need to avoid switch statements. One example is the BeagleBone,
where we use this function to differenciate between the white and black
variants.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
With commit c2ef47887 mci.f_max default value is
only set when pdata is available.
Fix this with always setting the mci.f_max default
value and overrite it when pdata available.
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fixes:
arch/mips/mach-bcm47xx/include/mach/debug_ll.h: In function 'PUTC_LL':
arch/mips/mach-bcm47xx/include/mach/debug_ll.h:33: warning: passing argument 1 of '__raw_readb' makes pointer from integer without a cast
arch/mips/mach-bcm47xx/include/mach/debug_ll.h:34: warning: passing argument 2 of '__raw_writeb' makes pointer from integer without a cast
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fixes:
arch/arm/boards/vexpress/init.c: In function 'vexpress_core_init':
arch/arm/boards/vexpress/init.c:139:22: warning: 'hostname' may be used uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fixes:
arch/arm/boards/edb93xx/edb93xx.c: In function 'edb93xx_console_init':
arch/arm/boards/edb93xx/edb93xx.c:123:2: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
With this a mount <devname> will mount the device to /mnt/<devname>. This
directory is created automatically if it doesn't exist already.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This introduces some new environment variable helpers and updates
the existing ones. Newly introduced are:
getenv_bool: read a bool variable
getenv_ul: read an unsigned long variable
getenev_uint: read an unsigned int variable
getenv_nonempty: like normal getenv, but does return NULL instead of an
empty string
All new helpers take a pointer to the value. This value is only modified
when the variable exists. This allows the following programming scheme:
unsigned int myvalue = sanedefault;
getenv_uint("myvalue", &myvalue);
So without checking the return value myvalue contains the best possible
value.
getenv_ull is updated to this scheme.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This replaces the 'boot' script in the defaultenv-2 with a command
with the same behaviour. A command gives more flexibility for future
externsions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
With this the verbosity of barebox can be controlled during runtime
using the 'loglevel' globalvar.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
It's useful to know which filesystems a barebox binary supports.
Add a -v option to the mount command to find it out.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When printing the devices on which a path is mounted the backingstore is
the interesting thing, not dev_name.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
All filesystem drivers which need a backingstore device do the same
ignoring of '/dev/' in the backingstore followed by a cdev_open. Add a
helper function for it and let the core handle the cdev. As a side
effect this makes sure that fsdev->cdev is also set when a device is
mounted without the leading '/dev/' which was previously ignored
by the mount code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Without it, when copying a smaller file over a larger file the
resulting file still has the remaining space from the larger file.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Using tftp command does not work proper when files
have FILESIZE_MAX, as copy_file and show_progress
can not handle it. Check the file size for FILESIZE_MAX
and handle it as file size = 0.
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>