[U-Boot] [PATCH 2/5] ARM: IGEP0033: Add support for Flattened Device Tree.

Javier Martinez Canillas javier at dowhile0.org
Wed Aug 7 18:01:05 CEST 2013


On Thu, Jul 25, 2013 at 9:27 AM, Enric Balletbo i Serra
<eballetbo at gmail.com> wrote:
> Now, the default kernel to boot the IGEP COM AQUILA is device tree based. As
> old kernel is deprecated we should adapt the boot commands to use DTB files.
>
> Also, with v3.9 and later of the Linux Kernel, uImage isn't builtable anymore
> by default, so we should switch to use the bootz command.
>
> Signed-off-by: Enric Balletbo i Serra <eballetbo at iseebcn.com>
> ---
>  include/configs/igep0033.h | 33 +++++++++++++--------------------
>  1 file changed, 13 insertions(+), 20 deletions(-)
>
> diff --git a/include/configs/igep0033.h b/include/configs/igep0033.h
> index 41c083e..be210a5 100644
> --- a/include/configs/igep0033.h
> +++ b/include/configs/igep0033.h
> @@ -41,6 +41,9 @@
>  /* Display cpuinfo */
>  #define CONFIG_DISPLAY_CPUINFO
>
> +/* Flattened Device Tree */
> +#define CONFIG_OF_LIBFDT
> +
>  /* Commands to include */
>  #include <config_cmd_default.h>
>
> @@ -63,37 +66,27 @@
>  #define CONFIG_ENV_VARS_UBOOT_CONFIG
>  #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
>  #define CONFIG_EXTRA_ENV_SETTINGS \
> -       "loadaddr=0x80200000\0" \
> -       "rdaddr=0x81000000\0" \
> -       "bootfile=/boot/uImage\0" \
> +       "loadaddr=0x80F80000\0" \
> +       "dtbaddr=0x80200000\0" \
> +       "bootdir=/boot\0" \
> +       "bootfile=zImage\0" \
> +       "dtbfile=am335x-base0033.dtb\0" \
>         "console=ttyO0,115200n8\0" \
> -       "optargs=\0" \
>         "mmcdev=0\0" \
>         "mmcroot=/dev/mmcblk0p2 rw\0" \
>         "mmcrootfstype=ext4 rootwait\0" \
> -       "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
> -       "ramrootfstype=ext2\0" \
>         "mmcargs=setenv bootargs console=${console} " \
> -               "${optargs} " \
>                 "root=${mmcroot} " \
>                 "rootfstype=${mmcrootfstype}\0" \
>         "bootenv=uEnv.txt\0" \
>         "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
>         "importbootenv=echo Importing environment from mmc ...; " \
> -               "env import -t $loadaddr $filesize\0" \
> -       "ramargs=setenv bootargs console=${console} " \
> -               "${optargs} " \
> -               "root=${ramroot} " \
> -               "rootfstype=${ramrootfstype}\0" \
> -       "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
> -       "loaduimagefat=load mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
> -       "loaduimage=load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \
> +               "env import -t ${loadaddr} ${filesize}\0" \
> +       "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \
> +               "load mmc ${mmcdev}:2 ${dtbaddr} ${bootdir}/${dtbfile}\0" \
>         "mmcboot=echo Booting from mmc ...; " \
>                 "run mmcargs; " \
> -               "bootm ${loadaddr}\0" \
> -       "ramboot=echo Booting from ramdisk ...; " \
> -               "run ramargs; " \
> -               "bootm ${loadaddr}\0" \
> +               "bootz ${loadaddr} - ${dtbaddr}\0" \
>
>  #define CONFIG_BOOTCOMMAND \
>         "mmc dev ${mmcdev}; if mmc rescan; then " \
> @@ -106,7 +99,7 @@
>                         "echo Running uenvcmd ...;" \
>                         "run uenvcmd;" \
>                 "fi;" \
> -               "if run loaduimage; then " \
> +               "if run mmcload; then " \
>                         "run mmcboot;" \
>                 "fi;" \
>         "fi;" \
> --
> 1.8.1.2
>

Reviewed-by: Javier Martinez Canillas <javier at dowhile0.org>


More information about the U-Boot mailing list