File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ echo "Running Mer Boat Loader"
2727BOOTLOGO=%BOOTLOGO%
2828ALWAYSDEBUG=%ALWAYSDEBUG%
2929DATA_PARTITION=%DATA_PART%
30+ SYSTEM_PARTITION=$( findfs LABEL=" system" )
3031DEFAULT_OS=%DEFAULT_OS%
3132
3233set_welcome_msg (){
@@ -141,14 +142,27 @@ mount_stowaways() {
141142 if [ ! -z $DATA_PARTITION ]; then
142143 data_subdir=" $( get_opt data_subdir) "
143144
144- mkdir /data
145- mkdir /target
145+ mkdir /data
146+ mkdir /target
146147
147- mount $DATA_PARTITION /data
148- mount /data/rootfs.img /target
148+ mount $DATA_PARTITION /data
149149
150- mkdir -p /target/data # in new fs
151- mount --bind /data/${data_subdir} /target/data
150+ if [ -f /data/rootfs.img ]; then
151+ mount /data/rootfs.img /target
152+ else
153+ if [ ! -z $SYSTEM_PARTITION ]; then
154+ # Mount the system partition as root filesystem
155+ mount $SYSTEM_PARTITION /target
156+
157+ # Refuse to boot android if installed on system partition
158+ if [ -f /target/build.prop ]; then
159+ echo " Refusing to boot android, install a Halium compatible rootfs first!" >> /diagnosis.log
160+ fi
161+ fi
162+ fi
163+
164+ mkdir -p /target/data # in new fs
165+ mount --bind /data/${data_subdir} /target/data
152166 else
153167 echo " Failed to mount /target, device node '$DATA_PARTITION ' not found!" >> /diagnosis.log
154168 fi
You can’t perform that action at this time.
0 commit comments