mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* Re: [ptxdist] Prepare Image for Raspberry Pi 4
       [not found] <PH0PR08MB801478F4321D6EC7F26475AB82329@PH0PR08MB8014.namprd08.prod.outlook.com>
@ 2022-10-31  8:01 ` Ahmad Fatoum
       [not found]   ` <PH0PR08MB80142B5E46E08F7A38197224823C9@PH0PR08MB8014.namprd08.prod.outlook.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Ahmad Fatoum @ 2022-10-31  8:01 UTC (permalink / raw)
  To: ptxdist, Joshi, Pranay, Michael Olbrich; +Cc: Robert Schwebel, distrokit

Hello Pranay,

On 28.10.22 14:47, Joshi, Pranay wrote:
> Hi Michael,
> 
> Thank you for your support.
> 
> Earlier we were stuck in building toolchain and root filesystem for Raspberry Pi platform using PTXDist Tool, OSELAS Toolchain and DistroKit. We have been successfully able to prepare an image with the solutions provided by you.

Cc += DistroKit Mailing List <distrokit@pengutronix.de>

The PTXdist mailing list is rather for the build system itself, toolchain
and upstream rules and not about particular board support packages.

> We tried prepared image over RPi 4, once we have powered up RPi 4 it is showing an error like "This board requires newer software".
> 
> After some inspection we understood that the prepared image can support RPi 3.

The DistroKit "next" branch supports Raspberry Pi 4 in 32-bit mode. The changes are not yet
in "master". The resulting image can be installed on Rasperry Pi 2, 3, CM3 and 4. Keep in mind
that I did not test rpi4 support on a CM4. It may need some slight tweaking.  

> Now can you please give some path to prepare supported image for RPi 4 using PTXDist tool?
> 
> From where can we get an idea to modify an image for a new platform like RPi 4 using PTXDist?

If you are willing to help, adding support for Raspberry Pi 3 and 4 64-bit to DistroKit
platform-v8a should be quite straight-forward. All components built by platform-v7a for
Raspberry Pi can be configured for 64-bit (bootloader, kernel, rootfs, rpi firmware),
but some integration into DistroKit is still required:

  - Add a new barebox-rpi.{make,in} rule to platform-v8a, which collects the same files
    as barebox-rpi2.make in platform-v7a. platform-v7a has barebox-common, but we don't
    have that for platform-v8a, so either add it or add it as a standalone rule

  - copy the barebox-rpi3.config to platform-v8a and change it to have CONFIG_64BIT=y

  - configure the kernel to enable all the Raspberry Pi 4 related drivers

  - Have DistroKit build the Raspberry Pi 4 device trees and generate bootspec entries using
    them

  - ensure config.txt has arm_64bit=1

  - Add image recipes that pull in the firmware, bootloader and rootfs

When done correctly, you will end up with a rpi.hdimg that can be booted from SD
on either Rpi3 or Rpi4.

Cheers,
Ahmad

> 
> 
> Pranay Joshi
> 
> Lead Engineer-Firmware Engineering
> 
> Drilling Services
> 
> Baker Hughes
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [ptxdist] Prepare Image for Raspberry Pi 4
       [not found]     ` <SN4PR0801MB8017A9D758C4B6BB3D006FAD82059@SN4PR0801MB8017.namprd08.prod.outlook.com>
@ 2022-11-14 10:58       ` Marco Felsch
  2022-11-15  6:05         ` Joshi, Pranay
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Felsch @ 2022-11-14 10:58 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel, Michael Olbrich, distrokit, Ahmad Fatoum

Hi Pranay,

On 22-11-14, Joshi, Pranay wrote:
> Any help on below query?

I'm not aware of the DistroKit integration nor the Barebox integration,
but maybe I can support you since Ahmad is on vacation. Please see my
question below.

> From: Joshi, Pranay <Pranay.Joshi@bakerhughes.com>
> Sent: Monday, November 7, 2022 5:09 PM
> To: Ahmad Fatoum <a.fatoum@pengutronix.de>; ptxdist@pengutronix.de; Michael Olbrich <m.olbrich@pengutronix.de>
> Cc: Robert Schwebel <rsc@pengutronix.de>; distrokit@pengutronix.de
> Subject: Re: [ptxdist] Prepare Image for Raspberry Pi 4
> 
> Hi Ahmad,
> 
> Thanks for your response.
> 
> We prepared images for the platform-rpi and platform-v7a using
> Distrokit "next" branch, as you mentioned it's having support of RPi
> for 32-bit. When prepared image is loaded into SD card and powered
> Raspberry Pi 4B, we are getting error "start_cd.elf: is not
> compatible".

Can you please provide the whole error string barebox is printing?

> Is there any configuration needs to update? Or anything else needs to
> do?

If you can provide us the whole barebox log we can see a bit more what
is going on.

Regards,
  Marco



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

* Re: [ptxdist] Prepare Image for Raspberry Pi 4
  2022-11-14 10:58       ` Marco Felsch
@ 2022-11-15  6:05         ` Joshi, Pranay
  2022-11-15  9:41           ` Marco Felsch
  0 siblings, 1 reply; 6+ messages in thread
From: Joshi, Pranay @ 2022-11-15  6:05 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel, Michael Olbrich, distrokit, Ahmad Fatoum

[-- Attachment #1: Type: text/plain, Size: 2085 bytes --]

Hi Marco,

Thanks for response.

Please find attached error logs for more detail.


Pranay Joshi
Lead Engineer-Firmware Engineering
Drilling Services
Baker Hughes


-----Original Message-----
From: ptxdist <ptxdist-bounces@pengutronix.de> On Behalf Of Marco Felsch
Sent: Monday, November 14, 2022 4:28 PM
To: ptxdist@pengutronix.de
Cc: Robert Schwebel <rsc@pengutronix.de>; Michael Olbrich <m.olbrich@pengutronix.de>; distrokit@pengutronix.de; Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [ptxdist] Prepare Image for Raspberry Pi 4

[You don't often get email from m.felsch@pengutronix.de. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

  EXTERNAL EMAIL: This email originated outside of our organization. Do not click on any links or open attachments from unexpected or unknown senders unless you can verify the content is safe.


Hi Pranay,

On 22-11-14, Joshi, Pranay wrote:
> Any help on below query?

I'm not aware of the DistroKit integration nor the Barebox integration, but maybe I can support you since Ahmad is on vacation. Please see my question below.

> From: Joshi, Pranay <Pranay.Joshi@bakerhughes.com>
> Sent: Monday, November 7, 2022 5:09 PM
> To: Ahmad Fatoum <a.fatoum@pengutronix.de>; ptxdist@pengutronix.de; 
> Michael Olbrich <m.olbrich@pengutronix.de>
> Cc: Robert Schwebel <rsc@pengutronix.de>; distrokit@pengutronix.de
> Subject: Re: [ptxdist] Prepare Image for Raspberry Pi 4
>
> Hi Ahmad,
>
> Thanks for your response.
>
> We prepared images for the platform-rpi and platform-v7a using 
> Distrokit "next" branch, as you mentioned it's having support of RPi 
> for 32-bit. When prepared image is loaded into SD card and powered 
> Raspberry Pi 4B, we are getting error "start_cd.elf: is not 
> compatible".

Can you please provide the whole error string barebox is printing?

> Is there any configuration needs to update? Or anything else needs to 
> do?

If you can provide us the whole barebox log we can see a bit more what is going on.

Regards,
  Marco


[-- Attachment #2: RPi-4_BootLog_using_hd_img.txt --]
[-- Type: text/plain, Size: 2526 bytes --]

pranay@pranay-Latitude-5400:~$ sudo minicom
[sudo] password for pranay: 


Welcome to minicom 2.7.1

OPTIONS: I18n 
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyUSB0, 12:17:05

Press CTRL-A Z for help on special keys                                
                                                                       
Read start_cd.elf bytes   685540 hnd 0x00000000                        
Read fixup_cd.dat bytes     2657 hnd 0x00000000                        
Firmware: 679ebca20dc08ca3f5392e02d772fed727debdae Sep  9 2019 18:51:29
0x00d03114 0x00000000 0x00000000
start_cd.elf: is not compatible
This board requires newer software
Get the latest software from https://www.raspberrypi.com/software/
ERROR: 44
Retry SD 1
SD HOST: 250000000 CTL0: 0x00000000 BUS: 200000 Hz actual: 200000 HZ div: 1250 (625) status: 0x1fff0000 delay0
SD HOST: 250000000 CTL0: 0x00000f00 BUS: 200000 Hz actual: 200000 HZ div: 1250 (625) status: 0x1fff0000 delay0
OCR c0ff8000 [7]
CID: 000353445343313647805cc2ce990166
CSD: 400e00325b59000076b27f800a404000
SD: bus-width: 4 spec: 2 SCR: 0x02358043 0x00000000
SD HOST: 250000000 CTL0: 0x00000f04 BUS: 50000000 Hz actual: 41666666 HZ div: 6 (3) status: 0x1fff0000 delay:2
MBR: 0x00000800,   65536 type: 0x0c
MBR: 0x00010800,  143360 type: 0x83
MBR: 0x00000000,       0 type: 0x00
MBR: 0x00000000,       0 type: 0x00
Trying partition: 0
type: 16 lba: 2048 oem: 'mkfs.fat' volume: '  V       ^ '
rsc 4 fat-sectors 64 c-count 16343 c-size 4
root dir cluster 1 sectors 32 entries 512
FAT16 clusters 16343
Trying partition: 0
type: 16 lba: 2048 oem: 'mkfs.fat' volume: '  V       ^ '
rsc 4 fat-sectors 64 c-count 16343 c-size 4
root dir cluster 1 sectors 32 entries 512
FAT16 clusters 16343
Read config.txt bytes      407 hnd 0x00000000
Read start_cd.elf bytes   685540 hnd 0x00000000
Read fixup_cd.dat bytes     2657 hnd 0x00000000
Firmware: 679ebca20dc08ca3f5392e02d772fed727debdae Sep  9 2019 18:51:29
0x00d03114 0x00000000 0x00000000
start_cd.elf: is not compatible
This board requires newer software
Get the latest software from https://www.raspberrypi.com/software/
ERROR: 44
Boot mode: USB-MSD (04) order f
XHCI-STOP
xHC ver: 256 HCS: 05000420 fc000031 00e70004 HCC: 002841eb
USBSTS 8
XHCI-STOP
xHC ver: 256 HCS: 05000420 fc000031 00e70004 HCC: 002841eb
USBSTS 9
xHC ver: 256 HCS: 05000420 fc000031 00e70004 HCC: 002841eb
xHC ports 5 slots 32 intrs 4
USB2[1] 400202e1 connected
USB2 root HUB port 1 init
DEV [01:00] 2.16 000000:01 class 9 VID 2109 PID 3431
HUB init [01:00] 2.16 000000:01


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

* Re: [ptxdist] Prepare Image for Raspberry Pi 4
  2022-11-15  6:05         ` Joshi, Pranay
@ 2022-11-15  9:41           ` Marco Felsch
  2022-11-15  9:47             ` Joshi, Pranay
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Felsch @ 2022-11-15  9:41 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel, Michael Olbrich, distrokit, Ahmad Fatoum

Hi,

On 22-11-15, Joshi, Pranay wrote:
> Hi Marco,
> 
> Thanks for response.
> 
> Please find attached error logs for more detail.

Thanks for the error log.

> Read start_cd.elf bytes   685540 hnd 0x00000000                        
> Read fixup_cd.dat bytes     2657 hnd 0x00000000                        
> Firmware: 679ebca20dc08ca3f5392e02d772fed727debdae Sep  9 2019 18:51:29
> 0x00d03114 0x00000000 0x00000000
> start_cd.elf: is not compatible
> This board requires newer software
> Get the latest software from https://www.raspberrypi.com/software/

The version of the start_cd.elf seems a bit old since Ahmad updated it
to v1.20220331 and the loader says it is from 2019.

To sum up a few things since I just stepped in into this conversation:

- You're using DistoKit Git-Version:
    4dd74b5 v7a: barebox: enable of_diff command
- You have selected the platform-v7a platform
- Which compiler you did used?
- You have no local changes?
- Which RPI4 you're using (RPI4, CM4, ...)?

Regards,
  Marco



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

* Re: [ptxdist] Prepare Image for Raspberry Pi 4
  2022-11-15  9:41           ` Marco Felsch
@ 2022-11-15  9:47             ` Joshi, Pranay
  2022-11-15 10:04               ` Marco Felsch
  0 siblings, 1 reply; 6+ messages in thread
From: Joshi, Pranay @ 2022-11-15  9:47 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel, Michael Olbrich, distrokit, Ahmad Fatoum

Hi,

Thanks to stepped in.

We have clone Distrokit "next" branch and used that.

- Which compiler you did used?
We are using OSELAS.Toolchain-2020.08.0

- You have no local changes?
Yes, no local changes, used default configuration.

- Which RPI4 you're using (RPI4, CM4, ...)?
Raspberry Pi 4B


Pranay Joshi
Lead Engineer-Firmware Engineering
Drilling Services
Baker Hughes


-----Original Message-----
From: ptxdist <ptxdist-bounces@pengutronix.de> On Behalf Of Marco Felsch
Sent: Tuesday, November 15, 2022 3:11 PM
To: ptxdist@pengutronix.de
Cc: Robert Schwebel <rsc@pengutronix.de>; Michael Olbrich <m.olbrich@pengutronix.de>; distrokit@pengutronix.de; Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [ptxdist] Prepare Image for Raspberry Pi 4

[You don't often get email from m.felsch@pengutronix.de. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

  EXTERNAL EMAIL: This email originated outside of our organization. Do not click on any links or open attachments from unexpected or unknown senders unless you can verify the content is safe.


Hi,

On 22-11-15, Joshi, Pranay wrote:
> Hi Marco,
>
> Thanks for response.
>
> Please find attached error logs for more detail.

Thanks for the error log.

> Read start_cd.elf bytes   685540 hnd 0x00000000
> Read fixup_cd.dat bytes     2657 hnd 0x00000000
> Firmware: 679ebca20dc08ca3f5392e02d772fed727debdae Sep  9 2019 
> 18:51:29
> 0x00d03114 0x00000000 0x00000000
> start_cd.elf: is not compatible
> This board requires newer software
> Get the latest software from 
> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> raspberrypi.com%2Fsoftware%2F&amp;data=05%7C01%7Cpranay.joshi%40bakerh
> ughes.com%7Cd4294c5d564c40f57c4d08dac6ed93b5%7Cd584a4b7b1f24714a578fd4
> d43c146a6%7C0%7C0%7C638041020940805444%7CUnknown%7CTWFpbGZsb3d8eyJWIjo
> iMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%
> 7C%7C&amp;sdata=R1RrE%2FMyBkeQleIquzTsdr4yrtGJs%2Ff3SJzJK5y3O4c%3D&amp
> ;reserved=0

The version of the start_cd.elf seems a bit old since Ahmad updated it to v1.20220331 and the loader says it is from 2019.

To sum up a few things since I just stepped in into this conversation:

- You're using DistoKit Git-Version:
    4dd74b5 v7a: barebox: enable of_diff command
- You have selected the platform-v7a platform
- Which compiler you did used?
- You have no local changes?
- Which RPI4 you're using (RPI4, CM4, ...)?

Regards,
  Marco




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

* Re: [ptxdist] Prepare Image for Raspberry Pi 4
  2022-11-15  9:47             ` Joshi, Pranay
@ 2022-11-15 10:04               ` Marco Felsch
  0 siblings, 0 replies; 6+ messages in thread
From: Marco Felsch @ 2022-11-15 10:04 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel, Michael Olbrich, distrokit, Ahmad Fatoum

On 22-11-15, Joshi, Pranay wrote:
> Hi,
> 
> Thanks to stepped in.
> 
> We have clone Distrokit "next" branch and used that.
> 
> - Which compiler you did used?
> We are using OSELAS.Toolchain-2020.08.0

And you're using the arm-v7a version?

> - You have no local changes?
> Yes, no local changes, used default configuration.
> 
> - Which RPI4 you're using (RPI4, CM4, ...)?
> Raspberry Pi 4B

Which platform did you select and which image did you flashed to the
SD card?

Regards,
  Marco

> 
> 
> Pranay Joshi
> Lead Engineer-Firmware Engineering
> Drilling Services
> Baker Hughes
> 
> 
> -----Original Message-----
> From: ptxdist <ptxdist-bounces@pengutronix.de> On Behalf Of Marco Felsch
> Sent: Tuesday, November 15, 2022 3:11 PM
> To: ptxdist@pengutronix.de
> Cc: Robert Schwebel <rsc@pengutronix.de>; Michael Olbrich <m.olbrich@pengutronix.de>; distrokit@pengutronix.de; Ahmad Fatoum <a.fatoum@pengutronix.de>
> Subject: Re: [ptxdist] Prepare Image for Raspberry Pi 4
> 
> [You don't often get email from m.felsch@pengutronix.de. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
>   EXTERNAL EMAIL: This email originated outside of our organization. Do not click on any links or open attachments from unexpected or unknown senders unless you can verify the content is safe.
> 
> 
> Hi,
> 
> On 22-11-15, Joshi, Pranay wrote:
> > Hi Marco,
> >
> > Thanks for response.
> >
> > Please find attached error logs for more detail.
> 
> Thanks for the error log.
> 
> > Read start_cd.elf bytes   685540 hnd 0x00000000
> > Read fixup_cd.dat bytes     2657 hnd 0x00000000
> > Firmware: 679ebca20dc08ca3f5392e02d772fed727debdae Sep  9 2019 
> > 18:51:29
> > 0x00d03114 0x00000000 0x00000000
> > start_cd.elf: is not compatible
> > This board requires newer software
> > Get the latest software from 
> > https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> > raspberrypi.com%2Fsoftware%2F&amp;data=05%7C01%7Cpranay.joshi%40bakerh
> > ughes.com%7Cd4294c5d564c40f57c4d08dac6ed93b5%7Cd584a4b7b1f24714a578fd4
> > d43c146a6%7C0%7C0%7C638041020940805444%7CUnknown%7CTWFpbGZsb3d8eyJWIjo
> > iMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%
> > 7C%7C&amp;sdata=R1RrE%2FMyBkeQleIquzTsdr4yrtGJs%2Ff3SJzJK5y3O4c%3D&amp
> > ;reserved=0
> 
> The version of the start_cd.elf seems a bit old since Ahmad updated it to v1.20220331 and the loader says it is from 2019.
> 
> To sum up a few things since I just stepped in into this conversation:
> 
> - You're using DistoKit Git-Version:
>     4dd74b5 v7a: barebox: enable of_diff command
> - You have selected the platform-v7a platform
> - Which compiler you did used?
> - You have no local changes?
> - Which RPI4 you're using (RPI4, CM4, ...)?
> 
> Regards,
>   Marco
> 
> 
> 



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

end of thread, other threads:[~2022-11-15 10:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <PH0PR08MB801478F4321D6EC7F26475AB82329@PH0PR08MB8014.namprd08.prod.outlook.com>
2022-10-31  8:01 ` [ptxdist] Prepare Image for Raspberry Pi 4 Ahmad Fatoum
     [not found]   ` <PH0PR08MB80142B5E46E08F7A38197224823C9@PH0PR08MB8014.namprd08.prod.outlook.com>
     [not found]     ` <SN4PR0801MB8017A9D758C4B6BB3D006FAD82059@SN4PR0801MB8017.namprd08.prod.outlook.com>
2022-11-14 10:58       ` Marco Felsch
2022-11-15  6:05         ` Joshi, Pranay
2022-11-15  9:41           ` Marco Felsch
2022-11-15  9:47             ` Joshi, Pranay
2022-11-15 10:04               ` Marco Felsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox