Open konosubakonoakua opened 4 days ago
sudo tee -a /var/lib/dpkg/status << EOF
Package: python
Status: install ok installed
Maintainer: Fake Entry <fake@example.com>
Architecture: all
Version: 2.7.17
Description: fake package for petalinux
EOF
sudo ln -s /usr/bin/python2.7 /usr/bin/python
If not, petalinux 2019 won't find python, and will raise error.
ERROR: You are missing the following system tools required by PetaLinux:
- python
export INSTALLER=~/Downloads/petalinux-v2019.1-final-installer.run
$INSTALLER /tools/petalinux/2019.1/
# need confirm with licenses
create /tools/petalinux if not exists
sudo mkdir -p /tools/petalinux
sudo chown rf:rf /tools/petalinux
mkdir -p /tools/petalinux/sstate/2019.1
tar xvzf ~/Downloads/sstate-rel-v2019.1.tar.gz -C /tools/petalinux/sstate/2019.1
I'm using ubuntu22, so I use docker instaled. https://github.com/z4yx/petalinux-docker
build
docker build \
--build-arg PETA_VERSION=2019.1 \
--build-arg PETA_RUN_FILE=petalinux-v2019.1-final-installer.run \
-t petalinux:2019.1 \
.
launch
docker run -ti --rm \
-e DISPLAY=$DISPLAY --net="host" \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/.Xauthority:/home/vivado/.Xauthority \
-v /tools/petalinux/sstate/2019.1:/tools/petalinux/sstate/2019.1 \
-v /tftpboot:/tftpboot \
-v $(pwd):/home/vivado/project \
petalinux:2019.1 \
/bin/bash
oneliner
tee -a ~/.bashrc << EOF
alias petadocker2019='docker run -it --rm -e DISPLAY=$DISPLAY --net="host" -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/home/vivado/.Xauthority -v /tools/petalinux/sstate/2019.1:/tools/petalinux/sstate/2019.1 -v /tftpboot:/tftpboot -v $(pwd):/home/vivado/project petalinux:2019.1 /bin/bash -c '
EOF
source ~/.bashrc
Config nfs (optional, used for Linux rootfs mount).
sudo mkdir -p /nfsroot
sudo chown -R rf:rf /nfsroot
[!CAUTION]
/nfsroot
is very similar with/nfsboot
, never make a typo like this!!! 🚨🚨🚨😱😱😱sudo cp -f /etc/exports /etc/exports.bak sudo tee -a /etc/exports << EOF /nfsroot *(rw,sync,no_root_squash) EOF
if encountered:
VFS:Unable to mount root fs via NFS, tring floppy
:sudo cp -f /etc/default/nfs-kernel-server /etc/default/nfs-kernel-server.bak sudo tee -a /etc/default/nfs-kernel-server << EOF RPCNFSDOPTS="--nfs-version 2,3,4 --debug --syslog" EOF sudo systemctl restart nfs-kernel-server
restart after modifications.
sudo service nfs-kernel-server restart
show shared folders
showmount -e
refresh on the fly
sudo exportfs -rv
test nfs
sudo mkdir -p /mnt/nfs sudo mount -t nfs 127.0.0.1:/nfsroot /mnt/nfs
references
Dependencies
Switch to bash
Install dependecies
Config tftp server (optional).
Install ssh server