[Android Q&A, Help & Troubleshooting] Woozy6839:
Hi all. I'm trying to compile the kernel for my HTC 5G HUB, as a first step in transforming it into a great IoT device.

It has a Snapdragon 855 SOC and runs Android 9.0.

After more than a week of work, I tried out a mostly correct environment and solved most of problems by myself, but there are still some issues that are bothering me.

I'm not expecting anyone to helping me solve problems hand by hand, but just hoping someone experienced in similar devices(Pixel 4; Mi 9; OnePlus 7, etc...) will give me some clues. Thanks!

1. Device Tree Compiler Warning

At the beginning, I got lots of warnings about"Warning (reg_format)" in various of nodes. I managed to resolve these warnings by carefully adding `#address-cells` and `#size-cells` in their parent node. Except for the following two.

Warning (reg_format): "reg" property in /fragment@39/__overlay__/qcom,smb1390@10 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)

Warning (reg_format): "reg" property in /fragment@39/__overlay__/qcom,smb1355@c has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)

Take smb1390 for example, its content is shown as below:

#include <dt-bindings/interrupt-controller/irq.h>

smb1390: qcom,smb1390@10 {
compatible = "qcom,i2c-pmic";
reg = <0x10>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&spmi_bus>;
interrupts = <0x2 0xC5 0x0 IRQ_TYPE_LEVEL_LOW>;
interrupt_names = "smb1390";
interrupt-controller;
#interrupt-cells = <3>;
qcom,periph-map = <0x10>;
status = "disabled";

smb1390_revid: qcom,revid {
compatible = "qcom,qpnp-revid";
reg = <0x100>;
};

smb1390_charger: qcom,charge_pump {
compatible = "qcom,smb1390-charger";
qcom,pmic-revid = <&smb1390_revid>;
interrupt-parent = <&smb1390>;
status = "disabled";

qcom,core {
interrupts = <0x10 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x10 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x10 0x2 IRQ_TYPE_EDGE_BOTH>,
<0x10 0x3 IRQ_TYPE_EDGE_BOTH>,
<0x10 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x10 0x5 IRQ_TYPE_EDGE_RISING>,
<0x10 0x6 IRQ_TYPE_EDGE_RISING>,
<0x10 0x7 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "switcher-off-window",
"switcher-off-fault",
"tsd-fault",
"irev-fault",
"vph-ov-hard",
"vph-ov-soft",
"ilim",
"temp-alarm";
};
};
};

and it is included by sm8150-qrd.dtsi, sm8150-sdx50m-qrd.dtsi and sm8150-mtp.dtsi like this

&qupv3_se4_i2c {
#include "smb1390.dtsi"
#include "smb1355.dtsi"
};

&smb1390 {
pinctrl-names = "default";
pinctrl-0 = <&smb_stat_default>;
status = "ok";
};

&smb1390_charger {
io-channels = <&pm8150b_vadc ADC_AMUX_THM2>;
io-channel-names = "cp_die_temp";
status = "ok";
};

searching qupv3_se4_i2c I got this in sm8150-audio-rt5-xb.dtsi (RTX is the codename of HTC 5G HUB)

&soc{
/* TI config for spk chip */
i2c@890000 { /* qupv3_se4_i2c */
#address-cells = <1>;
#size-cells = <0>;
tas2557s@4c {
...
};
};

};

I believe tas2557s is an unrelated device so I ignored the details of this.

So, where is the problem?

2. vmlinux warning at the end of compilation

WARNING: EXPORT symbol "gsi_write_channel_scratch" [vmlinux] version generation failed, symbol will not be versioned.

Fortunately, they were only warnings instead of errors. So I was still able to complete the entire compilation process.

If these problems are hard to fix easily, I'd like to know if I can safely ignore them.