Merge pull request #194 from luckfox-eng29/pullrequest
Pullrequest for Fix known issues.
This commit is contained in:
commit
322e821aab
|
|
@ -1,40 +1,37 @@
|
|||
#!/bin/sh
|
||||
|
||||
rcS()
|
||||
{
|
||||
for i in /oem/usr/etc/init.d/S??* ;do
|
||||
rcS() {
|
||||
for i in /oem/usr/etc/init.d/S??*; do
|
||||
|
||||
# Ignore dangling symlinks (if any).
|
||||
[ ! -f "$i" ] && continue
|
||||
|
||||
case "$i" in
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set start
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
# No sh extension, so fork subprocess.
|
||||
$i start
|
||||
;;
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set start
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
# No sh extension, so fork subprocess.
|
||||
$i start
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
check_linker()
|
||||
{
|
||||
[ ! -L "$2" ] && ln -sf $1 $2
|
||||
check_linker() {
|
||||
[ ! -L "$2" ] && ln -sf $1 $2
|
||||
}
|
||||
|
||||
network_init()
|
||||
{
|
||||
ethaddr1=`ifconfig -a | grep "eth.*HWaddr" | awk '{print $5}'`
|
||||
network_init() {
|
||||
ethaddr1=$(ifconfig -a | grep "eth.*HWaddr" | awk '{print $5}')
|
||||
|
||||
if [ -f /data/ethaddr.txt ]; then
|
||||
ethaddr2=`cat /data/ethaddr.txt`
|
||||
ethaddr2=$(cat /data/ethaddr.txt)
|
||||
if [ $ethaddr1 == $ethaddr2 ]; then
|
||||
echo "eth HWaddr cfg ok"
|
||||
else
|
||||
|
|
@ -42,18 +39,16 @@ network_init()
|
|||
ifconfig eth0 hw ether $ethaddr2
|
||||
fi
|
||||
else
|
||||
echo $ethaddr1 > /data/ethaddr.txt
|
||||
echo $ethaddr1 >/data/ethaddr.txt
|
||||
fi
|
||||
ifconfig eth0 up && udhcpc -i eth0
|
||||
ifconfig eth0 up && udhcpc -i eth0 >/dev/null 2>&1
|
||||
}
|
||||
|
||||
post_chk()
|
||||
{
|
||||
post_chk() {
|
||||
#TODO: ensure /userdata mount done
|
||||
cnt=0
|
||||
while [ $cnt -lt 30 ];
|
||||
do
|
||||
cnt=$(( cnt + 1 ))
|
||||
while [ $cnt -lt 30 ]; do
|
||||
cnt=$((cnt + 1))
|
||||
if mount | grep -w userdata; then
|
||||
break
|
||||
fi
|
||||
|
|
@ -62,15 +57,15 @@ post_chk()
|
|||
|
||||
# if ko exist, install ko first
|
||||
default_ko_dir=/ko
|
||||
if [ -f "/oem/usr/ko/insmod_ko.sh" ];then
|
||||
if [ -f "/oem/usr/ko/insmod_ko.sh" ]; then
|
||||
default_ko_dir=/oem/usr/ko
|
||||
fi
|
||||
if [ -f "$default_ko_dir/insmod_ko.sh" ];then
|
||||
if [ -f "$default_ko_dir/insmod_ko.sh" ]; then
|
||||
cd $default_ko_dir && sh insmod_ko.sh && cd -
|
||||
fi
|
||||
|
||||
network_init &
|
||||
check_linker /userdata /oem/usr/www/userdata
|
||||
check_linker /userdata /oem/usr/www/userdata
|
||||
check_linker /media/usb0 /oem/usr/www/usb0
|
||||
check_linker /mnt/sdcard /oem/usr/www/sdcard
|
||||
# if /data/rkipc not exist, cp /usr/share
|
||||
|
|
@ -79,33 +74,35 @@ post_chk()
|
|||
|
||||
if [ ! -f "/oem/usr/share/rkipc.ini" ]; then
|
||||
lsmod | grep sc530ai
|
||||
if [ $? -eq 0 ] ;then
|
||||
if [ $? -eq 0 ]; then
|
||||
ln -s -f /oem/usr/share/rkipc-500w.ini $default_rkipc_ini
|
||||
fi
|
||||
lsmod | grep sc4336
|
||||
if [ $? -eq 0 ] ;then
|
||||
if [ $? -eq 0 ]; then
|
||||
ln -s -f /oem/usr/share/rkipc-400w.ini $default_rkipc_ini
|
||||
fi
|
||||
lsmod | grep sc3336
|
||||
if [ $? -eq 0 ] ;then
|
||||
if [ $? -eq 0 ]; then
|
||||
ln -s -f /oem/usr/share/rkipc-300w.ini $default_rkipc_ini
|
||||
fi
|
||||
fi
|
||||
tmp_md5=/tmp/.rkipc-ini.md5sum
|
||||
data_md5=/userdata/.rkipc-default.md5sum
|
||||
md5sum $default_rkipc_ini > $tmp_md5
|
||||
chk_rkipc=`cat $tmp_md5|awk '{print $1}'`
|
||||
rm $tmp_md5
|
||||
if [ ! -f $data_md5 ];then
|
||||
md5sum $default_rkipc_ini > $data_md5
|
||||
fi
|
||||
grep -w $chk_rkipc $data_md5
|
||||
if [ $? -ne 0 ] ;then
|
||||
rm -f $rkipc_ini
|
||||
echo "$chk_rkipc" > $data_md5
|
||||
fi
|
||||
|
||||
if [ ! -f "$default_rkipc_ini" ];then
|
||||
# check md5sum
|
||||
# tmp_md5=/tmp/.rkipc-ini.md5sum
|
||||
# data_md5=/userdata/.rkipc-default.md5sum
|
||||
# md5sum $default_rkipc_ini > $tmp_md5
|
||||
# chk_rkipc=`cat $tmp_md5|awk '{print $1}'`
|
||||
# rm $tmp_md5
|
||||
# if [ ! -f $data_md5 ];then
|
||||
# md5sum $default_rkipc_ini > $data_md5
|
||||
# fi
|
||||
# grep -w $chk_rkipc $data_md5
|
||||
# if [ $? -ne 0 ] ;then
|
||||
# rm -f $rkipc_ini
|
||||
# echo "$chk_rkipc" > $data_md5
|
||||
# fi
|
||||
|
||||
if [ ! -f "$default_rkipc_ini" ]; then
|
||||
echo "Error: not found rkipc.ini !!!"
|
||||
exit -1
|
||||
fi
|
||||
|
|
@ -117,7 +114,7 @@ post_chk()
|
|||
cp -fa /oem/usr/share/image.bmp /userdata/
|
||||
fi
|
||||
|
||||
if [ -d "/oem/usr/share/iqfiles" ];then
|
||||
if [ -d "/oem/usr/share/iqfiles" ]; then
|
||||
rkipc -a /oem/usr/share/iqfiles &
|
||||
else
|
||||
rkipc &
|
||||
|
|
@ -127,9 +124,9 @@ post_chk()
|
|||
rcS
|
||||
|
||||
ulimit -c unlimited
|
||||
echo "/data/core-%p-%e" > /proc/sys/kernel/core_pattern
|
||||
echo "/data/core-%p-%e" >/proc/sys/kernel/core_pattern
|
||||
# echo 0 > /sys/devices/platform/rkcif-mipi-lvds/is_use_dummybuf
|
||||
|
||||
echo 1 > /proc/sys/vm/overcommit_memory
|
||||
echo 1 >/proc/sys/vm/overcommit_memory
|
||||
|
||||
post_chk &
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
[audio.0]
|
||||
enable = 1
|
||||
enable = 0
|
||||
card_name = hw:0,0
|
||||
encode_type = G711A
|
||||
format = S16
|
||||
|
|
|
|||
|
|
@ -1,40 +1,37 @@
|
|||
#!/bin/sh
|
||||
|
||||
rcS()
|
||||
{
|
||||
for i in /oem/usr/etc/init.d/S??* ;do
|
||||
rcS() {
|
||||
for i in /oem/usr/etc/init.d/S??*; do
|
||||
|
||||
# Ignore dangling symlinks (if any).
|
||||
[ ! -f "$i" ] && continue
|
||||
|
||||
case "$i" in
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set start
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
# No sh extension, so fork subprocess.
|
||||
$i start
|
||||
;;
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set start
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
# No sh extension, so fork subprocess.
|
||||
$i start
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
check_linker()
|
||||
{
|
||||
[ ! -L "$2" ] && ln -sf $1 $2
|
||||
check_linker() {
|
||||
[ ! -L "$2" ] && ln -sf $1 $2
|
||||
}
|
||||
|
||||
network_init()
|
||||
{
|
||||
ethaddr1=`ifconfig -a | grep "eth.*HWaddr" | awk '{print $5}'`
|
||||
network_init() {
|
||||
ethaddr1=$(ifconfig -a | grep "eth.*HWaddr" | awk '{print $5}')
|
||||
|
||||
if [ -f /data/ethaddr.txt ]; then
|
||||
ethaddr2=`cat /data/ethaddr.txt`
|
||||
ethaddr2=$(cat /data/ethaddr.txt)
|
||||
if [ $ethaddr1 == $ethaddr2 ]; then
|
||||
echo "eth HWaddr cfg ok"
|
||||
else
|
||||
|
|
@ -42,18 +39,16 @@ network_init()
|
|||
ifconfig eth0 hw ether $ethaddr2
|
||||
fi
|
||||
else
|
||||
echo $ethaddr1 > /data/ethaddr.txt
|
||||
echo $ethaddr1 >/data/ethaddr.txt
|
||||
fi
|
||||
ifconfig eth0 up && udhcpc -i eth0
|
||||
ifconfig eth0 up && udhcpc -i eth0 >/dev/null 2>&1
|
||||
}
|
||||
|
||||
post_chk()
|
||||
{
|
||||
post_chk() {
|
||||
#TODO: ensure /userdata mount done
|
||||
cnt=0
|
||||
while [ $cnt -lt 30 ];
|
||||
do
|
||||
cnt=$(( cnt + 1 ))
|
||||
while [ $cnt -lt 30 ]; do
|
||||
cnt=$((cnt + 1))
|
||||
if mount | grep -w userdata; then
|
||||
break
|
||||
fi
|
||||
|
|
@ -62,15 +57,15 @@ post_chk()
|
|||
|
||||
# if ko exist, install ko first
|
||||
default_ko_dir=/ko
|
||||
if [ -f "/oem/usr/ko/insmod_ko.sh" ];then
|
||||
if [ -f "/oem/usr/ko/insmod_ko.sh" ]; then
|
||||
default_ko_dir=/oem/usr/ko
|
||||
fi
|
||||
if [ -f "$default_ko_dir/insmod_ko.sh" ];then
|
||||
if [ -f "$default_ko_dir/insmod_ko.sh" ]; then
|
||||
cd $default_ko_dir && sh insmod_ko.sh && cd -
|
||||
fi
|
||||
|
||||
network_init &
|
||||
check_linker /userdata /oem/usr/www/userdata
|
||||
check_linker /userdata /oem/usr/www/userdata
|
||||
check_linker /media/usb0 /oem/usr/www/usb0
|
||||
check_linker /mnt/sdcard /oem/usr/www/sdcard
|
||||
# if /data/rkipc not exist, cp /usr/share
|
||||
|
|
@ -79,37 +74,39 @@ post_chk()
|
|||
|
||||
if [ ! -f "/oem/usr/share/rkipc.ini" ]; then
|
||||
lsmod | grep sc530ai
|
||||
if [ $? -eq 0 ] ;then
|
||||
if [ $? -eq 0 ]; then
|
||||
ln -s -f /oem/usr/share/rkipc-500w.ini $default_rkipc_ini
|
||||
fi
|
||||
lsmod | grep sc4336
|
||||
if [ $? -eq 0 ] ;then
|
||||
if [ $? -eq 0 ]; then
|
||||
ln -s -f /oem/usr/share/rkipc-400w.ini $default_rkipc_ini
|
||||
fi
|
||||
lsmod | grep sc3336
|
||||
if [ $? -eq 0 ] ;then
|
||||
if [ $? -eq 0 ]; then
|
||||
ln -s -f /oem/usr/share/rkipc-300w.ini $default_rkipc_ini
|
||||
fi
|
||||
lsmod | grep imx415
|
||||
if [ $? -eq 0 ] ;then
|
||||
if [ $? -eq 0 ]; then
|
||||
ln -s -f /oem/usr/share/rkipc-800w.ini $default_rkipc_ini
|
||||
fi
|
||||
fi
|
||||
tmp_md5=/tmp/.rkipc-ini.md5sum
|
||||
data_md5=/userdata/.rkipc-default.md5sum
|
||||
md5sum $default_rkipc_ini > $tmp_md5
|
||||
chk_rkipc=`cat $tmp_md5|awk '{print $1}'`
|
||||
rm $tmp_md5
|
||||
if [ ! -f $data_md5 ];then
|
||||
md5sum $default_rkipc_ini > $data_md5
|
||||
fi
|
||||
grep -w $chk_rkipc $data_md5
|
||||
if [ $? -ne 0 ] ;then
|
||||
rm -f $rkipc_ini
|
||||
echo "$chk_rkipc" > $data_md5
|
||||
fi
|
||||
|
||||
if [ ! -f "$default_rkipc_ini" ];then
|
||||
# check md5sum
|
||||
# tmp_md5=/tmp/.rkipc-ini.md5sum
|
||||
# data_md5=/userdata/.rkipc-default.md5sum
|
||||
# md5sum $default_rkipc_ini > $tmp_md5
|
||||
# chk_rkipc=`cat $tmp_md5|awk '{print $1}'`
|
||||
# rm $tmp_md5
|
||||
# if [ ! -f $data_md5 ];then
|
||||
# md5sum $default_rkipc_ini > $data_md5
|
||||
# fi
|
||||
# grep -w $chk_rkipc $data_md5
|
||||
# if [ $? -ne 0 ] ;then
|
||||
# rm -f $rkipc_ini
|
||||
# echo "$chk_rkipc" > $data_md5
|
||||
# fi
|
||||
|
||||
if [ ! -f "$default_rkipc_ini" ]; then
|
||||
echo "Error: not found rkipc.ini !!!"
|
||||
exit -1
|
||||
fi
|
||||
|
|
@ -121,11 +118,11 @@ post_chk()
|
|||
cp -fa /oem/usr/share/image.bmp /userdata/
|
||||
fi
|
||||
|
||||
if [ -f "/oem/usr/share/speaker_test.wav" ];then
|
||||
if [ -f "/oem/usr/share/speaker_test.wav" ]; then
|
||||
rk_mpi_ao_test -i /oem/usr/share/speaker_test.wav --sound_card_name=hw:0,0 --device_ch=2 --device_rate=8000 --input_rate=8000 --input_ch=2 --set_volume 50
|
||||
fi
|
||||
|
||||
if [ -d "/oem/usr/share/iqfiles" ];then
|
||||
if [ -d "/oem/usr/share/iqfiles" ]; then
|
||||
rkipc -a /oem/usr/share/iqfiles &
|
||||
else
|
||||
rkipc &
|
||||
|
|
@ -135,9 +132,9 @@ post_chk()
|
|||
rcS
|
||||
|
||||
ulimit -c unlimited
|
||||
echo "/data/core-%p-%e" > /proc/sys/kernel/core_pattern
|
||||
echo "/data/core-%p-%e" >/proc/sys/kernel/core_pattern
|
||||
# echo 0 > /sys/devices/platform/rkcif-mipi-lvds/is_use_dummybuf
|
||||
|
||||
echo 1 > /proc/sys/vm/overcommit_memory
|
||||
echo 1 >/proc/sys/vm/overcommit_memory
|
||||
|
||||
post_chk &
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
[audio.0]
|
||||
enable = 1
|
||||
enable = 0
|
||||
card_name = hw:0,0
|
||||
encode_type = G711A
|
||||
format = S16
|
||||
|
|
|
|||
20
project/app/wifi_app/.gitignore
vendored
20
project/app/wifi_app/.gitignore
vendored
|
|
@ -1,14 +1,14 @@
|
|||
*.o
|
||||
#hostapd-2.6/hostapd/hostapd
|
||||
#hostapd-2.6/hostapd/hostapd_cli
|
||||
hostapd-2.6/hostapd/hostapd
|
||||
hostapd-2.6/hostapd/hostapd_cli
|
||||
install_out
|
||||
libnl-3.4.0
|
||||
out
|
||||
#wifi/lib32/librkwifibt.so
|
||||
#wifi/librkwifibt.so
|
||||
#wifi/test/rkwifi_server
|
||||
#wpa_supplicant-2.6/wpa_supplicant/libwpa_client.so
|
||||
#wpa_supplicant-2.6/wpa_supplicant/wpa_cli
|
||||
#wpa_supplicant-2.6/wpa_supplicant/wpa_passphrase
|
||||
#wpa_supplicant-2.6/wpa_supplicant/wpa_supplicant
|
||||
#wpa_supplicant_hostapd-0.8_rtw-2-ga8ef7c824.20200911
|
||||
wifi/lib32/librkwifibt.so
|
||||
wifi/librkwifibt.so
|
||||
wifi/test/rkwifi_server
|
||||
wpa_supplicant-2.6/wpa_supplicant/libwpa_client.so
|
||||
wpa_supplicant-2.6/wpa_supplicant/wpa_cli
|
||||
wpa_supplicant-2.6/wpa_supplicant/wpa_passphrase
|
||||
wpa_supplicant-2.6/wpa_supplicant/wpa_supplicant
|
||||
wpa_supplicant_hostapd-0.8_rtw-2-ga8ef7c824.20200911
|
||||
|
|
|
|||
Binary file not shown.
104
project/build.sh
104
project/build.sh
|
|
@ -137,6 +137,17 @@ function check_config() {
|
|||
return 1
|
||||
}
|
||||
|
||||
function __IS_IN_ARRAY() {
|
||||
local value="$1"
|
||||
shift
|
||||
for item in "$@"; do
|
||||
if [[ "$item" == "$value" ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
function choose_target_board() {
|
||||
local LF_HARDWARE=("RV1103_Luckfox_Pico"
|
||||
"RV1103_Luckfox_Pico_Mini_A"
|
||||
|
|
@ -151,20 +162,31 @@ function choose_target_board() {
|
|||
local cnt=0 space8=" "
|
||||
|
||||
# Get Hardware Version
|
||||
local LUNCH_NUM=0
|
||||
local HW_INDEX
|
||||
echo "You're building on Linux"
|
||||
echo -e "${C_GREEN} "${space8}Lunch menu...pick the Luckfox Pico hardware version:"${C_NORMAL}"
|
||||
echo -e "${C_GREEN} "${space8}选择 Luckfox Pico 硬件版本:"${C_NORMAL}"
|
||||
echo "${space8}${space8}[0] RV1103_Luckfox_Pico"
|
||||
echo "${space8}${space8}[1] RV1103_Luckfox_Pico_Mini_A"
|
||||
echo "${space8}${space8}[2] RV1103_Luckfox_Pico_Mini_B"
|
||||
echo "${space8}${space8}[3] RV1103_Luckfox_Pico_Plus"
|
||||
echo "${space8}${space8}[4] RV1106_Luckfox_Pico_Pro"
|
||||
echo "${space8}${space8}[5] RV1106_Luckfox_Pico_Max"
|
||||
echo "${space8}${space8}[6] RV1106_Luckfox_Pico_Ultra"
|
||||
echo "${space8}${space8}[7] RV1106_Luckfox_Pico_Ultra_W"
|
||||
echo "${space8}${space8}[8] custom"
|
||||
read -p "Which would you like? [0~7][default:0]: " HW_INDEX
|
||||
|
||||
echo "${space8}${space8}[${LUNCH_NUM}] RV1103_Luckfox_Pico"
|
||||
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||
echo "${space8}${space8}[${LUNCH_NUM}] RV1103_Luckfox_Pico_Mini_A"
|
||||
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||
echo "${space8}${space8}[${LUNCH_NUM}] RV1103_Luckfox_Pico_Mini_B"
|
||||
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||
echo "${space8}${space8}[${LUNCH_NUM}] RV1103_Luckfox_Pico_Plus"
|
||||
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_Pro"
|
||||
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_Max"
|
||||
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_Ultra"
|
||||
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_Ultra_W"
|
||||
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||
echo "${space8}${space8}[${LUNCH_NUM}] custom"
|
||||
|
||||
read -p "Which would you like? [0~${LUNCH_NUM}][default:0]: " HW_INDEX
|
||||
|
||||
if [ -z "$HW_INDEX" ]; then
|
||||
HW_INDEX=0
|
||||
|
|
@ -228,21 +250,45 @@ function choose_target_board() {
|
|||
local BM_INDEX MAX_BM_INDEX
|
||||
echo -e "${C_GREEN} "${space8}Lunch menu...pick the boot medium:"${C_NORMAL}"
|
||||
echo -e "${C_GREEN} "${space8}选择启动媒介:"${C_NORMAL}"
|
||||
if (("$HW_INDEX" >= 0 && "$HW_INDEX" <= 1)); then
|
||||
|
||||
#if (("$HW_INDEX" >= 0 && "$HW_INDEX" <= 1)); then
|
||||
# echo "${space8}${space8}[0] SD_CARD"
|
||||
# read -p "Which would you like? [0][default:0]: " BM_INDEX
|
||||
# MAX_BM_INDEX=0
|
||||
#elif (("$HW_INDEX" >= 2 && "$HW_INDEX" <= 5)); then
|
||||
# echo "${space8}${space8}[0] SD_CARD"
|
||||
# echo "${space8}${space8}[1] SPI_NAND"
|
||||
# read -p "Which would you like? [0~1][default:0]: " BM_INDEX
|
||||
# MAX_BM_INDEX=1
|
||||
#elif (("$HW_INDEX" >= 6 && "$HW_INDEX" <= 7)); then
|
||||
# echo "${space8}${space8}[0] EMMC"
|
||||
# read -p "Which would you like? [0][default:0]: " BM_INDEX
|
||||
# MAX_BM_INDEX=0
|
||||
#fi
|
||||
|
||||
range_sd_card=(0 1)
|
||||
range_sd_card_spi_nand=(2 3 4 5)
|
||||
range_emmc=(6 7)
|
||||
|
||||
if __IS_IN_ARRAY "$HW_INDEX" "${range_sd_card[@]}"; then
|
||||
echo "${space8}${space8}[0] SD_CARD"
|
||||
read -p "Which would you like? [0][default:0]: " BM_INDEX
|
||||
MAX_BM_INDEX=0
|
||||
elif (("$HW_INDEX" >= 2 && "$HW_INDEX" <= 5)); then
|
||||
elif __IS_IN_ARRAY "$HW_INDEX" "${range_sd_card_spi_nand[@]}"; then
|
||||
echo "${space8}${space8}[0] SD_CARD"
|
||||
echo "${space8}${space8}[1] SPI_NAND"
|
||||
read -p "Which would you like? [0~1][default:0]: " BM_INDEX
|
||||
MAX_BM_INDEX=1
|
||||
elif (("$HW_INDEX" >= 6 && "$HW_INDEX" <= 7)); then
|
||||
elif __IS_IN_ARRAY "$HW_INDEX" "${range_emmc[@]}"; then
|
||||
echo "${space8}${space8}[0] EMMC"
|
||||
read -p "Which would you like? [0][default:0]: " BM_INDEX
|
||||
MAX_BM_INDEX=0
|
||||
else
|
||||
echo "Invalid HW_INDEX: $HW_INDEX"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Default is 0
|
||||
if [ -z "$BM_INDEX" ]; then
|
||||
BM_INDEX=0
|
||||
fi
|
||||
|
|
@ -730,7 +776,7 @@ function build_env() {
|
|||
local env_cfg_img
|
||||
env_cfg_img=$RK_PROJECT_OUTPUT_IMAGE/env.img
|
||||
|
||||
if [ ! -f $RK_PROJECT_PATH_PC_TOOLS/mkenvimage ] || [ $LF_ENABLE_SPI_NAND_FAST_BOOT = "y" ]; then
|
||||
if [ ! -f "$RK_PROJECT_PATH_PC_TOOLS/mkenvimage" ] || [ "$LF_ENABLE_SPI_NAND_FAST_BOOT" = "y" ]; then
|
||||
build_tool
|
||||
fi
|
||||
|
||||
|
|
@ -1297,7 +1343,7 @@ function build_clean() {
|
|||
rm -rf ${SDK_ROOT_DIR}/output ${SDK_ROOT_DIR}/config
|
||||
rm -rf ${SDK_ROOT_DIR}/sysdrv/source/kernel/out
|
||||
rm -rf ${BOARD_CONFIG}
|
||||
if [ -d ${SDK_SYSDRV_DIR}/source/buildroot ] && [ "$LF_TARGET_ROOTFS" != "ubuntu" ]; then
|
||||
if [ -d ${SDK_SYSDRV_DIR}/source/buildroot ] && [ "$LF_TARGET_ROOTFS" = "buildroot" ]; then
|
||||
rm -rf ${SDK_SYSDRV_DIR}/source/buildroot
|
||||
fi
|
||||
if [ -d ${SDK_SYSDRV_DIR}/source/busybox ]; then
|
||||
|
|
@ -2478,25 +2524,40 @@ function __RUN_POST_BUILD_SCRIPT() {
|
|||
}
|
||||
|
||||
function post_overlay() {
|
||||
check_config RK_POST_OVERLAY || return 0
|
||||
[ -n "$RK_POST_OVERLAY" ] || return 0
|
||||
|
||||
local tmp_path
|
||||
tmp_path=$(realpath $BOARD_CONFIG)
|
||||
tmp_path=$(dirname $tmp_path)
|
||||
if [ -d "$tmp_path/overlay/$RK_POST_OVERLAY" ]; then
|
||||
rsync -a --ignore-times --keep-dirlinks --chmod=u=rwX,go=rX --exclude .empty \
|
||||
$tmp_path/overlay/$RK_POST_OVERLAY/* $RK_PROJECT_PACKAGE_ROOTFS_DIR/
|
||||
fi
|
||||
|
||||
for overlay_dir in $RK_POST_OVERLAY; do
|
||||
if [ -d "$tmp_path/overlay/$overlay_dir" ]; then
|
||||
rsync -a --ignore-times --keep-dirlinks --chmod=u=rwX,go=rX --exclude .empty \
|
||||
$tmp_path/overlay/$overlay_dir/* $RK_PROJECT_PACKAGE_ROOTFS_DIR/
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function __RUN_PRE_BUILD_OEM_SCRIPT() {
|
||||
local tmp_path
|
||||
tmp_path=$(realpath $BOARD_CONFIG)
|
||||
tmp_path=$(dirname $tmp_path)
|
||||
|
||||
__RUN_POST_CLEAN_FILES
|
||||
|
||||
if [ -f "$tmp_path/$RK_PRE_BUILD_OEM_SCRIPT" ]; then
|
||||
bash -x $tmp_path/$RK_PRE_BUILD_OEM_SCRIPT
|
||||
fi
|
||||
__RUN_POST_CLEAN_FILES
|
||||
|
||||
}
|
||||
|
||||
function __RUN_POST_BUILD_USERDATA_SCRIPT() {
|
||||
local tmp_path
|
||||
tmp_path=$(realpath $BOARD_CONFIG)
|
||||
tmp_path=$(dirname $tmp_path)
|
||||
if [ -f "$tmp_path/$RK_PRE_BUILD_USERDATA_SCRIPT" ]; then
|
||||
bash -x $tmp_path/$RK_PRE_BUILD_USERDATA_SCRIPT
|
||||
fi
|
||||
}
|
||||
|
||||
function build_firmware() {
|
||||
|
|
@ -2552,6 +2613,7 @@ function build_firmware() {
|
|||
mkdir -p $RK_PROJECT_PACKAGE_USERDATA_DIR
|
||||
if [ "$RK_ENABLE_FASTBOOT" != "y" ]; then
|
||||
__PACKAGE_USERDATA
|
||||
__RUN_POST_BUILD_USERDATA_SCRIPT
|
||||
fi
|
||||
build_mkimg userdata $RK_PROJECT_PACKAGE_USERDATA_DIR
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: emmc/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=emmc
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=buildroot
|
||||
|
||||
# Buildroot defconfig
|
||||
|
|
@ -109,3 +109,16 @@ export RK_ENABLE_ROCKCHIP_TEST=y
|
|||
# enable rockchip wifi
|
||||
#export RK_ENABLE_WIFI=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow\
|
||||
overlay-luckfox-buildroot-rgb"
|
||||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra-w.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: emmc/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=emmc
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox/custom
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=buildroot
|
||||
|
||||
# Buildroot defconfig
|
||||
|
|
@ -114,3 +114,16 @@ export RK_ENABLE_WIFI_CHIP=AIC8800DC
|
|||
export LF_WIFI_SSID="Your wifi ssid"
|
||||
export LF_WIFI_PSK="Your wifi password"
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow\
|
||||
overlay-luckfox-buildroot-rgb"
|
||||
|
|
@ -21,7 +21,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra-fastboot.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: emmc/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=emmc
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -59,7 +59,7 @@ export RK_PARTITION_FS_TYPE_CFG=boot@IGNORE@erofs,userdata@/userdata@ext4
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=busybox
|
||||
|
||||
# Buildroot defconfig
|
||||
|
|
@ -132,7 +132,7 @@ export RK_PRE_BUILD_OEM_SCRIPT=luckfox-rv1106-tb-pre-oem.sh
|
|||
export RK_ENABLE_FASTBOOT=y
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY=overlay-luckfox
|
||||
export RK_POST_OVERLAY=overlay-luckfox-fastboot
|
||||
|
||||
# enable tiny meta only support cmdline overlay
|
||||
export RK_TINY_META=n
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: emmc/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=emmc
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=ubuntu
|
||||
|
||||
# SUBMODULES : github/gitee
|
||||
|
|
@ -109,3 +109,15 @@ export RK_ENABLE_ROCKCHIP_TEST=y
|
|||
# enable rockchip wifi
|
||||
#export RK_ENABLE_WIFI=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu-config overlay-luckfox-ubuntu-ultra"
|
||||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra-w.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: emmc/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=emmc
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=ubuntu
|
||||
|
||||
# SUBMODULES : github/gitee
|
||||
|
|
@ -117,3 +117,15 @@ export RK_ENABLE_WIFI_CHIP=AIC8800DC
|
|||
export LF_WIFI_SSID="Your wifi ssid"
|
||||
export LF_WIFI_PSK="Your wifi password"
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu-config overlay-luckfox-ubuntu-ultra"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=buildroot
|
||||
|
||||
# Buildroot defconfig
|
||||
|
|
@ -102,3 +102,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow"
|
||||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=buildroot
|
||||
|
||||
# Buildroot defconfig
|
||||
|
|
@ -102,3 +102,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow"
|
||||
|
|
@ -14,13 +14,13 @@ export RK_APP_TYPE=RKIPC_RV1103
|
|||
export RK_BOOTARGS_CMA_SIZE="24M"
|
||||
|
||||
# Kernel dts
|
||||
export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini-b.dts
|
||||
export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini.dts
|
||||
|
||||
#################################################
|
||||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=buildroot
|
||||
|
||||
# Buildroot defconfig
|
||||
|
|
@ -102,3 +102,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow"
|
||||
|
|
@ -21,7 +21,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico-plus.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -59,7 +59,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=buildroot
|
||||
|
||||
# Buildroot defconfig
|
||||
|
|
@ -103,3 +103,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow"
|
||||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-max.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=buildroot
|
||||
|
||||
# Buildroot defconfig
|
||||
|
|
@ -102,3 +102,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow"
|
||||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-pro.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=buildroot
|
||||
|
||||
# Buildroot defconfig
|
||||
|
|
@ -102,3 +102,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow"
|
||||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=ubuntu
|
||||
|
||||
# SUBMODULES : github/gitee
|
||||
|
|
@ -105,3 +105,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config"
|
||||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=ubuntu
|
||||
|
||||
# SUBMODULES : github/gitee
|
||||
|
|
@ -105,3 +105,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config"
|
||||
|
|
@ -14,13 +14,13 @@ export RK_CHIP=rv1106
|
|||
export RK_BOOTARGS_CMA_SIZE="1M"
|
||||
|
||||
# Kernel dts
|
||||
export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini-b.dts
|
||||
export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini.dts
|
||||
|
||||
#################################################
|
||||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=ubuntu
|
||||
|
||||
# SUBMODULES : github/gitee
|
||||
|
|
@ -105,3 +105,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config"
|
||||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico-plus.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=ubuntu
|
||||
|
||||
# SUBMODULES : github/gitee
|
||||
|
|
@ -105,3 +105,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config"
|
||||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-max.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=ubuntu
|
||||
|
||||
# SUBMODULES : github/gitee
|
||||
|
|
@ -105,3 +105,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config"
|
||||
|
|
@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-pro.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: sd_card/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=sd_card
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only sd_card)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=ubuntu
|
||||
|
||||
# SUBMODULES : github/gitee
|
||||
|
|
@ -105,3 +105,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config"
|
||||
|
|
@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
|
|||
# <partdef> := <size>[@<offset>](part-name)
|
||||
# Note:
|
||||
# If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding.
|
||||
export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),36M(oem),6M(userdata),78M(rootfs)"
|
||||
export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),30M(oem),6M(userdata),85M(rootfs)"
|
||||
|
||||
# config partition's filesystem type (squashfs is readonly)
|
||||
# emmc: squashfs/ext4
|
||||
|
|
@ -102,3 +102,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow"
|
||||
|
|
@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
|
|||
# <partdef> := <size>[@<offset>](part-name)
|
||||
# Note:
|
||||
# If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding.
|
||||
export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),36M(oem),6M(userdata),78M(rootfs)"
|
||||
export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),30M(oem),6M(userdata),85M(rootfs)"
|
||||
|
||||
# config partition's filesystem type (squashfs is readonly)
|
||||
# emmc: squashfs/ext4
|
||||
|
|
@ -102,3 +102,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow"
|
||||
|
|
@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
|
|||
# <partdef> := <size>[@<offset>](part-name)
|
||||
# Note:
|
||||
# If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding.
|
||||
export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),36M(oem),10M(userdata),204M(rootfs)"
|
||||
export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),30M(oem),10M(userdata),210M(rootfs)"
|
||||
|
||||
# config partition's filesystem type (squashfs is readonly)
|
||||
# emmc: squashfs/ext4
|
||||
|
|
@ -102,3 +102,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow"
|
||||
|
|
@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
|
|||
# <partdef> := <size>[@<offset>](part-name)
|
||||
# Note:
|
||||
# If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding.
|
||||
export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),36M(oem),10M(userdata),204M(rootfs)"
|
||||
export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),30M(oem),10M(userdata),210M(rootfs)"
|
||||
|
||||
# config partition's filesystem type (squashfs is readonly)
|
||||
# emmc: squashfs/ext4
|
||||
|
|
@ -102,3 +102,16 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y
|
|||
|
||||
# enable rockchip test
|
||||
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||
|
||||
#################################################
|
||||
# PRE and POST
|
||||
#################################################
|
||||
|
||||
# specify pre.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
||||
|
||||
# specify post.sh for delete/overlay files
|
||||
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow"
|
||||
|
|
@ -21,7 +21,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-pro-max-fastboot.dts
|
|||
# BOOT_MEDIUM
|
||||
#################################################
|
||||
|
||||
# Target boot medium: emmc/spi_nor/spi_nand
|
||||
# Target boot medium
|
||||
export RK_BOOT_MEDIUM=spi_nand
|
||||
|
||||
# Uboot defconfig fragment
|
||||
|
|
@ -65,7 +65,7 @@ export RK_PARTITION_FS_TYPE_CFG=boot@IGNORE@erofs,userdata@/userdata@ubifs
|
|||
# TARGET_ROOTFS
|
||||
#################################################
|
||||
|
||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
|
||||
# Target rootfs
|
||||
export LF_TARGET_ROOTFS=busybox
|
||||
|
||||
# Buildroot defconfig
|
||||
|
|
@ -138,7 +138,7 @@ export RK_PRE_BUILD_OEM_SCRIPT=luckfox-rv1106-tb-pre-oem.sh
|
|||
export RK_ENABLE_FASTBOOT=y
|
||||
|
||||
# declare overlay directory
|
||||
export RK_POST_OVERLAY=overlay-luckfox
|
||||
export RK_POST_OVERLAY=overlay-luckfox-fastboot
|
||||
|
||||
# enable tiny meta only support cmdline overlay
|
||||
export RK_TINY_META=n
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
|
||||
function lf_rm() {
|
||||
for file in "$@"; do
|
||||
if [ -e "$file" ]; then
|
||||
echo "Deleting: $file"
|
||||
rm -rf "$file"
|
||||
#else
|
||||
#echo "File not found: $file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# remove unused files
|
||||
function remove_data()
|
||||
{
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/*.aiisp
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/*.data
|
||||
|
||||
# drm
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libdrm*
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libdrm_rockchip*
|
||||
|
||||
# kms
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libkms*
|
||||
|
||||
# freetype
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libfreetype*
|
||||
|
||||
# iconv
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libiconv*
|
||||
|
||||
# rkAVS
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/librkAVS*
|
||||
|
||||
# jpeg
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libjpeg*
|
||||
|
||||
# png
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libpng*
|
||||
|
||||
# vqefiles
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/share/vqefiles/*
|
||||
|
||||
# ko
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/ko/phy-rockchip-csi2-dphy-hw.ko
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/ko/phy-rockchip-csi2-dphy.ko
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/ko/rga3.ko
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/ko/rknpu.ko
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/ko/rockit.ko
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/ko/sc3336.ko
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/ko/video_rkcif.ko
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/ko/video_rkisp.ko
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/ko/mpp_vcodec.ko
|
||||
|
||||
}
|
||||
|
||||
#=========================
|
||||
# run
|
||||
#=========================
|
||||
remove_data
|
||||
49
project/cfg/BoardConfig_IPC/luckfox-buildroot-oem-pre.sh
Normal file
49
project/cfg/BoardConfig_IPC/luckfox-buildroot-oem-pre.sh
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
|
||||
function lf_rm() {
|
||||
for file in "$@"; do
|
||||
if [ -e "$file" ]; then
|
||||
echo "Deleting: $file"
|
||||
rm -rf "$file"
|
||||
#else
|
||||
#echo "File not found: $file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# remove unused files
|
||||
function remove_data()
|
||||
{
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/*.aiisp
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/*.data
|
||||
|
||||
# drm ( sample program required )
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libdrm*
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libdrm_rockchip*
|
||||
|
||||
# kms
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libkms*
|
||||
|
||||
# freetype
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libfreetype*
|
||||
|
||||
# iconv
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libiconv*
|
||||
|
||||
# rkAVS
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/librkAVS*
|
||||
|
||||
# jpeg
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libjpeg*
|
||||
|
||||
# png
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libpng*
|
||||
|
||||
# vqefiles
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/share/vqefiles/*
|
||||
}
|
||||
|
||||
#=========================
|
||||
# run
|
||||
#=========================
|
||||
remove_data
|
||||
50
project/cfg/BoardConfig_IPC/luckfox-ubuntu-oem-pre.sh
Normal file
50
project/cfg/BoardConfig_IPC/luckfox-ubuntu-oem-pre.sh
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
|
||||
# remove unused files
|
||||
function lf_rm() {
|
||||
for file in "$@"; do
|
||||
if [ -e "$file" ]; then
|
||||
echo "Deleting: $file"
|
||||
rm -rf "$file"
|
||||
#else
|
||||
#echo "File not found: $file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# remove unused files
|
||||
function remove_data()
|
||||
{
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/*.aiisp
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/*.data
|
||||
|
||||
# drm
|
||||
#lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libdrm*
|
||||
#lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libdrm_rockchip*
|
||||
|
||||
# kms
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libkms*
|
||||
|
||||
# freetype
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libfreetype*
|
||||
|
||||
# iconv
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libiconv*
|
||||
|
||||
# rkAVS
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/librkAVS*
|
||||
|
||||
# jpeg
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libjpeg*
|
||||
|
||||
# png
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libpng*
|
||||
|
||||
# vqefiles
|
||||
lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/share/vqefiles/*
|
||||
}
|
||||
|
||||
#=========================
|
||||
# run
|
||||
#=========================
|
||||
remove_data
|
||||
24
project/cfg/BoardConfig_IPC/luckfox-userdata-pre.sh
Normal file
24
project/cfg/BoardConfig_IPC/luckfox-userdata-pre.sh
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
function lf_rm() {
|
||||
for file in "$@"; do
|
||||
if [ -e "$file" ]; then
|
||||
echo "Deleting: $file"
|
||||
rm -rf "$file"
|
||||
#else
|
||||
#echo "File not found: $file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# remove unused files
|
||||
function remove_data()
|
||||
{
|
||||
lf_rm $RK_PROJECT_PACKAGE_USERDATA_DIR/*.sh
|
||||
lf_rm $RK_PROJECT_PACKAGE_USERDATA_DIR/*.bmp
|
||||
}
|
||||
|
||||
#=========================
|
||||
# run
|
||||
#=========================
|
||||
remove_data
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# sshd Starts sshd.
|
||||
#
|
||||
|
||||
# Make sure the ssh-keygen progam exists
|
||||
[ -f /usr/bin/ssh-keygen ] || exit 0
|
||||
|
||||
umask 077
|
||||
|
||||
start() {
|
||||
chown root:root /var/empty/
|
||||
# Create any missing keys
|
||||
/usr/bin/ssh-keygen -A
|
||||
|
||||
printf "Starting sshd: "
|
||||
/usr/sbin/sshd
|
||||
touch /var/lock/sshd
|
||||
echo "OK"
|
||||
}
|
||||
stop() {
|
||||
printf "Stopping sshd: "
|
||||
killall sshd
|
||||
rm -f /var/lock/sshd
|
||||
echo "OK"
|
||||
}
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
|
||||
check_hciconfig() {
|
||||
if command -v hciattach &> /dev/null; then
|
||||
if lsmod | grep -q "aic8800_fdrv"; then
|
||||
hciattach -s 1500000 /dev/ttyS1 any 1500000 flow nosleep&
|
||||
sleep 2
|
||||
if hciconfig -a | grep -q "hci0"; then
|
||||
hciconfig hci0 up&
|
||||
else
|
||||
echo "hci0 not found or not available."
|
||||
fi
|
||||
ifconfig wlan0 up && udhcpc -i wlan0 > /dev/null 2>&1
|
||||
else
|
||||
echo "aic8800_fdrv not found."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
check_hciconfig &
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# python Starts python code.
|
||||
#
|
||||
|
||||
# Make sure the python progam exists
|
||||
[ -f /usr/bin/python ] || exit 0
|
||||
|
||||
umask 077
|
||||
|
||||
main_path="/root/main.py"
|
||||
boot_path="/root/boot.py"
|
||||
|
||||
start() {
|
||||
# Run python progam
|
||||
if [ -f $main_path ]; then
|
||||
echo "running $main_path..."
|
||||
python $main_path
|
||||
else
|
||||
if [ -f $boot_path ]; then
|
||||
echo "running $boot_path..."
|
||||
python $boot_path
|
||||
else
|
||||
echo "$main_path and $boot_path not exist ,pass..."
|
||||
fi
|
||||
fi
|
||||
echo "OK"
|
||||
}
|
||||
stop() {
|
||||
printf "Stopping python: "
|
||||
killall python
|
||||
echo "OK"
|
||||
}
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
if [ "$(hwclock | grep "1969")" ]; then
|
||||
echo "RTC time calibration"
|
||||
date -s 2024-01-01
|
||||
hwclock -w
|
||||
else
|
||||
echo "RTC does not require time calibration"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
#!/bin/sh
|
||||
|
||||
TARGET_IP="172.32.0.93"
|
||||
|
||||
USB_KEYWORD="android_work: sent uevent USB_STATE="
|
||||
USB_MODE_PATH="/proc/device-tree/usbdrd/usb@ffb00000/dr_mode"
|
||||
|
||||
MAX_RETRIES=10
|
||||
retries=0
|
||||
|
||||
usb0_config() {
|
||||
if [ "$(cat /proc/device-tree/usbdrd/usb@ffb00000/dr_mode)" == "peripheral" ]; then
|
||||
current_ip=$(ifconfig usb0 | grep -o 'inet addr:[^ ]*' | awk -F ':' '{print $2}')
|
||||
echo "current_ip = $current_ip"
|
||||
echo "TARGET_IP = $TARGET_IP"
|
||||
|
||||
while [[ "$current_ip" != "$TARGET_IP" && $retries -lt $MAX_RETRIES ]]; do
|
||||
sleep .5
|
||||
echo "luckfox : set usb0 ip"
|
||||
ifconfig usb0 "$TARGET_IP"
|
||||
current_ip=$(ifconfig usb0 | grep -o 'inet addr:[^ ]*' | awk -F ':' '{print $2}')
|
||||
echo $current_ip
|
||||
retries=$((retries + 1))
|
||||
done
|
||||
|
||||
if [[ "$current_ip" != "$TARGET_IP" ]]; then
|
||||
echo "usb0 config error"
|
||||
else
|
||||
echo "usb0 config success"
|
||||
fi
|
||||
else
|
||||
echo "usb0 is using host mode"
|
||||
fi
|
||||
}
|
||||
|
||||
usb_reset() {
|
||||
while true; do
|
||||
last_line=$(dmesg | grep "$USB_KEYWORD" | tail -n 1)
|
||||
|
||||
if [[ "$last_line" == *"DISCONNECTED"* ]]; then
|
||||
echo "Detected USB DISCONNECTED."
|
||||
/etc/init.d/S50usbdevice restart
|
||||
usb0_config
|
||||
#elif [[ "$last_line" == *"CONFIGURED"* ]]; then
|
||||
# echo "Detected CONFIGURED. No action required."
|
||||
#else
|
||||
# echo "No relevant USB_STATE found."
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
# check peripheral
|
||||
usb_mode="$(cat $USB_MODE_PATH)"
|
||||
if [ "$usb_mode" = "peripheral" ]; then
|
||||
usb0_config
|
||||
usb_reset &
|
||||
fi
|
||||
;;
|
||||
stop) ;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
|
||||
|
||||
export EDITOR='/bin/vi'
|
||||
|
||||
#export PS1='[\u@\h \W]# '
|
||||
if [ "$PS1" ]; then
|
||||
if [ "`id -u`" -eq 0 ]; then
|
||||
#export PS1='# '
|
||||
export PS1='[\u@\h \W]# '
|
||||
else
|
||||
#export PS1='$ '
|
||||
export PS1='[\u@\h \W]$ '
|
||||
fi
|
||||
fi
|
||||
|
||||
# Source configuration files from /etc/profile.d
|
||||
for i in /etc/profile.d/*.sh ; do
|
||||
if [ -r "$i" ]; then
|
||||
. $i
|
||||
fi
|
||||
done
|
||||
unset i
|
||||
|
||||
|
||||
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-buildroot-init/usr/bin/iomux
Executable file
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-buildroot-init/usr/bin/iomux
Executable file
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,9 @@
|
|||
root:$1$dXmV8ZLO$eNAQzSYOgRkYMJRdsHwLS1:19664::::::
|
||||
daemon:*:::::::
|
||||
bin:*:::::::
|
||||
sys:*:::::::
|
||||
sync:*:::::::
|
||||
mail:*:::::::
|
||||
www-data:*:::::::
|
||||
operator:*:::::::
|
||||
nobody:*:::::::
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[global]
|
||||
workgroup = WORKGROUP
|
||||
server string = luckfox samba server
|
||||
security = user
|
||||
passdb backend = smbpasswd
|
||||
smb passwd file = /etc/samba/smbpasswd
|
||||
[public]
|
||||
comment = public share
|
||||
path = /
|
||||
read only = no
|
||||
user = root
|
||||
create mask = 0755
|
||||
directory mask = 0755
|
||||
|
|
@ -0,0 +1 @@
|
|||
root:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:EF8BDD6C516032CDB7C15080FFE1B2D5:[U ]:LCT-5FEF3549:
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $
|
||||
|
||||
# This is the sshd server system-wide configuration file. See
|
||||
# sshd_config(5) for more information.
|
||||
|
||||
# This sshd was compiled with PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
||||
|
||||
# The strategy used for options in the default sshd_config shipped with
|
||||
# OpenSSH is to specify options with their default value where
|
||||
# possible, but leave them commented. Uncommented options override the
|
||||
# default value.
|
||||
|
||||
#Port 22
|
||||
#AddressFamily any
|
||||
#ListenAddress 0.0.0.0
|
||||
#ListenAddress ::
|
||||
|
||||
#HostKey /etc/ssh/ssh_host_rsa_key
|
||||
#HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||
#HostKey /etc/ssh/ssh_host_ed25519_key
|
||||
|
||||
# Ciphers and keying
|
||||
#RekeyLimit default none
|
||||
|
||||
# Logging
|
||||
#SyslogFacility AUTH
|
||||
#LogLevel INFO
|
||||
|
||||
# Authentication:
|
||||
|
||||
#LoginGraceTime 2m
|
||||
PermitRootLogin yes
|
||||
#StrictModes yes
|
||||
#MaxAuthTries 6
|
||||
#MaxSessions 10
|
||||
|
||||
#PubkeyAuthentication yes
|
||||
|
||||
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
|
||||
# but this is overridden so installations will only check .ssh/authorized_keys
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
|
||||
#AuthorizedPrincipalsFile none
|
||||
|
||||
#AuthorizedKeysCommand none
|
||||
#AuthorizedKeysCommandUser nobody
|
||||
|
||||
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
|
||||
#HostbasedAuthentication no
|
||||
# Change to yes if you don't trust ~/.ssh/known_hosts for
|
||||
# HostbasedAuthentication
|
||||
#IgnoreUserKnownHosts no
|
||||
# Don't read the user's ~/.rhosts and ~/.shosts files
|
||||
#IgnoreRhosts yes
|
||||
|
||||
# To disable tunneled clear text passwords, change to no here!
|
||||
#PasswordAuthentication yes
|
||||
#PermitEmptyPasswords no
|
||||
|
||||
# Change to no to disable s/key passwords
|
||||
#KbdInteractiveAuthentication yes
|
||||
|
||||
# Kerberos options
|
||||
#KerberosAuthentication no
|
||||
#KerberosOrLocalPasswd yes
|
||||
#KerberosTicketCleanup yes
|
||||
#KerberosGetAFSToken no
|
||||
|
||||
# GSSAPI options
|
||||
#GSSAPIAuthentication no
|
||||
#GSSAPICleanupCredentials yes
|
||||
|
||||
# Set this to 'yes' to enable PAM authentication, account processing,
|
||||
# and session processing. If this is enabled, PAM authentication will
|
||||
# be allowed through the KbdInteractiveAuthentication and
|
||||
# PasswordAuthentication. Depending on your PAM configuration,
|
||||
# PAM authentication via KbdInteractiveAuthentication may bypass
|
||||
# the setting of "PermitRootLogin prohibit-password".
|
||||
# If you just want the PAM account and session checks to run without
|
||||
# PAM authentication, then enable this but set PasswordAuthentication
|
||||
# and KbdInteractiveAuthentication to 'no'.
|
||||
#UsePAM no
|
||||
|
||||
#AllowAgentForwarding yes
|
||||
#AllowTcpForwarding yes
|
||||
#GatewayPorts no
|
||||
#X11Forwarding no
|
||||
#X11DisplayOffset 10
|
||||
#X11UseLocalhost yes
|
||||
#PermitTTY yes
|
||||
#PrintMotd yes
|
||||
#PrintLastLog yes
|
||||
#TCPKeepAlive yes
|
||||
#PermitUserEnvironment no
|
||||
#Compression delayed
|
||||
#ClientAliveInterval 0
|
||||
#ClientAliveCountMax 3
|
||||
#UseDNS no
|
||||
#PidFile /var/run/sshd.pid
|
||||
#MaxStartups 10:30:100
|
||||
#PermitTunnel no
|
||||
#ChrootDirectory none
|
||||
#VersionAddendum none
|
||||
|
||||
# no default banner path
|
||||
#Banner none
|
||||
|
||||
# override default of no subsystems
|
||||
Subsystem sftp /usr/libexec/sftp-server
|
||||
|
||||
# Example of overriding settings on a per-user basis
|
||||
#Match User anoncvs
|
||||
# X11Forwarding no
|
||||
# AllowTcpForwarding no
|
||||
# PermitTTY no
|
||||
# ForceCommand cvs server
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
echo "The smb initialization is skipped"
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
|
||||
check_hciconfig() {
|
||||
if command -v hciattach &> /dev/null; then
|
||||
if lsmod | grep -q "aic8800_fdrv"; then
|
||||
hciattach -s 1500000 /dev/ttyS1 any 1500000 flow nosleep&
|
||||
sleep 2
|
||||
if hciconfig -a | grep -q "hci0"; then
|
||||
hciconfig hci0 up&
|
||||
else
|
||||
echo "hci0 not found or not available."
|
||||
fi
|
||||
ifconfig wlan0 up && udhcpc -i wlan0 > /dev/null 2>&1
|
||||
else
|
||||
echo "aic8800_fdrv not found."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
check_hciconfig &
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
if [ "$(hwclock | grep "1969")" ]; then
|
||||
echo "RTC time calibration"
|
||||
date -s 2024-01-01
|
||||
hwclock -w
|
||||
else
|
||||
echo "RTC does not require time calibration"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
[ -f /etc/profile.d/RkEnv.sh ] && source /etc/profile.d/RkEnv.sh
|
||||
case $1 in
|
||||
start)
|
||||
if [ -f /usr/bin/t ] ;then
|
||||
chmod a+x /usr/bin/t
|
||||
t &
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
#!/bin/sh
|
||||
|
||||
TARGET_IP="172.32.0.93"
|
||||
|
||||
USB_KEYWORD="android_work: sent uevent USB_STATE="
|
||||
USB_MODE_PATH="/proc/device-tree/usbdrd/usb@ffb00000/dr_mode"
|
||||
|
||||
MAX_RETRIES=10
|
||||
retries=0
|
||||
|
||||
usb0_config() {
|
||||
if [ "$(cat /proc/device-tree/usbdrd/usb@ffb00000/dr_mode)" == "peripheral" ]; then
|
||||
current_ip=$(ifconfig usb0 | grep -o 'inet addr:[^ ]*' | awk -F ':' '{print $2}')
|
||||
echo "current_ip = $current_ip"
|
||||
echo "TARGET_IP = $TARGET_IP"
|
||||
|
||||
while [[ "$current_ip" != "$TARGET_IP" && $retries -lt $MAX_RETRIES ]]; do
|
||||
sleep .5
|
||||
echo "luckfox : set usb0 ip"
|
||||
ifconfig usb0 "$TARGET_IP"
|
||||
current_ip=$(ifconfig usb0 | grep -o 'inet addr:[^ ]*' | awk -F ':' '{print $2}')
|
||||
echo $current_ip
|
||||
retries=$((retries + 1))
|
||||
done
|
||||
|
||||
if [[ "$current_ip" != "$TARGET_IP" ]]; then
|
||||
echo "usb0 config error"
|
||||
else
|
||||
echo "usb0 config success"
|
||||
fi
|
||||
else
|
||||
echo "usb0 is using host mode"
|
||||
fi
|
||||
}
|
||||
|
||||
usb_reset() {
|
||||
while true; do
|
||||
last_line=$(dmesg | grep "$USB_KEYWORD" | tail -n 1)
|
||||
|
||||
if [[ "$last_line" == *"DISCONNECTED"* ]]; then
|
||||
echo "Detected USB DISCONNECTED."
|
||||
/etc/init.d/S50usbdevice restart
|
||||
usb0_config
|
||||
#elif [[ "$last_line" == *"CONFIGURED"* ]]; then
|
||||
# echo "Detected CONFIGURED. No action required."
|
||||
#else
|
||||
# echo "No relevant USB_STATE found."
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
# check peripheral
|
||||
usb_mode="$(cat $USB_MODE_PATH)"
|
||||
if [ "$usb_mode" = "peripheral" ]; then
|
||||
usb0_config
|
||||
usb_reset &
|
||||
fi
|
||||
;;
|
||||
stop) ;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
# /etc/inittab
|
||||
#
|
||||
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Note: BusyBox init doesn't support runlevels. The runlevels field is
|
||||
# completely ignored by BusyBox init. If you want runlevels, use
|
||||
# sysvinit.
|
||||
#
|
||||
# Format for each entry: <id>:<runlevels>:<action>:<process>
|
||||
#
|
||||
# id == tty to run on, or empty for /dev/console
|
||||
# runlevels == ignored
|
||||
# action == one of sysinit, respawn, askfirst, wait, and once
|
||||
# process == program to run
|
||||
|
||||
# Startup the system
|
||||
::sysinit:/bin/mount -t proc proc /proc
|
||||
::sysinit:/bin/mount -o remount,rw /
|
||||
::sysinit:/bin/mkdir -p /dev/pts /dev/shm
|
||||
::sysinit:/bin/mount -a
|
||||
::sysinit:/bin/mkdir -p /run/lock/subsys
|
||||
::sysinit:/sbin/swapon -a
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
|
||||
::sysinit:/bin/hostname -F /etc/hostname
|
||||
# now run any rc scripts
|
||||
::sysinit:/etc/init.d/rcS
|
||||
|
||||
# Put a getty on the serial port
|
||||
#console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL
|
||||
console::respawn:-/bin/sh
|
||||
|
||||
# Stuff to do for the 3-finger salute
|
||||
#::ctrlaltdel:/sbin/reboot
|
||||
|
||||
# Stuff to do before rebooting
|
||||
::shutdown:/etc/init.d/rcK
|
||||
::shutdown:/sbin/swapoff -a
|
||||
::shutdown:/bin/umount -a -r
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
|
||||
|
||||
export EDITOR='/bin/vi'
|
||||
|
||||
#export PS1='[\u@\h \W]# '
|
||||
if [ "$PS1" ]; then
|
||||
if [ "`id -u`" -eq 0 ]; then
|
||||
#export PS1='# '
|
||||
export PS1='[\u@\h \W]# '
|
||||
else
|
||||
#export PS1='$ '
|
||||
export PS1='[\u@\h \W]$ '
|
||||
fi
|
||||
fi
|
||||
|
||||
# Source configuration files from /etc/profile.d
|
||||
for i in /etc/profile.d/*.sh ; do
|
||||
if [ -r "$i" ]; then
|
||||
. $i
|
||||
fi
|
||||
done
|
||||
unset i
|
||||
|
||||
|
||||
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-buildroot-tiny/usr/bin/iomux
Executable file
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-buildroot-tiny/usr/bin/iomux
Executable file
Binary file not shown.
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
load_luckfoxconfig() {
|
||||
if [ -f /usr/bin/luckfox-config ]; then
|
||||
luckfox-config load
|
||||
fi
|
||||
if [ "$(cat /proc/device-tree/model)" == "Luckfox Pico Ultra" ] ||
|
||||
[ "$(cat /proc/device-tree/model)" == "Luckfox Pico Ultra W" ]; then
|
||||
if [ -f /usr/bin/luckfox_switch_rgb_resolution ]; then
|
||||
luckfox_switch_rgb_resolution &
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
load_luckfoxconfig
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
#!/bin/bash
|
||||
LUCKFOX_FDT_DTB=/tmp/.fdt.dtb
|
||||
LUCKFOX_FDT_HDR_DTB=/tmp/.fdt_header.dtb
|
||||
LUCKFOX_FDT_HDR_OVERLAY_DTS=/tmp/.fdt_header_overlay.dts
|
||||
LUCKFOX_FDT_HDR_OVERLAY_DTBO=/tmp/.fdt_header_overlay.dtbo
|
||||
|
||||
LUCKFOX_FDT_DUMP_TXT=/tmp/.fdt_dump.txt
|
||||
LF_CUSTOM_DTS_PATH="/mnt/cfg"
|
||||
SYS_OVERLAYS_PATH="/sys/kernel/config/device-tree/overlays"
|
||||
LUCKFOX_CHIP_MEDIA_CLASS="emmc"
|
||||
LUCKFOX_CHIP_MEDIA="/dev/mmcblk0p4"
|
||||
|
||||
function luckfox_tools_check() {
|
||||
if ! command -v dialog &>/dev/null; then
|
||||
echo "The dialog is not installed "
|
||||
exit
|
||||
fi
|
||||
|
||||
if ! command -v dtc &>/dev/null; then
|
||||
echo "The dtc is not installed"
|
||||
exit
|
||||
fi
|
||||
|
||||
# get media class dev
|
||||
if [[ -e /dev/mmcblk0p4 ]]; then
|
||||
LUCKFOX_CHIP_MEDIA_CLASS="emmc"
|
||||
LUCKFOX_CHIP_MEDIA=/dev/mmcblk0p4
|
||||
elif [[ -e /dev/mmcblk1p4 ]]; then
|
||||
LUCKFOX_CHIP_MEDIA_CLASS="sdmmc"
|
||||
LUCKFOX_CHIP_MEDIA=/dev/mmcblk1p4
|
||||
luckfox_set_pin_parameter "SDMMC" 1
|
||||
elif [[ -e /dev/mtdblock3 ]]; then
|
||||
LUCKFOX_CHIP_MEDIA_CLASS="spi_nand"
|
||||
LUCKFOX_CHIP_MEDIA=/dev/mtdblock3
|
||||
else
|
||||
LUCKFOX_CHIP_MEDIA_CLASS="unknown"
|
||||
echo "Do not know the storage medium of Luckfox!"
|
||||
exit
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# -- Static Overlay --
|
||||
function luckfox_sha256_convert() {
|
||||
local sha256_hash=$1
|
||||
local formatted_hash=""
|
||||
|
||||
for ((i = 0; i < ${#sha256_hash}; i += 8)); do
|
||||
formatted_hash+="0x${sha256_hash:$i:8} "
|
||||
done
|
||||
|
||||
echo "$formatted_hash"
|
||||
}
|
||||
|
||||
function luckfox_update_fdt() {
|
||||
# get fdt_header
|
||||
local origin_fdt_size_hex origin_fdt_size
|
||||
dd if=$LUCKFOX_CHIP_MEDIA of=$LUCKFOX_FDT_HDR_DTB bs=1 skip=0 count=2048 >/dev/null 2>&1
|
||||
|
||||
# get size
|
||||
if [ ! -f $LUCKFOX_FDT_HDR_DTB ]; then
|
||||
echo "$LUCKFOX_FDT_HDR_DTB can't be found!"
|
||||
return
|
||||
fi
|
||||
origin_fdt_size_hex=$(fdtdump $LUCKFOX_FDT_HDR_DTB | grep -A 5 "fdt {" | grep "data-size" | awk '{print $3}' | tr -d ';<>')
|
||||
origin_fdt_size=$(printf "%d\n" "$origin_fdt_size_hex")
|
||||
|
||||
# get fdt dtb
|
||||
dd if=$LUCKFOX_CHIP_MEDIA of=$LUCKFOX_FDT_DTB bs=1 skip=2048 count="$origin_fdt_size" >/dev/null 2>&1
|
||||
|
||||
# create fdt dump
|
||||
if [ ! -f $LUCKFOX_FDT_DTB ]; then
|
||||
echo "$LUCKFOX_FDT_DTB can't be found!"
|
||||
return
|
||||
fi
|
||||
fdtdump $LUCKFOX_FDT_DTB >$LUCKFOX_FDT_DUMP_TXT
|
||||
}
|
||||
|
||||
function luckfox_fdt_overlay() {
|
||||
#region
|
||||
local fdt_overlay_dtbo="$1"
|
||||
local fdt_dtb_size fdt_size fdt_size_hex fdt_hash_data
|
||||
|
||||
fdtoverlay -i $LUCKFOX_FDT_DTB -o $LUCKFOX_FDT_DTB "$fdt_overlay_dtbo" >/dev/null 2>&1
|
||||
fdt_dtb_size=$(ls -la $LUCKFOX_FDT_DTB | awk '{print $5}')
|
||||
|
||||
kernel_offset=$(fdtdump $LUCKFOX_FDT_HDR_DTB | grep -A 2 "kernel {" | grep "data-position" | sed -n 's/.*<\(0x[0-9a-fA-F]*\)>.*/\1/p')
|
||||
fdt_offset=$(fdtdump $LUCKFOX_FDT_HDR_DTB | grep -A 2 "fdt {" | grep "data-position" | sed -n 's/.*<\(0x[0-9a-fA-F]*\)>.*/\1/p')
|
||||
|
||||
kernel_offset_dec=$((kernel_offset))
|
||||
fdt_offset_dec=$((fdt_offset))
|
||||
result_dec=$((kernel_offset_dec - fdt_offset_dec))
|
||||
|
||||
if [ $result_dec -lt "$fdt_dtb_size" ]; then
|
||||
echo "Kernel will be affected !"
|
||||
fi
|
||||
|
||||
dd if=$LUCKFOX_FDT_DTB of=$LUCKFOX_CHIP_MEDIA bs=1 seek=2048 count="$fdt_dtb_size" >/dev/null 2>&1
|
||||
|
||||
# fdt header
|
||||
if [ ! -f $LUCKFOX_FDT_DTB ]; then
|
||||
echo "$LUCKFOX_FDT_DTB can't be found!"
|
||||
return
|
||||
fi
|
||||
fdt_size=$(ls -la $LUCKFOX_FDT_DTB | awk '{print $5}')
|
||||
fdt_size_hex=$(printf "%x\n" "$fdt_size")
|
||||
fdt_hash_data=$(luckfox_sha256_convert "$(sha256sum $LUCKFOX_FDT_DTB | awk '{print $1}')")
|
||||
fdt_header_content="
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
&{/images/fdt}{
|
||||
data-size=<0x$fdt_size_hex>;
|
||||
hash{
|
||||
value=<$fdt_hash_data>;
|
||||
};
|
||||
};
|
||||
"
|
||||
echo "$fdt_header_content" >$LUCKFOX_FDT_HDR_OVERLAY_DTS
|
||||
dtc -I dts -O dtb $LUCKFOX_FDT_HDR_OVERLAY_DTS -o $LUCKFOX_FDT_HDR_OVERLAY_DTBO
|
||||
if [ ! -f $LUCKFOX_FDT_HDR_OVERLAY_DTBO ]; then
|
||||
echo "$LUCKFOX_FDT_HDR_OVERLAY_DTBO can't found!"
|
||||
return
|
||||
fi
|
||||
fdtoverlay -i $LUCKFOX_FDT_HDR_DTB -o $LUCKFOX_FDT_HDR_DTB $LUCKFOX_FDT_HDR_OVERLAY_DTBO >/dev/null 2>&1
|
||||
dd if=$LUCKFOX_FDT_HDR_DTB of=$LUCKFOX_CHIP_MEDIA bs=1 seek=0 count=2048 >/dev/null 2>&1
|
||||
#endregion
|
||||
}
|
||||
|
||||
# Load the device tree dynamically
|
||||
function luckfox_load_dynamic_dts() {
|
||||
local dtbo_node_name
|
||||
|
||||
if [ ! -d ${LF_CUSTOM_DTS_PATH}/dtbo/ ]; then
|
||||
exit 1
|
||||
#echo "Can't find ${LF_CUSTOM_DTS_PATH}/dtbo dir !"
|
||||
fi
|
||||
|
||||
for dts_file in ${LF_CUSTOM_DTS_PATH}/dtbo/*.dts; do
|
||||
#Get DTBO name
|
||||
dtbo_node_name="$(basename "$dts_file" .dts)"
|
||||
#Check DTBO path
|
||||
if [ -d "${SYS_OVERLAYS_PATH}/${dtbo_node_name}" ]; then
|
||||
echo "Node is exist"
|
||||
continue
|
||||
fi
|
||||
|
||||
#DTS->DTBO
|
||||
dtc -I dts -O dtb ${LF_CUSTOM_DTS_PATH}/dtbo/${dtbo_node_name}.dts -o \
|
||||
${LF_CUSTOM_DTS_PATH}/dtbo/${dtbo_node_name}.dtbo
|
||||
|
||||
if [ ! -f "${LF_CUSTOM_DTS_PATH}/dtbo/${dtbo_node_name}.dtbo" ]; then
|
||||
echo "${dtbo_node_name}.dts to dtbo error!"
|
||||
continue
|
||||
else
|
||||
mkdir -p ${SYS_OVERLAYS_PATH}/${dtbo_node_name}
|
||||
fi
|
||||
#Load and enable DTBO
|
||||
cat ${LF_CUSTOM_DTS_PATH}/dtbo/${dtbo_node_name}.dtbo > \
|
||||
${SYS_OVERLAYS_PATH}/${dtbo_node_name}/dtbo
|
||||
echo 1 >${SYS_OVERLAYS_PATH}/${dtbo_node_name}/status
|
||||
|
||||
rm ${LLF_CUSTOM_DTS_PATH}/dtbo/${dtbo_node_name}.dtbo
|
||||
done
|
||||
}
|
||||
|
||||
#Overwrite the disk device tree (requires restart)
|
||||
function luckfox_load_static_dts() {
|
||||
local dtbo_node_name
|
||||
if [ ! -d ${LF_CUSTOM_DTS_PATH}/fdt_overlay/ ]; then
|
||||
echo "Can't find ${LF_CUSTOM_DTS_PATH}/fdt_overlay dir!"
|
||||
fi
|
||||
|
||||
for dts_file in ${LF_CUSTOM_DTS_PATH}/fdt_overlay/*.dts; do
|
||||
#Get DTBO name
|
||||
dtbo_node_name="$(basename "$dts_file" .dts)"
|
||||
|
||||
#DTS->DTBO
|
||||
dtc -I dts -O dtb ${LF_CUSTOM_DTS_PATH}/fdt_overlay/${dtbo_node_name}.dts -o \
|
||||
${LF_CUSTOM_DTS_PATH}/fdt_overlay/${dtbo_node_name}.dtbo
|
||||
|
||||
if [ ! -f "${LF_CUSTOM_DTS_PATH}/fdt_overlay/${dtbo_node_name}.dtbo" ]; then
|
||||
echo "${dtbo_node_name}.dts to dtbo error!"
|
||||
continue
|
||||
fi
|
||||
|
||||
# load to disk
|
||||
luckfox_update_fdt
|
||||
luckfox_fdt_overlay ${LF_CUSTOM_DTS_PATH}/fdt_overlay/${dtbo_node_name}.dtbo
|
||||
rm ${LUCKFOX_FDT_OVERLAY_DTBO}
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
luckfox_load_dynamic_dts
|
||||
;;
|
||||
stop)
|
||||
luckfox_tools_check
|
||||
luckfox_load_static_dts
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
2754
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-config/usr/bin/luckfox-config
Executable file
2754
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-config/usr/bin/luckfox-config
Executable file
File diff suppressed because it is too large
Load Diff
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-config/usr/bin/dtc
Executable file
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-config/usr/bin/dtc
Executable file
Binary file not shown.
Binary file not shown.
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-config/usr/bin/fdtget
Executable file
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-config/usr/bin/fdtget
Executable file
Binary file not shown.
Binary file not shown.
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-config/usr/bin/fdtput
Executable file
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-config/usr/bin/fdtput
Executable file
Binary file not shown.
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-config/usr/bin/iomux
Executable file
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-config/usr/bin/iomux
Executable file
Binary file not shown.
|
|
@ -0,0 +1 @@
|
|||
libfdt.so.1.7.0
|
||||
Binary file not shown.
|
|
@ -0,0 +1,4 @@
|
|||
# UNCONFIGURED FSTAB FOR BASE SYSTEM
|
||||
/dev/mmcblk0p7 / ext4 rw 0 0
|
||||
/dev/mmcblk0p5 /oem ext4 defaults 0 0
|
||||
/dev/mmcblk0p6 /userdata ext4 defaults 0 0
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
USB_KEYWORD="android_work: sent uevent USB_STATE="
|
||||
USB_MODE_PATH="/proc/device-tree/usbdrd/usb@ffb00000/dr_mode"
|
||||
|
||||
usb_reset() {
|
||||
while true; do
|
||||
last_line=$(dmesg | grep "$USB_KEYWORD" | tail -n 1)
|
||||
|
||||
if [[ "$last_line" == *"DISCONNECTED" ]]; then
|
||||
echo "Detected USB DISCONNECTED."
|
||||
/etc/init.d/S50usbdevice restart
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
/usr/bin/filesystem_resize.sh
|
||||
/usr/bin/wifi_bt_init.sh
|
||||
/usr/bin/luckfox_switch_rgb_resolution &
|
||||
|
||||
usb_mode="$(cat $USB_MODE_PATH)"
|
||||
/etc/init.d/S50usbdevice start
|
||||
if [ "$usb_mode" = "peripheral" ];then
|
||||
usb_reset &
|
||||
fi
|
||||
|
||||
luckfox-config load
|
||||
if [ -n "$(hwclock | grep "invalid")" ]; then
|
||||
date -s 2024-01-01
|
||||
hwclock -w
|
||||
fi
|
||||
116
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-ultra/etc/udhcpd.conf
Executable file
116
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-ultra/etc/udhcpd.conf
Executable 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
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check if the filesystem has been resized previously
|
||||
if [ ! -f /etc/.filesystem_resized ]; then
|
||||
# Perform filesystem resize
|
||||
sudo resize2fs /dev/mmcblk0p5
|
||||
sudo resize2fs /dev/mmcblk0p6
|
||||
sudo resize2fs /dev/mmcblk0p7
|
||||
|
||||
# Create a marker file indicating filesystem resize has been done
|
||||
sudo touch /etc/.filesystem_resized
|
||||
|
||||
echo "Filesystem resized successfully."
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/.filesystem_swap ]; then
|
||||
sudo fallocate -l 1G /swapfile
|
||||
sudo chmod 600 /swapfile
|
||||
sudo mkswap /swapfile >/dev/null
|
||||
sudo swapon /swapfile >/dev/null
|
||||
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab >/dev/null
|
||||
|
||||
sudo touch /etc/.filesystem_swap
|
||||
echo "Swap successfully."
|
||||
fi
|
||||
Binary file not shown.
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-ultra/usr/bin/udhcpc
Executable file
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-ultra/usr/bin/udhcpc
Executable file
Binary file not shown.
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-ultra/usr/bin/udhcpd
Executable file
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-ultra/usr/bin/udhcpd
Executable file
Binary file not shown.
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$(cat /proc/device-tree/model)" == "Luckfox Pico Ultra W" ]; then
|
||||
systemctl stop wpa_supplicant
|
||||
|
||||
if [ "$1" = "stop" ] ;then
|
||||
pkill -f "udhcpc -i wlan0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d /oem/usr/ko ]; then
|
||||
cd /oem/usr/ko
|
||||
if [ -z "$(ifconfig | grep "wlan0")" ]; then
|
||||
insmod cfg80211.ko
|
||||
insmod libarc4.ko
|
||||
insmod ctr.ko
|
||||
insmod ccm.ko
|
||||
insmod aes_generic.ko
|
||||
insmod aic8800_bsp.ko
|
||||
sleep 0.2
|
||||
insmod aic8800_fdrv.ko
|
||||
sleep 2
|
||||
insmod aic8800_btlpm.ko
|
||||
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
|
||||
|
|
@ -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
|
||||
30
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local
Executable file
30
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
USB_KEYWORD="android_work: sent uevent USB_STATE="
|
||||
USB_MODE_PATH="/proc/device-tree/usbdrd/usb@ffb00000/dr_mode"
|
||||
|
||||
usb_reset() {
|
||||
while true; do
|
||||
last_line=$(dmesg | grep "$USB_KEYWORD" | tail -n 1)
|
||||
|
||||
if [[ "$last_line" == *"DISCONNECTED" ]]; then
|
||||
echo "Detected USB DISCONNECTED."
|
||||
/etc/init.d/S50usbdevice restart
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
/usr/bin/filesystem_resize.sh
|
||||
|
||||
usb_mode="$(cat $USB_MODE_PATH)"
|
||||
/etc/init.d/S50usbdevice start
|
||||
if [ "$usb_mode" = "peripheral" ];then
|
||||
usb_reset &
|
||||
fi
|
||||
|
||||
luckfox-config load
|
||||
if [ -n "$(hwclock | grep "invalid")" ]; then
|
||||
date -s 2024-01-01
|
||||
hwclock -w
|
||||
fi
|
||||
1
project/make_meta/.gitignore
vendored
1
project/make_meta/.gitignore
vendored
|
|
@ -7,3 +7,4 @@ sensor_init/*_init
|
|||
zlib/out_board/
|
||||
zlib/out_host_pc/
|
||||
zlib/zlib-1.2.11/
|
||||
mtd_updateEngeen/out_board/
|
||||
|
|
|
|||
|
|
@ -347,7 +347,8 @@ endif
|
|||
################################################################################
|
||||
all: uboot kernel rootfs env
|
||||
|
||||
clean: uboot_clean kernel_clean buildroot_clean busybox_clean pctools_clean boardtools_clean rootfs_clean drv_clean
|
||||
#clean: uboot_clean kernel_clean buildroot_clean busybox_clean pctools_clean boardtools_clean rootfs_clean drv_clean
|
||||
clean: uboot_clean kernel_clean busybox_clean pctools_clean boardtools_clean rootfs_clean drv_clean
|
||||
|
||||
distclean: clean out_clean
|
||||
|
||||
|
|
@ -640,22 +641,6 @@ ifeq ($(SYSDRV_BUILD_RAMDISK_FLAG),YES)
|
|||
endif
|
||||
else
|
||||
tar xf $(BUILDROOT_DIR)/$(BUILDROOT_VER)/output/images/rootfs.tar -C $(SYSDRV_DIR_OUT_ROOTFS)
|
||||
#cp $(SYSDRV_DIR)/tools/board/buildroot/busybox $(SYSDRV_DIR_OUT_ROOTFS)/bin/busybox
|
||||
cp $(SYSDRV_DIR)/tools/board/buildroot/shadow_defconfig $(SYSDRV_DIR_OUT_ROOTFS)/etc/shadow
|
||||
cp $(SYSDRV_DIR)/tools/board/buildroot/sshd_defconfig $(SYSDRV_DIR_OUT_ROOTFS)/etc/ssh/sshd_config
|
||||
cp $(SYSDRV_DIR)/tools/board/buildroot/samba_defconfig $(SYSDRV_DIR_OUT_ROOTFS)/etc/samba/smb.conf
|
||||
cp $(SYSDRV_DIR)/tools/board/buildroot/smbpasswd_defconfig $(SYSDRV_DIR_OUT_ROOTFS)/etc/samba/smbpasswd
|
||||
cp $(SYSDRV_DIR)/tools/board/buildroot/profile_defconfig $(SYSDRV_DIR_OUT_ROOTFS)/etc/profile
|
||||
cp $(SYSDRV_DIR)/tools/board/buildroot/iomux $(SYSDRV_DIR_OUT_ROOTFS)/usr/bin/
|
||||
cp $(SYSDRV_DIR)/tools/board/buildroot/S99hciinit $(SYSDRV_DIR_OUT_ROOTFS)/etc/init.d/
|
||||
cp $(SYSDRV_DIR)/tools/board/buildroot/S99rtcinit $(SYSDRV_DIR_OUT_ROOTFS)/etc/init.d/
|
||||
cp $(SYSDRV_DIR)/tools/board/buildroot/S50sshd $(SYSDRV_DIR_OUT_ROOTFS)/etc/init.d/
|
||||
cp $(SYSDRV_DIR)/tools/board/buildroot/S99python $(SYSDRV_DIR_OUT_ROOTFS)/etc/init.d/
|
||||
cp $(SYSDRV_DIR)/tools/board/luckfox_config/S99luckfoxconfigload $(SYSDRV_DIR_OUT_ROOTFS)/etc/init.d/
|
||||
cp $(SYSDRV_DIR)/tools/board/luckfox_config/S99luckfoxcustomoverlay $(SYSDRV_DIR_OUT_ROOTFS)/etc/init.d/
|
||||
cp $(SYSDRV_DIR)/tools/board/luckfox_config/luckfox-config $(SYSDRV_DIR_OUT_ROOTFS)/usr/bin/
|
||||
cp $(SYSDRV_DIR)/tools/board/luckfox_config/luckfox_switch_rgb_resolution $(SYSDRV_DIR_OUT_ROOTFS)/usr/bin/
|
||||
cp $(SYSDRV_DIR)/tools/board/android-tools/S99usb0config $(SYSDRV_DIR_OUT_ROOTFS)/etc/init.d/
|
||||
endif
|
||||
|
||||
buildroot_clean:
|
||||
|
|
@ -679,22 +664,6 @@ ubuntu: prepare
|
|||
rm $(SYSDRV_DIR_OUT_ROOTFS)/* -rf ;\
|
||||
tar xzf $(SYSDRV_DIR)/tools/board/ubuntu/$(UBUNTU_VER).tar.gz -C $(SYSDRV_DIR_OUT_ROOTFS) ;\
|
||||
);
|
||||
cp $(SYSDRV_DIR)/tools/board/luckfox_config/luckfox-config ${SYSDRV_DIR_OUT_ROOTFS}/usr/bin/
|
||||
cp $(SYSDRV_DIR)/tools/board/luckfox_config/ubuntu/etc/* ${SYSDRV_DIR_OUT_ROOTFS}/etc/
|
||||
cp $(SYSDRV_DIR)/tools/board/luckfox_config/ubuntu/usr/bin/* ${SYSDRV_DIR_OUT_ROOTFS}/usr/bin/
|
||||
cp -d $(SYSDRV_DIR)/tools/board/luckfox_config/ubuntu/usr/lib/* ${SYSDRV_DIR_OUT_ROOTFS}/usr/lib/
|
||||
ifeq ($(ENABLE_EMMC),YES)
|
||||
cp $(SYSDRV_DIR)/tools/board/emmc/emmc_fstab $(SYSDRV_DIR_OUT_ROOTFS)/etc/fstab
|
||||
cp $(SYSDRV_DIR)/tools/board/emmc/emmc_filesystem_resize.sh $(SYSDRV_DIR_OUT_ROOTFS)/usr/bin/filesystem_resize.sh
|
||||
cp $(SYSDRV_DIR)/tools/board/emmc/emmc_rc.local $(SYSDRV_DIR_OUT_ROOTFS)/etc/rc.local
|
||||
cp $(SYSDRV_DIR)/tools/board/emmc/emmc_wifi_bt_init.sh $(SYSDRV_DIR_OUT_ROOTFS)/usr/bin/wifi_bt_init.sh
|
||||
#cp $(SYSDRV_DIR)/tools/board/emmc/emmc_wifi_ko $(SYSDRV_DIR_OUT_ROOTFS)/usr/ko -r
|
||||
cp $(SYSDRV_DIR)/tools/board/emmc/udhcp/usr/bin/udhcpc $(SYSDRV_DIR_OUT_ROOTFS)/usr/bin/udhcpc
|
||||
cp $(SYSDRV_DIR)/tools/board/emmc/udhcp/usr/bin/udhcpd $(SYSDRV_DIR_OUT_ROOTFS)/usr/bin/udhcpd
|
||||
mkdir -p $(SYSDRV_DIR_OUT_ROOTFS)/usr/share/udhcpc
|
||||
cp $(SYSDRV_DIR)/tools/board/emmc/udhcp/usr/share/udhcpc/default.script $(SYSDRV_DIR_OUT_ROOTFS)/usr/share/udhcpc/default.script
|
||||
cp $(SYSDRV_DIR)/tools/board/emmc/udhcp/etc/udhcpd.conf $(SYSDRV_DIR_OUT_ROOTFS)/etc/udhcpd.conf
|
||||
endif
|
||||
ubuntu_clean:
|
||||
$(AT)rm -rf $(SYSDRV_DIR_OUT_ROOTFS)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
TARGET_IP="172.32.0.93"
|
||||
|
||||
USB_KEYWORD="android_work: sent uevent USB_STATE="
|
||||
USB_MODE_PATH="/proc/device-tree/usbdrd/usb@ffb00000/dr_mode"
|
||||
|
||||
MAX_RETRIES=10
|
||||
retries=0
|
||||
|
||||
|
|
@ -30,9 +33,32 @@ usb0_config() {
|
|||
fi
|
||||
}
|
||||
|
||||
usb_reset() {
|
||||
while true; do
|
||||
last_line=$(dmesg | grep "$USB_KEYWORD" | tail -n 1)
|
||||
|
||||
if [[ "$last_line" == *"DISCONNECTED"* ]]; then
|
||||
echo "Detected USB DISCONNECTED."
|
||||
/etc/init.d/S50usbdevice restart
|
||||
usb0_config
|
||||
#elif [[ "$last_line" == *"CONFIGURED"* ]]; then
|
||||
# echo "Detected CONFIGURED. No action required."
|
||||
#else
|
||||
# echo "No relevant USB_STATE found."
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
usb0_config
|
||||
# check peripheral
|
||||
usb_mode="$(cat $USB_MODE_PATH)"
|
||||
if [ "$usb_mode" = "peripheral" ]; then
|
||||
usb0_config
|
||||
usb_reset &
|
||||
fi
|
||||
;;
|
||||
stop) ;;
|
||||
*)
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@ BR2_TARGET_GENERIC_HOSTNAME="luckfox pico"
|
|||
BR2_TARGET_GENERIC_ISSUE="Welcome to luckfox pico"
|
||||
BR2_TARGET_GENERIC_ROOT_PASSWD="luckfox"
|
||||
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
|
||||
BR2_PACKAGE_BZIP2=y
|
||||
BR2_PACKAGE_GZIP=y
|
||||
BR2_PACKAGE_PIXZ=y
|
||||
BR2_PACKAGE_E2FSPROGS=y
|
||||
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
BR2_PACKAGE_PYTHON3_SSL=y
|
||||
|
|
@ -29,6 +33,9 @@ BR2_PACKAGE_PYTHON_SETUPTOOLS=y
|
|||
BR2_PACKAGE_PYTHON_SMBUS_CFFI=y
|
||||
BR2_PACKAGE_PYTHON_SPIDEV=y
|
||||
BR2_PACKAGE_PYTHON_WERKZEUG=y
|
||||
BR2_PACKAGE_GNUTLS=y
|
||||
BR2_PACKAGE_FREETYPE=y
|
||||
BR2_PACKAGE_LIBDRM=y
|
||||
BR2_PACKAGE_DTC=y
|
||||
BR2_PACKAGE_DTC_PROGRAMS=y
|
||||
BR2_PACKAGE_LIBV4L=y
|
||||
|
|
@ -36,7 +43,6 @@ BR2_PACKAGE_LIBV4L_UTILS=y
|
|||
BR2_PACKAGE_LRZSZ=y
|
||||
BR2_PACKAGE_NTP=y
|
||||
BR2_PACKAGE_OPENSSH=y
|
||||
BR2_PACKAGE_SAMBA4=y
|
||||
BR2_PACKAGE_BASH=y
|
||||
BR2_PACKAGE_BASH_LOADABLE_EXAMPLES=y
|
||||
BR2_PACKAGE_DIALOG=y
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ BR2_PACKAGE_SDL2_TTF=y
|
|||
BR2_PACKAGE_VULKAN_HEADERS=y
|
||||
BR2_PACKAGE_DBUS_CPP=y
|
||||
BR2_PACKAGE_DBUS_TRIGGERD=y
|
||||
BR2_PACKAGE_EVTEST=y
|
||||
BR2_PACKAGE_PYTHON3_SSL=y
|
||||
BR2_PACKAGE_PYTHON_AIOHTTP=y
|
||||
BR2_PACKAGE_PYTHON_CLICK=y
|
||||
|
|
@ -58,6 +59,7 @@ BR2_PACKAGE_PYTHON_SPIDEV=y
|
|||
BR2_PACKAGE_PYTHON_WERKZEUG=y
|
||||
BR2_PACKAGE_LIBAO=y
|
||||
BR2_PACKAGE_PORTAUDIO=y
|
||||
BR2_PACKAGE_LIBDRM=y
|
||||
BR2_PACKAGE_DTC=y
|
||||
BR2_PACKAGE_DTC_PROGRAMS=y
|
||||
BR2_PACKAGE_LIBV4L=y
|
||||
|
|
@ -85,4 +87,3 @@ BR2_PACKAGE_HTOP=y
|
|||
BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
|
||||
BR2_PACKAGE_NANO=y
|
||||
BR2_PACKAGE_HOST_DTC=y
|
||||
BR2_PACKAGE_EVTEST=y
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
backlight: backlight {
|
||||
status = "okay";
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm1 0 25000 12500>;
|
||||
pwms = <&pwm1 0 100000 50000>;
|
||||
brightness-levels = <
|
||||
0 1 2 3 4 5 6 7
|
||||
8 9 10 11 12 13 14 15
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
de-active = <0>;
|
||||
pixelclk-active = <1>;
|
||||
pixelclk-active = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,27 +15,27 @@
|
|||
};
|
||||
|
||||
/**********CRU**********/
|
||||
&cru {
|
||||
assigned-clocks =
|
||||
<&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
<&cru ARMCLK>,
|
||||
<&cru ACLK_PERI_ROOT>, <&cru HCLK_PERI_ROOT>,
|
||||
<&cru PCLK_PERI_ROOT>, <&cru ACLK_BUS_ROOT>,
|
||||
<&cru PCLK_TOP_ROOT>, <&cru PCLK_PMU_ROOT>,
|
||||
<&cru HCLK_PMU_ROOT>, <&cru CLK_500M_SRC>;
|
||||
assigned-clock-rates =
|
||||
<1188000000>, <700000000>,
|
||||
<1104000000>,
|
||||
<400000000>, <200000000>,
|
||||
<100000000>, <300000000>,
|
||||
<100000000>, <100000000>,
|
||||
<200000000>, <700000000>;
|
||||
};
|
||||
//&cru {
|
||||
// assigned-clocks =
|
||||
// <&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
// <&cru ARMCLK>,
|
||||
// <&cru ACLK_PERI_ROOT>, <&cru HCLK_PERI_ROOT>,
|
||||
// <&cru PCLK_PERI_ROOT>, <&cru ACLK_BUS_ROOT>,
|
||||
// <&cru PCLK_TOP_ROOT>, <&cru PCLK_PMU_ROOT>,
|
||||
// <&cru HCLK_PMU_ROOT>, <&cru CLK_500M_SRC>;
|
||||
// assigned-clock-rates =
|
||||
// <1188000000>, <700000000>,
|
||||
// <1104000000>,
|
||||
// <400000000>, <200000000>,
|
||||
// <100000000>, <300000000>,
|
||||
// <100000000>, <100000000>,
|
||||
// <200000000>, <700000000>;
|
||||
//};
|
||||
|
||||
/**********NPU**********/
|
||||
&npu {
|
||||
assigned-clock-rates = <700000000>;
|
||||
};
|
||||
//&npu {
|
||||
// assigned-clock-rates = <700000000>;
|
||||
//};
|
||||
|
||||
/**********FLASH**********/
|
||||
&sfc {
|
||||
|
|
|
|||
|
|
@ -36,27 +36,27 @@
|
|||
};
|
||||
|
||||
/**********CRU**********/
|
||||
&cru {
|
||||
assigned-clocks =
|
||||
<&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
<&cru ARMCLK>,
|
||||
<&cru ACLK_PERI_ROOT>, <&cru HCLK_PERI_ROOT>,
|
||||
<&cru PCLK_PERI_ROOT>, <&cru ACLK_BUS_ROOT>,
|
||||
<&cru PCLK_TOP_ROOT>, <&cru PCLK_PMU_ROOT>,
|
||||
<&cru HCLK_PMU_ROOT>, <&cru CLK_500M_SRC>;
|
||||
assigned-clock-rates =
|
||||
<1188000000>, <700000000>,
|
||||
<1104000000>,
|
||||
<400000000>, <200000000>,
|
||||
<100000000>, <300000000>,
|
||||
<100000000>, <100000000>,
|
||||
<200000000>, <700000000>;
|
||||
};
|
||||
//&cru {
|
||||
// assigned-clocks =
|
||||
// <&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
// <&cru ARMCLK>,
|
||||
// <&cru ACLK_PERI_ROOT>, <&cru HCLK_PERI_ROOT>,
|
||||
// <&cru PCLK_PERI_ROOT>, <&cru ACLK_BUS_ROOT>,
|
||||
// <&cru PCLK_TOP_ROOT>, <&cru PCLK_PMU_ROOT>,
|
||||
// <&cru HCLK_PMU_ROOT>, <&cru CLK_500M_SRC>;
|
||||
// assigned-clock-rates =
|
||||
// <1188000000>, <700000000>,
|
||||
// <1104000000>,
|
||||
// <400000000>, <200000000>,
|
||||
// <100000000>, <300000000>,
|
||||
// <100000000>, <100000000>,
|
||||
// <200000000>, <700000000>;
|
||||
//};
|
||||
|
||||
/**********NPU**********/
|
||||
&npu {
|
||||
assigned-clock-rates = <700000000>;
|
||||
};
|
||||
//&npu {
|
||||
// assigned-clock-rates = <700000000>;
|
||||
//};
|
||||
|
||||
/**********EMMC**********/
|
||||
&emmc {
|
||||
|
|
|
|||
|
|
@ -15,27 +15,27 @@
|
|||
};
|
||||
|
||||
/**********CRU**********/
|
||||
&cru {
|
||||
assigned-clocks =
|
||||
<&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
<&cru ARMCLK>,
|
||||
<&cru ACLK_PERI_ROOT>, <&cru HCLK_PERI_ROOT>,
|
||||
<&cru PCLK_PERI_ROOT>, <&cru ACLK_BUS_ROOT>,
|
||||
<&cru PCLK_TOP_ROOT>, <&cru PCLK_PMU_ROOT>,
|
||||
<&cru HCLK_PMU_ROOT>, <&cru CLK_500M_SRC>;
|
||||
assigned-clock-rates =
|
||||
<1188000000>, <700000000>,
|
||||
<1104000000>,
|
||||
<400000000>, <200000000>,
|
||||
<100000000>, <300000000>,
|
||||
<100000000>, <100000000>,
|
||||
<200000000>, <700000000>;
|
||||
};
|
||||
//&cru {
|
||||
// assigned-clocks =
|
||||
// <&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
// <&cru ARMCLK>,
|
||||
// <&cru ACLK_PERI_ROOT>, <&cru HCLK_PERI_ROOT>,
|
||||
// <&cru PCLK_PERI_ROOT>, <&cru ACLK_BUS_ROOT>,
|
||||
// <&cru PCLK_TOP_ROOT>, <&cru PCLK_PMU_ROOT>,
|
||||
// <&cru HCLK_PMU_ROOT>, <&cru CLK_500M_SRC>;
|
||||
// assigned-clock-rates =
|
||||
// <1188000000>, <700000000>,
|
||||
// <1104000000>,
|
||||
// <400000000>, <200000000>,
|
||||
// <100000000>, <300000000>,
|
||||
// <100000000>, <100000000>,
|
||||
// <200000000>, <700000000>;
|
||||
//};
|
||||
|
||||
/**********NPU**********/
|
||||
&npu {
|
||||
assigned-clock-rates = <700000000>;
|
||||
};
|
||||
//&npu {
|
||||
// assigned-clock-rates = <700000000>;
|
||||
//};
|
||||
|
||||
/**********EMMC**********/
|
||||
&emmc {
|
||||
|
|
|
|||
|
|
@ -2237,7 +2237,7 @@ function luckfox_compatible_devices() {
|
|||
function luckfox_advanced_options() {
|
||||
if [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra" ] || [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra W" ]; then
|
||||
while true; do
|
||||
option=$(dialog --title "Compatible Devices" \
|
||||
option=$(dialog --title "Advanced Options" \
|
||||
--menu "Choose an option" 80 50 6 \
|
||||
1 "PWM" \
|
||||
2 "UART" \
|
||||
|
|
@ -2263,7 +2263,7 @@ function luckfox_advanced_options() {
|
|||
done
|
||||
else
|
||||
while true; do
|
||||
option=$(dialog --title "Compatible Devices" \
|
||||
option=$(dialog --title "Advanced Options" \
|
||||
--menu "Choose an option" 80 50 6 1 "PWM" \
|
||||
2 "UART" \
|
||||
3 "I2C" \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user