mirror of
https://gitee.com/open-loongarch/buildroot.git
synced 2026-10-25 21:07:11 +08:00
update to e4afb6d9a45f
1.ramdisk: loongson_resize: fix error check loongson_resize path a. mmcblkxboot info not need display b. root data backup size radio from 1 1 2 to 1 2 1 2.Add quectel-cm tools ref: https://github.com/QuectelWB/q_drivers 3.2k300: defconfig: add xkb rules and sshpass 4.2K300: asound.state: Increase Record Volume and Decrease OUTPUT a little bit
This commit is contained in:
+1
-1
@@ -142,7 +142,7 @@ run()
|
||||
sync;
|
||||
#查看分区表的变化
|
||||
echo ""
|
||||
fdisk -l | grep "$disk_path";
|
||||
fdisk -l | grep "$disk_path" | grep -v boot;
|
||||
sleep 1;
|
||||
|
||||
/home/install_format_all_disk.sh
|
||||
|
||||
@@ -17,6 +17,9 @@ fdisk_part_total=0
|
||||
|
||||
install_disk_blk="/dev/sda"
|
||||
|
||||
part_1_size_unit="G"
|
||||
part_2_size_unit="G"
|
||||
|
||||
check_cmdline_ins_target()
|
||||
{
|
||||
install_target_type=0
|
||||
@@ -108,13 +111,13 @@ n
|
||||
p
|
||||
1
|
||||
|
||||
+$1G
|
||||
+$1$part_1_size_unit
|
||||
|
||||
n
|
||||
p
|
||||
2
|
||||
|
||||
+$2G
|
||||
+$2$part_2_size_unit
|
||||
|
||||
n
|
||||
p
|
||||
@@ -156,7 +159,7 @@ n
|
||||
p
|
||||
1
|
||||
|
||||
+$1G
|
||||
+$1$part_1_size_unit
|
||||
|
||||
n
|
||||
p
|
||||
@@ -170,46 +173,6 @@ p
|
||||
|
||||
|
||||
|
||||
t
|
||||
3
|
||||
82
|
||||
|
||||
p
|
||||
|
||||
w
|
||||
!
|
||||
}
|
||||
|
||||
fdisk_run_three_part()
|
||||
{
|
||||
fdisk $install_disk_blk >/dev/null << !
|
||||
d
|
||||
1
|
||||
d
|
||||
2
|
||||
d
|
||||
3
|
||||
d
|
||||
4
|
||||
|
||||
n
|
||||
p
|
||||
$1
|
||||
|
||||
+$2G
|
||||
|
||||
n
|
||||
p
|
||||
$3
|
||||
|
||||
+$4G
|
||||
|
||||
n
|
||||
p
|
||||
$5
|
||||
|
||||
|
||||
|
||||
t
|
||||
3
|
||||
82
|
||||
@@ -309,10 +272,10 @@ analy_four_part()
|
||||
disk_size_root_and_data=5
|
||||
disk_size_root_and_data_bak=5
|
||||
elif [ $disk_size -le 16 ]; then
|
||||
disk_size_root=6
|
||||
disk_size_data=3
|
||||
disk_size_root_and_data=9
|
||||
disk_size_root_and_data_bak=9
|
||||
disk_size_root=3
|
||||
disk_size_data=7
|
||||
disk_size_root_and_data=10
|
||||
disk_size_root_and_data_bak=10
|
||||
else
|
||||
disk_size_root_and_data=$(($disk_size_ex_swap-$disk_size_backup))
|
||||
disk_size_root_and_data_bak=$disk_size_root_and_data
|
||||
@@ -324,19 +287,23 @@ analy_four_part()
|
||||
analy_pingpang()
|
||||
{
|
||||
if [ $disk_size -le 8 ]; then
|
||||
disk_size_root=2
|
||||
disk_size_data=1
|
||||
disk_size_root=1536
|
||||
disk_size_data=3072
|
||||
disk_size_swap=1
|
||||
disk_size_root_and_data=3
|
||||
disk_size_root_and_data_bak=3
|
||||
disk_size_root_and_data=4608
|
||||
disk_size_root_and_data_bak=4608
|
||||
part_1_size_unit="M"
|
||||
part_2_size_unit="M"
|
||||
elif [ $disk_size -le 16 ]; then
|
||||
disk_size_root=4
|
||||
disk_size_data=2
|
||||
disk_size_root_and_data=6
|
||||
disk_size_root_and_data_bak=6
|
||||
disk_size_root=3
|
||||
disk_size_data=6
|
||||
disk_size_root_and_data=9
|
||||
disk_size_root_and_data_bak=9
|
||||
else
|
||||
#/2会向下取整,也就是bakcup的大小 >= root+data
|
||||
disk_size_root_and_data=$(($disk_size_ex_swap/2))
|
||||
# /2会向下取整,也就是bakcup的大小 >= root+data
|
||||
disk_size_root_and_data=$((3*$disk_size_ex_swap/4))
|
||||
# 预留多1G给backup分区,用来存镜像
|
||||
disk_size_root_and_data=$(($disk_size_root_and_data - 1))
|
||||
disk_size_root_and_data_bak=$disk_size_root_and_data
|
||||
split_root_and_data 1 2 $disk_size_root_and_data;
|
||||
fi
|
||||
|
||||
@@ -20,7 +20,7 @@ install_target_type=0
|
||||
root_partition=""
|
||||
root_mount_point="/mnt/usb1"
|
||||
|
||||
resize_ext4_dir="/usr/local/ls_resize"
|
||||
resize_ext4_dir="./usr/local/ls_resize"
|
||||
resize_ext4_flag="$resize_ext4_dir/resizerootfs"
|
||||
|
||||
check_cmdline_ins_target()
|
||||
@@ -57,9 +57,12 @@ check_resize_ext4()
|
||||
mount $root_partition $root_mount_point;
|
||||
sync;
|
||||
|
||||
old_path=$PWD
|
||||
cd $root_mount_point
|
||||
if [ -d $resize_ext4_dir ]; then
|
||||
echo 2 > $resize_ext4_flag
|
||||
fi
|
||||
cd $old_path
|
||||
umount $root_partition
|
||||
sync
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ echo "*************************************************************************"
|
||||
echo " ";
|
||||
sleep 2;
|
||||
|
||||
disk_path="/dev/sda"
|
||||
|
||||
usb_partition="/dev/sdb1"
|
||||
usb_partition_bak="/dev/sdb"
|
||||
|
||||
@@ -40,6 +42,8 @@ check_cmdline_ins_target()
|
||||
# install_target_type=$(cat /proc/cmdline | grep ins_target="scsi") #default is scsi
|
||||
install_target_type=$(cat /proc/cmdline | grep ins_target=mmc)
|
||||
if [ ! -z "$install_target_type" ]; then
|
||||
disk_path="/dev/mmcblk0"
|
||||
|
||||
root_partition="/dev/mmcblk0p1"
|
||||
data_partition="/dev/mmcblk0p2"
|
||||
swap_partition="/dev/mmcblk0p3"
|
||||
@@ -53,6 +57,7 @@ check_cmdline_ins_target()
|
||||
return 0
|
||||
fi
|
||||
|
||||
disk_path="/dev/sda"
|
||||
root_partition="/dev/sda1"
|
||||
data_partition="/dev/sda2"
|
||||
swap_partition="/dev/sda3"
|
||||
@@ -168,7 +173,7 @@ fdisk_SSD()
|
||||
sync;
|
||||
#查看分区表的变化
|
||||
echo ""
|
||||
fdisk -l | grep "/dev/sda";
|
||||
fdisk -l | grep $disk_path | grep -v "boot";
|
||||
sleep 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ install_target_type=0
|
||||
root_partition=""
|
||||
root_mount_point="/mnt/usb1"
|
||||
|
||||
resize_ext4_dir="/usr/local/ls_resize"
|
||||
resize_ext4_dir="./usr/local/ls_resize"
|
||||
resize_ext4_flag="$resize_ext4_dir/resizerootfs"
|
||||
|
||||
check_cmdline_ins_target()
|
||||
@@ -55,9 +55,12 @@ check_resize_ext4()
|
||||
mount $root_partition $root_mount_point;
|
||||
sync;
|
||||
|
||||
old_path=$PWD
|
||||
cd $root_mount_point
|
||||
if [ -d $resize_ext4_dir ]; then
|
||||
echo 2 > $resize_ext4_flag
|
||||
fi
|
||||
cd $old_path
|
||||
umount $root_partition
|
||||
sync
|
||||
}
|
||||
|
||||
@@ -108,8 +108,8 @@ state.ES8388 {
|
||||
control.9 {
|
||||
iface MIXER
|
||||
name 'PCM Volume'
|
||||
value.0 185
|
||||
value.1 185
|
||||
value.0 192
|
||||
value.1 192
|
||||
comment {
|
||||
access 'read write'
|
||||
type INTEGER
|
||||
@@ -117,15 +117,15 @@ state.ES8388 {
|
||||
range '0 - 192'
|
||||
dbmin -9600
|
||||
dbmax 0
|
||||
dbvalue.0 -350
|
||||
dbvalue.1 -350
|
||||
dbvalue.0 0
|
||||
dbvalue.1 0
|
||||
}
|
||||
}
|
||||
control.10 {
|
||||
iface MIXER
|
||||
name 'Output 1 Playback Volume'
|
||||
value.0 33
|
||||
value.1 33
|
||||
value.0 32
|
||||
value.1 32
|
||||
comment {
|
||||
access 'read write'
|
||||
type INTEGER
|
||||
@@ -133,8 +133,8 @@ state.ES8388 {
|
||||
range '0 - 36'
|
||||
dbmin -3000
|
||||
dbmax 600
|
||||
dbvalue.0 300
|
||||
dbvalue.1 300
|
||||
dbvalue.0 200
|
||||
dbvalue.1 200
|
||||
}
|
||||
}
|
||||
control.11 {
|
||||
|
||||
@@ -140,7 +140,6 @@ BR2_PACKAGE_SQLITE_NO_SYNC=y
|
||||
BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y
|
||||
BR2_PACKAGE_LIBGPIOD=y
|
||||
BR2_PACKAGE_LIBGPIOD_TOOLS=y
|
||||
# BR2_PACKAGE_LIBXKBCOMMON_RULES is not set
|
||||
BR2_PACKAGE_LIBFASTJSON=y
|
||||
BR2_PACKAGE_TINYXML2=y
|
||||
BR2_PACKAGE_CPPZMQ=y
|
||||
@@ -197,6 +196,7 @@ BR2_PACKAGE_NETWORK_MANAGER_MODEM_MANAGER=y
|
||||
BR2_PACKAGE_NETWORK_MANAGER_PPPD=y
|
||||
BR2_PACKAGE_NETWORK_MANAGER_OVS=y
|
||||
BR2_PACKAGE_OPENSSH=y
|
||||
BR2_PACKAGE_SSHPASS=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_WIFI_DISPLAY=y
|
||||
|
||||
@@ -2542,6 +2542,7 @@ menu "Loongson board software"
|
||||
source "package/loongson_kernel/Config.in"
|
||||
source "package/loongson_build_essential/Config.in"
|
||||
source "package/mp4_sample/Config.in"
|
||||
source "package/quectel-cm/Config.in"
|
||||
endmenu
|
||||
|
||||
endmenu
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
config BR2_PACKAGE_QUECTEL_CM
|
||||
bool "quectel-cm"
|
||||
default n
|
||||
help
|
||||
Quectel 4G-Model Connection Manager
|
||||
|
||||
config BR2_PACKAGE_QUECTEL_CM_LINK
|
||||
bool "quectel-cm link to /opt/quectel-cm"
|
||||
depends on BR2_PACKAGE_QUECTEL_CM
|
||||
default n
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
################################################################################
|
||||
#
|
||||
# quectel-cm
|
||||
#
|
||||
################################################################################
|
||||
|
||||
QUECTEL_CM_SITE = $(TOPDIR)/package/quectel-cm/quectel-cm.tar.gz
|
||||
QUECTEL_CM_SITE_METHOD = file
|
||||
QUECTEL_CM_CFLAGS = $(TARGET_CFLAGS)
|
||||
|
||||
define QUECTEL_CM_EXTRACT_CMDS
|
||||
echo $(QUECTEL_CM_SITE)
|
||||
tar -zxf $(QUECTEL_CM_SITE) --strip-components=1 -C $(@D)/
|
||||
endef
|
||||
|
||||
#define QUECTEL_CM_BUILD_CMDS
|
||||
# cd $(@D) && $(TARGET_MAKE_ENV) $(MAKE) CC=$(TARGET_CC) AR=$(TARGET_AR) -C $(@D)
|
||||
#endef
|
||||
#
|
||||
#define QUECTEL_CM_INSTALL_STAGING_CMDS
|
||||
# echo "nothing to do"
|
||||
#endef
|
||||
#
|
||||
#define QUECTEL_CM_INSTALL_TARGET_CMDS
|
||||
# echo quectel-cm install to $(BR2_PACKAGE_QUECTEL_INSTALL_PATH)
|
||||
# mkdir -p $(TARGET_DIR)$(BR2_PACKAGE_QUECTEL_INSTALL_PATH)
|
||||
# cd $(@D) && cp quectel-CM $(TARGET_DIR)$(BR2_PACKAGE_QUECTEL_INSTALL_PATH) && cp quectel-mbim-proxy $(TARGET_DIR)$(BR2_PACKAGE_QUECTEL_INSTALL_PATH) && cp quectel-qmi-proxy $(TARGET_DIR)$(BR2_PACKAGE_QUECTEL_INSTALL_PATH)
|
||||
#endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_QUECTEL_CM_LINK),y)
|
||||
define QUECTEL_CM_LINK
|
||||
echo quectel-cm link to /opt/quectel-cm
|
||||
mkdir -p $(TARGET_DIR)/opt/quectel-cm
|
||||
cd $(TARGET_DIR)/opt/quectel-cm && ln -sf ../../usr/bin/quectel-CM quectel-CM
|
||||
cd $(TARGET_DIR)/opt/quectel-cm && ln -sf ../../usr/bin/quectel-qmi-proxy quectel-qmi-proxy
|
||||
cd $(TARGET_DIR)/opt/quectel-cm && ln -sf ../../usr/bin/quectel-mbim-proxy quectel-mbim-proxy
|
||||
cd $(TARGET_DIR)/opt/quectel-cm && ln -sf ../../usr/bin/quectel-atc-proxy quectel-atc-proxy
|
||||
endef
|
||||
|
||||
QUECTEL_CM_POST_INSTALL_TARGET_HOOKS += QUECTEL_CM_LINK
|
||||
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Binary file not shown.
Reference in New Issue
Block a user