当前位置: 首页 > news >正文

wordpress tag生成的链接乱张家港优化网站seo

wordpress tag生成的链接乱,张家港优化网站seo,电商网站程序,怎么创建一个网站🚀 PetaLinux 使用技巧与缓存配置 适用场景: Ubuntu 主机Zynq 开发板可选 Windows 辅助(用 RDP、CLion Remote 插件协作) 本指南主要聚焦于 Ubuntu 与开发板端的高效协作与缓存配置和启动。 🧠 开发建议 P1: 配置 Pet…

🚀 PetaLinux 使用技巧与缓存配置

适用场景:

  • Ubuntu 主机
  • Zynq 开发板
  • 可选 Windows 辅助(用 RDP、CLion Remote 插件协作)
    本指南主要聚焦于 Ubuntu 与开发板端的高效协作与缓存配置和启动。

🧠 开发建议

P1: 配置 PetaLinux 缓存,加速编译、防止因网络造成编译慢或失败

通过使用本地 downloadssstate 缓存,避免 Yocto 网络下载导致失败。

P2: 三机连同一网络(Ubuntu / Windows / 开发板)

三者连接到同一个路由器,别在网络上浪费时间。

P3: 使用 RDP + CLion 进行远程交叉编译

  • Windows 中使用 remote-file-systems 插件 访问 Ubuntu。
  • 可直接在 CLion 中浏览与编辑 PetaLinux 工程目录结构。

P4: 启动文件拆分管理

将启动文件拆开

BOOT.BIN, system.dtb, zImage, system.bit, rootfs

📦 PetaLinux 缓存目录结构

$ ls /opt/mycache
downloads  sstate_arm_2020.2

🛠️ 缓存配置脚本 fix_complie.sh

脚本位置示例, z7是petalinux工程目录

$ cd ~/petalinux
$ ls
fix_complie.sh  xsa_7010  xsa_7020  z7

使用方式:

$ ./fix_complie.sh z7
已成功注释掉 CONFIG_YOCTO_NETWORK_SSTATE_FEEDS 配置项。
配置文件已成功更新。
BSP 配置文件中已存在 PREMIRRORS_prepend 内容。
BSP 配置文件已成功更新。

脚本内容如下:

fix_complie.sh
#!/bin/bash# 配置文件路径
CONFIG_FILE="$1/project-spec/configs/config"
BSP_CONF_FILE="$1/project-spec/meta-user/conf/petalinuxbsp.conf"# 新的配置值
NEW_PRE_MIRROR_URL='CONFIG_PRE_MIRROR_URL="file:///opt/mycache/downloads/"'
NEW_SSTATE_FEEDS_URL='CONFIG_YOCTO_LOCAL_SSTATE_FEEDS_URL="/opt/mycache/sstate_arm_2020.2/arm/  "'# 新的 PREMIRRORS_prepend 内容
PREMIRRORS_CONTENT='PREMIRRORS_prepend = " \
git://.*/.* file:///opt/mycache/downloads/ \n\
gitsm://.*/.* file:///opt/mycache/downloads/ \n\
ftp://.*/.* file:///opt/mycache/downloads/ \n\
http://.*/.* file:///opt/mycache/downloads/ \n\
https://.*/.* file:///opt/mycache/downloads/ \n"
DL_DIR="/opt/mycache/downloads"
SSTATE_DIR="/opt/mycache/sstate_arm_2020.2/arm"'# 检查配置文件是否存在
if [ ! -f "$CONFIG_FILE" ]; thenecho "配置文件 $CONFIG_FILE 不存在。"exit 1
fi# 注释掉 CONFIG_YOCTO_NETWORK_SSTATE_FEEDS=y 这一行
if grep -q '^CONFIG_YOCTO_NETWORK_SSTATE_FEEDS=' "$CONFIG_FILE"; thensed -i '/^CONFIG_YOCTO_NETWORK_SSTATE_FEEDS=/ s/^/#/' "$CONFIG_FILE"echo "已成功注释掉 CONFIG_YOCTO_NETWORK_SSTATE_FEEDS 配置项。"
fi# 替换或添加 CONFIG_PRE_MIRROR_URL
if grep -q '^CONFIG_PRE_MIRROR_URL=' "$CONFIG_FILE"; then# 如果存在,使用 sed 替换配置值sed -i 's|^CONFIG_PRE_MIRROR_URL=.*|'"$NEW_PRE_MIRROR_URL"'|' "$CONFIG_FILE"
else# 如果不存在,添加新的配置项echo "$NEW_PRE_MIRROR_URL" >> "$CONFIG_FILE"
fi# 替换或添加 CONFIG_YOCTO_LOCAL_SSTATE_FEEDS_URL
if grep -q '^CONFIG_YOCTO_LOCAL_SSTATE_FEEDS_URL=' "$CONFIG_FILE"; then# 如果存在,使用 sed 替换配置值sed -i 's|^CONFIG_YOCTO_LOCAL_SSTATE_FEEDS_URL=.*|'"$NEW_SSTATE_FEEDS_URL"'|' "$CONFIG_FILE"
else# 如果不存在,添加新的配置项echo "$NEW_SSTATE_FEEDS_URL" >> "$CONFIG_FILE"
fi# 确认替换或添加是否成功
if grep -q "$NEW_PRE_MIRROR_URL" "$CONFIG_FILE" && grep -q "$NEW_SSTATE_FEEDS_URL" "$CONFIG_FILE"; thenecho "配置文件已成功更新。"
elseecho "配置文件更新失败。"exit 1
fi# 检查 BSP 配置文件是否存在
if [ ! -f "$BSP_CONF_FILE" ]; thenecho "BSP 配置文件 $BSP_CONF_FILE 不存在。"exit 1
fi# 添加 PREMIRRORS_prepend 内容到 BSP 配置文件
if ! grep -q '^PREMIRRORS_prepend' "$BSP_CONF_FILE"; thencat << EOF >> "$BSP_CONF_FILE"
$PREMIRRORS_CONTENT
EOFecho "已将 PREMIRRORS_prepend 内容添加到 BSP 配置文件。"
elseecho "BSP 配置文件中已存在 PREMIRRORS_prepend 内容。"
fi# 确认添加是否成功
if grep -q "^PREMIRRORS_prepend" "$BSP_CONF_FILE"; thenecho "BSP 配置文件已成功更新。"
elseecho "BSP 配置文件更新失败。"exit 1
fi

🔧 U-Boot 启动文件拆解技巧

通过编写 boot.cmd.default 来拆分启动项(使用 mkimage 工具生成 boot.scr):

mkimage -c none -A arm -T script -d boot.cmd.default boot.scr

📄 启动脚本 boot.cmd.default 如下

boot.cmd.default

# mkimage -c none -A arm -T script -d boot.cmd.default boot.scr
#
################
ming_mmc_devnum=1for boot_target in ${boot_targets};
doif test "${boot_target}" = "jtag" ; thenbootm 0x00200000 0x04000000 0x00100000exit;fiif test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; thenecho " AAAAAAAAAAAAAWPF  Booting from SD (zImage)...${boot_target}--${devtype} -${devnum}-${distro_bootpart} "if test -e ${devtype} ${devnum}:${distro_bootpart} /zImage; thenfatload ${devtype} ${devnum}:${distro_bootpart} 0x00200000 zImage;;fiif test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; thenfatload ${devtype} ${devnum}:${distro_bootpart} 0x00100000 system.dtb;fiif test -e ${devtype} ${devnum}:${distro_bootpart} /rootfs.cpio.gz.u-boot; thenfatload ${devtype} ${devnum}:${distro_bootpart} 0x04000000 rootfs.cpio.gz.u-boot;bootm 0x00200000 0x04000000 0x00100000exit;fiif test -e ${devtype} ${devnum}:${distro_bootpart} /system.bit; thenfatload ${devtype} ${devnum}:${distro_bootpart} 0x00800000 system.bit;fpga loadb 0 ${fileaddr} ${filesize}fibootz  0x00200000 - 0x00100000exit;fiif test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; thenecho "BBBBBBBBBBBBBBBBBKYLV1  Booting from QSPI (zImage)...${boot_target}--${devtype} -${ming_mmc_devnum}-${distro_bootpart} "if test -z "${bootargs}"; thensetenv bootargs 'console=ttyPS0,115200 root=/dev/mmcblk1p2 rw rootwait rootfstype=ext4 earlyprintk'fiif test -e ${devtype} ${ming_mmc_devnum}:${distro_bootpart} /zImage; thenfatload ${devtype} ${ming_mmc_devnum}:${distro_bootpart} 0x00200000 zImage;;fiif test -e ${devtype} ${ming_mmc_devnum}:${distro_bootpart} /system.dtb; thenfatload ${devtype} ${ming_mmc_devnum}:${distro_bootpart} 0x00100000 system.dtb;fiif test -e ${devtype} ${ming_mmc_devnum}:${distro_bootpart} /rootfs.cpio.gz.u-boot; thenfatload ${devtype} ${ming_mmc_devnum}:${distro_bootpart} 0x04000000 rootfs.cpio.gz.u-boot;bootm 0x00200000 0x04000000 0x00100000exit;fiif test -e ${devtype} ${ming_mmc_devnum}:${distro_bootpart} /system.bit; thenfatload ${devtype} ${ming_mmc_devnum}:${distro_bootpart} 0x00800000 system.bit;fpga loadb 0 ${fileaddr} ${filesize}fibootz  0x00200000 - 0x00100000exit;fiif test "${boot_target}" = "nand" || test "${boot_target}" = "nand0"; thennand infoif test "image.ub" = "image.ub"; thennand read 0x10000000 0x1000000 0x6400000;bootm 0x10000000;exit;fiif test "image.ub" = "uImage"; thennand read 0x00200000 0x1000000 0x3200000;nand read 0x04000000 0x4600000  0x3200000;bootm 0x00200000 0x04000000 0x00100000exit;fifi
done

拷贝sd卡的文件到qspi和emmc

如果不再用sd卡,则将sd卡里的文件拷贝到到qspi和emmc里

将 BOOT.BIN 拷贝到qspi

copy_boot_to_qspi.sh
#!/bin/sh
echo "##############################################"
echo "########## COPY BOOT TO Flash QSPI #########"
echo "##############################################"
echo ""
boot=/media/sd-mmcblk0p1/BOOT.BIN
if [ ! -f ${boot} ]; thenecho "ERROR: ${boot} file does not exist!"exit 1
fi
echo "Erase partition /dev/mtd0"
flash_erase /dev/mtd0 0 0
flashcp ${boot} /dev/mtd0
echo "##########         Complete         ##########"
echo "##############################################"

将emmc分区

emmc的分区和sd卡一样,一个fat一个ext4

emmc_partition.sh
#!/bin/sheMMC_DEVICE="/dev/mmcblk1"umount "${eMMC_DEVICE}p1" 2>/dev/null
umount "${eMMC_DEVICE}p2" 2>/dev/nullif [ ! -b "$eMMC_DEVICE" ]; thenecho "$eMMC_DEVICE not found!"exit 1
fifdisk "$eMMC_DEVICE" <<EOF
o
n
p
1+100M
n
p
2w
EOFblockdev --rereadpt "${eMMC_DEVICE}"mkfs.vfat -F 32 "${eMMC_DEVICE}p1"
mkfs.ext4 "${eMMC_DEVICE}p2"fdisk -l "$eMMC_DEVICE"

将sd卡所有文件拷贝到emmc

copy_sd_to_emmc.sh
#!/bin/sh
cp -a  /media/sd-mmcblk0p1/*   /media/sd-mmcblk1p1
cp -a  /media/sd-mmcblk0p2/*   /media/sd-mmcblk1p2
http://www.dtcms.com/a/478788.html

相关文章:

  • 中天建设集团网站wordpress显示不了图片
  • 【React】19.2 新特性全面解析:并发优化与性能提升指南
  • SALSITA AI:3D产品演示、安装动态过程展示
  • 网站建设国内现状松原网站推广
  • 东营区建设局网站湛江城乡建设局网站
  • 多制式基站综合测试线的架构与验证实践(2)
  • 基于单片机智能水产养殖系统设计(论文+源码)
  • 关于STM32L051单片机(Stop)休眠唤醒后初始化USART2,单片机死机问题
  • 做网站的一些好处科技类网站简介怎么做
  • xgboost参数含义以及应付金融数据中的类别不平衡的套路
  • 养殖类网站模板建筑设计网站排行榜
  • Cursor 对话技巧 【Prompt 模板与全局通用规则】
  • 按键控制LED灯
  • 打工人日报#202510012
  • 网站备案 做网站东莞有互联网企业吗
  • 涪城移动网站建设如何自己学建设网站
  • codeforces round1057(div2)AB题解
  • 【ADS】【python基础】jupyter notebook环境极简搭建
  • 【办公类-115-05】20250920职称资料上传04——PDF和PDF合并PDF、图片和PDF合并PDF(十三五PDF+十四五图片)
  • MySQL分库分表方案及优缺点分析
  • 存储引擎(MySQL体系结构、InnoDB、MyISAM、Memory区别及特点、存储引擎的选择方案)
  • 星外网站开发苏州网络推广
  • 怎么做网站横幅建设工程协会网站查询系统
  • 1NumPy 常用代码示例
  • 【工业场景】用YOLOv8实现行人识别
  • 新手玩Go协程的一些小坑
  • STM32的VDD和VSS,VDDA和VSSA,REF+与REF-。
  • 基于STM32的智能门禁系统(论文+源码)
  • 新乡网站建设价格怎么做网站模块
  • 中小企业建设网站补贴企业网站推广的重要性