-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(petalinux): add support for KR260
- Loading branch information
1 parent
d1527c3
commit 97e7a16
Showing
37 changed files
with
6,074 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# Xilinx KR260 | ||
|
||
|
||
## Prerequisites | ||
|
||
Requirements: | ||
* [extra2000/xilinx-toolkit v3.x image](https://github.com/extra2000/xilinx-toolkit) | ||
* Vitis `v2022.1` and PetaLinux `v2022.1 Update 3` | ||
* [Kria KR260 Starter Kit 2022.1 BSP Update 1](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2022-1.html) | ||
* [KR260 board that have it's firmware updated with 2022.1_update3_BOOT.BIN](https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/1641152513/Kria+K26+SOM#Boot-Firmware-Updates) | ||
|
||
Allow source files to be mounted into container: | ||
``` | ||
chcon -R -t container_file_t project | ||
``` | ||
|
||
|
||
## Building PetaLinux | ||
|
||
Spawn new container: | ||
``` | ||
podman run -it --rm \ | ||
--network=host \ | ||
--userns="keep-id:uid=1000,gid=1000" \ | ||
-v ${PWD}/project:${PWD}/project:rw \ | ||
-v xilinx-tools-v2022-1:/tools/Xilinx:ro \ | ||
--workdir ${PWD}/project/petalinux \ | ||
--security-opt label=type:xilinx_toolkit_podman.process \ | ||
localhost/extra2000/xilinx-toolkit:latest \ | ||
bash | ||
source /tools/Xilinx/PetaLinux/2022.1/tool/settings.sh | ||
``` | ||
|
||
Create project: | ||
``` | ||
petalinux-create \ | ||
--force \ | ||
--type project \ | ||
--source ../third-party/xilinx-kr260-starterkit-v2022.1-*.bsp \ | ||
--name kr260 | ||
``` | ||
|
||
Restore replaced configs and remove old backup (should be executed by host, not by container): | ||
``` | ||
git restore project/petalinux/kr260 | ||
git clean -f project/petalinux/kr260.old | ||
``` | ||
|
||
`cd` into `kr260/`: | ||
``` | ||
cd kr260 | ||
``` | ||
|
||
Get hardware description: | ||
``` | ||
petalinux-config --get-hw-description hardware/xilinx-kr260-starterkit-2022.1/kr260_starter_kit.xsa | ||
``` | ||
|
||
Build and package `rootfs`, and then build for WIC `images/linux/petalinux-sdimage.wic` for SD card: | ||
``` | ||
petalinux-build | ||
petalinux-package \ | ||
--boot \ | ||
--u-boot | ||
petalinux-package \ | ||
--wic \ | ||
--images-dir ./images/linux/ \ | ||
--bootfiles "ramdisk.cpio.gz.u-boot,boot.scr,Image,system.dtb,system-zynqmp-sck-kr-g-revB.dtb" \ | ||
--disk-name "sda" | ||
``` | ||
|
||
Build and package `sysroot` (SDK): | ||
``` | ||
petalinux-build --sdk | ||
petalinux-package --sysroot | ||
``` | ||
|
||
**NOTE: Later to source SDK:** | ||
``` | ||
source images/linux/sdk/environment-setup-cortexa72-cortexa53-xilinx-linux | ||
``` | ||
|
||
Exit the container. | ||
|
||
|
||
## Flashing to SD Card | ||
|
||
Insert SD card and execute the following command: | ||
``` | ||
sudo dd \ | ||
bs=4M \ | ||
if=project/petalinux/kr260/images/linux/petalinux-sdimage.wic \ | ||
iflag=fullblock \ | ||
oflag=direct \ | ||
status=progress \ | ||
of=/dev/sdX | ||
sudo sync | ||
``` | ||
|
||
|
||
## Testing | ||
|
||
Insert SD card into KR260 board, connect USB to your computer, and power on the board. Use the following `screen` command to access shell: | ||
``` | ||
screen /dev/ttyUSB1 115200 | ||
``` | ||
|
||
Then, follow [Testing](../yocto/common/testing.md) instructions. To exit from `screen`, do `CTRL` + `A` and then type `:quit`. | ||
|
||
|
||
## Known Issues | ||
|
||
* Warnings from `project/petalinux/kr260/components/yocto/layers/meta-ros/meta-ros2-humble/generated-recipes/iceoryx/iceoryx-posh_2.0.2-3.bb` can be safely ignored. | ||
* Running with QEMU is not possible (I haven't figured out how to boot QEMU with the starter kit BSP). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*/*/config.old | ||
*/*/rootfs_config.old | ||
build/ | ||
images/linux/ | ||
pre-built/linux/ | ||
.petalinux/* | ||
!.petalinux/metadata | ||
*.o | ||
*.jou | ||
*.log | ||
/components/plnx_workspace | ||
/components/yocto |
Oops, something went wrong.