我装的是这版本的 Ubuntu
现在u盘重新刷入ubuntu系统,然后可以从u盘启动 但是就是无法脱离优盘 单独从emmc启动
我刷的步骤是 :
1、U盘写入ubuntu镜像,然后启动使用winscp把附件的install.sh拷贝到root目录下,覆盖原来root下的,下面是install.sh的内容#!/bin/sh
echo "Start copy system for DATA partition."
mkdir -p /ddbr
chmod 777 /ddbr
VER=`uname -r`
IMAGE_KERNEL="/boot/zImage"
IMAGE_INITRD="/boot/initrd.img-$VER"
PART_ROOT="/dev/data"
DIR_INSTALL="/ddbr/install"
IMAGE_DTB="/boot/dtb.img"
if [ ! -f $IMAGE_KERNEL ] ; then
echo "Not KERNEL. STOP install !!!"
return
fi
if [ ! -f $IMAGE_INITRD ] ; then
echo "Not INITRD. STOP install !!!"
return
fi
#edit by achaoge,
#disable 64bit and metadata_csum features for uboot compatibility
#ref: https://kshadeslayer.wordpress.com/2016/04/11/my-filesystem-has-too-many-bits/
/sbin/resize2fs -s $PART_ROOT
/sbin/tune2fs -O ^metadata_csum $PART_ROOT
#echo "Formatting DATA partition..."
#umount -f $PART_ROOT
#mke2fs -F -q -t ext4 -m 0 $PART_ROOT
e2fsck -f $PART_ROOT
#echo "done."
echo "Copying ROOTFS."
if [ -d $DIR_INSTALL ] ; then
rm -rf $DIR_INSTALL
fi
mkdir -p $DIR_INSTALL
mount -o rw $PART_ROOT $DIR_INSTALL
cd /
echo "Copy BIN"
tar -cf - bin | (cd $DIR_INSTALL; tar -xpf -)
echo "Copy BOOT"
#mkdir -p $DIR_INSTALL/boot
tar -cf - boot | (cd $DIR_INSTALL; tar -xpf -)
echo "Create DEV"
mkdir -p $DIR_INSTALL/dev
#tar -cf - dev | (cd $DIR_INSTALL; tar -xpf -)
echo "Copy ETC"
tar -cf - etc | (cd $DIR_INSTALL; tar -xpf -)
echo "Copy HOME"
tar -cf - home | (cd $DIR_INSTALL; tar -xpf -)
echo "Copy LIB"
tar -cf - lib | (cd $DIR_INSTALL; tar -xpf -)
echo "Create MEDIA"
mkdir -p $DIR_INSTALL/media
#tar -cf - media | (cd $DIR_INSTALL; tar -xpf -)
echo "Create MNT"
mkdir -p $DIR_INSTALL/mnt
#tar -cf - mnt | (cd $DIR_INSTALL; tar -xpf -)
echo "Copy OPT"
tar -cf - opt | (cd $DIR_INSTALL; tar -xpf -)
echo "Create PROC"
mkdir -p $DIR_INSTALL/proc
echo "Copy ROOT"
tar -cf - root | (cd $DIR_INSTALL; tar -xpf -)
echo "Create RUN"
mkdir -p $DIR_INSTALL/run
echo "Copy SBIN"
tar -cf - sbin | (cd $DIR_INSTALL; tar -xpf -)
echo "Copy SELINUX"
tar -cf - selinux | (cd $DIR_INSTALL; tar -xpf -)
echo "Copy SRV"
tar -cf - srv | (cd $DIR_INSTALL; tar -xpf -)
echo "Create SYS"
mkdir -p $DIR_INSTALL/sys
echo "Create TMP"
mkdir -p $DIR_INSTALL/tmp
echo "Copy USR"
tar -cf - usr | (cd $DIR_INSTALL; tar -xpf -)
echo "Copy VAR"
tar -cf - var | (cd $DIR_INSTALL; tar -xpf -)
echo "Copy fstab"
rm $DIR_INSTALL/etc/fstab
cp -a /root/fstab $DIR_INSTALL/etc
#cp -a /boot/hdmi.sh $DIR_INSTALL/boot
#add by achaoge 2018-06-22
export $(/usr/sbin/fw_printenv mac)
echo "Modify files for N1 emmc boot"
/bin/sed -e "/usb [23]/d" -e 's/fatload mmc 0 \([^ ]*\) \([^;]*\)/ext4load mmc 1:c \1 \/boot\/\2/g' -i $DIR_INSTALL/boot/s905_autoscript.cmd
/bin/sed -e 's/LABEL=ROOTFS/\/dev\/data/' -e "s/mac=.*/mac=${mac}/" -i $DIR_INSTALL/boot/uEnv.ini
/usr/bin/mkimage -C none -A arm -T script -d $DIR_INSTALL/boot/s905_autoscript.cmd $DIR_INSTALL/boot/s905_autoscript
echo "Emmc boot fixed end"
rm $DIR_INSTALL/root/install.sh
rm $DIR_INSTALL/root/fstab
rm $DIR_INSTALL/usr/bin/ddbr
rm $DIR_INSTALL/usr/bin/ddbr_backup_nand
rm $DIR_INSTALL/usr/bin/ddbr_restore_nand
cd /
sync
umount $DIR_INSTALL
echo "*******************************************"
echo "Done copy ROOTFS"
echo "*******************************************"
#echo "Writing new kernel image..."
#mkdir -p $DIR_INSTALL/aboot
#cd $DIR_INSTALL/aboot
#dd if=/dev/boot of=boot.backup.img
#abootimg -i /dev/boot > aboot.txt
#abootimg -x /dev/boot
#abootimg -u /dev/boot -k $IMAGE_KERNEL
#abootimg -u /dev/boot -r $IMAGE_INITRD
#
#echo "done."
#if [ -f $IMAGE_DTB ] ; then
# abootimg -u /dev/boot -s $IMAGE_DTB
# echo "Writing new dtb ..."
# dd if="$IMAGE_DTB" of="/dev/dtb" bs=262144 status=none && sync
# echo "done."
#fi
echo "Write env bootargs"
#/usr/sbin/fw_setenv initargs "root=/dev/data rootflags=data=writeback rw console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.repair=yes net.ifnames=0 mac=\${mac}"
#Edit by achaoge 2018-06-22, for Phicomm N1 boot from emmc
/usr/sbin/fw_setenv start_autoscript "if usb start ; then run start_usb_autoscript; fi; if ext4load mmc 1:c 1020000 /boot/s905_autoscript; then autoscr 1020000; fi;"
echo "*******************************************"
echo "Complete copy OS to eMMC parted DATA"
echo "*******************************************"
2、执行nand-sata-install
3、执行e2label /dev/sda2 ""
4、执行e2label /dev/data "ROOTFS"
5、关机,拔掉u盘
6、两分钟后上电开机
结果开机以后就一直停留这个页面,默认的斐讯开机页面,见最下面的图
通过插入u盘可以实现启动,如下图
你有没有先降级,刷官改,然后再刷linux?这个步骤是必须的!
我是用最新的5.67版本12月7日的,刷buuntu和debian系统都可以。
步骤:
1、先刷降级
2、再刷官改
3、最后刷linux
我看你的步骤,有一点不一样:
最新的系统里面自带的就有install.sh这个程序:
1、镜像写入U盘
2、把别人修改的meson-gxl-s905d-phicomm-N1.dtb下载并放到U盘的boot\dtb下面,并把文件名替换到U盘boot下的uEnv.ini里
3、U盘启动并执行install.sh写入emmc
4、写入完成以后断电、拔U盘、重启就可以直接从emmc启动了。
你的U盘没弄好吧,我32G的U盘刷好1019的armbia之后进入U盘的系统可用显示29G,你用Fdisk -l看看是不是有没有其它分区没挂载