Re: [PATCH/RFC] ARM: dts: kzm9g: Extend DTS with hints on how to build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Magnus,

On Sun, Mar 21, 2021 at 1:06 PM Magnus Damm <damm@xxxxxxxxxxxxx> wrote:
> From: Magnus Damm <damm+renesas@xxxxxxxxxxxxx>
> Include hints in the DTS for KZM9G on how to build a kernel that may be booted
> using the old on-board boot loader. Special handling includes:
>  - The DTB needs to be appended to the zImage before generating the uImage
>  - LOADADDR needs to be set to 0x48008000 to be able to generate an uImage
>  - CONFIG_ATAGS=n is needed for the board to boot
>
> Perhaps there is a better place where this kind of information should be
> placed? Many years ago the LOADADDR information used to be part of the kernel
> makefiles (and make uImage just worked out of the box) but when going DTS
> and zImage this seems to have been dropped. So these days special care is
> needed to build a uImage file which is required by the boot loader.
>
> Not-Yet-Signed-off-by: Magnus Damm <damm+renesas@xxxxxxxxxxxxx>

Thanks for your patch!

> --- 0001/arch/arm/boot/dts/sh73a0-kzm9g.dts
> +++ work/arch/arm/boot/dts/sh73a0-kzm9g.dts     2021-03-21 18:10:53.515741849 +0900
> @@ -2,9 +2,24 @@
>  /*
>   * Device Tree Source for the KZM-A9-GT board
>   *
> - * Copyright (C) 2012 Horms Solutions Ltd.
> + * The KZM9G board comes with on-board out-of-tree U-Boot from 2012 with:
> + *  uImage support but without zImage support

Funny, mine (which I never upgraded) has:

    U-Boot 2013.01.-rc1 (Nov 15 2012 - 11:13:00)

and does boot zImage, with appended DTB.

> + *  one way or the other busted ATAGs
> + *
> + * Generate an uImage at the correct load address with apppended DTB like this:

appended

> + *  make ARCH=arm CROSS_COMPILE=_ uImage LOADADDR=0x48008000
> + *  rm arch/arm/boot/zImage
> + *  make ARCH=arm CROSS_COMPILE=_ dtbs zImage
> + *  cat arch/arm/boot/dts/sh73a0-kzm9g.dtb >> arch/arm/boot/zImage
> + *  $(cut -f 3- -d ' ' < arch/arm/boot/.uImage.cmd)
> + *
> + * For a working recent kernel (v5.10+) the following configuration is needed:
> + *  CONFIG_ARM_APPENDED_DTB=y
> + *  CONFIG_ATAGS=n
>   *
> - * Based on sh73a0-kzm9g.dts
> + * The shmobile_defconfig works well after setting CONFIG_ATAGS=n

Why CONFIG_ATAGS=n? I have CONFIG_ATAGS=y in my .config.

IIRC, shmobile_defconfig works, if I change CONFIG_CMDLINE to match
what I need, as U-Boot cannot update chosen/cmdline in an appended DTB.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux