1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/BBA1.5_platform/host_tools/buildFs
2024-07-22 01:58:46 -03:00

167 lines
3.8 KiB
Bash
Executable File

#!/bin/sh
cd $1
echo "mknod ..."
mknod dev/console c 4 64
mknod dev/flash0 c 200 0
mknod dev/adsl0 c 100 0 # zl added 2011-10-25
mknod dev/gpio c 10 123
mknod dev/gpio1 c 252 0
mknod dev/led c 10 151
mknod dev/random c 1 8
mknod dev/mtd b 31 0
mknod dev/mtd0 c 90 0
mknod dev/mtd1 c 90 2
mknod dev/mtd2 c 90 4
mknod dev/mtd3 c 90 6
mknod dev/mtd4 c 90 8
mknod dev/mtd5 c 90 10
mknod dev/mtd6 c 90 12
mknod dev/mtdblock0 b 31 0
mknod dev/mtdblock1 b 31 1
mknod dev/mtdblock2 b 31 2
mknod dev/mtdblock3 b 31 3
mknod dev/mtdblock4 b 31 4
mknod dev/mtdblock5 b 31 5
mknod dev/mtdblock6 b 31 6
mknod dev/null c 1 3
mknod dev/ppp c 108 0
mknod dev/ptmx c 5 2
mknod dev/ptyp0 c 2 0
mknod dev/ptyp1 c 2 1
mknod dev/ptyp2 c 2 2
mknod dev/tty c 5 0
mknod dev/tty0 c 4 0
mknod dev/ttyS0 c 4 64
mknod dev/ttyp0 c 3 0
mknod dev/ttyp1 c 3 1
mknod dev/ttyp2 c 3 2
mknod dev/urandom c 1 9
mknod dev/watchdog c 10 130
mknod dev/zero c 1 5
mknod dev/dk0 c 63 0
mknod dev/caldata b 31 6
mknod dev/net/tun c 10 200
#mknod dev/sda b 8 0
#mknod dev/sda1 b 8 1
#mknod dev/sda2 b 8 2
#mknod dev/sdb b 8 16
#mknod dev/sdb1 b 8 17
#mknod dev/sdb2 b 8 18
mknod dev/pmap c 200 0
mknod dev/qostype c 111 2
#mknod dev/fuse c 10 229
#mknod dev/misc/fuse c 10 229
mknod dev/ttyUSB0 c 188 0
mknod dev/ttyUSB1 c 188 1
mknod dev/ttyUSB2 c 188 2
mknod dev/ttyUSB3 c 188 3
mknod dev/ttyUSB4 c 188 4
mknod dev/ttyUSB5 c 188 5
mknod dev/ttyUSB6 c 188 6
mknod dev/ttyUSB7 c 188 7
mknod dev/ttyUSB8 c 188 8
mknod dev/ttyUSB9 c 188 9
mknod dev/ttyUSB10 c 188 10
mknod dev/ttyUSB11 c 188 11
mknod dev/ttyUSB12 c 188 12
mknod dev/ttyUSB13 c 188 13
mknod dev/ttyUSB14 c 188 14
mknod dev/ttyUSB15 c 188 15
mknod dev/ttyACM0 c 166 0
mknod dev/ttyACM1 c 166 1
mknod dev/ttyACM2 c 166 2
mknod dev/ttyACM3 c 166 3
mknod dev/ttyACM4 c 166 4
mknod dev/ttyACM5 c 166 5
mknod dev/ttyACM6 c 166 6
mknod dev/ttyACM7 c 166 7
mknod dev/ttyACM8 c 166 8
mknod dev/ttyACM9 c 166 9
mknod dev/ttyACM10 c 166 10
mknod dev/ttyACM11 c 166 11
mknod dev/ttyACM12 c 166 12
mknod dev/ttyACM13 c 166 13
mknod dev/ttyACM14 c 166 14
mknod dev/ttyACM15 c 166 15
mknod dev/voip c 215 0
mknod dev/vpe1 c 254 1
mknod dev/vmmc11 c 183 11
mknod dev/vmmc12 c 183 12
mknod dev/vmmc13 c 183 13
mknod dev/vmmc14 c 183 14
mknod dev/vmmc15 c 183 15
mknod dev/vmmc16 c 183 16
mknod dev/vmmc17 c 183 17
mknod dev/vmmc18 c 183 18
mknod dev/vmmc10 c 183 10
mknod dev/pb c 150 0
mknod dev/dect_drv c 213 0
mknod dev/timer_drv c 212 0
mknod dev/voip_timer_driver c 229 0
#mknod dev/usb/lp0 c 180 0
if [ $3 == "VG3631V1" -o $3 == "VG3511V1" -o $3 == "V411TV1" ]; then
mknod dev/AclDsp c 234 0
mknod dev/FxsDrv c 35 0
mknod dev/tdicmd c 214 0
fi
#for lantiq dsl firmware, wzy, 20120331
if [ $3 == "ArcherD2V1" -o $3 == "ArcherD20V1" ]
then
rm -rf dev/dsl_cpe_api
rm -rf dev/mei_cpe
mknod dev/dsl_cpe_api c 107 0
mknod dev/mei_cpe c 105 0
else
mknod dev/dsl_cpe_api/0 c 109 0
mknod dev/mei_cpe/0 c 249 0
fi
#end by wzy
mknod dev/ifx_dsl c 106 0
mknod dev/ifx_mei c 105 0
mknod dev/ifx_ppa c 181 0
mknod dev/switch_api/0 c 81 0
mknod dev/switch_api/1 c 81 1
if [ $3 == "ArcherD2V1" -o $3 == "ArcherD20V1" ]; then
mknod dev/mem c 1 1
fi
mknod dev/exin0 c 244 0
mknod dev/exin1 c 244 1
mknod dev/exin2 c 244 2
mknod dev/exin3 c 244 3
mknod dev/exin4 c 244 4
mknod dev/exin5 c 244 5
echo "building FS ..."
if [ "$4" = "ralink" ]
then $2 . ../rootfs.$3 -be -noappend
elif [ "$4" = "realtek" ]
then $2 . ../rootfs.$3 -comp lzma -noappend
elif [ "$4 = "lantiq"" -o "$4 = "lantiqAR368"" ]
then $2 . ../rootfs.$3 -nopad -noappend -root-owned -comp lzma -processors 1
else
echo "Wrong supplier"
fi