1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| setenv serverip 192.168.1.10; setenv ipaddr 192.168.1.1;
tftpboot 0x44000000 u-boot-sunxi-with-spl.bin; mmc dev 0; mmc write 0x44000000 0x10 1024;
setenv serverip 192.168.1.10;setenv ipaddr 192.168.1.1; setenv bootargs console=ttyS0,115200 rdinit=/sbin/init panic=10 earlyprintk rw tftpboot 0x41F00000 iboot.itb; bootm 0x41F00000#config-lichee bootm 0x41F00000#config-ramfs
setenv bootcmd boot_tftp setenv boot_tftp "setenv bootargs console=ttyS0,115200 rdinit=/sbin/init panic=10 e && tftpboot 0x41F00000 iboot.itb; && bootm 0x41F00000#config-ramfs"
n e 2097152 +36M w
fdisk /dev/mmcblk0 mkfs.ext2 /dev/mmcblk0p4 mount /mnt/ /dev/mmcblk0p4 mount /dev/mmcblk0p4 /mnt/ cd /mnt/ ifconfig eth0 up 192.168.1.1 tftp -gr rootfs.ext2 192.168.1.10
mount -n -t ext4 /dev/mmcblk0p3 -o rw,noatime /overlay; mkdir -p /overlay/upper /overlay/work /mnt/rom; mount -n -t overlay overlayfs:/overlay -o rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work /mnt; mount -n /proc -o noatime,--move /mnt/proc; pivot_root /mnt /mnt/rom; mount -n /rom/dev -o noatime,--move /dev; mount -n /rom/dev/shm -o noatime,--move /dev/shm; mount -n /rom/tmp -o noatime,--move /tmp; mount -n /rom/sys -o noatime,--move /sys; mount -n /rom/run -o noatime,--move /run ; mount -n /rom/media -o noatime,--move /media;
mount -n -t ext4 /dev/mmcblk0p3 -o rw,noatime /overlay; mkdir -p /overlay/upper /overlay/work /overlay/lower; mount --bind / /overlay/lower; mount -n -t overlay overlay -o rw,noatime,lowerdir=/overlay/lower,upperdir=/overlay/upper,workdir=/overlay/work /mnt; mkdir -p /mnt/oldroot /mnt/proc /mnt/dev /mnt/shm; mount -n /proc -o noatime,--move /mnt/proc;
pivot_root /mnt /mnt/oldroot mount -n /oldroot/dev -o noatime,--move /dev; mount -n /oldroot/dev/shm -o noatime,--move /dev/shm; mount -n /oldroot/tmp -o noatime,--move /tmp; mount -n /oldroot/sys -o noatime,--move /sys; mount -n /oldroot/run -o noatime,--move /run ; mount -n /oldroot/media -o noatime,--move /media;
|