porting iwg20m to isar-cip-core

8 views
Skip to first unread message

Daniel Sangorrin

unread,
Jun 4, 2019, 10:17:13 PM6/4/19
to cip...@lists.cip-project.org, isar-...@googlegroups.com
Hi Jan,

I tried to add a recipe for iwg20m's u-boot. That board
only supports version 2013.01 and does not support distro boot.

There were a couple of build errors, one of them I couldn't
easily solve (unrecognized option '-Wl,-z,relro').
But for now, I wanted to confirm if the structure of the recipe is OK.

I wanted to use uImage because that's what is used in the
iwg20m manual, and it's known to work on Deby as well.
Ref: https://gitlab.com/cip-project/cip-core/deby/blob/master/poky/meta-cip-iwg20m/README.IWG20M.txt
Do you suggest that we should use bootz instead of bootm?
Is uImage not recommended or something? I have used uImage in many boards.

As for the kernel image location, since we do not have u-boot
distro support I will move it manually from the root partition
to the boot partition using a postinstall script inside the
customizations recipe. If there is a better option please
let me know.

[isar-cip-core] iwg20m: temporary patch for review v2

Thanks,
Daniel

daniel.s...@toshiba.co.jp

unread,
Jun 5, 2019, 1:35:17 AM6/5/19
to daniel.s...@toshiba.co.jp, cip...@lists.cip-project.org, isar-...@googlegroups.com
> I tried to add a recipe for iwg20m's u-boot. That board
> only supports version 2013.01 and does not support distro boot.
[snip]
> As for the kernel image location, since we do not have u-boot
> distro support I will move it manually from the root partition
> to the boot partition using a postinstall script inside the
> customizations recipe. If there is a better option please
> let me know.

OK, I figured it out. I just had to define KERNEL_IMAGE="zImage" (so that it gets deployed) and then add that variable to IMAGE_BOOT_FILES.

Thanks,
Daniel

Jan Kiszka

unread,
Jun 5, 2019, 1:52:00 AM6/5/19
to daniel.s...@toshiba.co.jp, cip...@lists.cip-project.org, isar-...@googlegroups.com
I would definitely recommend following the pre-existing pattern as they are
working on a lot of different boards already. Primarily on ARMv8 (where most
things are much better), but also on quite a few ARMv7 boards. That will avoid
having to invent too much board-specific things over and over again.

Missing distro boot is a PITA, I know, but the best workaround is specifying
what missing command the user should inject into the legacy U-Boot so that it
loads the boot.scr from the rootfs and has the required board-specific env vars
set. If you can even rebuild the U-Boot, you may also inject those commands into
the default env, just by enhancing the defconfig.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

Jan Kiszka

unread,
Jun 5, 2019, 2:00:29 AM6/5/19
to Daniel Sangorrin, cip...@lists.cip-project.org, isar-...@googlegroups.com
On 05.06.19 04:16, Daniel Sangorrin wrote:
> I wanted to use uImage because that's what is used in the
> iwg20m manual, and it's known to work on Deby as well.
> Ref: https://gitlab.com/cip-project/cip-core/deby/blob/master/poky/meta-cip-iwg20m/README.IWG20M.txt
> Do you suggest that we should use bootz instead of bootm?
> Is uImage not recommended or something? I have used uImage in many boards.

BTW, we chose bootz (and distro boot) in order to be able to boot also stock
Debian kernels - which work on a (slowly) increasing number of boards. I.e. Isar
is modeled around the ideal case, not legacy ones.

daniel.s...@toshiba.co.jp

unread,
Jun 5, 2019, 4:28:12 AM6/5/19
to jan.k...@siemens.com, cip...@lists.cip-project.org, nobuhiro1...@toshiba.co.jp, isar-...@googlegroups.com
Hi Jan,

> From: isar-...@googlegroups.com <isar-...@googlegroups.com> On Behalf Of Jan Kiszka
> On 05.06.19 04:16, Daniel Sangorrin wrote:
> > I wanted to use uImage because that's what is used in the
> > iwg20m manual, and it's known to work on Deby as well.
> > Ref:
> https://gitlab.com/cip-project/cip-core/deby/blob/master/poky/meta-cip-iwg20m/README.IWG20M.txt
> > Do you suggest that we should use bootz instead of bootm?
> > Is uImage not recommended or something? I have used uImage in many boards.
>
> BTW, we chose bootz (and distro boot) in order to be able to boot also stock
> Debian kernels - which work on a (slowly) increasing number of boards. I.e. Isar
> is modeled around the ideal case, not legacy ones.

I was surprised to see so many u-boot debian packages:
https://packages.debian.org/search?keywords=u-boot

For now, please let me go the legacy way (ask users to 'setenv' things). Do you have an example of how to emulate boot.scr on older u-boot versions. I

Iwamatsu-san is going to upgrade/mainstream the u-boot support for Renesas iwg20m. Once that is done I will modify the recipe.
# One thing though: if the flash process fails, you really need to get a JTAG device to unbrick the board (not sure if OpenOCD JTAG devices would be supported).

Thanks,
Daniel

> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>
> --
> You received this message because you are subscribed to the Google Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> isar-users+...@googlegroups.com.
> To post to this group, send email to isar-...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/isar-users/d0acd9f6-2f30-2407-c202-5600b3750352%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages