Hi WayneWWW,
I did not yet implement auto-mount-sd-card-on-startup by changing fstab. I plan to have a script (do not have it yet) which before running my startup application would mount the /dev/mmcblkp1 (sd card partition) at $HOME/sd_card
location. But at the moment I do this manually. It seems the sd card mounting works, but the device takes a long time to boot when the sd card is kept inserted. Here’s the output of systemd-analyze time
:
Startup finished in 11.261s (kernel) + 2.454s (userspace) = 13.715s
multi-user.target reached after 2.423s in userspace
However, I noticed that after power on from a completely powered off state, it takes around 2 min 45 seconds to boot.
The reboot command is however faster, happens in 30 seconds! Similar to the case when no SD card is inserted, and irrespective of whether the SD card patch is applied or not.
Could you shed some light on what might be happening here?
Since the kernel code was modified owing to an additional driver I am using, I had to change the patch slightly. Please find it below.
diff --git a/hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-p2530-common.dtsi b/hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-p2530-common.dtsi
--- a/hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-p2530-common.dtsi 2019-09-18 13:21:25.000000000 +0200
+++ b/hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-p2530-common.dtsi 2019-09-18 13:26:22.723470000 +0200
@@ -131,7 +131,7 @@
uhs-mask = <0x1c>;
power-off-rail;
nvidia,update-pinctrl-settings;
- status = "disabled";
+ status = "okay";
};
sdhci@700b0200 {
diff --git a/hardware/nvidia/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi b/hardware/nvidia/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi
--- a/hardware/nvidia/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi 2019-09-18 13:21:25.000000000 +0200
+++ b/hardware/nvidia/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi 2019-09-18 13:28:08.251948000 +0200
@@ -313,7 +313,8 @@
override@1 {
target = <&sdhci2>;
_overlay_ {
- vmmc-supply = <&max77620_ldo6>;
+ status = "okay";
+ vqmmc-supply = <&max77620_ldo6>;
no-sdio;
no-mmc;
sd-uhs-sdr104;
diff --git a/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi b/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
--- a/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi 2019-09-18 13:21:25.000000000 +0200
+++ b/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi 2019-09-18 13:30:00.344454000 +0200
@@ -250,9 +250,14 @@
};
sdhci@700b0400 {
- status = "disabled";
+ status = "okay";
/delete-property/ keep-power-in-suspend;
/delete-property/ non-removable;
+ mmc-ddr-1_8v;
+ mmc-ocr-mask = <3>;
+ uhs-mask = <0x0>;
+ max-clk-limit = <400000>;
+ tap-delay = <3>;
};
sdhci@700b0200 { /* SDMMC2 for Wifi */
P.S. I still boot from the internal flash memory and plan to use the SD card to store data which my startup application generates on specific conditions.