3 MountSDCardAtBoot - norikuro/Armadillo-IoT GitHub Wiki

3. How to mount sd card at every boot

3-1. make mount point.

cd atmark-dist-20160126/romfs/mnt
mkdir sd

3-2. edit fstab.

cd atmark-dist-20160126/vendors/AtmarkTechno/Armadillo-IoTG-Std/etc
vi fstab

append folloing section in fstab file.

/dev/mmcblk0p1		/mnt/sd		vfat	defaults		0 0

save fstab file.

3-3. make start up script.

cd atmark-dist-20160126/vendors/AtmarkTechno/Armadillo-IoTG-Std/etc/init.d
vi mountsd.sh

add following in mountsd.sh

#!/bin/sh
mount -a

3-4. configure Makefile in atmark-dist-20160126/vendors/AtmarkTechno/Armadillo-IoTG-Std directory

cd atmark-dist-20160126/vendors/AtmarkTechno/Armadillo-IoTG-Std
vi Makefile

append $(ROMFSINST) -s /etc/init.d/mountsd.sh /etc/rc.d/S100mountsd.sh after "S99rc.local" section.

important: You need add "tab" before $(ROMFSINST).

        $(ROMFSINST) -s /etc/init.d/misc /etc/rc.d/S99misc
        [ "$(CONFIG_USER_FLATFSD_FLATFSD)" != "y" ] || \
        $(ROMFSINST) -s /etc/init.d/rc.local /etc/rc.d/S99rc.local
        $(ROMFSINST) -s /etc/init.d/mountsd.sh /etc/rc.d/S100mountsd.sh

save Makefile.