Skip to contentSkip to conversation

tinyprintf: Add vprintf implementation

PATCH New Hans de Goede 3 participants 5 messages Jun 10, 2016 – Jun 12, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tinyprintf: Add vprintf implementation

vprintf is used by panic() which is used in various SPL paths on some boards.

---
 lib/tiny-printf.c | 5 +++++
 1 file changed, 5 insertions(+)
lib/tiny-printf.c +5 -0
index 3c65fc9..451f4f7 100644
@@ -130,6 +130,11 @@ abort:
 	return 0;
 }
 
+int vprintf(const char *fmt, va_list va)
+{
+	return _vprintf(fmt, va, putc);
+}
+
 int printf(const char *fmt, ...)
 {
 	va_list va;
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 sunxi: Select USE_TINY_PRINTF

This gives us a bit more breathing room wrt our SPL size.

---
 arch/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index e75c4c0..4aeb4d2 100644
@@ -611,6 +611,7 @@ config ARCH_SUNXI
 	select USB
 	select USB_STORAGE
 	select USB_KEYBOARD
+	select USE_TINY_PRINTF
 
 config TARGET_TS4800
 	bool "Support TS4800"
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 sunxi: Select USE_TINY_PRINTF

Quoted 3 lines · Hans de Goede

This gives us a bit more breathing room wrt our SPL size.

(and the first one too, FWIW)

Quoted 16 lines

---
?arch/arm/Kconfig | 1 +
?1 file changed, 1 insertion(+)

arch/arm/Kconfig +0 -0
index e75c4c0..4aeb4d2 100644
@@ -611,6 +611,7 @@ config ARCH_SUNXI

? select USB
? select USB_STORAGE
? select USB_KEYBOARD

arch/arm/Kconfig +1 -0
+	select USE_TINY_PRINTF

?
?config TARGET_TS4800
? bool "Support TS4800"