pinebook-notes/make-factory-sdcard/Makefile

29 lines
1.0 KiB
Makefile
Raw Permalink Normal View History

2019-01-21 00:18:41 -06:00
all:
echo make install-onto-sdcard
install-onto-sdcard:
parted /dev/sdb mklabel msdos
parted /dev/sdb mkpart primary ext4 1MiB 8GB
parted /dev/sdb mkpart primary ext4 8GB 32GB
sleep 1
mkfs.ext4 /dev/sdb1
mkfs.ext4 /dev/sdb2
e2label /dev/sdb1 root
e2label /dev/sdb2 factory-image
mount /dev/sdb1 /mnt/sdcard/
dd if=/home/pinebook/u-boot-jcarr/u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1K seek=8
cd /mnt/sdcard/ && rsync -av --progress /home/pinebook/factory/jcarr-factory-sdcard/ .
cp -a rc.local /mnt/sdcard/etc/rc.local
cp -a rc.root.local /mnt/sdcard/root/rc.local
2019-01-21 00:18:41 -06:00
umount /mnt/sdcard
sync
mount /dev/sdb2 /mnt/sdcard-image/
# rsync -av --progress /home/pinebook/factory/community-builds/Armbian_5.69_Pinebook-a64_Ubuntu_bionic_next_4.19.13_desktop.img /mnt/sdcard-image/emmc.img
rsync -av --progress /home/pinebook/factory/mmcblk2-factory-jcarr-test1 /mnt/sdcard-image/emmc.img
2019-01-21 00:18:41 -06:00
umount /mnt/sdcard-image/
sync
rc-local:
cp -a rc.local /media/jcarr/root/etc/rc.local
cp -a rc.root.local /media/jcarr/root/root/rc.local