[U-Boot] [PATCH v4 5/6] rockchip: kylin: Enable boot with android boot image

Tom Rini
2016-01-13T15:28:11Z

On Wed, Jan 13, 2016 at 04:53:19PM +0800, Jeffy Chen wrote:

> The android kernel is using appended dtb by default, and store
> ramdisk right after kernel & dtb.
> So we needs to relocate ramdisk, and use atags to pass params.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
> include/configs/kylin_rk3036.h | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h
> index b750b26..49997ec 100644
> --- a/include/configs/kylin_rk3036.h
> +++ b/include/configs/kylin_rk3036.h
> @@ -35,6 +35,29 @@
> #undef CONFIG_EXTRA_ENV_SETTINGS
> #define CONFIG_EXTRA_ENV_SETTINGS \
> "partitions=" PARTS_DEFAULT \
> + "mmcdev=0\0" \
> + "mmcpart=5\0" \
> + "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
> +
> +#define CONFIG_ANDROID_BOOT_IMAGE
> +#define CONFIG_SYS_BOOT_RAMDISK_HIGH

This should already be set.

> +#define CONFIG_SYS_HUSH_PARSER
> +
> +#undef CONFIG_BOOTCOMMAND
> +#define CONFIG_BOOTCOMMAND \
> + "mmc dev ${mmcdev}; if mmc rescan; then " \
> + "part start mmc ${mmcdev} ${mmcpart} boot_start;" \
> + "part size mmc ${mmcdev} ${mmcpart} boot_size;" \
> + "mmc read ${loadaddr} ${boot_start} ${boot_size};" \
> + "bootm start ${loadaddr}; bootm ramdisk;" \
> + "bootm prep; bootm go;" \
> + "fi;" \
> +
> +/* Enable atags */
> +#define CONFIG_SYS_BOOTPARAMS_LEN (64*1024)
> +#define CONFIG_INITRD_TAG
> +#define CONFIG_SETUP_MEMORY_TAGS
> +#define CONFIG_CMDLINE_TAG

But I'm confused as to what exactly is going on here. Appended dtb is
not the same as ATAGS. And you shouldn't need to split up bootm like
that. Can you please explain a bit more? Thanks!

--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160113/71fd91f8/attachment.sig>