diff --git a/common/serial.c b/common/serial.c
index c4b111c496cad5e671d2cc87c5764b52ef10a0c4..7423920b9316ca43b693a493361edef186ba9783 100644
--- a/common/serial.c
+++ b/common/serial.c
@@ -32,6 +32,14 @@ DECLARE_GLOBAL_DATA_PTR;
 static struct serial_device *serial_devices;
 static struct serial_device *serial_current;
 
+static void serial_null(void)
+{
+}
+
+#define serial_initfunc(name)					\
+	void name(void)						\
+		__attribute__((weak, alias("serial_null")));
+
 void serial_register(struct serial_device *dev)
 {
 #ifdef CONFIG_NEEDS_MANUAL_RELOC