All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] MIPS: fix generic zboot support
@ 2021-11-05 13:52 YunQiang Su
  2021-11-05 15:00 ` Jiaxun Yang
  2021-11-08  9:54 ` Paul Cercueil
  0 siblings, 2 replies; 7+ messages in thread
From: YunQiang Su @ 2021-11-05 13:52 UTC (permalink / raw)
  To: tsbogend; +Cc: paul, zhouyanjie, jiaxun.yang, linux-mips, YunQiang Su

There are 2 problems here:
1. setting zload-y to 0xffffffff81000000 breaks booting on qemu -M boston.
   Why it is set here? Any other platform needs this value?
2. vmlinux.gz.itb should be appended to all-$(CONFIG_MIPS_GENERIC) instead
   of replacing. Otherwise, no vmlinuz will be built.
---
 arch/mips/generic/Platform | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
index e1abc113b409..0c03623f3897 100644
--- a/arch/mips/generic/Platform
+++ b/arch/mips/generic/Platform
@@ -13,8 +13,7 @@ cflags-$(CONFIG_MACH_INGENIC_SOC)	+= -I$(srctree)/arch/mips/include/asm/mach-ing
 cflags-$(CONFIG_MIPS_GENERIC)	+= -I$(srctree)/arch/mips/include/asm/mach-generic
 
 load-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff80100000
-zload-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff81000000
-all-$(CONFIG_MIPS_GENERIC)	:= vmlinux.gz.itb
+all-$(CONFIG_MIPS_GENERIC)	+= vmlinux.gz.itb
 
 its-y					:= vmlinux.its.S
 its-$(CONFIG_FIT_IMAGE_FDT_BOSTON)	+= board-boston.its.S
-- 
2.30.2


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

* Re: [RFC] MIPS: fix generic zboot support
  2021-11-05 13:52 [RFC] MIPS: fix generic zboot support YunQiang Su
@ 2021-11-05 15:00 ` Jiaxun Yang
  2021-11-08  9:54 ` Paul Cercueil
  1 sibling, 0 replies; 7+ messages in thread
From: Jiaxun Yang @ 2021-11-05 15:00 UTC (permalink / raw)
  To: YunQiang Su, Thomas Bogendoerfer; +Cc: Paul Cercueil, zhouyanjie, linux-mips



在2021年11月5日十一月 下午1:52,YunQiang Su写道:
> There are 2 problems here:
> 1. setting zload-y to 0xffffffff81000000 breaks booting on qemu -M boston.
>    Why it is set here? Any other platform needs this value?

Actually we have arch/mips/boot/compressed/calc_vmlinuz_load_addr.c to calculate zload address.
It will append zloader after the vmlinux so I'm not sure why we have to specify a address here.
Especially for generic kernel.

> 2. vmlinux.gz.itb should be appended to all-$(CONFIG_MIPS_GENERIC) instead
>    of replacing. Otherwise, no vmlinuz will be built.

Ack.

Thanks.

- Jiaxun

> ---
>  arch/mips/generic/Platform | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
> index e1abc113b409..0c03623f3897 100644
> --- a/arch/mips/generic/Platform
> +++ b/arch/mips/generic/Platform
> @@ -13,8 +13,7 @@ cflags-$(CONFIG_MACH_INGENIC_SOC)	+= 
> -I$(srctree)/arch/mips/include/asm/mach-ing
>  cflags-$(CONFIG_MIPS_GENERIC)	+= 
> -I$(srctree)/arch/mips/include/asm/mach-generic
> 
>  load-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff80100000
> -zload-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff81000000
> -all-$(CONFIG_MIPS_GENERIC)	:= vmlinux.gz.itb
> +all-$(CONFIG_MIPS_GENERIC)	+= vmlinux.gz.itb
> 
>  its-y					:= vmlinux.its.S
>  its-$(CONFIG_FIT_IMAGE_FDT_BOSTON)	+= board-boston.its.S
> -- 
> 2.30.2

-- 
- Jiaxun

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

* Re: [RFC] MIPS: fix generic zboot support
  2021-11-05 13:52 [RFC] MIPS: fix generic zboot support YunQiang Su
  2021-11-05 15:00 ` Jiaxun Yang
@ 2021-11-08  9:54 ` Paul Cercueil
  2021-11-08 10:21   ` Paul Cercueil
  2021-11-08 18:08   ` Jiaxun Yang
  1 sibling, 2 replies; 7+ messages in thread
From: Paul Cercueil @ 2021-11-08  9:54 UTC (permalink / raw)
  To: YunQiang Su; +Cc: tsbogend, zhouyanjie, jiaxun.yang, linux-mips

Hi,

Le ven., nov. 5 2021 at 09:52:32 -0400, YunQiang Su 
<yunqiang.su@cipunited.com> a écrit :
> There are 2 problems here:
> 1. setting zload-y to 0xffffffff81000000 breaks booting on qemu -M 
> boston.
>    Why it is set here? Any other platform needs this value?

Is there another place where it should be set?

With this patch applied, kernels won't boot anymore on Ingenic boards.

> 2. vmlinux.gz.itb should be appended to all-$(CONFIG_MIPS_GENERIC) 
> instead
>    of replacing. Otherwise, no vmlinuz will be built.

I build vmlinuz all the time, and never needed this patch.

Cheers,
-Paul

> ---
>  arch/mips/generic/Platform | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
> index e1abc113b409..0c03623f3897 100644
> --- a/arch/mips/generic/Platform
> +++ b/arch/mips/generic/Platform
> @@ -13,8 +13,7 @@ cflags-$(CONFIG_MACH_INGENIC_SOC)	+= 
> -I$(srctree)/arch/mips/include/asm/mach-ing
>  cflags-$(CONFIG_MIPS_GENERIC)	+= 
> -I$(srctree)/arch/mips/include/asm/mach-generic
> 
>  load-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff80100000
> -zload-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff81000000
> -all-$(CONFIG_MIPS_GENERIC)	:= vmlinux.gz.itb
> +all-$(CONFIG_MIPS_GENERIC)	+= vmlinux.gz.itb
> 
>  its-y					:= vmlinux.its.S
>  its-$(CONFIG_FIT_IMAGE_FDT_BOSTON)	+= board-boston.its.S
> --
> 2.30.2
> 



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

* Re: [RFC] MIPS: fix generic zboot support
  2021-11-08  9:54 ` Paul Cercueil
@ 2021-11-08 10:21   ` Paul Cercueil
  2021-11-08 18:09     ` Jiaxun Yang
  2021-11-08 18:08   ` Jiaxun Yang
  1 sibling, 1 reply; 7+ messages in thread
From: Paul Cercueil @ 2021-11-08 10:21 UTC (permalink / raw)
  To: YunQiang Su; +Cc: tsbogend, zhouyanjie, jiaxun.yang, linux-mips

Hi again,

Le lun., nov. 8 2021 at 09:54:38 +0000, Paul Cercueil 
<paul@crapouillou.net> a écrit :
> Hi,
> 
> Le ven., nov. 5 2021 at 09:52:32 -0400, YunQiang Su 
> <yunqiang.su@cipunited.com> a écrit :
>> There are 2 problems here:
>> 1. setting zload-y to 0xffffffff81000000 breaks booting on qemu -M 
>> \x7fboston.
>>    Why it is set here? Any other platform needs this value?
> 
> Is there another place where it should be set?
> 
> With this patch applied, kernels won't boot anymore on Ingenic boards.

Nevermind - it works, I just needed to adapt my tooling.

However, I think there should still be an option to have a fixed zload 
address, for the case where you want a vmlinuz.bin.

Cheers,
-Paul

>> 2. vmlinux.gz.itb should be appended to all-$(CONFIG_MIPS_GENERIC) 
>> \x7finstead
>>    of replacing. Otherwise, no vmlinuz will be built.
> 
> I build vmlinuz all the time, and never needed this patch.
> 
> Cheers,
> -Paul
> 
>> ---
>>  arch/mips/generic/Platform | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>> 
>> diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
>> index e1abc113b409..0c03623f3897 100644
>> --- a/arch/mips/generic/Platform
>> +++ b/arch/mips/generic/Platform
>> @@ -13,8 +13,7 @@ cflags-$(CONFIG_MACH_INGENIC_SOC)	+= 
>> \x7f-I$(srctree)/arch/mips/include/asm/mach-ing
>>  cflags-$(CONFIG_MIPS_GENERIC)	+= 
>> \x7f-I$(srctree)/arch/mips/include/asm/mach-generic
>> 
>>  load-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff80100000
>> -zload-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff81000000
>> -all-$(CONFIG_MIPS_GENERIC)	:= vmlinux.gz.itb
>> +all-$(CONFIG_MIPS_GENERIC)	+= vmlinux.gz.itb
>> 
>>  its-y					:= vmlinux.its.S
>>  its-$(CONFIG_FIT_IMAGE_FDT_BOSTON)	+= board-boston.its.S
>> --
>> 2.30.2
>> 
> 



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

* Re: [RFC] MIPS: fix generic zboot support
  2021-11-08  9:54 ` Paul Cercueil
  2021-11-08 10:21   ` Paul Cercueil
@ 2021-11-08 18:08   ` Jiaxun Yang
  1 sibling, 0 replies; 7+ messages in thread
From: Jiaxun Yang @ 2021-11-08 18:08 UTC (permalink / raw)
  To: Paul Cercueil, YunQiang Su; +Cc: Thomas Bogendoerfer, zhouyanjie, linux-mips



在2021年11月8日十一月 上午9:54,Paul Cercueil写道:
> Hi,
>
> Le ven., nov. 5 2021 at 09:52:32 -0400, YunQiang Su 
> <yunqiang.su@cipunited.com> a écrit :
>> There are 2 problems here:
>> 1. setting zload-y to 0xffffffff81000000 breaks booting on qemu -M 
>> boston.
>>    Why it is set here? Any other platform needs this value?
>
> Is there another place where it should be set?
>
> With this patch applied, kernels won't boot anymore on Ingenic boards.
>
>> 2. vmlinux.gz.itb should be appended to all-$(CONFIG_MIPS_GENERIC) 
>> instead
>>    of replacing. Otherwise, no vmlinuz will be built.
>
> I build vmlinuz all the time, and never needed this patch.

It's because we doesn't use itb on ingenic ;-)

Thanks
- Jiaxun

>
> Cheers,
> -Paul
>
>> ---
>>  arch/mips/generic/Platform | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>> 
>> diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
>> index e1abc113b409..0c03623f3897 100644
>> --- a/arch/mips/generic/Platform
>> +++ b/arch/mips/generic/Platform
>> @@ -13,8 +13,7 @@ cflags-$(CONFIG_MACH_INGENIC_SOC)	+= 
>> -I$(srctree)/arch/mips/include/asm/mach-ing
>>  cflags-$(CONFIG_MIPS_GENERIC)	+= 
>> -I$(srctree)/arch/mips/include/asm/mach-generic
>> 
>>  load-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff80100000
>> -zload-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff81000000
>> -all-$(CONFIG_MIPS_GENERIC)	:= vmlinux.gz.itb
>> +all-$(CONFIG_MIPS_GENERIC)	+= vmlinux.gz.itb
>> 
>>  its-y					:= vmlinux.its.S
>>  its-$(CONFIG_FIT_IMAGE_FDT_BOSTON)	+= board-boston.its.S
>> --
>> 2.30.2
>>

-- 
- Jiaxun

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

* Re: [RFC] MIPS: fix generic zboot support
  2021-11-08 10:21   ` Paul Cercueil
@ 2021-11-08 18:09     ` Jiaxun Yang
  2021-11-09 17:37       ` Paul Cercueil
  0 siblings, 1 reply; 7+ messages in thread
From: Jiaxun Yang @ 2021-11-08 18:09 UTC (permalink / raw)
  To: Paul Cercueil, YunQiang Su; +Cc: Thomas Bogendoerfer, zhouyanjie, linux-mips



在2021年11月8日十一月 上午10:21,Paul Cercueil写道:
> Hi again,
>
> Le lun., nov. 8 2021 at 09:54:38 +0000, Paul Cercueil 
> <paul@crapouillou.net> a écrit :
>> Hi,
>> 
>> Le ven., nov. 5 2021 at 09:52:32 -0400, YunQiang Su 
>> <yunqiang.su@cipunited.com> a écrit :
>>> There are 2 problems here:
>>> 1. setting zload-y to 0xffffffff81000000 breaks booting on qemu -M 
>>> \x7fboston.
>>>    Why it is set here? Any other platform needs this value?
>> 
>> Is there another place where it should be set?
>> 
>> With this patch applied, kernels won't boot anymore on Ingenic boards.
>
> Nevermind - it works, I just needed to adapt my tooling.
>
> However, I think there should still be an option to have a fixed zload 
> address, for the case where you want a vmlinuz.bin.

Hmm how about leave it for Kconfig?

Thanks.

- Jiaxun

>
> Cheers,
> -Paul
>
>>> 2. vmlinux.gz.itb should be appended to all-$(CONFIG_MIPS_GENERIC) 
>>> \x7finstead
>>>    of replacing. Otherwise, no vmlinuz will be built.
>> 
>> I build vmlinuz all the time, and never needed this patch.
>> 
>> Cheers,
>> -Paul
>> 
>>> ---
>>>  arch/mips/generic/Platform | 3 +--
>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>> 
>>> diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
>>> index e1abc113b409..0c03623f3897 100644
>>> --- a/arch/mips/generic/Platform
>>> +++ b/arch/mips/generic/Platform
>>> @@ -13,8 +13,7 @@ cflags-$(CONFIG_MACH_INGENIC_SOC)	+= 
>>> \x7f-I$(srctree)/arch/mips/include/asm/mach-ing
>>>  cflags-$(CONFIG_MIPS_GENERIC)	+= 
>>> \x7f-I$(srctree)/arch/mips/include/asm/mach-generic
>>> 
>>>  load-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff80100000
>>> -zload-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff81000000
>>> -all-$(CONFIG_MIPS_GENERIC)	:= vmlinux.gz.itb
>>> +all-$(CONFIG_MIPS_GENERIC)	+= vmlinux.gz.itb
>>> 
>>>  its-y					:= vmlinux.its.S
>>>  its-$(CONFIG_FIT_IMAGE_FDT_BOSTON)	+= board-boston.its.S
>>> --
>>> 2.30.2
>>> 
>>

-- 
- Jiaxun

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

* Re: [RFC] MIPS: fix generic zboot support
  2021-11-08 18:09     ` Jiaxun Yang
@ 2021-11-09 17:37       ` Paul Cercueil
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Cercueil @ 2021-11-09 17:37 UTC (permalink / raw)
  To: Jiaxun Yang; +Cc: YunQiang Su, Thomas Bogendoerfer, zhouyanjie, linux-mips

Hi,

Le lun., nov. 8 2021 at 18:09:06 +0000, Jiaxun Yang 
<jiaxun.yang@flygoat.com> a écrit :
> 
> 
> 在2021年11月8日十一月 上午10:21,Paul Cercueil写道:
>>  Hi again,
>> 
>>  Le lun., nov. 8 2021 at 09:54:38 +0000, Paul Cercueil
>>  <paul@crapouillou.net> a écrit :
>>>  Hi,
>>> 
>>>  Le ven., nov. 5 2021 at 09:52:32 -0400, YunQiang Su
>>>  <yunqiang.su@cipunited.com> a écrit :
>>>>  There are 2 problems here:
>>>>  1. setting zload-y to 0xffffffff81000000 breaks booting on qemu -M
>>>>  \x7fboston.
>>>>     Why it is set here? Any other platform needs this value?
>>> 
>>>  Is there another place where it should be set?
>>> 
>>>  With this patch applied, kernels won't boot anymore on Ingenic 
>>> boards.
>> 
>>  Nevermind - it works, I just needed to adapt my tooling.
>> 
>>  However, I think there should still be an option to have a fixed 
>> zload
>>  address, for the case where you want a vmlinuz.bin.
> 
> Hmm how about leave it for Kconfig?

Sure, that works.

Cheers,
-Paul



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

end of thread, other threads:[~2021-11-09 17:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 13:52 [RFC] MIPS: fix generic zboot support YunQiang Su
2021-11-05 15:00 ` Jiaxun Yang
2021-11-08  9:54 ` Paul Cercueil
2021-11-08 10:21   ` Paul Cercueil
2021-11-08 18:09     ` Jiaxun Yang
2021-11-09 17:37       ` Paul Cercueil
2021-11-08 18:08   ` Jiaxun Yang

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.