From 94de881f6c8b8ae213a21216d8778420a0aa0f53 Mon Sep 17 00:00:00 2001 From: Cosmin Gorgovan Date: Tue, 26 Apr 2016 22:26:33 +0100 Subject: [PATCH] Expose the internal storage partition as an USB mass storage block --- build_rootfs.sh | 5 ++++- files/rc.local | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 files/rc.local diff --git a/build_rootfs.sh b/build_rootfs.sh index 5dec6e2..0df0910 100755 --- a/build_rootfs.sh +++ b/build_rootfs.sh @@ -75,8 +75,11 @@ config_rootfs() { mkdir ./rootfs/mnt/onboard mkdir ./rootfs/mnt/external cp files/fstab rootfs/etc/ - chown root:root rootfs/etc/fstab + cp files/rc.local rootfs/etc/ + + chown root:root rootfs/etc/fstab rootfs/etc/rc.local chmod 644 rootfs/etc/fstab + chmod 755 rootfs/etc/rc.local echo "Configuration done." } diff --git a/files/rc.local b/files/rc.local new file mode 100755 index 0000000..f59a670 --- /dev/null +++ b/files/rc.local @@ -0,0 +1,6 @@ +#!/bin/sh -e + +depmod -a +modprobe g_file_storage file=/dev/mmcblk0p3 + +exit 0