a3ffa97f40
This has been done with the following script: find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \ -e 's/u2boot/barebox/g' \ -e 's/U2Boot/barebox/g' \ -e 's/U-boot V2/barebox/g' \ -e 's/u-boot v2/barebox/g' \ -e 's/U-Boot V2/barebox/g' \ -e 's/U-Boot-v2/barebox/g' \ -e 's/U_BOOT/BAREBOX/g' \ -e 's/UBOOT/BAREBOX/g' \ -e 's/uboot/barebox/g' \ -e 's/u-boot/barebox/g' \ -e 's/u_boot/barebox/g' \ -e 's/U-Boot/barebox/g' \ -e 's/U-boot/barebox/g' \ -e 's/U-BOOT/barebox/g' find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \ xargs -0 -r rename 's/u[-_]?boot/barebox/' It needs some manual fixup following in the next patch Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
32 lines
796 B
C
32 lines
796 B
C
#ifndef _USB_DFU_TRAILER_H
|
|
#define _USB_DFU_TRAILER_H
|
|
|
|
/* trailer handling for DFU files */
|
|
|
|
#define BAREBOX_DFU_TRAILER_V1 1
|
|
#define BAREBOX_DFU_TRAILER_MAGIC 0x19731978
|
|
struct barebox_dfu_trailer {
|
|
u_int32_t magic;
|
|
u_int16_t version;
|
|
u_int16_t length;
|
|
u_int16_t vendor;
|
|
u_int16_t product;
|
|
u_int32_t revision;
|
|
} __attribute__((packed));
|
|
|
|
/* we mirror the trailer because we want it to be longer in later versions
|
|
* while keeping backwards compatibility */
|
|
static inline void dfu_trailer_mirror(struct barebox_dfu_trailer *trailer,
|
|
unsigned char *eof)
|
|
{
|
|
int i;
|
|
int len = sizeof(struct barebox_dfu_trailer);
|
|
unsigned char *src = eof - len;
|
|
unsigned char *dst = (unsigned char *) trailer;
|
|
|
|
for (i = 0; i < len; i++)
|
|
dst[len-1-i] = src[i];
|
|
}
|
|
|
|
#endif /* _USB_DFU_TRAILER_H */
|