20230511干掉CV1826的buildroot系统的串口用户名和密码root

news2024/10/5 18:32:26

20230511干掉CV1826的buildroot系统的串口用户名和密码root
2023/5/11 11:56

https://blog.csdn.net/u011342132/article/details/126116391
buildroot跳过密码登录

 

 


1、全新原始编译:
rootroot@rootroot-X99-Turbo:~$ 
rootroot@rootroot-X99-Turbo:~$ cd smartpen/
rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ ll
total 116
drwxrwxr-x 18 rootroot rootroot  4096 4月  28 10:20 ./
drwxr-xr-x 32 rootroot rootroot  4096 5月  10 17:23 ../
drwxrwxr-x  2 rootroot rootroot  4096 4月  28 10:19 aw_cali/
drwxrwxr-x  5 rootroot rootroot  4096 4月  28 10:19 bluetooth/
drwxrwxr-x  7 rootroot rootroot  4096 4月  28 10:19 build/
drwxrwxr-x 14 rootroot rootroot  4096 4月  28 10:19 buildroot/
-rwxrwxr-x  1 rootroot rootroot 18139 4月  28 10:19 CHANGELIST.md*
drwxrwxr-x  8 rootroot rootroot  4096 4月  28 10:20 .git/
-rw-rw-r--  1 rootroot rootroot  3820 4月  28 10:19 .gitignore
-rwxrwxr-x  1 rootroot rootroot  4015 4月  28 10:19 GSENSOR.md*
drwxrwxr-x  3 rootroot rootroot  4096 4月  28 10:19 host-tools/
drwxrwxr-x 10 rootroot rootroot  4096 4月  28 10:19 install/
drwxrwxr-x  3 rootroot rootroot  4096 4月  28 10:19 isp_tuning/
drwxrwxr-x 26 rootroot rootroot  4096 4月  28 10:19 linux/
drwxrwxr-x  7 rootroot rootroot  4096 4月  28 10:19 middleware/
drwxrwxr-x  3 rootroot rootroot  4096 4月  28 10:19 osdrv/
drwxrwxr-x  3 rootroot rootroot  4096 4月  28 10:19 package/
drwxrwxr-x  9 rootroot rootroot  4096 4月  28 10:20 ramdisk/
-rw-rw-r--  1 rootroot rootroot   952 4月  28 10:19 README.md
drwxrwxr-x  3 rootroot rootroot  4096 4月  28 10:20 sample_bt/
drwxrwxr-x  5 rootroot rootroot  4096 4月  28 10:20 sample-demo/
drwxrwxr-x 23 rootroot rootroot  4096 4月  28 10:20 u-boot/
-rwxrwxr-x  1 rootroot rootroot  9377 4月  28 10:19 ZTFunctionsTestInfo.md*
rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ find . -name inittab
./ramdisk/rootfs/common_arm64/etc/inittab
./ramdisk/rootfs/common_uclibc/etc/inittab
./ramdisk/rootfs/common_arm/etc/inittab
./ramdisk/initramfs/glibc_arm/etc/inittab
./ramdisk/initramfs/glibc_arm64/etc/inittab
./ramdisk/initramfs/uclibc_arm/etc/inittab
./buildroot/package/sysvinit/inittab
./buildroot/package/busybox/inittab
rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ 

INFO: size:6400000, offset:9c900,crc:90f1d346
INFO: size:6400000, offset:ce900,crc:4b282398
INFO: Packing rootfs_ext4.emmc done!
 Run pack_system_emmc() function 
mkdir -p /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/system
  [TARGET] /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/rawimages/system.emmc 
/home/rootroot/smartpen/build/tools/common/prebuild/make_ext4fs -l 38M  -L SYSTEM /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/rawimages/system.emmc /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/system
Creating filesystem with parameters:
    Size: 39845888
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 2432
    Inode size: 256
    Journal blocks: 1024
    Label: SYSTEM
    Blocks: 9728
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/2432 inodes and 1190/9728 blocks
resize2fs -M /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/rawimages/system.emmc
resize2fs 1.44.1 (24-Mar-2018)
Resizing the filesystem on /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/rawimages/system.emmc to 1201 (4k) blocks.
The filesystem on /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/rawimages/system.emmc is now 1201 (4k) blocks long.

  [TARGET] system 
python3 /home/rootroot/smartpen/build/tools/common/image_tool/raw2cimg.py /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/rawimages/system.emmc /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a /home/rootroot/smartpen/build/tools/common/image_tool/partition_cv1826_wevb_0005a.xml
 Run pack_gpt() function 
~/smartpen/build/tools/common/emmc_tool ~/smartpen
gcc mk_gpt.c crc.c -luuid -lxml2 -L ./ -lm -I ./ -o mk_gpt
./mk_gpt -p /home/rootroot/smartpen/build/tools/common/image_tool/partition_cv1826_wevb_0005a.xml -d /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/rawimages/gpt.img
xml_file : /home/rootroot/smartpen/build/tools/common/image_tool/partition_cv1826_wevb_0005a.xml
update_dev     : /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/rawimages/gpt.img
[hq] total size:3727392768
INFO: size:4400, offset:0,crc:7c166466
INFO: Packing gpt.img done!
~/smartpen
INFO: size:7ef3, offset:6000,crc:b9b2bd53
INFO: Packing logo.jpg done!
-bash: [: : integer expression expected
INFO: Packing /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a/upgrade.zip done!
rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ 


rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ source build/cvisetup.sh
===========================================================
  Usage:
  (1) menuconfig - Use menu to configure your board.
      ex: $ menuconfig
  (2) defconfig $CHIP_$BOARD - Choose EVB board settings.
      ex: $ defconfig cv1835_wevb_0002a
===========================================================

- The avaliable cvitek EVB boards
  cv1835 - cv1835_wevb_0001a [EMMC 8GB + LPDDR4 1GB]
  cv1838 - cv1838_wevb_0001a [EMMC 8GB + LPDDR4 32bit 1GB]
  cv1821 - cv1821_wevb_0005b_spinand [SPINAND 256MB + QFN SIP 128MB]
  cv1822 - cv1822_wevb_0005b_spinand [SPINAND 256MB + QFN SIP 256MB]
  cv1823 - cv1823_wevb_0005a [SPINAND 256MB + BGA SIP 128MB]
  cv1825 - cv1825_wevb_0005a [EMMC + BGA SIP 256MB]
           cv1825_wevb_0005a_spinand [SPINAND 256MB + BGA SIP 256MB]
  cv1826 - cv1826_dictpen_wm108_v00a [EMMC 256MB + BGA SIP 512MB]
           cv1826_wevb_0005a [EMMC 256MB + BGA SIP 512MB YD-X5]
           cv1826_wevb_0005a_1 [YD-X5S]
           cv1826_wevb_0005a_2 [YD-X6]
           cv1826_wevb_0005a_3 [YD-S6]
           cv1826_wevb_0005a_spinand [SPINAND 256MB + BGA SIP 512MB]

rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ defconfig cv1826_wevb_0005a
 Run defconfig function 
Loaded configuration '/home/rootroot/smartpen/build/boards/cv1826_wevb_0005a/.config'
Configuration saved to '.config'

====== Environment Variables ======= 
  PROJECT: cv1826_wevb_0005a, DDR_CFG=ddr3_1866_x16_auto
  CHIP_ARCH: CV182X, DEBUG=0 BOARD=wevb_0005a
  SDK VERSION: 32bit, RPC=0
  ATF options: ATF_KEY_SEL=default, BL32=1
  UBOOT options: UBOOT_VBOOT=0 ENABLE_BOOTLOGO=1
                 ENABLE_CHARGELOGO=
  CROSS_COMPILE_PREFIX: /home/rootroot/smartpen/host-tools/gcc/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
  CROSS_COMPILE_PREFIX_PATH: /home/rootroot/smartpen/host-tools/gcc/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf
  USE_CCACHE: n
  Flash layout xml: /home/rootroot/smartpen/build/tools/common/image_tool/partition_cv1826_wevb_0005a.xml
  output path: /home/rootroot/smartpen/install/soc_cv1826_wevb_0005a
  sensor: sms_sc035gs
  Sensor tuning param: sony_imx307_sony_imx307

rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ build_all


rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ find . -name inittab
./ramdisk/rootfs/common_arm64/etc/inittab
./ramdisk/rootfs/common_uclibc/etc/inittab
./ramdisk/rootfs/common_arm/etc/inittab
./ramdisk/build/cv1826_wevb_0005a/target/etc/inittab
./ramdisk/initramfs/glibc_arm/etc/inittab
./ramdisk/initramfs/glibc_arm64/etc/inittab
./ramdisk/initramfs/uclibc_arm/etc/inittab
./buildroot/output/cvitek_cv182x/build/busybox-1.33.0/examples/inittab
./buildroot/output/cvitek_cv182x/build/busybox-1.33.0/examples/bootfloppy/etc/inittab
./buildroot/output/cvitek_cv182x/target/etc/inittab
./buildroot/package/sysvinit/inittab
./buildroot/package/busybox/inittab
rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ 
rootroot@rootroot-X99-Turbo:~/smartpen$ 

 

 


2、编译后生成的文件:
./ramdisk/build/cv1826_wevb_0005a/target/etc/inittab

 

./buildroot/output/cvitek_cv182x/target/etc/inittab

 

很容易知道(根据经验在全部的inittab中加打印,看哪个inittab起作用!):
Z:\smartpen\ramdisk\initramfs\glibc_arm\etc\inittab
# Put a getty on the serial port
console::respawn:/sbin/getty -L  console 115200 vt100 # GENERIC_SERIAL

echo "2023/4/28 18:33 wenyuanbo"

# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot

 


Z:\smartpen\ramdisk\initramfs\glibc_arm64\etc\inittab
# Put a getty on the serial port
#ttyS0::sysinit:/bin/sh
#ttyS0::respawn:/sbin/getty -L  ttyS0 115200 vt100
console::respawn:/sbin/getty -L  console 115200 vt100 -n -l /usr/local/bin/autologin

echo "2023/4/28 18:34 wenyuanbo"

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

 


Z:\smartpen\ramdisk\initramfs\uclibc_arm\etc\inittab
# Put a getty on the serial port
console::respawn:/sbin/getty -L  console 115200 vt100 # GENERIC_SERIAL

echo "2023/4/28 18:35 wenyuanbo"

# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot

 


Z:\smartpen\ramdisk\rootfs\common_arm\etc\inittab
# Put a getty on the serial port
#ttyS0::sysinit:/bin/sh
#ttyS0::respawn:/sbin/getty -L  ttyS0 115200 vt100
console::respawn:/sbin/getty -L  console 115200 vt100 -n -l /usr/local/bin/autologin

echo "2023/4/28 18:41 wenyuanbo"

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

 


Z:\smartpen\ramdisk\rootfs\common_arm64\etc\inittab
# Put a getty on the serial port
#ttyS0::sysinit:/bin/sh
#ttyS0::respawn:/sbin/getty -L  ttyS0 115200 vt100
console::respawn:/sbin/getty -L  console 115200 vt100 -n -l /usr/local/bin/autologin

echo "2023/4/28 18:42 wenyuanbo"

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

 


Z:\smartpen\ramdisk\rootfs\common_uclibc\etc\inittab
# Put a getty on the serial port
#ttyS0::sysinit:/bin/sh
#ttyS0::respawn:/sbin/getty -L  ttyS0 115200 vt100
console::respawn:/sbin/getty -L  console 115200 vt100 -n -l /usr/local/bin/autologin

echo "2023/4/28 18:43 wenyuanbo"

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

 


Z:\smartpen\buildroot\package\busybox\inittab
# Put a getty on the serial port
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL

# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
修改为:
# Put a getty on the serial port
#ttyS0::respawn:-/bin/sh # GENERIC_SERIAL

echo "2023/4/28 18:51 wenyuanbo"

# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot

 


Z:\smartpen\buildroot\package\sysvinit\inittab
si0::sysinit:/bin/mount -t proc proc /proc
si1::sysinit:/bin/mount -o remount,rw /
si2::sysinit:/bin/mkdir -p /dev/pts /dev/shm
si3::sysinit:/bin/mount -a
si4::sysinit:/sbin/swapon -a
si5::sysinit:/bin/ln -sf /proc/self/fd /dev/fd 2>/dev/null
si6::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin 2>/dev/null
si7::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout 2>/dev/null
si8::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr 2>/dev/null
si9::sysinit:/bin/hostname -F /etc/hostname
rcS:12345:wait:/etc/init.d/rcS

# S0:1:respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL

echo "2023/4/28 18:52 wenyuanbo"

# Stuff to do for the 3-finger salute
#ca::ctrlaltdel:/sbin/reboot

rootroot@rootroot-X99-Turbo:~/smartpen$ clean_buildroot_fs 

rootroot@rootroot-X99-Turbo:~/smartpen$ build_all

 

Z:\smartpen\ramdisk\build\cv1826_wevb_0005a\target\etc\inittab
Z:\comcom1\ramdisk\initramfs\glibc_arm\etc\inittab
# Put a getty on the serial port
console::respawn:/sbin/getty -L  console 115200 vt100 # GENERIC_SERIAL

echo "2023/4/28 18:33 wenyuanbo"

# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot

 



Z:\smartpen\buildroot\output\cvitek_cv182x\target\etc\inittab
Z:\comcom1\buildroot\package\busybox\inittab

# Put a getty on the serial port
console::respawn:/sbin/getty -L  console 0 vt100 # GENERIC_SERIAL

echo "2023/4/28 18:51 wenyuanbo"

编译成为:
# Put a getty on the serial port
#ttyS0::respawn:-/bin/sh # GENERIC_SERIAL

echo "2023/4/28 18:51 wenyuanbo"

# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot


3、终章:
rootroot@rootroot-X99-Turbo:~/smartpen$ clean_buildroot_fs 
rootroot@rootroot-X99-Turbo:~/smartpen$ build_all

 


./ramdisk/build/cv1826_wevb_0005a/target/etc/inittab
./buildroot/output/cvitek_cv182x/target/etc/inittab

Z:\smartpen\ramdisk\build\cv1826_wevb_0005a\target\etc\inittab
Z:\comcom1\ramdisk\initramfs\glibc_arm\etc\inittab


修正1:
Z:\smartpen\buildroot\package\busybox\busybox.mk
ifeq ($(BR2_INIT_BUSYBOX),y)

define BUSYBOX_SET_INIT
    $(call KCONFIG_ENABLE_OPT,CONFIG_INIT)
endef

ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
define BUSYBOX_SET_GETTY
    $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(SYSTEM_GETTY_PORT)::respawn:/sbin/getty -L $(SYSTEM_GETTY_OPTIONS) $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_TERM) #~' \
        $(TARGET_DIR)/etc/inittab
endef
else
define BUSYBOX_SET_GETTY
    $(SED) '/# GENERIC_SERIAL$$/s~^.*#~#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 #~' $(TARGET_DIR)/etc/inittab
endef

endif # BR2_TARGET_GENERIC_GETTY
BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_SET_GETTY

BUSYBOX_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB
修改为:
ifeq ($(BR2_INIT_BUSYBOX),y)

define BUSYBOX_SET_INIT
    $(call KCONFIG_ENABLE_OPT,CONFIG_INIT)
endef

echo "2023/4/28 12:32 wenyuanbo *****"

#ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
define BUSYBOX_SET_GETTY
    $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(SYSTEM_GETTY_PORT)::respawn:-/bin/sh #~' \
        $(TARGET_DIR)/etc/inittab
endef
#else
#define BUSYBOX_SET_GETTY
#    $(SED) '/# GENERIC_SERIAL$$/s~^.*#~#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 #~' $(TARGET_DIR)/etc/inittab
#endef
#endif # BR2_TARGET_GENERIC_GETTY

BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_SET_GETTY

echo "2023/4/28 12:56 wenyuanbo *****"


BUSYBOX_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB

 


# Add /bin/{a,hu}sh to /etc/shells otherwise some login tools like dropbear
# can reject the user connection. See man shells.
define BUSYBOX_INSTALL_ADD_TO_SHELLS
    if grep -q CONFIG_ASH=y $(BUSYBOX_DIR)/.config; then \
        grep -qsE '^/bin/ash$$' $(TARGET_DIR)/etc/shells \
        || echo "/bin/ash" >> $(TARGET_DIR)/etc/shells; \
    fi
    if grep -q CONFIG_HUSH=y $(BUSYBOX_DIR)/.config; then \
        grep -qsE '^/bin/hush$$' $(TARGET_DIR)/etc/shells \
        || echo "/bin/hush" >> $(TARGET_DIR)/etc/shells; \
    fi
    
    echo "2023/4/28 11:06 wenyuanbo *****"
    echo $(SYSTEM_GETTY_PORT)
    echo $(SYSTEM_GETTY_OPTIONS) 
    echo $(SYSTEM_GETTY_PORT) 
    echo $(SYSTEM_GETTY_BAUDRATE) 
    echo $(SYSTEM_GETTY_TERM)
    echo $(TARGET_DIR)
    echo "2023/4/28 11:07 wenyuanbo *****"
    
    echo $(BR2_TARGET_GENERIC_GETTY)
    echo "2023/4/28 12:32 wenyuanbo *****"

endef
BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_INSTALL_ADD_TO_SHELLS

 


Z:\smartpen\buildroot\package\busybox\inittab
# 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:/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
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL

echo "2023/4/28 18:51 wenyuanbo"

# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
修改为:
# 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:/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
#ttyS0::respawn:-/bin/sh # GENERIC_SERIAL

echo "2023/4/28 18:51 wenyuanbo"

# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot

 


Z:\smartpen\ramdisk\initramfs\glibc_arm\etc\inittab

# Put a getty on the serial port
console::respawn:/sbin/getty -L  console 115200 vt100 # GENERIC_SERIAL

echo "2023/4/28 18:33 wenyuanbo"

# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
修改为:
# Put a getty on the serial port
#console::respawn:/sbin/getty -L  console 115200 vt100 # GENERIC_SERIAL

echo "2023/4/28 18:33 wenyuanbo"
console::respawn:-/bin/sh

echo "2023/4/29 11:35 wenyuanbo"


# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot


 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/514885.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【集群模式】执行MapReduce程序-wordcount

因为是在hadoop集群下通过jar包的方式运行我们自己写的wordcount案例,所以需要传递的是 HDFS中的文件路径,所以我们需要修改上一节【本地模式】中 WordCountRunner类 的代码: //5.设置统计文件输入的路径,将命令行的第一个参数作为输入文件的…

超细详解MyBatis操作数据库(1)

文章目录 1.MyBatis 是什么?2.回顾 JDBC 的操作流程3.MyBatis 在整个框架中的定位4.MyBatis的使用4.1创建数据库和表4.2 添加MyBatis框架支持4.2.1 老项目添加MyBatis4.2.2 新项目添加MyBatis 4.3 配置连接字符串和MyBatis4.3.1 配置连接字符串4.3.2 配置 MyBatis 中…

【一】设计模式~~~创建型模式~~~简单工厂模式(Java)

【学习难度:★★☆☆☆,使用频率:★★★☆☆】 1.1. 模式动机 考虑一个简单的软件应用场景,一个软件系统可以提供多个外观不同的按钮(如圆形按钮、矩形按钮、菱形按钮等), 这些按钮都源自同一个…

学习之-spring cache缓存框架应用Redis

本文章用于个人学习记录 一、前言 1、SpringCache是Spring提供的一个缓存框架,在Spring3.1版本开始支持将缓存添加到现有的spring应用程序中,在4.1开始,缓存已支持JSR-107注释和更多自定义的选项。Spring 从 3.1 开始定义了 org.springframe…

设备树dtb文件的格式分析

设备树dtb文件的格式分析 文章目录 设备树dtb文件的格式分析DTB文件格式1.header头部1.magic2.totalsize3.off_dt_struct4.off_dt_strings字符串的偏移量5.off_mem_rsvmap 内存保留映射的偏移量6.version 格式版本7.last_comp_version最后兼容版本8.boot_cpuid_phys 我们正在启…

SpringBoot ( 五 ) 封装响应数据

2.6.业务处理 这是通过 Spring 在 Controller中注入Service模型层 而在 Service模型层 结合 Mybatis / Mybatis-Plus 进行数据加工, 数据持久化 2.7.封装响应值 将 业务处理得到数据封装到 Model作用域中, 伴随着转页将信息传递到页面 2.7.1.传值容器 2.7.1.1.Model 在Cont…

【Qt编程之Widgets模块】-001:QButtonGroup抽象容器

1.QButtonGroup简介 QButtonGroup提供了一个抽象容器,可以将按钮小部件放入其中。它不提供此容器的可视化表示,而是管理组中每个按钮的状态。 互斥按钮组,将关闭除已单击的按钮外的所有可选中(可切换)按钮。默认情况下…

七个合法学习黑客技术的网站,让你从萌新成为大佬

合法的学习网站,以下这些网站,虽说不上全方位的满足你的需求,但是大部分也都能。能带你了解到黑客有关的技术,视频,电子书,实践,工具,数据库等等相关学习内容。以上这些网站我都是用…

项目调研 | Loopring研究报告

一、项目简介及愿景 Loopring协议是一个专为应用程序开发的 zkRollup 协议、一个中继器、一个 L2 非托管交易所、一个智能钱包。用户可以在其中使用、交易和存储资产,同时让资产获得增长。 上述Loopring这些Title具体详情如下: 作为协议,Loop…

latex论文写作实用工具

从pdf定位到latex:ctrl 鼠标左键从latex定位到pdf:ctrl alt jVscode写latex时如何自动换行 最简单的方法就是使用快捷 Alt z 公式识别 SiimpleTex latex格式化 下载链接 在VSCode用户Json文件中添加如下: 表格转换工具 链接 Excel…

YOLOv5改进系列(3)——添加CA注意力机制

【YOLOv5改进系列】前期回顾: YOLOv5改进系列(0)——重要性能指标与训练结果评价及分析 YOLOv5改进系列(1)——添加SE注意力机制 YOLOv5改进系列(2)——添加CBAM注意力机制 目录 &#x1f68…

【Linux】Redis高可用概述1(RDB和AOF的备份恢复)

在web服务器中,高可用是指服务器可以正常访问的时间,衡量的标准是在多长时间内可以提供正常服务 (99.9%、99.99%、99.999% 等等)。 但是在Redis语境中,高可用的含义似乎要宽泛一些,除了保证提供正常服 务(如…

优惠卷秒杀——分布式锁

在集群的模式下,有多个jvm,每个jvm内部有他自己的锁,导致并行执行存在线程安全问题 分布式锁:满足分布式系统或集群模式下多线程可见并且互斥的锁 基于Redis实现分布式锁 基于redis锁的初级版本 public interface ILock {/*** …

第十四届蓝桥杯C++--A组题解(更新中)

本来考场上做完想着这回图一乐,打打暴力混个省奖得了,看完民间题解感觉跟自己估计的差不多,应该挺寄的,没想到出分捡了个省一,喜提弱省省一倒数 这篇博客把自己会的题先放上来,其他的题慢慢补,好…

干翻Mybatis源码系列之第八篇:Mybatis提供的缓存方案细节注意

前言 Mybatis缓存设计成了两层的体系,第一层叫做一级缓存,第二层叫做二级缓存(全局缓存)。我们从这里可以看到Mybatis的缓存方案是有两种处理方式的。 一级缓存(默认开启) 一级缓存默认开启的&#xff0c…

[天翼杯 2021]esay_eval

[天翼杯 2021]esay_eval <?php class A{ #定义一个名为A的类public $code ""; #定义一个公共属性code function __call($method,$args){ #call魔术方法 当调用一个不存在的成员方法的时候触发eval($this->code); #将code的值以php代码执行 }function __w…

c高级day3作业

#!/bin/bash # 脚本名称:myfirstshell echo hello hostname ls -a .. echo $PATH echo $HOME df -h id -g hostname echo goodbye #!/bin/bash a(ls -l /etc | grep "^-" ) #/etc文件中普通文件 b(ls -l /etc | grep "^d" ) #/etc文件中一级目录文件 …

一篇了解智慧网关

智慧网关是指基于互联网技术的智能网关&#xff0c;能够连接不同的物联网设备和传感器&#xff0c;实现数据采集、信息传递、远程控制、通信管理等功能。作为物联网架构中的核心设备之一&#xff0c;智慧网关在智能家居、智慧城市、智能制造、智能交通、智能农业等领域得到了广…

solidworks三维建模竞赛练习题

solidworks三维建模竞赛练习题&#xff1a;3D01‐ 01 solidworks三维建模竞赛练习题&#xff1a;3D01‐ 02 solidworks三维建模竞赛练习题&#xff1a;3D01‐ 03 solidworks三维建模竞赛练习题&#xff1a;3D01‐ 04 solidworks三维建模竞赛练习题&#xff1a;3D01‐ 05 solidw…

windows docker 创建mysql主从 容器创建mysql主从

1. docker命令新建mysql-master&#xff0c;只是简单测试&#xff0c;没有设置映射&#xff0c;只是验证主从连接&#xff0c;需要可自行添加 docker run --restartalways --name mysql-master --privilegedtrue -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD123456 mysql:8.0 2.…