fix(luckfox-config):Resolving conflicts between RGB and other pin multiplexing

feat(luckfox-config):Support for touch screens and FBTFT
feat(luckfox-config):Support for Ubuntu system
feat(ubuntu):Support using local root filesystem for submodule updates
feat(ubuntu):Support for WiFi on Luckfox Pico Ultra W using the Ubuntu system
perf(ubuntu):Improve the initial boot speed of RV1103 using the Ubuntu system
perf(kernel_dts):Improve EMMC read/write speed

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
This commit is contained in:
luckfox-eng29
2024-06-28 19:18:35 +08:00
committed by luckfox-eng33
parent 6cf97cc3f9
commit 955ff6aa57
73 changed files with 6130 additions and 2172 deletions

0
sysdrv/tools/board/emmc/emmc_filesystem_resize.sh Normal file → Executable file
View File

0
sysdrv/tools/board/emmc/emmc_fstab Normal file → Executable file
View File

30
sysdrv/tools/board/emmc/emmc_rc.local Normal file → Executable file
View File

@@ -1,29 +1,11 @@
#!/bin/bash
/usr/bin/filesystem_resize.sh
/usr/bin/wifi_bt_init.sh
/usr/bin/luckfox_switch_rgb_resolution &
/etc/init.d/S50usbdevice start
# WIFI/BT
if [ -f /oem/usr/ko/install_wifi.sh ]; then
#wifi
cd /oem/usr/ko
sh insmod_wifi.sh
cd -
#BT
if command -v hciattach &>/dev/null; then
if lsmod | grep -q "aic8800_fdrv"; then
hciattach -s 115200 /dev/ttyS1 any 115200 flow nosleep &
sleep 2
if hciconfig -a | grep -q "hci0"; then
hciconfig hci0 up &
else
echo "hci0 not found or not available."
fi
else
echo "aic8800_fdrv not found."
fi
else
echo "You need install hci tools"
fi
luckfox-config load
if [ -n "$(hwclock | grep "invalid")" ]; then
date -s 2024-01-01
hwclock -w
fi

View File

@@ -0,0 +1,27 @@
#!/bin/bash
if [ "$(cat /proc/device-tree/model)" == "Luckfox Pico Ultra W" ]; then
systemctl stop wpa_supplicant
if [ -d /usr/ko ]; then
cd /usr/ko
if [ -z "$(ifconfig | grep "wlan0")" ]; then
./insmod_wifi.sh
else
# wait systemctl
sleep 0.5
fi
else
echo "Missing ko files!"
fi
if [ -d /var/run/wpa_supplicant ]; then
rm /var/run/wpa_supplicant/ -rf
fi
if [ -f /etc/wpa_supplicant.conf ] && [ -n "$(ifconfig | grep "wlan0")" ]; then
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf >/dev/null
chmod a+x /usr/share/udhcpc/default.script
fi
else
echo "This Luckfox Pico model don't support WIFI!"
fi

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,56 @@
# AIC USERCONFIG 2022/0803/1707
# txpwr_lvl
enable=1
lvl_11b_11ag_1m_2g4=20
lvl_11b_11ag_2m_2g4=20
lvl_11b_11ag_5m5_2g4=20
lvl_11b_11ag_11m_2g4=20
lvl_11b_11ag_6m_2g4=20
lvl_11b_11ag_9m_2g4=20
lvl_11b_11ag_12m_2g4=20
lvl_11b_11ag_18m_2g4=20
lvl_11b_11ag_24m_2g4=18
lvl_11b_11ag_36m_2g4=18
lvl_11b_11ag_48m_2g4=16
lvl_11b_11ag_54m_2g4=16
lvl_11n_11ac_mcs0_2g4=20
lvl_11n_11ac_mcs1_2g4=20
lvl_11n_11ac_mcs2_2g4=20
lvl_11n_11ac_mcs3_2g4=20
lvl_11n_11ac_mcs4_2g4=18
lvl_11n_11ac_mcs5_2g4=18
lvl_11n_11ac_mcs6_2g4=16
lvl_11n_11ac_mcs7_2g4=16
lvl_11n_11ac_mcs8_2g4=16
lvl_11n_11ac_mcs9_2g4=16
lvl_11ax_mcs0_2g4=20
lvl_11ax_mcs1_2g4=20
lvl_11ax_mcs2_2g4=20
lvl_11ax_mcs3_2g4=20
lvl_11ax_mcs4_2g4=18
lvl_11ax_mcs5_2g4=18
lvl_11ax_mcs6_2g4=16
lvl_11ax_mcs7_2g4=16
lvl_11ax_mcs8_2g4=16
lvl_11ax_mcs9_2g4=16
lvl_11ax_mcs10_2g4=15
lvl_11ax_mcs11_2g4=15
# txpwr_ofst
ofst_enable=0
ofst_chan_1_4=0
ofst_chan_5_9=0
ofst_chan_10_13=0
ofst_chan_36_64=0
ofst_chan_100_120=0
ofst_chan_122_140=0
ofst_chan_142_165=0
# xtal cap
xtal_enable=0
xtal_cap=24
xtal_cap_fine=31

View File

@@ -0,0 +1,56 @@
# AIC USERCONFIG 2022/0803/1707
# txpwr_lvl
enable=1
lvl_11b_11ag_1m_2g4=20
lvl_11b_11ag_2m_2g4=20
lvl_11b_11ag_5m5_2g4=20
lvl_11b_11ag_11m_2g4=20
lvl_11b_11ag_6m_2g4=20
lvl_11b_11ag_9m_2g4=20
lvl_11b_11ag_12m_2g4=20
lvl_11b_11ag_18m_2g4=20
lvl_11b_11ag_24m_2g4=18
lvl_11b_11ag_36m_2g4=18
lvl_11b_11ag_48m_2g4=16
lvl_11b_11ag_54m_2g4=16
lvl_11n_11ac_mcs0_2g4=20
lvl_11n_11ac_mcs1_2g4=20
lvl_11n_11ac_mcs2_2g4=20
lvl_11n_11ac_mcs3_2g4=20
lvl_11n_11ac_mcs4_2g4=18
lvl_11n_11ac_mcs5_2g4=18
lvl_11n_11ac_mcs6_2g4=16
lvl_11n_11ac_mcs7_2g4=16
lvl_11n_11ac_mcs8_2g4=16
lvl_11n_11ac_mcs9_2g4=16
lvl_11ax_mcs0_2g4=20
lvl_11ax_mcs1_2g4=20
lvl_11ax_mcs2_2g4=20
lvl_11ax_mcs3_2g4=20
lvl_11ax_mcs4_2g4=18
lvl_11ax_mcs5_2g4=18
lvl_11ax_mcs6_2g4=16
lvl_11ax_mcs7_2g4=16
lvl_11ax_mcs8_2g4=16
lvl_11ax_mcs9_2g4=16
lvl_11ax_mcs10_2g4=15
lvl_11ax_mcs11_2g4=15
# txpwr_ofst
ofst_enable=0
ofst_chan_1_4=0
ofst_chan_5_9=0
ofst_chan_10_13=0
ofst_chan_36_64=0
ofst_chan_100_120=0
ofst_chan_122_140=0
ofst_chan_142_165=0
# xtal cap
xtal_enable=0
xtal_cap=24
xtal_cap_fine=31

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,24 @@
#!/bin/sh
cmd=$(realpath $0)
_DIR=$(dirname $cmd)
cd $_DIR
export PATH=$PATH:/ko
#aic8800
if [ -f /usr/ko/aic8800_fdrv.ko ]; then
mkdir -p /oem/usr/ko
cp /usr/ko/aic8800dc_fw /oem/usr/ko -r
insmod cfg80211.ko
insmod libarc4.ko
insmod ctr.ko
insmod ccm.ko
#insmod libaes.ko
#insmod aes_generic.ko
insmod aic8800_bsp.ko
sleep 0.2
insmod aic8800_fdrv.ko
sleep 2
insmod aic8800_btlpm.ko
sleep 0.1
fi

Binary file not shown.

View File

@@ -0,0 +1,116 @@
# Sample udhcpd configuration file (/etc/udhcpd.conf)
# The start and end of the IP lease block
start 192.168.0.20 #default: 192.168.0.20
end 192.168.0.254 #default: 192.168.0.254
# The interface that udhcpd will use
interface eth0 #default: eth0
# The maximim number of leases (includes addressesd reserved
# by OFFER's, DECLINE's, and ARP conficts
#max_leases 254 #default: 254
# If remaining is true (default), udhcpd will store the time
# remaining for each lease in the udhcpd leases file. This is
# for embedded systems that cannot keep time between reboots.
# If you set remaining to no, the absolute time that the lease
# expires at will be stored in the dhcpd.leases file.
#remaining yes #default: yes
# The time period at which udhcpd will write out a dhcpd.leases
# file. If this is 0, udhcpd will never automatically write a
# lease file. (specified in seconds)
#auto_time 7200 #default: 7200 (2 hours)
# The amount of time that an IP will be reserved (leased) for if a
# DHCP decline message is received (seconds).
#decline_time 3600 #default: 3600 (1 hour)
# The amount of time that an IP will be reserved (leased) for if an
# ARP conflct occurs. (seconds
#conflict_time 3600 #default: 3600 (1 hour)
# How long an offered address is reserved (leased) in seconds
#offer_time 60 #default: 60 (1 minute)
# If a lease to be given is below this value, the full lease time is
# instead used (seconds).
#min_lease 60 #defult: 60
# The location of the leases file
#lease_file /var/lib/misc/udhcpd.leases #defualt: /var/lib/misc/udhcpd.leases
# The location of the pid file
#pidfile /var/run/udhcpd.pid #default: /var/run/udhcpd.pid
# Everytime udhcpd writes a leases file, the below script will be called.
# Useful for writing the lease file to flash every few hours.
#notify_file #default: (no script)
#notify_file dumpleases # <--- usefull for debugging
# The following are bootp specific options, setable by udhcpd.
#siaddr 192.168.0.22 #default: 0.0.0.0
#sname zorak #default: (none)
#boot_file /var/nfs_root #default: (none)
# The remainer of options are DHCP options and can be specifed with the
# keyword 'opt' or 'option'. If an option can take multiple items, such
# as the dns option, they can be listed on the same line, or multiple
# lines. The only option with a default is 'lease'.
#Examles
opt dns 192.168.10.2 192.168.10.10
option subnet 255.255.255.0
opt router 192.168.10.2
opt wins 192.168.10.10
option dns 129.219.13.81 # appened to above DNS servers for a total of 3
option domain local
option lease 864000 # 10 days of seconds
# Currently supported options, for more info, see options.c
#subnet
#timezone
#router
#timesvr
#namesvr
#dns
#logsvr
#cookiesvr
#lprsvr
#bootsize
#domain
#swapsvr
#rootpath
#ipttl
#mtu
#broadcast
#wins
#lease
#ntpsrv
#tftp
#bootfile

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,39 @@
#!/bin/sh
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
RESOLV_CONF="/etc/resolv.conf"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
case "$1" in
deconfig)
/sbin/ifconfig $interface 0.0.0.0
;;
renew|bound)
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
if [ -n "$router" ] ; then
echo "deleting routers"
while route del default gw 0.0.0.0 dev $interface ; do
:
done
for i in $router ; do
route add default gw $i dev $interface
done
fi
echo -n > $RESOLV_CONF
[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
for i in $dns ; do
echo adding dns $i
echo nameserver $i >> $RESOLV_CONF
done
;;
esac
exit 0