All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] board/pc: fix build failure due to new genimage 15
@ 2022-02-04  0:56 Giulio Benetti
  2022-02-05 14:10 ` Arnout Vandecappelle
  2022-02-12 22:05 ` Arnout Vandecappelle
  0 siblings, 2 replies; 7+ messages in thread
From: Giulio Benetti @ 2022-02-04  0:56 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti

Actually genimage fails to create final image with:
```
ERROR: hdimage(disk.img): partition [MBR] (offset 0x1b8, size 0x48) overlaps previous partition boot (offset 0x0, size 0x200)
ERROR: hdimage(disk.img): bootloaders, etc. that overlap with the partition table must declare the overlapping area as a hole.
```

This is because genimage 15 is less permissive than before, so let's add
holes = {"(440; 512)"} to leave room to MBR.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/1865935249

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 board/pc/genimage-bios.cfg | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/pc/genimage-bios.cfg b/board/pc/genimage-bios.cfg
index 26d12d9ab3..54026f6527 100644
--- a/board/pc/genimage-bios.cfg
+++ b/board/pc/genimage-bios.cfg
@@ -7,6 +7,7 @@ image disk.img {
 		image = "boot.img"
 		offset = 0
 		size = 512
+		holes = {"(440; 512)"}
 	}
 
 	partition grub {
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] board/pc: fix build failure due to new genimage 15
  2022-02-04  0:56 [Buildroot] [PATCH] board/pc: fix build failure due to new genimage 15 Giulio Benetti
@ 2022-02-05 14:10 ` Arnout Vandecappelle
  2022-02-05 15:36   ` Giulio Benetti
  2022-02-12 22:05 ` Arnout Vandecappelle
  1 sibling, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2022-02-05 14:10 UTC (permalink / raw)
  To: Giulio Benetti, buildroot

  Hi Giulio,

On 04/02/2022 01:56, Giulio Benetti wrote:
> Actually genimage fails to create final image with:
> ```
> ERROR: hdimage(disk.img): partition [MBR] (offset 0x1b8, size 0x48) overlaps previous partition boot (offset 0x0, size 0x200)
> ERROR: hdimage(disk.img): bootloaders, etc. that overlap with the partition table must declare the overlapping area as a hole.
> ```
> 
> This is because genimage 15 is less permissive than before, so let's add
> holes = {"(440; 512)"} to leave room to MBR.
> 
> Fixes:
> https://gitlab.com/buildroot.org/buildroot/-/jobs/1865935249
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>   board/pc/genimage-bios.cfg | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/board/pc/genimage-bios.cfg b/board/pc/genimage-bios.cfg
> index 26d12d9ab3..54026f6527 100644
> --- a/board/pc/genimage-bios.cfg
> +++ b/board/pc/genimage-bios.cfg
> @@ -7,6 +7,7 @@ image disk.img {
>   		image = "boot.img"
>   		offset = 0
>   		size = 512
> +		holes = {"(440; 512)"}

  Have you tested this change on an actual board (i.e. a PC :-)?

  Regards,
  Arnout

>   	}
>   
>   	partition grub {
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] board/pc: fix build failure due to new genimage 15
  2022-02-05 14:10 ` Arnout Vandecappelle
@ 2022-02-05 15:36   ` Giulio Benetti
  2022-02-05 17:40     ` Giulio Benetti
  0 siblings, 1 reply; 7+ messages in thread
From: Giulio Benetti @ 2022-02-05 15:36 UTC (permalink / raw)
  To: Arnout Vandecappelle; +Cc: buildroot

Hi Arnout,

> Il giorno 5 feb 2022, alle ore 15:11, Arnout Vandecappelle <arnout@mind.be> ha scritto:
> 
>  Hi Giulio,
> 
>> On 04/02/2022 01:56, Giulio Benetti wrote:
>> Actually genimage fails to create final image with:
>> ```
>> ERROR: hdimage(disk.img): partition [MBR] (offset 0x1b8, size 0x48) overlaps previous partition boot (offset 0x0, size 0x200)
>> ERROR: hdimage(disk.img): bootloaders, etc. that overlap with the partition table must declare the overlapping area as a hole.
>> ```
>> This is because genimage 15 is less permissive than before, so let's add
>> holes = {"(440; 512)"} to leave room to MBR.
>> Fixes:
>> https://gitlab.com/buildroot.org/buildroot/-/jobs/1865935249
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>>  board/pc/genimage-bios.cfg | 1 +
>>  1 file changed, 1 insertion(+)
>> diff --git a/board/pc/genimage-bios.cfg b/board/pc/genimage-bios.cfg
>> index 26d12d9ab3..54026f6527 100644
>> --- a/board/pc/genimage-bios.cfg
>> +++ b/board/pc/genimage-bios.cfg
>> @@ -7,6 +7,7 @@ image disk.img {
>>          image = "boot.img"
>>          offset = 0
>>          size = 512
>> +        holes = {"(440; 512)"}
> 
> Have you tested this change on an actual board (i.e. a PC :-)?

I’ve tested it with qemu and it boots the kernel correctly(that is in rootfs), only thing is that it can’t mount the rootfs and I don’t understand why.
I wanted to ask about this but I’ve got lost among all the other patches :-)

Could someone double check if it mounts?

Best regards
Giulio

> 
> Regards,
> Arnout
> 
>>      }
>>        partition grub {
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] board/pc: fix build failure due to new genimage 15
  2022-02-05 15:36   ` Giulio Benetti
@ 2022-02-05 17:40     ` Giulio Benetti
  2022-02-08 20:00       ` Giulio Benetti
  0 siblings, 1 reply; 7+ messages in thread
From: Giulio Benetti @ 2022-02-05 17:40 UTC (permalink / raw)
  To: Arnout Vandecappelle; +Cc: buildroot

Hi again Arnout,

On 05/02/22 16:36, Giulio Benetti wrote:
> Hi Arnout,
> 
>> Il giorno 5 feb 2022, alle ore 15:11, Arnout Vandecappelle <arnout@mind.be> ha scritto:
>>
>>  Hi Giulio,
>>
>>> On 04/02/2022 01:56, Giulio Benetti wrote:
>>> Actually genimage fails to create final image with:
>>> ```
>>> ERROR: hdimage(disk.img): partition [MBR] (offset 0x1b8, size 0x48) overlaps previous partition boot (offset 0x0, size 0x200)
>>> ERROR: hdimage(disk.img): bootloaders, etc. that overlap with the partition table must declare the overlapping area as a hole.
>>> ```
>>> This is because genimage 15 is less permissive than before, so let's add
>>> holes = {"(440; 512)"} to leave room to MBR.
>>> Fixes:
>>> https://gitlab.com/buildroot.org/buildroot/-/jobs/1865935249
>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>> ---
>>>   board/pc/genimage-bios.cfg | 1 +
>>>   1 file changed, 1 insertion(+)
>>> diff --git a/board/pc/genimage-bios.cfg b/board/pc/genimage-bios.cfg
>>> index 26d12d9ab3..54026f6527 100644
>>> --- a/board/pc/genimage-bios.cfg
>>> +++ b/board/pc/genimage-bios.cfg
>>> @@ -7,6 +7,7 @@ image disk.img {
>>>           image = "boot.img"
>>>           offset = 0
>>>           size = 512
>>> +        holes = {"(440; 512)"}
>>
>> Have you tested this change on an actual board (i.e. a PC :-)?
> 
> I’ve tested it with qemu and it boots the kernel correctly(that is in rootfs), only thing is that it can’t mount the rootfs and I don’t understand why.
> I wanted to ask about this but I’ve got lost among all the other patches :-)

I've compared the 2 disk.img files, one generated with genimage 14 
without "holes..." and the other generated with genimage 15 and they are 
the same.

The problem here is not that it can't mount using qemu, but it doesn't 
show the shell.

Here is the qemu command:
qemu-system-x86_64 -M pc -drive 
file=images/disk.img,if=virtio,format=raw -net nic,model=virtio -net user

and this is the output:
https://imgur.com/a/ffZBlJR

So it seems like a busybox/init system issue with tty1. I'm digging.

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

> Could someone double check if it mounts?
> 
> Best regards
> Giulio
> 
>>
>> Regards,
>> Arnout
>>
>>>       }
>>>         partition grub {
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] board/pc: fix build failure due to new genimage 15
  2022-02-05 17:40     ` Giulio Benetti
@ 2022-02-08 20:00       ` Giulio Benetti
  2022-02-08 20:01         ` Giulio Benetti
  0 siblings, 1 reply; 7+ messages in thread
From: Giulio Benetti @ 2022-02-08 20:00 UTC (permalink / raw)
  To: Arnout Vandecappelle; +Cc: buildroot

Hi Arnout,

On 05/02/22 18:40, Giulio Benetti wrote:
> Hi again Arnout,
> 
> On 05/02/22 16:36, Giulio Benetti wrote:
>> Hi Arnout,
>>
>>> Il giorno 5 feb 2022, alle ore 15:11, Arnout Vandecappelle <arnout@mind.be> ha scritto:
>>>
>>>  Hi Giulio,
>>>
>>>> On 04/02/2022 01:56, Giulio Benetti wrote:
>>>> Actually genimage fails to create final image with:
>>>> ```
>>>> ERROR: hdimage(disk.img): partition [MBR] (offset 0x1b8, size 0x48) overlaps previous partition boot (offset 0x0, size 0x200)
>>>> ERROR: hdimage(disk.img): bootloaders, etc. that overlap with the partition table must declare the overlapping area as a hole.
>>>> ```
>>>> This is because genimage 15 is less permissive than before, so let's add
>>>> holes = {"(440; 512)"} to leave room to MBR.
>>>> Fixes:
>>>> https://gitlab.com/buildroot.org/buildroot/-/jobs/1865935249
>>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>>> ---
>>>>    board/pc/genimage-bios.cfg | 1 +
>>>>    1 file changed, 1 insertion(+)
>>>> diff --git a/board/pc/genimage-bios.cfg b/board/pc/genimage-bios.cfg
>>>> index 26d12d9ab3..54026f6527 100644
>>>> --- a/board/pc/genimage-bios.cfg
>>>> +++ b/board/pc/genimage-bios.cfg
>>>> @@ -7,6 +7,7 @@ image disk.img {
>>>>            image = "boot.img"
>>>>            offset = 0
>>>>            size = 512
>>>> +        holes = {"(440; 512)"}
>>>
>>> Have you tested this change on an actual board (i.e. a PC :-)?
>>
>> I’ve tested it with qemu and it boots the kernel correctly(that is in rootfs), only thing is that it can’t mount the rootfs and I don’t understand why.
>> I wanted to ask about this but I’ve got lost among all the other patches :-)
> 
> I've compared the 2 disk.img files, one generated with genimage 14
> without "holes..." and the other generated with genimage 15 and they are
> the same.
> 
> The problem here is not that it can't mount using qemu, but it doesn't
> show the shell.
> 
> Here is the qemu command:
> qemu-system-x86_64 -M pc -drive
> file=images/disk.img,if=virtio,format=raw -net nic,model=virtio -net user
> 
> and this is the output:
> https://imgur.com/a/ffZBlJR
> 
> So it seems like a busybox/init system issue with tty1. I'm digging.

I've found the problem. Using the grub.cfg as it is(root=/dev/sda1) 
works only with Virtualbox but not with Qemu that needs s/sda1/vda1.

But it's not so well explained in readme.txt, so I'm going to send a 
patch for that.

So I can give a:
Tested-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[Giulio: tested successfully with Qemu and Virtualbox]

Best regards
-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] board/pc: fix build failure due to new genimage 15
  2022-02-08 20:00       ` Giulio Benetti
@ 2022-02-08 20:01         ` Giulio Benetti
  0 siblings, 0 replies; 7+ messages in thread
From: Giulio Benetti @ 2022-02-08 20:01 UTC (permalink / raw)
  To: Arnout Vandecappelle; +Cc: buildroot

On 08/02/22 21:00, Giulio Benetti wrote:
> Hi Arnout,
> 
> On 05/02/22 18:40, Giulio Benetti wrote:
>> Hi again Arnout,
>>
>> On 05/02/22 16:36, Giulio Benetti wrote:
>>> Hi Arnout,
>>>
>>>> Il giorno 5 feb 2022, alle ore 15:11, Arnout Vandecappelle <arnout@mind.be> ha scritto:
>>>>
>>>>  Hi Giulio,
>>>>
>>>>> On 04/02/2022 01:56, Giulio Benetti wrote:
>>>>> Actually genimage fails to create final image with:
>>>>> ```
>>>>> ERROR: hdimage(disk.img): partition [MBR] (offset 0x1b8, size 0x48) overlaps previous partition boot (offset 0x0, size 0x200)
>>>>> ERROR: hdimage(disk.img): bootloaders, etc. that overlap with the partition table must declare the overlapping area as a hole.
>>>>> ```
>>>>> This is because genimage 15 is less permissive than before, so let's add
>>>>> holes = {"(440; 512)"} to leave room to MBR.
>>>>> Fixes:
>>>>> https://gitlab.com/buildroot.org/buildroot/-/jobs/1865935249
>>>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>>>> ---
>>>>>     board/pc/genimage-bios.cfg | 1 +
>>>>>     1 file changed, 1 insertion(+)
>>>>> diff --git a/board/pc/genimage-bios.cfg b/board/pc/genimage-bios.cfg
>>>>> index 26d12d9ab3..54026f6527 100644
>>>>> --- a/board/pc/genimage-bios.cfg
>>>>> +++ b/board/pc/genimage-bios.cfg
>>>>> @@ -7,6 +7,7 @@ image disk.img {
>>>>>             image = "boot.img"
>>>>>             offset = 0
>>>>>             size = 512
>>>>> +        holes = {"(440; 512)"}
>>>>
>>>> Have you tested this change on an actual board (i.e. a PC :-)?
>>>
>>> I’ve tested it with qemu and it boots the kernel correctly(that is in rootfs), only thing is that it can’t mount the rootfs and I don’t understand why.
>>> I wanted to ask about this but I’ve got lost among all the other patches :-)
>>
>> I've compared the 2 disk.img files, one generated with genimage 14
>> without "holes..." and the other generated with genimage 15 and they are
>> the same.
>>
>> The problem here is not that it can't mount using qemu, but it doesn't
>> show the shell.
>>
>> Here is the qemu command:
>> qemu-system-x86_64 -M pc -drive
>> file=images/disk.img,if=virtio,format=raw -net nic,model=virtio -net user
>>
>> and this is the output:
>> https://imgur.com/a/ffZBlJR
>>
>> So it seems like a busybox/init system issue with tty1. I'm digging.
> 
> I've found the problem. Using the grub.cfg as it is(root=/dev/sda1)
> works only with Virtualbox but not with Qemu that needs s/sda1/vda1.
> 
> But it's not so well explained in readme.txt, so I'm going to send a
> patch for that.

Pardon, I've only misread. readme.txt is correct.

> So I can give a:
> Tested-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> [Giulio: tested successfully with Qemu and Virtualbox]
> 
> Best regards

-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] board/pc: fix build failure due to new genimage 15
  2022-02-04  0:56 [Buildroot] [PATCH] board/pc: fix build failure due to new genimage 15 Giulio Benetti
  2022-02-05 14:10 ` Arnout Vandecappelle
@ 2022-02-12 22:05 ` Arnout Vandecappelle
  1 sibling, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2022-02-12 22:05 UTC (permalink / raw)
  To: Giulio Benetti, buildroot



On 04/02/2022 01:56, Giulio Benetti wrote:
> Actually genimage fails to create final image with:
> ```
> ERROR: hdimage(disk.img): partition [MBR] (offset 0x1b8, size 0x48) overlaps previous partition boot (offset 0x0, size 0x200)
> ERROR: hdimage(disk.img): bootloaders, etc. that overlap with the partition table must declare the overlapping area as a hole.
> ```
> 
> This is because genimage 15 is less permissive than before, so let's add
> holes = {"(440; 512)"} to leave room to MBR.
> 
> Fixes:
> https://gitlab.com/buildroot.org/buildroot/-/jobs/1865935249
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   board/pc/genimage-bios.cfg | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/board/pc/genimage-bios.cfg b/board/pc/genimage-bios.cfg
> index 26d12d9ab3..54026f6527 100644
> --- a/board/pc/genimage-bios.cfg
> +++ b/board/pc/genimage-bios.cfg
> @@ -7,6 +7,7 @@ image disk.img {
>   		image = "boot.img"
>   		offset = 0
>   		size = 512
> +		holes = {"(440; 512)"}
>   	}
>   
>   	partition grub {
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-02-12 22:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04  0:56 [Buildroot] [PATCH] board/pc: fix build failure due to new genimage 15 Giulio Benetti
2022-02-05 14:10 ` Arnout Vandecappelle
2022-02-05 15:36   ` Giulio Benetti
2022-02-05 17:40     ` Giulio Benetti
2022-02-08 20:00       ` Giulio Benetti
2022-02-08 20:01         ` Giulio Benetti
2022-02-12 22:05 ` Arnout Vandecappelle

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.