Open konosubakonoakua opened 1 month ago
petalinux-create -h
petalinux-config --get-hw-description=<xsa folder>
_PETA_ARCH=arm
#_PETA_ARCH=aarch64
_PETA_VERSION=2019.1
#_PETA_VERSION=2024.1
_CONFIG_FILE=project-spec/configs/config
cp $_CONFIG_FILE $_CONFIG_FILE.bak
sed -i -e "s/^\(CONFIG_YOCTO_NETWORK_SSTATE_FEEDS\)=.*/\1=n/" \
-e "s#^\(CONFIG_PRE_MIRROR_URL\)=.*#\1=\"file:///tools/petalinux/sstate/$_PETA_VERSION/downloads\"#" \
-e "s#^\(CONFIG_YOCTO_LOCAL_SSTATE_FEEDS_URL\)=.*#\1=\"/tools/petalinux/sstate/$_PETA_VERSION/$_PETA_ARCH\"#" \
-e "s/^# CONFIG_YOCTO_BB_NO_NETWORK is not set/CONFIG_YOCTO_BB_NO_NETWORK=y/" \
$_CONFIG_FILE
petalinux-config --silentconfig
petalinux-config -c kernel
petalinux-config -c rootfs
petalinux-build
petalinux-package --boot --fsbl --fpga --u-boot --force
petalinux-package prebuilt
pelinux-boot jtag --prebuilt 2
[!IMPORTANT] If you encoutered the following error, JUST Smaaaaaashhhhhhhhhhh the reset button on your board. 🙄🙄🙄 or do some gentle but similar 🧐
[ERROR] Command 'xsdb /tmp/tmpsetc21xx' returned non-zero exit status 1.
rf@myPC:~ $ petalinux-boot jtag --prebuilt 2
[WARNING] Will not program bitstream on the target. If you want to program bitstream,
[WARNING] Use --fpga <BITSTREAM> option to specify a bitstream.
[INFO] Launching XSDB for file download and boot.
[INFO] This may take a few minutes, depending on the size of your image.
attempting to launch hw_server
****** Xilinx hw_server v2024.1
**** Build date : May 16 2024 at 12:16:21
** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
** Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
INFO: hw_server application started
INFO: Use Ctrl-C to exit hw_server application
INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121
Memory read error at 0xF8007080. MMU section translation fault
invoked from within
"::tcf::eval -progress {apply {{msg} {puts $msg}}} {tcf_send_command tcfchan#0 Memory get siiii {Bea{o{msg o{} A}}} {JTAG-jsn-JTAG-SMT2-210251190311-4ba00477-0.0 4160778368 4 4 7}}"
(procedure "::tcf::send_command" line 4)
invoked from within
"::tcf::send_command $chan Memory get "siiii" "Bea{o{msg o{} A}}" [list $ctx $start_addr $size $nbytes $mode]"
(procedure "mrd" line 87)
invoked from within
"mrd 0xF8007080"
(procedure "ps_version" line 2)
invoked from within
"ps_version"
(procedure "ps7_post_config" line 8)
invoked from within
"ps7_post_config"
(file "/tmp/tmpsetc21xx" line 8)
[ERROR] Command 'xsdb /tmp/tmpsetc21xx' returned non-zero exit status 1.
Refer to https://github.com/konosubakonoakua/blog/issues/97#issuecomment-2374149784
petalinux-config
[!TIP] bootargs generated by
petalinux-cofing
doesn't have correct ip config (wrong gateway & netmask) add node below toproject-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
OR, maybe I messed up something.chosen { //bootargs = "console=ttyPS0,115200 earlycon root=/dev/nfs rootfstype=nfs nfsroot=10.9.8.8:/nfsroot,tcp,nfsvers=3 ip=dhcp rw"; bootargs = "console=ttyPS0,115200 earlycon root=/dev/nfs rootfstype=nfs nfsroot=10.9.8.8:/nfsroot,tcp,nfsvers=3 ip=10.9.8.9:10.9.8.8:10.9.8.254:255.255.255.0::eth0:off rw"; stdout-path = "serial0:115200n8"; };
build petalinux
petalinux-build
package prebuilt petalinux
petalinux-package prebuilt --force
remove
INITRD
frompxelinux.cfg/default
PXE_CFG_FILE=/tftpboot/pxelinux.cfg/default cp -f $PXE_CFG_FILE $PXE_CFG_FILE.bak sed -i '/^INITRD/d' $PXE_CFG_FILE
petalinux-boot jtag --prebuilt 2
TFTPBOOT_PATH=/tftpboot
SDBOOT_PATH=/media/$USER/BOOT
cd $TFTPBOOT_PATH
cp BOOT.BIN boot.scr image.ub system.dtb $SDBOOT_PATH
ll $SDBOOT_PATH
umount /media/$USER/BOOT /media/$USER/rootfs
# or jsut umount /media/$USER/*
cd -
tio -a latest --exclude-drivers=!(cp210x)
bootarg
or cmdline
after logincat /proc/cmdline
First, follow this guide #95
Second, boot petalinux via nfs, login
Third, Add new ip address to eth0
check current settings
ifconfig eth0
sudo ip address add 192.168.137.253/24 brd + dev eth0
sudo ip route del default
sudo ip route add default via 192.168.137.1 dev eth0
ping 8.8.8.8 # should succeed
Fourth, add nameserver
echo "nameserver 192.168.137.1" | sudo tee -a /etc/resolv.conf
curl www.baidu.com # should succeed
But, failed to download from github 🧐🧐🧐.
petalinux:~/Downloads$ wget https://github.com/junegunn/fzf/releases/download/v0.55.0/fzf-0.55.0-linux_armv7.tar.gz
--2018-03-09 13:12:57-- https://github.com/junegunn/fzf/releases/download/v0.55.0/fzf-0.55.0-linux_armv7.tar.gz
Resolving github.com... 20.205.243.166
Connecting to github.com|20.205.243.166|:443... connected.
ERROR: The certificate of 'github.com' is not trusted.
ERROR: The certificate of 'github.com' is not yet activated.
The certificate has not yet been activated
The certificate has expired
design flow overview
design flow overview (text version)