u-boot-brain/include
Sebastian Siewior 9ace3fc814 image: add support for Android's boot image format
This patch adds support for the Android boot-image format. The header
file is from the Android project and got slightly alterted so the struct +
its defines are not generic but have something like a namespace. The
header file is from bootloader/legacy/include/boot/bootimg.h. The header
parsing has been written from scratch and I looked at
bootloader/legacy/usbloader/usbloader.c for some details.
The image contains the physical address (load address) of the kernel and
ramdisk. This address is considered only for the kernel image.
The "second image" defined in the image header is currently not
supported. I haven't found anything that is creating this.

v3 (Rob Herring):
This is based on http://patchwork.ozlabs.org/patch/126797/ with the
following changes:
- Rebased to current mainline
- Moved android image handling to separate functions in
  common/image-android.c
- s/u8/char/ in header to fix string function warnings
- Use SPDX identifiers for licenses
- Cleaned-up file source information:
  android_image.h is from file include/boot/bootimg.h in repository:
  https://android.googlesource.com/platform/bootable/bootloader/legacy
  The git commit hash is 4205b865141ff2e255fe1d3bd16de18e217ef06a
  usbloader.c would be from the same commit, but it does not appear
  to have been used for any actual code.
v4:
- s/andriod/android/
- Use a separate flag ep_found to track if the entry point has been set
rather than using a magic value.

Cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Tom Rini <trini@ti.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
2014-05-08 10:38:29 +02:00
..
andestech
asm-generic driver/mxc_i2c: Move static data structure to global_data 2014-04-29 07:10:27 +02:00
bedbug
configs Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze 2014-05-06 14:55:27 -04:00
cramfs include: delete unused header files 2014-01-24 16:59:07 -05:00
dm dm: Add basic tests 2014-03-04 12:15:29 -05:00
faraday include: delete unused header files 2014-01-24 16:59:07 -05:00
galileo
jffs2 cmd_mtdparts: use 64 bits for flash size, partition size & offset 2013-10-09 12:52:16 -05:00
linux mtd: delete unused files 2014-04-17 14:38:30 -04:00
lzma
mtd mtd: move & update nand_ecclayout structure (plus board changes) 2013-11-21 13:32:43 -06:00
pcmcia
power Merge branch 'master' of git://git.denx.de/u-boot-arm 2014-03-05 12:51:26 +01:00
samsung board:samsung:common: set envs with board unified information 2014-02-07 10:06:24 +09:00
synopsys
u-boot
usb fsl/usb: Increase TXFIFOTHRESH value for usb write in T4 Rev 2.0 2014-04-22 17:58:49 -07:00
zfs
_exports.h
.gitignore .gitignore: drop include/asm from ignored file list 2014-02-19 11:10:04 -05:00
74xx_7xx.h
ACEX1K.h
addr_map.h
aes.h aes: make apply_cbc_chain_data non-static 2014-04-18 16:14:17 -04:00
ahci.h ahci: convert to use libata functions and definitions 2013-09-06 13:09:07 -04:00
ali512x.h
altera.h
ambapp.h
android_image.h image: add support for Android's boot image format 2014-05-08 10:38:29 +02:00
ansi.h
api_public.h
armcoremodule.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
asm-offsets.h
ata.h
atmel_hlcdc.h
atmel_lcdc.h
atmel_mci.h
bcd.h
bitfield.h arch: bcm281xx: Initial commit of bcm281xx architecture code 2014-02-22 19:30:24 +01:00
bmp_layout.h
bootcount.h
bootstage.h
bouncebuf.h
bus_vcxk.h
bzlib.h
cbfs.h
circbuf.h
clk.h common: Add new clk command 2014-02-04 16:32:20 +01:00
cmd_spl.h
command.h Add cmd_process_error() to report and process errors 2014-03-04 12:15:28 -05:00
common_timing_params.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
common.h MIPS: drop incaip board 2014-04-20 13:16:43 +02:00
commproc.h powerpc: remove RPXClassic, RPXlite boards support 2014-04-18 10:42:30 -04:00
compiler.h
config_cmd_all.h fs/fdos: Remove 2014-02-21 08:42:47 -05:00
config_cmd_default.h
config_cmd_defaults.h
config_defaults.h common/config_defaults.h: make CONFIG_BOOTM_VXWORKS default configuration 2013-12-13 09:18:45 -05:00
config_distro_defaults.h config: Fix line lengths in include/config_distro_defaults.h 2014-02-05 08:04:38 -05:00
config_fallbacks.h new commands: uuid and guid - generate random unique identifier 2014-04-02 16:36:06 -04:00
config_phylib_all_drivers.h
config_uncmd_spl.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cpsw.h drivers: net: cpsw: add support to have phy address from cpsw platform data 2014-03-04 09:41:53 -05:00
crc.h
cros_ec_message.h cros_ec: Sync up with latest Chrome OS EC version 2014-03-17 20:05:47 -06:00
cros_ec.h cros_ec: Implement I2C pass-through 2014-03-17 20:05:48 -06:00
dataflash.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
ddr_spd.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
dfu.h USB: gadget: added a saner gadget downloader registration API 2014-05-05 08:21:47 +02:00
dialog_pmic.h
div64.h
dm9000.h
dm-demo.h dm: Add a demonstration/example driver 2014-03-04 12:15:29 -05:00
dm.h dm: Add base driver model support 2014-03-04 12:15:29 -05:00
dp83848.h
ds1722.h
ds4510.h
dtt.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
dwmmc.h mmc: Split mmc struct, rework mmc initialization (v2) 2014-03-24 12:58:56 +02:00
e500.h powerpc/85xx: Enhance get_sys_info() to check clocking mode 2014-04-22 17:58:52 -07:00
ec_commands.h cros_ec: Sync up with latest Chrome OS EC version 2014-03-17 20:05:47 -06:00
edid.h
elf.h
env_attr.h
env_callback.h
env_default.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
env_flags.h
environment.h env: Implement support for encrypting environment 2014-03-21 16:44:02 -04:00
errno.h
exports.h
ext4fs.h ext4: implement exists() for ext4fs 2014-02-19 09:47:34 -05:00
ext_common.h
fat.h fat: implement exists() for FAT fs 2014-02-19 09:47:34 -05:00
fdt_support.h fdt_support: Add helper function to read "ranges" property 2014-04-22 17:58:45 -07:00
fdt.h
fdtdec.h Merge branch 'u-boot/master' into 'u-boot-arm/master' 2014-03-25 10:53:15 +01:00
fis.h
flash.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
fm_eth.h net/fman: Add support for 10GEC3 and 10GEC4 2013-11-25 11:43:47 -08:00
fpga.h
fs.h fs: implement infrastructure for an 'exists' function 2014-02-19 09:47:33 -05:00
fsl_ddr_dimm_params.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
fsl_ddr_sdram.h mpc85xx/t104x: Add deep sleep framework support 2014-04-22 17:58:49 -07:00
fsl_ddr.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
fsl_ddrc_version.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
fsl_diu_fb.h
fsl_esdhc.h driver: Add support of image load for MMC & SPI in SPL 2014-04-22 17:58:50 -07:00
fsl_ifc.h driver/fsl_ifc: Add a function to finalize CS0 address binding 2014-04-22 17:58:47 -07:00
fsl_immap.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
fsl_mdio.h net: fsl_mdio: Fix warnings for __iomem pointers 2013-11-22 17:03:15 -06:00
fsl_pmic.h
fsl_usb.h powerpc/mpc85xx: Add Differential SYSCLK config support T1040 2014-04-22 17:58:52 -07:00
fuse.h
g_dnl.h USB: gadget: added a saner gadget downloader registration API 2014-05-05 08:21:47 +02:00
gdsys_fpga.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
gt64120.h
hash.h gen: Add progressive hash API 2014-03-21 16:39:36 -04:00
hush.h
hw_sha.h
hwconfig.h
i2c.h OMAP24xx I2C: Add support for set-speed 2014-02-20 06:48:23 +01:00
i2s.h Sound: WM8994: Support I2S0 channel 2013-09-24 09:10:33 -04:00
i8042.h
ide.h
image.h image: add support for Android's boot image format 2014-05-08 10:38:29 +02:00
initcall.h
input.h
iomux.h
ioports.h
ipu_pixfmt.h
key_matrix.h
keyboard.h
kgdb.h
lattice.h
lcd.h sandbox: Add LCD driver 2014-03-17 20:05:49 -06:00
lcdvideo.h
ld9040.h
led-display.h
libata.h
libfdt_env.h
libfdt.h Fix some obvious typos across multiple subsystems. 2013-09-20 10:29:48 -04:00
libtizen.h
linker_lists.h common: fixed linker-list example 2014-05-05 10:24:13 +02:00
linux_logo.h
lmb.h
logbuff.h
lxt971a.h
lynxkdi.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
malloc.h Consolidate bool type 2013-04-01 16:33:52 -04:00
mb862xx.h
mc9sdz60.h
mc13783.h
mc13892.h
mc34704.h
MCD_dma.h
MCD_progCheck.h
MCD_tasksInit.h
menu.h
micrel.h udoo: Add ethernet support (FEC + Micrel KSZ9031). 2013-11-28 08:28:54 +01:00
mii_phy.h
miiphy.h SPDX: fix IBM-pibs license identifier 2013-09-20 10:30:54 -04:00
mk48t59.h
mmc.h mmc: mmc header fix 2014-05-05 08:00:28 +02:00
mpc5xx.h
mpc5xxx_sdma.h
mpc5xxx.h
mpc8xx_irq.h
mpc8xx.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
mpc83xx.h
mpc85xx.h
mpc86xx.h
mpc106.h
mpc824x.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
mpc8260_irq.h
mpc8260.h
msc01.h malta: support for coreFPGA6 boards 2013-11-09 17:21:01 +01:00
mtd_node.h
mv88e6352.h
mvmfp.h
nand.h mtd: nand: atmel: prepare for nand spl boot support 2014-03-09 19:19:06 +01:00
net.h net: Fix mcast function pointer prototype 2013-11-22 16:57:13 -06:00
netdev.h MIPS: drop incaip board 2014-04-20 13:16:43 +02:00
nios2-epcs.h
nios2-io.h
nios2-yanu.h
nios2.h
nomadik.h
ns16550.h
ns87308.h
onenand_uboot.h
os.h sandbox: Allow Ctrl-C to work in sandbox 2014-03-17 20:05:49 -06:00
palmas.h ARM: OMAP5: Power: Add new function to turn on SMPS10 2013-10-20 23:42:39 +02:00
part_efi.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
part.h part: header fix 2014-05-05 08:00:28 +02:00
pc_keyb.h
pca953x.h
pca9564.h
pca9698.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pci_gt64120.h
pci_ids.h malta: support for coreFPGA6 boards 2013-11-09 17:21:01 +01:00
pci_msc01.h malta: support for coreFPGA6 boards 2013-11-09 17:21:01 +01:00
pci.h pci.h: allow inclusion in assembly source 2013-11-09 17:21:01 +01:00
pcmcia.h powerpc: remove RPXClassic, RPXlite boards support 2014-04-18 10:42:30 -04:00
phy.h wandboard: Fix sparse warning 2014-03-05 12:23:48 +01:00
physmem.h
post.h
ppc_asm.tmpl powerpc: mpc8260: consolidate CONFIG_MPC8260 and CONFIG_8260 2014-03-07 10:59:06 -05:00
ppc_defs.h
ps2mult.h
pwm.h
radeon.h
reiserfs.h
rsa-checksum.h rsa: add sha256,rsa4096 algorithm 2014-03-21 16:39:35 -04:00
rsa.h rsa: add sha256,rsa4096 algorithm 2014-03-21 16:39:35 -04:00
rtc.h
s6e63d6.h
s_record.h
SA-1100.h
sandboxblockdev.h sandbox: block driver using host file/device as backing store 2014-01-08 17:24:03 -07:00
sandboxfs.h sandbox: implement exists() function 2014-02-19 09:47:34 -05:00
sata.h
scf0403_lcd.h lcd: add DataImage SCF0403x LCD panel support 2013-11-12 10:08:48 +01:00
scsi.h
sdhci.h Merge branch 'u-boot/master' into 'u-boot-arm/master' 2014-04-08 09:25:08 +02:00
search.h
sed156x.h
sed13806.h
serial.h
sh_pfc.h
sh_tmu.h sh: sh4: Remove CONFIG_SH4A definition from source code 2014-01-09 12:47:15 +09:00
sha1.h
sha256.h
sja1000.h
slre.h
sm501.h
sound.h sound: Move Samsung-specific code into its own file 2014-03-17 20:05:49 -06:00
spartan2.h
spartan3.h
spd_sdram.h
spd.h
spi_flash.h driver: Add support of image load for MMC & SPI in SPL 2014-04-22 17:58:50 -07:00
spi.h sf: Add dual memories support - DUAL_PARALLEL 2014-01-12 21:40:22 +05:30
spl.h common: spl: Add spl sata boot support 2014-02-19 10:47:43 -05:00
splash.h
status_led.h
stdio_dev.h
stratixII.h
sx151x.h Add support for SX151x SPI GPIO Expanders 2013-11-08 09:39:13 -05:00
sym53c8xx.h
systemace.h
tca642x.h
tegra-kbc.h
thor.h USB: gadget: added a saner gadget downloader registration API 2014-05-05 08:21:47 +02:00
timestamp.h
tis.h
tmu.h
tpm.h
tps6586x.h
trace.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
tsec.h net: tsec: Use portable regs type (uint->u32) 2013-11-22 17:03:17 -06:00
tsi108.h
tsi148.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
twl4030.h
twl6030.h ARMV7: OMAP4: Add twl6032 support 2013-12-04 08:11:28 -05:00
tws.h
ubi_uboot.h
universe.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
usb_cdc_acm.h
usb_defs.h usb: Move 'bmRequestType' USB device request macros from EHCI header 2013-10-20 23:42:38 +02:00
usb_ether.h usb: net: introduce support for Moschip USB ethernet 2014-03-12 17:04:31 -04:00
usb_mass_storage.h ums: move IO support code to common location 2014-05-08 10:38:29 +02:00
usb.h usb: dfu: fix boards wo USB cable detection 2014-05-05 08:00:28 +02:00
usbdescriptors.h
usbdevice.h
usbroothubdes.h usb: create common header virtual root hub descriptors 2014-03-10 18:53:36 +01:00
uuid.h lib: uuid: add functions to generate UUID version 4 2014-04-02 16:35:53 -04:00
version.h
video_ad7176.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
video_ad7177.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
video_ad7179.h
video_easylogo.h
video_fb.h video, cfb_console: make background and foreground color configurable 2013-10-30 10:48:37 +01:00
video_font_4x6.h cosmetic: remove empty lines at the top of file 2013-11-08 09:41:37 -05:00
video_font_data.h
video_font.h
video_logo.h
video.h
virtex2.h
vsc7385.h
vsprintf.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
vxworks.h common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface. 2013-12-16 08:59:05 -05:00
w83c553f.h
watchdog.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
xilinx.h
xyzModem.h
zfs_common.h
zynqpl.h fpga: zynqpl: Add support for zc7015 device 2014-02-06 10:08:14 +01:00