All of lore.kernel.org
 help / color / mirror / Atom feed
* [cip-dev] [isar-cip-core] porting isar-cip-core to iwg20m
@ 2019-06-04  6:15 daniel.sangorrin at toshiba.co.jp
  2019-06-04  6:28 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: daniel.sangorrin at toshiba.co.jp @ 2019-06-04  6:15 UTC (permalink / raw)
  To: cip-dev

Hi Jan,

I am trying to port isar-cip-core to the iwg20m board.

So far I managed to create a WIC SDCard image with 2 partitions:
- boot: an VFAT partition to store the uImage and devicetree
- root: the root filesystem
[Note] u-boot.bin is installed on an SPI memory with a JTAG debugger, so it's not in the image.

I would appreciate your help with a couple of problems:

- The kernel is built correctly, but I need to transform it into an uImage. I guess I can install u-boot-tools and do a mkimage in some postinstall script, but isn't this supposed to be automatized?
For example, in meta-debian, I just need to define KERNEL_IMAGETYPE=uImage and the UBOOT_ENTRYPOINT. The rest is done for me.

- In case, I want to build u-boot (not strictly necessary but it would be good to have it), do I have to create a whole recipe including debian rules like in the jailhouse-images repository [1]!?
In meta-debian, I just need to define a few variables (git repo, config, entrypoint) and the u-boot packages will be created automatically. Those scripts may be needed for very detailed customization (e.g. Trusted firmware), but the common case should be automatized.
[1] https://github.com/siemens/jailhouse-images/tree/master/recipes-bsp/u-boot

- What is the correct way to specify the device tree for the kernel?
I added DTB_FILE="mydt.dtb" to my machine config, and then added that to IMAGE_BOOT_FILES. That worked, but is that the correct way to do it? There is no documentation about this.

- For the kernel configuration, I want to use shmobile_defconfig (already in the kernel source) plus a few extra configurations that I have on another file. Is that possible? So far I had to concatenate my configurations to shmobile_defconfig which is redundant.

- How can I install the kernel into the boot partition?
Currently, the kernel binary and symbols are deployed into the the /boot folder of the "root" partition instead of the "boot" partition. I would like the /boot folder to be deployed into the FAT partition. And maybe also get fstab filled automatically.

I send the actual code/metadata separately on another e-mail.
https://lists.cip-project.org/pipermail/cip-dev/2019-June/002409.html

Thanks,
Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [cip-dev] [isar-cip-core] porting isar-cip-core to iwg20m
  2019-06-04  6:15 [cip-dev] [isar-cip-core] porting isar-cip-core to iwg20m daniel.sangorrin at toshiba.co.jp
@ 2019-06-04  6:28 ` Jan Kiszka
  2019-06-04  6:37   ` daniel.sangorrin at toshiba.co.jp
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2019-06-04  6:28 UTC (permalink / raw)
  To: cip-dev

On 04.06.19 08:15, daniel.sangorrin at toshiba.co.jp wrote:
> Hi Jan,
> 
> I am trying to port isar-cip-core to the iwg20m board.
> 
> So far I managed to create a WIC SDCard image with 2 partitions:
> - boot: an VFAT partition to store the uImage and devicetree
> - root: the root filesystem
> [Note] u-boot.bin is installed on an SPI memory with a JTAG debugger, so it's not in the image.
> 
> I would appreciate your help with a couple of problems:
> 
> - The kernel is built correctly, but I need to transform it into an uImage. I guess I can install u-boot-tools and do a mkimage in some postinstall script, but isn't this supposed to be automatized?

Why is that transformation needed or desired?

> For example, in meta-debian, I just need to define KERNEL_IMAGETYPE=uImage and the UBOOT_ENTRYPOINT. The rest is done for me.
> 
> - In case, I want to build u-boot (not strictly necessary but it would be good to have it), do I have to create a whole recipe including debian rules like in the jailhouse-images repository [1]!?

Nope, just use u-boot-custom.inc, see 
meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb for an example.

> In meta-debian, I just need to define a few variables (git repo, config, entrypoint) and the u-boot packages will be created automatically. Those scripts may be needed for very detailed customization (e.g. Trusted firmware), but the common case should be automatized.
> [1] https://github.com/siemens/jailhouse-images/tree/master/recipes-bsp/u-boot
> 
> - What is the correct way to specify the device tree for the kernel?
> I added DTB_FILE="mydt.dtb" to my machine config, and then added that to IMAGE_BOOT_FILES. That worked, but is that the correct way to do it? There is no documentation about this.
> 
> - For the kernel configuration, I want to use shmobile_defconfig (already in the kernel source) plus a few extra configurations that I have on another file. Is that possible? So far I had to concatenate my configurations to shmobile_defconfig which is redundant.

We probably need to tune the recipes a bit, including in isar, to pick up an 
existing defconfig != "defconfig" - though that is now the default, only ARMv7 
still has board-specific defconfigs.

> 
> - How can I install the kernel into the boot partition?
> Currently, the kernel binary and symbols are deployed into the the /boot folder of the "root" partition instead of the "boot" partition. I would like the /boot folder to be deployed into the FAT partition. And maybe also get fstab filled automatically.

You want U-Boot distro boot. The kernel will then be picked up from the rootfs, 
and you do not need to move it manually. See other boards, e.g. the bananapi in 
upstream isar.

Jan

> 
> I send the actual code/metadata separately on another e-mail.
> https://lists.cip-project.org/pipermail/cip-dev/2019-June/002409.html
> 
> Thanks,
> Daniel
> 

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [cip-dev] [isar-cip-core] porting isar-cip-core to iwg20m
  2019-06-04  6:28 ` Jan Kiszka
@ 2019-06-04  6:37   ` daniel.sangorrin at toshiba.co.jp
  0 siblings, 0 replies; 3+ messages in thread
From: daniel.sangorrin at toshiba.co.jp @ 2019-06-04  6:37 UTC (permalink / raw)
  To: cip-dev

Thanks Jan!
I will check your points and try to complete the porting.

> -----Original Message-----
> From: Jan Kiszka <jan.kiszka@siemens.com>
> Sent: Tuesday, June 4, 2019 3:28 PM
> To: sangorrin daniel(????? ???? ????????) <daniel.sangorrin@toshiba.co.jp>;
> cip-dev at lists.cip-project.org
> Cc: isar-users at googlegroups.com
> Subject: Re: [isar-cip-core] porting isar-cip-core to iwg20m
> 
> On 04.06.19 08:15, daniel.sangorrin at toshiba.co.jp wrote:
> > Hi Jan,
> >
> > I am trying to port isar-cip-core to the iwg20m board.
> >
> > So far I managed to create a WIC SDCard image with 2 partitions:
> > - boot: an VFAT partition to store the uImage and devicetree
> > - root: the root filesystem
> > [Note] u-boot.bin is installed on an SPI memory with a JTAG debugger, so it's not in the image.
> >
> > I would appreciate your help with a couple of problems:
> >
> > - The kernel is built correctly, but I need to transform it into an uImage. I guess I can install u-boot-tools and
> do a mkimage in some postinstall script, but isn't this supposed to be automatized?
> 
> Why is that transformation needed or desired?
> 
> > For example, in meta-debian, I just need to define KERNEL_IMAGETYPE=uImage and the
> UBOOT_ENTRYPOINT. The rest is done for me.
> >
> > - In case, I want to build u-boot (not strictly necessary but it would be good to have it), do I have to create a
> whole recipe including debian rules like in the jailhouse-images repository [1]!?
> 
> Nope, just use u-boot-custom.inc, see
> meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb for an example.
> 
> > In meta-debian, I just need to define a few variables (git repo, config, entrypoint) and the u-boot packages will
> be created automatically. Those scripts may be needed for very detailed customization (e.g. Trusted firmware),
> but the common case should be automatized.
> > [1] https://github.com/siemens/jailhouse-images/tree/master/recipes-bsp/u-boot
> >
> > - What is the correct way to specify the device tree for the kernel?
> > I added DTB_FILE="mydt.dtb" to my machine config, and then added that to IMAGE_BOOT_FILES. That
> worked, but is that the correct way to do it? There is no documentation about this.
> >
> > - For the kernel configuration, I want to use shmobile_defconfig (already in the kernel source) plus a few extra
> configurations that I have on another file. Is that possible? So far I had to concatenate my configurations to
> shmobile_defconfig which is redundant.
> 
> We probably need to tune the recipes a bit, including in isar, to pick up an
> existing defconfig != "defconfig" - though that is now the default, only ARMv7
> still has board-specific defconfigs.
> 
> >
> > - How can I install the kernel into the boot partition?
> > Currently, the kernel binary and symbols are deployed into the the /boot folder of the "root" partition instead
> of the "boot" partition. I would like the /boot folder to be deployed into the FAT partition. And maybe also get fstab
> filled automatically.
> 
> You want U-Boot distro boot. The kernel will then be picked up from the rootfs,
> and you do not need to move it manually. See other boards, e.g. the bananapi in
> upstream isar.
> 
> Jan
> 
> >
> > I send the actual code/metadata separately on another e-mail.
> > https://lists.cip-project.org/pipermail/cip-dev/2019-June/002409.html
> >
> > Thanks,
> > Daniel
> >
> 
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-04  6:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04  6:15 [cip-dev] [isar-cip-core] porting isar-cip-core to iwg20m daniel.sangorrin at toshiba.co.jp
2019-06-04  6:28 ` Jan Kiszka
2019-06-04  6:37   ` daniel.sangorrin at toshiba.co.jp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.