* [PATCH 1/2] MIPS: enable both vmlinux.gz.itb and vmlinuz for generic
@ 2021-12-22 13:43 YunQiang Su
2021-12-22 13:43 ` [PATCH 2/2] MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS YunQiang Su
2022-01-02 13:26 ` [PATCH 1/2] MIPS: enable both vmlinux.gz.itb and vmlinuz for generic Thomas Bogendoerfer
0 siblings, 2 replies; 4+ messages in thread
From: YunQiang Su @ 2021-12-22 13:43 UTC (permalink / raw
To: linux-mips
Cc: tsbogend, paul, zhouyanjie, jiaxun.yang, syq, aaro.koskinen,
YunQiang Su
vmlinux.gz.itb should be appended to all-$(CONFIG_MIPS_GENERIC)
instead of replacing. Otherwise, no vmlinuz will be built.
Signed-off-by: YunQiang Su <yunqiang.su@cipunited.com>
---
arch/mips/generic/Platform | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
index e1abc113b409..d7c8cff6de2c 100644
--- a/arch/mips/generic/Platform
+++ b/arch/mips/generic/Platform
@@ -14,7 +14,7 @@ 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] 4+ messages in thread
* [PATCH 2/2] MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS
2021-12-22 13:43 [PATCH 1/2] MIPS: enable both vmlinux.gz.itb and vmlinuz for generic YunQiang Su
@ 2021-12-22 13:43 ` YunQiang Su
2022-01-02 13:26 ` Thomas Bogendoerfer
2022-01-02 13:26 ` [PATCH 1/2] MIPS: enable both vmlinux.gz.itb and vmlinuz for generic Thomas Bogendoerfer
1 sibling, 1 reply; 4+ messages in thread
From: YunQiang Su @ 2021-12-22 13:43 UTC (permalink / raw
To: linux-mips
Cc: tsbogend, paul, zhouyanjie, jiaxun.yang, syq, aaro.koskinen,
YunQiang Su
If this option is not 0x0, it will be used for zboot load address.
Otherwise, the result of calc_vmlinuz_load_addr will be used.
The zload-y value for generic are also removed then, as the current
value breaks booting on qemu -M boston.
The result of calc_vmlinuz_load_addr works well for most of cases.
The default value of bcm47xx keeps as it currently.
Signed-off-by: YunQiang Su <yunqiang.su@cipunited.com>
---
arch/mips/Kconfig | 10 ++++++++++
arch/mips/bcm47xx/Platform | 1 -
arch/mips/boot/compressed/Makefile | 4 ++++
arch/mips/generic/Platform | 1 -
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index d6898c7e2cb8..610cb7d36967 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2114,6 +2114,16 @@ config MIPS_VA_BITS_48
If unsure, say N.
+config ZBOOT_LOAD_ADDRESS
+ hex "Compressed kernel load address"
+ default 0xffffffff80400000 if BCM47XX
+ default 0x0
+ depends on SYS_SUPPORTS_ZBOOT
+ help
+ The address to load compressed kernel, aka vmlinuz.
+
+ This is only used if non-zero.
+
choice
prompt "Kernel page size"
default PAGE_SIZE_4KB
diff --git a/arch/mips/bcm47xx/Platform b/arch/mips/bcm47xx/Platform
index 833b204fe5da..fe6daba3f948 100644
--- a/arch/mips/bcm47xx/Platform
+++ b/arch/mips/bcm47xx/Platform
@@ -4,4 +4,3 @@
cflags-$(CONFIG_BCM47XX) += \
-I$(srctree)/arch/mips/include/asm/mach-bcm47xx
load-$(CONFIG_BCM47XX) := 0xffffffff80001000
-zload-$(CONFIG_BCM47XX) += 0xffffffff80400000
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index f27cf31b4140..85d5082db917 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -89,6 +89,10 @@ HOSTCFLAGS_calc_vmlinuz_load_addr.o += $(LINUXINCLUDE)
# Calculate the load address of the compressed kernel image
hostprogs := calc_vmlinuz_load_addr
+ifneq (0x0,$(CONFIG_ZBOOT_LOAD_ADDRESS))
+zload-y = $(CONFIG_ZBOOT_LOAD_ADDRESS)
+endif
+
ifneq ($(zload-y),)
VMLINUZ_LOAD_ADDRESS := $(zload-y)
else
diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
index d7c8cff6de2c..0c03623f3897 100644
--- a/arch/mips/generic/Platform
+++ b/arch/mips/generic/Platform
@@ -13,7 +13,6 @@ 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
its-y := vmlinux.its.S
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] MIPS: enable both vmlinux.gz.itb and vmlinuz for generic
2021-12-22 13:43 [PATCH 1/2] MIPS: enable both vmlinux.gz.itb and vmlinuz for generic YunQiang Su
2021-12-22 13:43 ` [PATCH 2/2] MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS YunQiang Su
@ 2022-01-02 13:26 ` Thomas Bogendoerfer
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2022-01-02 13:26 UTC (permalink / raw
To: YunQiang Su; +Cc: linux-mips, paul, zhouyanjie, jiaxun.yang, syq, aaro.koskinen
On Wed, Dec 22, 2021 at 01:43:45PM +0000, YunQiang Su wrote:
> vmlinux.gz.itb should be appended to all-$(CONFIG_MIPS_GENERIC)
> instead of replacing. Otherwise, no vmlinuz will be built.
>
> Signed-off-by: YunQiang Su <yunqiang.su@cipunited.com>
> ---
> arch/mips/generic/Platform | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
> index e1abc113b409..d7c8cff6de2c 100644
> --- a/arch/mips/generic/Platform
> +++ b/arch/mips/generic/Platform
> @@ -14,7 +14,7 @@ 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
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS
2021-12-22 13:43 ` [PATCH 2/2] MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS YunQiang Su
@ 2022-01-02 13:26 ` Thomas Bogendoerfer
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2022-01-02 13:26 UTC (permalink / raw
To: YunQiang Su; +Cc: linux-mips, paul, zhouyanjie, jiaxun.yang, syq, aaro.koskinen
On Wed, Dec 22, 2021 at 01:43:46PM +0000, YunQiang Su wrote:
> If this option is not 0x0, it will be used for zboot load address.
> Otherwise, the result of calc_vmlinuz_load_addr will be used.
>
> The zload-y value for generic are also removed then, as the current
> value breaks booting on qemu -M boston.
> The result of calc_vmlinuz_load_addr works well for most of cases.
>
> The default value of bcm47xx keeps as it currently.
>
> Signed-off-by: YunQiang Su <yunqiang.su@cipunited.com>
> ---
> arch/mips/Kconfig | 10 ++++++++++
> arch/mips/bcm47xx/Platform | 1 -
> arch/mips/boot/compressed/Makefile | 4 ++++
> arch/mips/generic/Platform | 1 -
> 4 files changed, 14 insertions(+), 2 deletions(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-02 13:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-22 13:43 [PATCH 1/2] MIPS: enable both vmlinux.gz.itb and vmlinuz for generic YunQiang Su
2021-12-22 13:43 ` [PATCH 2/2] MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS YunQiang Su
2022-01-02 13:26 ` Thomas Bogendoerfer
2022-01-02 13:26 ` [PATCH 1/2] MIPS: enable both vmlinux.gz.itb and vmlinuz for generic Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).