[add] AX630C-LITE && soc overlay

This commit is contained in:
dianjixz
2024-12-06 19:19:15 +08:00
parent 1167f9d490
commit e2422a837c
38 changed files with 242 additions and 331 deletions
@@ -255,7 +255,7 @@
axera,uart-16550-compatible = <1>;
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
status = "okay";
};
&wdt0 {
@@ -35,4 +35,10 @@ CONFIG_BACKLIGHT_GENERIC=y
CONFIG_BACKLIGHT_AW99703=m
CONFIG_GPIO_PI4IOE5V64XX=y
CONFIG_BATTERY_BQ27XXX=y
CONFIG_BATTERY_BQ27XXX_I2C=y
CONFIG_BATTERY_BQ27XXX_I2C=y
CONFIG_BT=m
CONFIG_BT_BREDR=y
CONFIG_BT_HS=y
CONFIG_BT_LE=y
CONFIG_BT_DEBUGFS=y
+2 -1
View File
@@ -1,5 +1,6 @@
#!/bin/bash
# TARGET_DIR
mkdir -p ${TARGET_DIR}/soc
tar zxf ${BR2_EXTERNAL_M5STACK_PATH}/board/m5stack/soc.tar.gz -C ${TARGET_DIR}/soc
exit 0
+2 -1
View File
@@ -1,5 +1,6 @@
#!/bin/bash
# TARGET_DIR
mkdir -p ${TARGET_DIR}/soc
tar zxf ${BR2_EXTERNAL_M5STACK_PATH}/board/m5stack/soc.tar.gz -C ${TARGET_DIR}/soc
exit 0
@@ -0,0 +1 @@
eval $(/usr/bin/locale-check C.UTF-8)
@@ -1,2 +0,0 @@
export LCD_FRAMEBUFFER=`cat /proc/fb | grep ili9342c | awk '{print "/dev/fb"$1}'`
export HDMI_FRAMEBUFFER=`cat /proc/fb | grep stmdrmfb | awk '{print "/dev/fb"$1}'`
+6 -18
View File
@@ -1,22 +1,10 @@
#!/bin/sh
[ "$1" = "stop" ] && exit 0
/usr/local/m5stack/startup-script.sh
/soc/scripts/startup-script.sh
bash -c ". /etc/profile ; /soc/scripts/usb-adb.sh start"
exit 0
chown root:telnetd /usr/lib/telnetlogin
chmod 4754 /usr/lib/telnetlogin
/usr/local/m5stack/bin/ax_usb_adb_event.sh >> /dev/null 2>&1 &
@@ -1,43 +0,0 @@
# 2.4 GHz, 20 MHz BW mode
manfid=0x2d0
prodid=0x0726
vendid=0x14e4
devid=0x43e2
boardtype=0x0726
boardrev=0x1202
boardnum=22
macaddr=00:90:4c:c5:12:38
sromrev=11
boardflags=0x00404201
boardflags3=0x08000000
xtalfreq=37400
nocrc=1
ag0=0
aa2g=1
ccode=ALL
#pa0itssit=0x20
extpagain2g=0
pa2ga0=-145,6667,-751
AvVmid_c0=0x0,0xc8
cckpwroffset0=2
maxp2ga0=74
#txpwrbckof=6
cckbw202gpo=0
legofdmbw202gpo=0x88888888
mcsbw202gpo=0xaaaaaaaa
propbw202gpo=0xdd
ofdmdigfilttype=18
ofdmdigfilttypebe=18
papdmode=1
papdvalidtest=1
pacalidx2g=48
papdepsoffset=-22
papdendidx=58
il0macaddr=00:90:4c:c5:12:38
wl0id=0x431b
# muxenab defined to enable OOB IRQ. Level sensitive interrupt via WL_HOST_WAKE line.
muxenab=0x10
#BT COEX deferral limit setting
#btc_params 8 45000
#btc_params 10 20000
#spurconfig=0x3
@@ -0,0 +1,20 @@
#!/bin/sh
if [ -z "$PATH" ]; then
export PATH="/usr/local/m5stack/bin"
else
echo "$PATH" | grep -q "/usr/local/m5stack/bin"
if [ $? -ne 0 ]; then
export PATH="/usr/local/m5stack/bin:$PATH"
fi
fi
if [ -z "$LD_LIBRARY_PATH" ]; then
export LD_LIBRARY_PATH="/usr/local/m5stack/lib"
else
echo "$LD_LIBRARY_PATH" | grep -q "/usr/local/m5stack/lib"
if [ $? -ne 0 ]; then
export LD_LIBRARY_PATH="/usr/local/m5stack/lib:$LD_LIBRARY_PATH"
fi
fi
@@ -0,0 +1,8 @@
#!/bin/sh
while true; do
if [ -z "$(cat /etc/configfs/usb_gadget/usb_adb/UDC)" ]; then
echo "8000000.dwc3" > /etc/configfs/usb_gadget/usb_adb/UDC
fi
sleep 1
done
Binary file not shown.
@@ -0,0 +1,92 @@
#!/bin/bash
# /etc/hotplug.d/block/10-block
LOGGER=/usr/bin/logger
BLACKLIST=""
WHITELIST=""
DEVNAME=$(basename "$DEVNAME")
is_in_list() {
local item=$1
local list=$2
for i in $list; do
if [ "$i" = "$item" ]; then
return 0
fi
done
return 1
}
case "$ACTION" in
add)
$LOGGER "Block device added: $DEVNAME"
if echo "$DEVNAME" | grep -qE '^(mmcblk[1-9]+p[0-9]+|sd[a-z][0-9]+)$'; then
$LOGGER "Device $DEVNAME is of supported type"
if is_in_list "$DEVNAME" "$BLACKLIST"; then
$LOGGER "Device $DEVNAME is in the blacklist, ignoring."
exit 0
fi
if [ -n "$WHITELIST" ]; then
if ! is_in_list "$DEVNAME" "$WHITELIST"; then
$LOGGER "Device $DEVNAME is not in the whitelist, ignoring."
exit 0
fi
fi
mkdir -p /mnt/$DEVNAME
# mount /dev/$DEVNAME /mnt/$DEVNAME
/usr/bin/systemd-mount --no-block --collect /dev/$DEVNAME /mnt/$DEVNAME
if [ $? -eq 0 ]; then
$LOGGER "Successfully mounted /dev/$DEVNAME to /mnt/$DEVNAME"
else
$LOGGER "Failed to mount /dev/$DEVNAME"
fi
if [ ! -f "/tmp/update_check_script.lock" ] ; then
touch /tmp/update_check_script.lock
sync
/usr/bin/systemd-run /usr/local/m5stack/update_check.sh >> /dev/null 2>&1 &
fi
else
$LOGGER "Device $DEVNAME is not of supported type"
fi
;;
remove)
$LOGGER "Block device removed: $DEVNAME"
if echo "$DEVNAME" | grep -qE '^(mmcblk[1-9]+p[0-9]+|sd[a-z][0-9]+)$'; then
$LOGGER "Device $DEVNAME is of supported type"
if is_in_list "$DEVNAME" "$BLACKLIST"; then
$LOGGER "Device $DEVNAME is in the blacklist, ignoring."
exit 0
fi
if [ -n "$WHITELIST" ]; then
if ! is_in_list "$DEVNAME" "$WHITELIST"; then
$LOGGER "Device $DEVNAME is not in the whitelist, ignoring."
exit 0
fi
fi
#umount /mnt/$DEVNAME
/usr/bin/systemd-umount /mnt/$DEVNAME
if [ $? -eq 0 ]; then
$LOGGER "Successfully unmounted /mnt/$DEVNAME"
rmdir /mnt/$DEVNAME
else
$LOGGER "Failed to unmount /mnt/$DEVNAME"
fi
else
$LOGGER "Device $DEVNAME is not of supported type"
fi
;;
*)
$LOGGER "Unhandled action: $ACTION"
;;
esac
# [ "$ACTION" = "add" -o "$ACTION" = "remove" ] && /sbin/block hotplug

Some files were not shown because too many files have changed in this diff Show More