Support uncompress debug message for multiplatform build
Subsystems (2)
cover Support uncompress debug message for multiplatform build
After moving i.MX to multiplatform build, I hear people complaining that it's bad to lose the uncompress debug message, because not only does it mean that we will never see message "Uncompressing Linux... done, booting the kernel.", but also that the debug facility in arch/arm/boot/compressed/head.S outputs nothing even DEBUG is turned on.
The series follows the approach handling DEBUG_LL to create a Kconfig symbol CONFIG_UNCOMPRESS_INCLUDE for choosing the correct uncompress header. For traditional build, mach/uncompress.h will be included in arch/arm/boot/compressed/misc.c, and nothing changes than before. For multiplatform build with none DEBUG_LL port enabled, a set of empty functions defined in debug/uncompress/dummy.h will be used. And for multiplatform build with a DEBUG_LL port, platform specific uncompress header like debug/uncompress/imx.h will come to play.
Different from traditional build that uncompress output and DEBUG_LL are two separate pieces, for multiplatform build uncompress output becomes a subset of DEBUG_LL and relies on DEBUG_LL to select the uart port, so it only works when DEBUG_LL is enabled. I think it's an acceptable compromise to have the uncompress debug facility back.
Shawn Guo (4):
ARM: imx: use separated debug uart symbol for imx31 and imx35
ARM: imx: support DEBUG_LL uart port selection for all i.MX SoCs
ARM: imx: restore uncompress.h to a common place
ARM: uncompress: support uncompress debug for multiplatform build
arch/arm/Kconfig.debug | 44 ++++++++++++--- arch/arm/boot/compressed/misc.c | 8 +-- arch/arm/include/debug/imx-uart.h | 88 +++++++++++++++++++++++++++++ arch/arm/include/debug/imx.S | 29 +--------- arch/arm/include/debug/uncompress/dummy.h | 3 + arch/arm/include/debug/uncompress/imx.h | 63 +++++++++++++++++++++ 6 files changed, 191 insertions(+), 44 deletions(-) create mode 100644 arch/arm/include/debug/imx-uart.h create mode 100644 arch/arm/include/debug/uncompress/dummy.h create mode 100644 arch/arm/include/debug/uncompress/imx.h
Signature · 1 line
1.7.9.5
PATCH 1/4 ARM: imx: use separated debug uart symbol for imx31 and imx35
It's improper to use combined symbol DEBUG_IMX31_IMX35_UART for imx31 and imx35, because imx31 has 5 UARTs while imx35 only has 3. So later when we add UART port selection for DEBUG_IMX31_IMX35_UART, we will have problem.
Use separated Kconfig options for imx31 and imx35 debug uart selection.
--- arch/arm/Kconfig.debug | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
arch/arm/Kconfig.debug +13 -5
@@ -205,12 +205,19 @@ choice Say Y here if you want kernel low-level debugging support on i.MX28. - config DEBUG_IMX31_IMX35_UART - bool "i.MX31 and i.MX35 Debug UART" - depends on SOC_IMX31 || SOC_IMX35 + config DEBUG_IMX31_UART + bool "i.MX31 Debug UART" + depends on SOC_IMX31 help Say Y here if you want kernel low-level debugging support - on i.MX31 or i.MX35. + on i.MX31. + + config DEBUG_IMX35_UART + bool "i.MX35 Debug UART" + depends on SOC_IMX35 + help + Say Y here if you want kernel low-level debugging support + on i.MX35. config DEBUG_IMX51_UART bool "i.MX51 Debug UART"
@@ -495,7 +502,8 @@ config DEBUG_LL_INCLUDE default "debug/imx.S" if DEBUG_IMX1_UART || \ DEBUG_IMX25_UART || \ DEBUG_IMX21_IMX27_UART || \ - DEBUG_IMX31_IMX35_UART || \ + DEBUG_IMX31_UART || \ + DEBUG_IMX35_UART || \ DEBUG_IMX51_UART || \ DEBUG_IMX50_IMX53_UART ||\ DEBUG_IMX6Q_UART
Signature · 1 line
1.7.9.5
PATCH 2/4 ARM: imx: support DEBUG_LL uart port selection for all i.MX SoCs
In reply to Shawn GuoExtend imx6q DEBUG_LL uart port selection support to cover all i.MX SoCs. The 'range' of the Kconfig option gets dropped, as users looking at the option must know the uart number on his board. The bottom line is that the build system will report an error if an invalid port number is picked for given SoC.
The header arch/arm/include/debug/imx-uart.h is created to accommodate all the uart base addresses. And the header will also be used for other low-level debug facility later.
--- arch/arm/Kconfig.debug | 13 ++++-- arch/arm/include/debug/imx-uart.h | 88 +++++++++++++++++++++++++++++++++++++ arch/arm/include/debug/imx.S | 29 +----------- 3 files changed, 98 insertions(+), 32 deletions(-) create mode 100644 arch/arm/include/debug/imx-uart.h
arch/arm/Kconfig.debug +9 -4
@@ -457,11 +457,16 @@ choice endchoice -config DEBUG_IMX6Q_UART_PORT - int "i.MX6Q Debug UART Port (1-5)" if DEBUG_IMX6Q_UART - range 1 5 +config DEBUG_IMX_UART_PORT + int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ + DEBUG_IMX25_UART || \ + DEBUG_IMX21_IMX27_UART || \ + DEBUG_IMX31_UART || \ + DEBUG_IMX35_UART || \ + DEBUG_IMX51_UART || \ + DEBUG_IMX50_IMX53_UART || \ + DEBUG_IMX6Q_UART default 1 - depends on SOC_IMX6Q help Choose UART port on which kernel low-level debug messages should be output.
arch/arm/include/debug/imx-uart.h new file +88 -0
88 lines not on this page · raw message
arch/arm/include/debug/imx.S +1 -28
@@ -10,35 +10,8 @@ * published by the Free Software Foundation. * */ -#define IMX6Q_UART1_BASE_ADDR 0x02020000 -#define IMX6Q_UART2_BASE_ADDR 0x021e8000 -#define IMX6Q_UART3_BASE_ADDR 0x021ec000 -#define IMX6Q_UART4_BASE_ADDR 0x021f0000 -#define IMX6Q_UART5_BASE_ADDR 0x021f4000 -/* - * IMX6Q_UART_BASE_ADDR is put in the middle to force the expansion - * of IMX6Q_UART##n##_BASE_ADDR. - */ -#define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR -#define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n) -#define IMX6Q_DEBUG_UART_BASE IMX6Q_UART_BASE(CONFIG_DEBUG_IMX6Q_UART_PORT) - -#ifdef CONFIG_DEBUG_IMX1_UART -#define UART_PADDR 0x00206000 -#elif defined (CONFIG_DEBUG_IMX25_UART) -#define UART_PADDR 0x43f90000 -#elif defined (CONFIG_DEBUG_IMX21_IMX27_UART) -#define UART_PADDR 0x1000a000 -#elif defined (CONFIG_DEBUG_IMX31_IMX35_UART) -#define UART_PADDR 0x43f90000 -#elif defined (CONFIG_DEBUG_IMX51_UART) -#define UART_PADDR 0x73fbc000 -#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART) -#define UART_PADDR 0x53fbc000 -#elif defined (CONFIG_DEBUG_IMX6Q_UART) -#define UART_PADDR IMX6Q_DEBUG_UART_BASE -#endif +#include "imx-uart.h" /* * FIXME: This is a copy of IMX_IO_P2V in hardware.h, and needs to
Signature · 1 line
1.7.9.5
PATCH 2/4 ARM: imx: support DEBUG_LL uart port selection for all i.MX SoCs
Quoted 30 lines · Shawn Guo
Extend imx6q
DEBUG_LLuart port selection support to cover all i.MX SoCs. The 'range' of theKconfigoption gets dropped, as users looking at the option must know the uart number on his board. The bottom line is that the build system will report an error if an invalid port number is picked for given SoC.The header
arch/arm/include/debug/imx-uart.his created to accommodate all the uart base addresses. And the header will also be used for other low-level debug facility later.Signed-off-by Shawn Guo <[email protected]>--- arch/arm/Kconfig.debug | 13 ++++-- arch/arm/include/debug/imx-uart.h | 88 +++++++++++++++++++++++++++++++++++++ arch/arm/include/debug/imx.S | 29 +----------- 3 files changed, 98 insertions(+), 32 deletions(-) create mode 100644 arch/arm/include/debug/imx-uart.harch/arm/Kconfig.debug +1
-3@@ -457,11 +457,16 @@ choice endchoice -config DEBUG_IMX6Q_UART_PORT - int "i.MX6Q Debug UART Port (1-5)" if DEBUG_IMX6Q_UART - range 1 5 +config DEBUG_IMX_UART_PORT
arch/arm/Kconfig.debug choice · line 464
Quoted 10 lines
arch/arm/Kconfig.debug +8
-1+ int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ + DEBUG_IMX25_UART || \ + DEBUG_IMX21_IMX27_UART || \ + DEBUG_IMX31_UART || \ + DEBUG_IMX35_UART || \ + DEBUG_IMX51_UART || \ + DEBUG_IMX50_IMX53_UART || \ + DEBUG_IMX6Q_UART default 1 - depends on SOC_IMX6Q
After removing any dependency everybody gets a DEBUG_IMX_UART_PORT in their config now.
Karl
PATCH 2/4 ARM: imx: support DEBUG_LL uart port selection for all i.MX SoCs
Quoted 9 lines · Karl Beldan
Quoted 9 lines
arch/arm/Kconfig.debug +6
-3-config DEBUG_IMX6Q_UART_PORT - int "i.MX6Q Debug UART Port (1-5)" if DEBUG_IMX6Q_UART - range 1 5 +config DEBUG_IMX_UART_PORT + int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ + DEBUG_IMX25_UART || \ + DEBUG_IMX21_IMX27_UART || \ + DEBUG_IMX31_UART || \ + DEBUG_IMX35_UART || \
Quoted 9 lines
arch/arm/Kconfig.debug choice · line 464
Quoted 5 lines
arch/arm/Kconfig.debug +3
-1+ DEBUG_IMX51_UART || \ + DEBUG_IMX50_IMX53_UART || \ + DEBUG_IMX6Q_UART default 1 - depends on SOC_IMX6QAfter removing any dependency everybody gets a
DEBUG_IMX_UART_PORTin their config now.
Right, this is something undesirable. Will fix it. Thanks for reporting, Karl.
Shawn
PATCH 3/4 ARM: imx: restore uncompress.h to a common place
In reply to Shawn GuoRestore arch/arm/plat-mxc/include/mach/uncompress.h removed by commit 3995eb8 (ARM: imx: merge plat-mxc into mach-imx) to a common place as arch/arm/include/debug/uncompress/imx.h.
--- arch/arm/include/debug/uncompress/imx.h | 132 +++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 arch/arm/include/debug/uncompress/imx.h
arch/arm/include/debug/uncompress/imx.h new file +132 -0
@@ -0,0 +1,132 @@ +/* +* arch/arm/plat-mxc/include/mach/uncompress.h +* +* Copyright (C) 1999 ARM Limited +* Copyright (C) Shane Nay (shane at minirl.com) +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ +#ifndef __ASM_ARCH_MXC_UNCOMPRESS_H__ +#define __ASM_ARCH_MXC_UNCOMPRESS_H__ + +#define __MXC_BOOT_UNCOMPRESS + +#include <asm/mach-types.h> + +unsigned long uart_base; + +#define UART (x) (*(volatile unsigned long *)(uart_base + (x))) + +#define USR2 0x98 +#define USR2_TXFE (1<<14) +#define TXR 0x40 +#define UCR1 0x80 +#define UCR1_UARTEN 1 + +/* +* The following code assumes the serial port has already been +* initialized by the bootloader. We search for the first enabled +* port in the most probable order. If you didn't setup a port in +* your bootloader then nothing will appear (which might be desired). +* +* This does not append a newline +*/ + +static void putc (int ch) +{ +if (!uart_base) +return ; +if (!(UART (UCR1 ) &UCR1_UARTEN )) +return ; + +while (!(UART (USR2 ) &USR2_TXFE )) +barrier (); + +UART (TXR ) = ch; +} + +static inline void flush (void ) +{ +} + +#define MX1_UART1_BASE_ADDR 0x00206000 +#define MX25_UART1_BASE_ADDR 0x43f90000 +#define MX2X_UART1_BASE_ADDR 0x1000a000 +#define MX3X_UART1_BASE_ADDR 0x43F90000 +#define MX3X_UART2_BASE_ADDR 0x43F94000 +#define MX3X_UART5_BASE_ADDR 0x43FB4000 +#define MX51_UART1_BASE_ADDR 0x73fbc000 +#define MX50_UART1_BASE_ADDR 0x53fbc000 +#define MX53_UART1_BASE_ADDR 0x53fbc000 + +static __inline__void __arch_decomp_setup (unsigned long arch_id) +{ +switch (arch_id) { +case MACH_TYPE_MX1ADS : +case MACH_TYPE_SCB9328 : + uart_base =MX1_UART1_BASE_ADDR ; +break ; +case MACH_TYPE_MX25_3DS : + uart_base =MX25_UART1_BASE_ADDR ; +break ; +case MACH_TYPE_IMX27LITE : +case MACH_TYPE_MX27_3DS : +case MACH_TYPE_MX27ADS : +case MACH_TYPE_PCM038 : +case MACH_TYPE_MX21ADS : +case MACH_TYPE_PCA100 : +case MACH_TYPE_MXT_TD60 : +case MACH_TYPE_IMX27IPCAM : + uart_base =MX2X_UART1_BASE_ADDR ; +break ; +case MACH_TYPE_MX31LITE : +case MACH_TYPE_ARMADILLO5X0 : +case MACH_TYPE_MX31MOBOARD : +case MACH_TYPE_QONG : +case MACH_TYPE_MX31_3DS : +case MACH_TYPE_PCM037 : +case MACH_TYPE_MX31ADS : +case MACH_TYPE_MX35_3DS : +case MACH_TYPE_PCM043 : +case MACH_TYPE_LILLY1131 : +case MACH_TYPE_VPR200 : +case MACH_TYPE_EUKREA_CPUIMX35SD : + uart_base =MX3X_UART1_BASE_ADDR ; +break ; +case MACH_TYPE_MAGX_ZN5 : + uart_base =MX3X_UART2_BASE_ADDR ; +break ; +case MACH_TYPE_BUG : + uart_base =MX3X_UART5_BASE_ADDR ; +break ; +case MACH_TYPE_MX51_BABBAGE : +case MACH_TYPE_EUKREA_CPUIMX51SD : +case MACH_TYPE_MX51_3DS : + uart_base =MX51_UART1_BASE_ADDR ; +break ; +case MACH_TYPE_MX50_RDP : + uart_base =MX50_UART1_BASE_ADDR ; +break ; +case MACH_TYPE_MX53_EVK : +case MACH_TYPE_MX53_LOCO : +case MACH_TYPE_MX53_SMD : +case MACH_TYPE_MX53_ARD : + uart_base =MX53_UART1_BASE_ADDR ; +break ; +default : +break ; + } +} + +#define arch_decomp_setup () __arch_decomp_setup(arch_id) +#define arch_decomp_wdog () + +#endif /* __ASM_ARCH_MXC_UNCOMPRESS_H__ */
Signature · 1 line
1.7.9.5
PATCH 3/4 ARM: imx: restore uncompress.h to a common place
Quoted 6 lines · Shawn Guo
Restore
arch/arm/plat-mxc/include/mach/uncompress.hremoved by commit 3995eb8 (ARM: imx: merge plat-mxc into mach-imx) to a common place asarch/arm/include/debug/uncompress/imx.h.Signed-off-by Shawn Guo <[email protected]>---
...
Quoted 1 line
+++
b/arch/arm/include/debug/uncompress/imx.h
...
Quoted 1 line
+ *
arch/arm/plat-mxc/include/mach/uncompress.h
In case you touch these patches again, you might check if the above path and file name in the file header should be adapted to the new file location, too.
Best regards
Dirk
PATCH 3/4 ARM: imx: restore uncompress.h to a common place
Quoted 7 lines · Dirk Behme
Quoted 6 lines · Shawn Guo
Restore
arch/arm/plat-mxc/include/mach/uncompress.hremoved by commit 3995eb8 (ARM: imx: merge plat-mxc into mach-imx) to a common place asarch/arm/include/debug/uncompress/imx.h.Signed-off-by Shawn Guo <[email protected]>---
Quoted 9 lines
...
Quoted 1 line
+++
b/arch/arm/include/debug/uncompress/imx.h...
Quoted 1 line
+ *
arch/arm/plat-mxc/include/mach/uncompress.hIn case you touch these patches again, you might check if the above path and file name in the file header should be adapted to the new file location, too.
I would not bother to update that. To me, it's quite pointless to have a full file name there. If I can choose, I would remove it completely.
Shawn
PATCH 3/4 ARM: imx: restore uncompress.h to a common place
Quoted 8 lines · Shawn Guo
Quoted 4 lines · Dirk Behme
In case you touch these patches again, you might check if the above path and file name in the file header should be adapted to the new file location, too.
I would not bother to update that. To me, it's quite pointless to have a full file name there. If I can choose, I would remove it completely.
I agree, they tend to all get wrong over time. It's not worth removing those statements all at once, but I also remove them when moving files and I remember.
Arnd
PATCH 4/4 ARM: uncompress: support uncompress debug for multiplatform build
In reply to Shawn GuoWhen moving to multiplatform build, platforms lose the output from decompressor. Not only does it mean that we will never see message "Uncompressing Linux... done, booting the kernel.", but also that the debug facility in arch/arm/boot/compressed/head.S outputs nothing even DEBUG is turned on.
The patch follows the approach handling DEBUG_LL to create a Kconfig symbol CONFIG_UNCOMPRESS_INCLUDE for choosing the correct uncompress header. For traditional build, mach/uncompress.h will be included in arch/arm/boot/compressed/misc.c. For multiplatform build with none DEBUG_LL port enabled, debug/uncompress/dummy.h will be used. And for multiplatform build with a DEBUG_LL port, platform specific uncompress header like debug/uncompress/imx.h will come to play.
Different from traditional build that uncompress output and DEBUG_LL are two separated pieces, for multiplatform build uncompress output becomes a subset of DEBUG_LL and will not work unless DEBUG_LL is enabled.
The arch/arm/include/debug/uncompress/imx.h is cleaned up and added here as an example to show how this approach works.
--- arch/arm/Kconfig.debug | 13 +++++ arch/arm/boot/compressed/misc.c | 8 +-- arch/arm/include/debug/uncompress/dummy.h | 3 ++ arch/arm/include/debug/uncompress/imx.h | 75 ++--------------------------- 4 files changed, 20 insertions(+), 79 deletions(-) create mode 100644 arch/arm/include/debug/uncompress/dummy.h
arch/arm/Kconfig.debug +13 -0
@@ -523,6 +523,19 @@ config DEBUG_LL_INCLUDE default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 default "mach/debug-macro.S" +config UNCOMPRESS_INCLUDE + string + default "debug/uncompress/imx.h" if DEBUG_IMX1_UART || \ + DEBUG_IMX25_UART || \ + DEBUG_IMX21_IMX27_UART || \ + DEBUG_IMX31_UART || \ + DEBUG_IMX35_UART || \ + DEBUG_IMX51_UART || \ + DEBUG_IMX50_IMX53_UART || \ + DEBUG_IMX6Q_UART + default "debug/uncompress/dummy.h" if ARCH_MULTIPLATFORM + default "mach/uncompress.h" + config EARLY_PRINTK bool "Early printk" depends on DEBUG_LL
arch/arm/boot/compressed/misc.c +1 -7
@@ -25,13 +25,7 @@ unsigned int __machine_arch_type;static void putstr (const char *ptr);extern void error (char *x); -#ifdef CONFIG_ARCH_MULTIPLATFORM -static inline void putc (int c) {} -static inline void flush (void ) {} -static inline void arch_decomp_setup (void ) {} -#else -#include <mach/uncompress.h> -#endif +#include CONFIG_UNCOMPRESS_INCLUDE #ifdef CONFIG_DEBUG_ICEDCC
arch/arm/include/debug/uncompress/dummy.h new file +3 -0
@@ -0,0 +1,3 @@ +static inline void putc (int c) {} +static inline void flush (void ) {} +static inline void arch_decomp_setup (void ) {}
arch/arm/include/debug/uncompress/imx.h +3 -72
88 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 4/4 ARM: uncompress: support uncompress debug for multiplatform build
Hi,
Quoted 14 lines · Shawn Guo
When moving to multiplatform build, platforms lose the output from decompressor. Not only does it mean that we will never see message "Uncompressing Linux... done, booting the kernel.", but also that the debug facility in
arch/arm/boot/compressed/head.Soutputs nothing even DEBUG is turned on.The patch follows the approach handling
DEBUG_LLto create aKconfigsymbolCONFIG_UNCOMPRESS_INCLUDEfor choosing the correct uncompress header. For traditional build,mach/uncompress.hwill be included inarch/arm/boot/compressed/misc.c. For multiplatform build with noneDEBUG_LLport enabled,debug/uncompress/dummy.hwill be used. And for multiplatform build with aDEBUG_LLport, platform specific uncompress header likedebug/uncompress/imx.hwill come to play.
Quoted 7 lines
Different from traditional build that uncompress output and
DEBUG_LLare two separated pieces, for multiplatform build uncompress output becomes a subset ofDEBUG_LLand will not work unlessDEBUG_LLis enabled.The
arch/arm/include/debug/uncompress/imx.his cleaned up and added here as an example to show how this approach works.
Since this requires you to define a debug uart to get uncompress output, it would make more sense to do a generic wrapper that uses the debug code generically, instead of having to add this kind of wrapper for every platform. That would solve it for all of them at once.
-Olof
PATCH 4/4 ARM: uncompress: support uncompress debug for multiplatform build
Quoted 22 lines · Olof Johansson
Hi,
Quoted 19 lines · Shawn Guo
When moving to multiplatform build, platforms lose the output from decompressor. Not only does it mean that we will never see message "Uncompressing Linux... done, booting the kernel.", but also that the debug facility in
arch/arm/boot/compressed/head.Soutputs nothing even DEBUG is turned on.The patch follows the approach handling
DEBUG_LLto create aKconfigsymbolCONFIG_UNCOMPRESS_INCLUDEfor choosing the correct uncompress header. For traditional build,mach/uncompress.hwill be included inarch/arm/boot/compressed/misc.c. For multiplatform build with noneDEBUG_LLport enabled,debug/uncompress/dummy.hwill be used. And for multiplatform build with aDEBUG_LLport, platform specific uncompress header likedebug/uncompress/imx.hwill come to play.Different from traditional build that uncompress output and
DEBUG_LLare two separated pieces, for multiplatform build uncompress output becomes a subset ofDEBUG_LLand will not work unlessDEBUG_LLis enabled.
Quoted 8 lines
Quoted 2 lines
The
arch/arm/include/debug/uncompress/imx.his cleaned up and added here as an example to show how this approach works.Since this requires you to define a debug uart to get uncompress output, it would make more sense to do a generic wrapper that uses the debug code generically, instead of having to add this kind of wrapper for every platform. That would solve it for all of them at once.
I'm not entirely sure about what you mean here. Can you please elaborate that generic wrapper in your mind a little bit?
Shawn
PATCH 4/4 ARM: uncompress: support uncompress debug for multiplatform build
Quoted 26 lines · Shawn Guo
Quoted 25 lines · Olof Johansson
Hi,
Quoted 21 lines · Shawn Guo
When moving to multiplatform build, platforms lose the output from decompressor. Not only does it mean that we will never see message "Uncompressing Linux... done, booting the kernel.", but also that the debug facility in
arch/arm/boot/compressed/head.Soutputs nothing even DEBUG is turned on.The patch follows the approach handling
DEBUG_LLto create aKconfigsymbolCONFIG_UNCOMPRESS_INCLUDEfor choosing the correct uncompress header. For traditional build,mach/uncompress.hwill be included inarch/arm/boot/compressed/misc.c. For multiplatform build with noneDEBUG_LLport enabled,debug/uncompress/dummy.hwill be used. And for multiplatform build with aDEBUG_LLport, platform specific uncompress header likedebug/uncompress/imx.hwill come to play.Different from traditional build that uncompress output and
DEBUG_LLare two separated pieces, for multiplatform build uncompress output becomes a subset ofDEBUG_LLand will not work unlessDEBUG_LLis enabled.The
arch/arm/include/debug/uncompress/imx.his cleaned up and added here as an example to show how this approach works.
Quoted 7 lines
Quoted 5 lines
Since this requires you to define a debug uart to get uncompress output, it would make more sense to do a generic wrapper that uses the debug code generically, instead of having to add this kind of wrapper for every platform. That would solve it for all of them at once.
I'm not entirely sure about what you mean here. Can you please elaborate that generic wrapper in your mind a little bit?
Hi,
Sorry for the delay in responding.
Most functionality to deal with this already exist in the include/debug/*.S files files, you just need to instantiate the macros somewhere (compressed/head.S, or a separate file), and wrap the calls to those instantiated assembly functions in a generic header file.
That way, every platform that has a DEBUG_LL implementation should be able to reuse that, and no need to enable every platform one by one.
Or am I missing some complexity involved here?
-Olof
PATCH 4/4 ARM: uncompress: support uncompress debug for multiplatform build
Quoted 8 lines · Olof Johansson
Most functionality to deal with this already exist in the
include/debug/*.Sfiles files, you just need to instantiate the macros somewhere (compressed/head.S, or a separate file), and wrap the calls to those instantiated assembly functions in a generic header file.That way, every platform that has a
DEBUG_LLimplementation should be able to reuse that, and no need to enable every platform one by one.
Ok, got your point. I'm working on a solution as what you suggest here. So please ignore that pull request I sent.
Shawn