This commit is contained in:
2024-03-26 14:31:48 +01:00
parent 82be1d5544
commit f40116648d
6 changed files with 59 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
teco/firmware/v5.6.tfw filter=lfs diff=lfs merge=lfs -text
teco/sd/v5.2.tar filter=lfs diff=lfs merge=lfs -text

View File

@@ -1,2 +1,3 @@
# test_lfs
hello

BIN
teco/firmware/v5.6.tfw LFS Normal file

Binary file not shown.

16
teco/fw.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
if [ "$1" == "ver" ] || [ "$1" == "-ver" ]; then
echo '{"version":"14122022","compatible":"v5"}'
else
. /lib/web/init
. /lib/init/functions
if [ -r /etc/default/fwupdate ]; then
. /etc/default/fwupdate
fi
if [ "$1" == "b" ] || [ "$1" == "-b" ]; then
cp -f /mnt/mmc/ez_sys/source/teco_firmware.tfw /tmp/update/teco_firmware.tfw
#teco_imx6ul.tfw
fi
#rm -f /tmp/update/*.tfw >/dev/null 2>&1
/sbin/fwupdate -i 2>&1 &
fi

34
teco/sd.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
if [ "$1" == "ver" ] || [ "$1" == "-ver" ]; then
echo '{"version":"03112022","compatible":"v5"}'
fi
if [ "$1" == "info" ] || [ "$1" == "-info" ]; then
cid=$(sed -n '1p' /sys/block/mmcblk0/device/cid)
csd=$(sed -n '1p' /sys/block/mmcblk0/device/csd)
serial=$(sed -n '1p' /sys/block/mmcblk0/device/serial)
manfid=$(sed -n '1p' /sys/block/mmcblk0/device/manfid)
size1=$(df -h /dev/mmcblk0p1 | grep mmcblk |awk '{printf $2}')
size2=$(df -h /dev/mmcblk0p2 | grep mmcblk |awk '{printf $2}')
echo '{"cid":"'$cid'","csd":"'$csd'","serial":"'$serial'","manufacturer":"'$manfid'","size":["'$size1'","'$size2'"]}'
fi
if [ "$1" == "do" ] || [ "$1" == "-do" ]; then
umount -f /dev/mmcblk0p1
umount -f /dev/mmcblk0p2
sleep 1
echo "delete MBR"
dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=1
sleep 1
echo "create partitions"
printf "n\np\n1\n\n2000000\n\nn\np\n2\n2000001\n\nw\n" | fdisk /dev/mmcblk0
sleep 1
echo "create EXT4 SD"
umount -f /dev/mmcblk0p1
mkfs.ext4 -F -L sd /dev/mmcblk0p1
sleep 1
echo "create EXT4 LOG"
umount -f /dev/mmcblk0p2
mkfs.ext4 -F -L log /dev/mmcblk0p2
mount /dev/mmcblk0p1 /mnt/mmc
fi

BIN
teco/sd/v5.2.tar LFS Normal file

Binary file not shown.