209 | | $ make rev1_xc7z035 |
210 | | }}} |
| 209 | $ make rev2_xczu7ev |
| 210 | }}} |
| 211 | Time: ~1 hour |
| 212 | |
| 213 | === Configure U-Boot environment variables === |
| 214 | Documentation for configuration of u-boot-xlnx_%.bbappend, bsp.cfg, and platform-top.h can be found [https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_2/ug1144-petalinux-tools-reference-guide.pdf here] on page 99. Because u-boot autoconfig is being deprecated, this is the workaround to avoid the need for platform-auto.h. |
| 215 | |
| 216 | {{{ |
| 217 | $ cd kernel |
| 218 | $ mkdir ./configs/rev2_xczu7ev/u-boot |
| 219 | $ mkdir ./configs/rev2_xczu7ev/u-boot/files |
| 220 | }}} |
| 221 | ==== u-boot-xlnx_%.bbappend ==== |
| 222 | {{{ |
| 223 | $ vi ./configs/rev2_xczu7ev/u-boot/u-boot-xlnx_%.bbappend |
| 224 | |
| 225 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 226 | |
| 227 | SRC_URI += " \ |
| 228 | file://platform-top.h \ |
| 229 | file://bsp.cfg \ |
| 230 | " |
| 231 | |
| 232 | do_configure_append () { |
| 233 | if [ "${U_BOOT_AUTO_CONFIG}" = "1" ]; then |
| 234 | install ${WORKDIR}/platform-auto.h ${S}/include/configs/ |
| 235 | install ${WORKDIR}/platform-top.h ${S}/include/configs/ |
| 236 | else |
| 237 | install ${WORKDIR}/platform-top.h ${S}/include/configs/ |
| 238 | fi |
| 239 | } |
| 240 | |
| 241 | do_configure_append_microblaze () { |
| 242 | if [ "${U_BOOT_AUTO_CONFIG}" = "1" ]; then |
| 243 | install -d ${B}/source/board/xilinx/microblazegeneric/ |
| 244 | install ${WORKDIR}/config.mk ${B}/source/board/xilinx/microblaze-generic/ |
| 245 | fi |
| 246 | } |
| 247 | }}} |
| 248 | ==== bsp.cfg ==== |
| 249 | {{{ |
| 250 | $ vi ./configs/rev2_xczu7ev/u-boot/files/bsp.cfg |
| 251 | |
| 252 | CONFIG_SYS_CONFIG_NAME="platform-top" |
| 253 | }}} |
| 254 | ==== platform-top.h ==== |
| 255 | {{{ |
| 256 | $ vi ./configs/rev2_xczu7ev/u-boot/files/platform-top_NFS+TFTP.h |
| 257 | |
| 258 | #include <configs/xilinx_zynqmp.h> |
| 259 | |
| 260 | #define pushCEES _Pragma("push_macro(\"CONFIG_EXTRA_ENV_SETTINGS\")") |
| 261 | #define popCEES _Pragma("pop_macro(\"CONFIG_EXTRA_ENV_SETTINGS\")") |
| 262 | |
| 263 | pushCEES |
| 264 | #undef CONFIG_EXTRA_ENV_SETTINGS |
| 265 | #define CONFIG_EXTRA_ENV_SETTINGS popCEES CONFIG_EXTRA_ENV_SETTINGS \ |
| 266 | "bootargs=console=ttyPS0,115200 earlycon clk_ignore_unused rootwait root=/dev/nfs rw ip=dhcp nfsroot=192.168.30.2:/export/CentOS,nfsvers=3,tcp\0" \ |
| 267 | "autoload=no\0" \ |
| 268 | "netstart=0x04000000\0" \ |
| 269 | "kernel_img=image.ub\0" \ |
| 270 | "netboot=dhcp && setenv serverip 192.168.30.2 && tftpboot ${netstart} ${kernel_img} && bootm ${netstart}\0" \ |
| 271 | "bootcmd=run netboot\0" \ |
| 272 | "" |
| 273 | }}} |
| 274 | {{{ |
| 275 | $ ln -s ./configs/rev2_xczu7ev/u-boot/files/platform-top_NFS+TFTP.h ./configs/rev2_xczu7ev/u-boot/files/platform-top.h |
| 276 | }}} |
| 277 | Rather than creating a symlink, you may also put your changes directly into platform-top.h, whatever best fits your workflow. |
| 278 | |
| 279 | Makefile will transfer contents of ./configs/rev2_xczu7ev/u-boot directory into ${ZYNQ_OS_PROJECT_PATH}/project-spec/meta-user/recipes-bsp/u-boot |
213 | | {{{ |
214 | | $ make pull_cm |
215 | | $ cd kernel |
216 | | $ make rev1_xc7z035 |
217 | | }}} |
218 | | Note: In order to do this you must have a personal GitHub token defined as an env variable export GH_TOKEN= follow this to generate a token https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token |
219 | | |
220 | | Configure general system behavior |
| 282 | |
| 283 | {{{ |
| 284 | $ make rev2_xczu7ev |
| 285 | }}} |
| 286 | After the build completes, `BOOT.BIN`, `boot.scr`, and `image.ub` can be found in `SM_ZYNQ_FW/kernel/zynq_os/images/linux` |
| 287 | |
| 288 | {{{#!div |
| 289 | {{{#!html |
| 290 | <h4 class="foldable">Configure general system behavior</h2> |
| 291 | }}} |
| 292 | {{{#!div |
| 293 | Everything done within the Petalinux configuration menu should already be handled by the settings within platform-top.h. I've left these steps as they may be useful in the future, however, they are outdated and use Petalinux 2017.4 and build rev1_xc7z035. |
272 | | After the build completes, `BOOT.BIN` and `image.ub` can be found in `SM_ZYNQ_FW/kernel/zynq_os/images/linux` |
| 345 | After the build completes, `BOOT.BIN`, `boot.scr`, and `image.ub` can be found in `SM_ZYNQ_FW/kernel/zynq_os/images/linux` |
| 346 | }}} |
| 347 | |
| 348 | === Transfer Images === |
| 349 | This guide is specific to Apollo202 and may or may not apply to other blades. |
| 350 | {{{ |
| 351 | $ mount /dev/mmcblk1p1 /mnt |
| 352 | }}} |
| 353 | Transfer `BOOT.BIN` and `boot.scr` into `/mnt` |
| 354 | {{{ |
| 355 | $ umount /mnt |
| 356 | }}} |
| 357 | |
| 358 | Transfer `image.ub` into the TFTP server directory |