"make release" draft
This commit is contained in:
@@ -16,7 +16,7 @@ chroot "$ROOTFS" /bin/sh -c "ln -s /var/cache/apk /etc/apk/cache"
|
||||
# chroot "$ROOTFS" /bin/sh -c "apk update"
|
||||
chroot "$ROOTFS" /bin/sh -c "apk add bash curl"
|
||||
cp "/install-packages.sh" "$ROOTFS/install-packages.sh"
|
||||
chroot "$ROOTFS" /bin/bash /install-packages.sh
|
||||
chroot "$ROOTFS" /bin/bash /install-packages.sh || exit 1
|
||||
|
||||
umount "$ROOTFS/var/cache/apk"
|
||||
umount "$ROOTFS/dev"
|
||||
@@ -26,4 +26,36 @@ umount "$ROOTFS/run"
|
||||
|
||||
rm -r "$ROOTFS/build"
|
||||
|
||||
# Begin making full disk image for the device
|
||||
### Begin making full disk image for the device
|
||||
echo "=========================== RootFS "$( du -sh "$ROOTFS/" )
|
||||
|
||||
IMG=output.img
|
||||
SIZE=512MB
|
||||
|
||||
dd if=/dev/zero of="$IMG" bs=1 count=0 seek=$SIZE
|
||||
|
||||
sgdisk -o "$IMG" \
|
||||
-n 1:2048:+64M -t 1:0700 \
|
||||
-n 2:0:-1M -t 2:8300
|
||||
|
||||
losetup -D
|
||||
LOOP=$(losetup --find --show -P "$IMG")
|
||||
|
||||
/sync-loop.sh "$LOOP"
|
||||
|
||||
TMP_LOOP="/tmp$LOOP"
|
||||
mkfs.vfat "${TMP_LOOP}p1"
|
||||
mkfs.ext4 "${TMP_LOOP}p2"
|
||||
|
||||
mkdir -p /mnt/img-root /mnt/img-boot
|
||||
|
||||
mount ${TMP_LOOP}p1 /mnt/img-boot
|
||||
mount ${TMP_LOOP}p2 /mnt/img-root
|
||||
|
||||
cp -a "$ROOTFS"/. /mnt/img-root/
|
||||
cp /build/board.itb /mnt/img-boot
|
||||
|
||||
umount /mnt/img-root
|
||||
umount /mnt/img-boot
|
||||
|
||||
losetup -d "$LOOP"
|
||||
|
||||
Reference in New Issue
Block a user