@@ -110,17 +110,17 @@ help:
110110# Recipes that run things
111111
112112# Boot one L2CPU in Blackhole RISC-V CPU
113- boot : _need_linux _need_opensbi _need_dtb _need_rootfs _need_hosttool _need_python _need_luwen _need_ttkmd _need_pylibfdt
114- $( PYTHON ) boot.py --boot --ttdevice $(TTDEVICE ) --l2cpu $(L2CPU ) --opensbi_bin $(OPENSBI ) --opensbi_dst 0x400030000000 --rootfs_dst 0x4000e5000000 --kernel_bin $(KERNEL ) --kernel_dst 0x400030200000 --dtb_bin $(DTB ) --dtb_dst 0x400030100000
113+ boot : _need_linux _need_opensbi _need_dtb _need_rootfs _need_hosttool _need_ttkmd
114+ ./console/boot --boot --ttdevice $(TTDEVICE ) --l2cpu $(L2CPU ) --opensbi_bin $(OPENSBI ) --opensbi_dst 0x400030000000 --rootfs_dst 0x4000e5000000 --kernel_bin $(KERNEL ) --kernel_dst 0x400030200000 --dtb_bin $(DTB ) --dtb_dst 0x400030100000
115115 ./console/tt-bh-linux --ttdevice $(TTDEVICE ) --l2cpu $(L2CPU ) --disk $(DISK_IMAGE ) --network
116116
117117# Boot one L2CPU in Blackhole RISC-V CPU into an initramfs specified by $(INITRAMFS)
118- boot_initramfs : _need_linux _need_opensbi _need_dtb _need_rootfs _need_hosttool _need_python _need_luwen _need_ttkmd _need_pylibfdt
119- $( PYTHON ) boot.py --boot --ttdevice $(TTDEVICE ) --l2cpu $(L2CPU ) --opensbi_bin $(OPENSBI ) --opensbi_dst 0x400030000000 --rootfs_dst 0x4000e5000000 --kernel_bin $(KERNEL ) --kernel_dst 0x400030200000 --dtb_bin $(DTB ) --dtb_dst 0x400030100000 --boot_device initramfs --rootfs_bin $(INITRAMFS ) $(DT_NO_VIRTIO_DEVICES ) $(EXTRA_BOOTARGS )
118+ boot_initramfs : _need_linux _need_opensbi _need_dtb _need_rootfs _need_hosttool _need_ttkmd
119+ ./console/boot --boot --ttdevice $(TTDEVICE ) --l2cpu $(L2CPU ) --opensbi_bin $(OPENSBI ) --opensbi_dst 0x400030000000 --rootfs_dst 0x4000e5000000 --kernel_bin $(KERNEL ) --kernel_dst 0x400030200000 --dtb_bin $(DTB ) --dtb_dst 0x400030100000 --boot_device initramfs --rootfs_bin $(INITRAMFS ) $(DT_NO_VIRTIO_DEVICES ) $(EXTRA_BOOTARGS )
120120 ./console/tt-bh-linux --ttdevice $(TTDEVICE ) --l2cpu $(L2CPU ) --disk $(DISK_IMAGE ) --network
121121
122- # boot_all: _need_linux _need_opensbi _need_dtb _need_dtb_all _need_rootfs _need_hosttool _need_python _need_luwen _need_ttkmd _need_pylibfdt
123- # $(PYTHON) boot.py --boot --ttdevice $(TTDEVICE) --l2cpu 0 1 2 3 --opensbi_bin fw_jump.bin --opensbi_dst 0x400100000000 0x400100000000 0x400100000000 0x400180000000 --rootfs_dst 0x400165000000 0x400165000000 0x400165000000 0x4001e5000000 --kernel_bin Image --kernel_dst 0x400100200000 0x400100200000 0x400100200000 0x400180200000 --dtb_bin blackhole-card.dtb blackhole-card.dtb blackhole-card2.dtb blackhole-card3.dtb --dtb_dst 0x400100100000 0x400100100000 0x400100100000 0x400180100000 --boot_device initramfs --rootfs_bin $(INITRAMFS)
122+ # boot_all: _need_linux _need_opensbi _need_dtb _need_dtb_all _need_rootfs _need_hosttool _need_ttkmd
123+ # ./console/boot --boot --ttdevice $(TTDEVICE) --l2cpu 0 1 2 3 --opensbi_bin fw_jump.bin --opensbi_dst 0x400100000000 0x400100000000 0x400100000000 0x400180000000 --rootfs_dst 0x400165000000 0x400165000000 0x400165000000 0x4001e5000000 --kernel_bin Image --kernel_dst 0x400100200000 0x400100200000 0x400100200000 0x400180200000 --dtb_bin blackhole-card.dtb blackhole-card.dtb blackhole-card2.dtb blackhole-card3.dtb --dtb_dst 0x400100100000 0x400100100000 0x400100100000 0x400180100000 --boot_device initramfs --rootfs_bin $(INITRAMFS)
124124
125125# Connect to console (requires a booted RISC-V)
126126connect : _need_hosttool _need_ttkmd
@@ -155,8 +155,8 @@ user-data.img: user-data.yaml _need_cloud_image_utils
155155 cloud-localds -d raw user-data.img user-data.yaml
156156
157157# Boot with cloud-init image attached
158- boot_cloud_init : _need_linux _need_opensbi _need_dtb _need_rootfs _need_hosttool _need_python _need_luwen _need_ttkmd _need_pylibfdt user-data.img
159- $( PYTHON ) boot.py --boot --ttdevice $(TTDEVICE ) --l2cpu $(L2CPU ) --opensbi_bin $(OPENSBI ) --opensbi_dst 0x400030000000 --rootfs_dst 0x4000e5000000 --kernel_bin $(KERNEL ) --kernel_dst 0x400030200000 --dtb_bin $(DTB ) --dtb_dst 0x400030100000
158+ boot_cloud_init : _need_linux _need_opensbi _need_dtb _need_rootfs _need_hosttool _need_ttkmd user-data.img
159+ ./console/boot --boot --ttdevice $(TTDEVICE ) --l2cpu $(L2CPU ) --opensbi_bin $(OPENSBI ) --opensbi_dst 0x400030000000 --rootfs_dst 0x4000e5000000 --kernel_bin $(KERNEL ) --kernel_dst 0x400030200000 --dtb_bin $(DTB ) --dtb_dst 0x400030100000
160160 ./console/tt-bh-linux --ttdevice $(TTDEVICE ) --l2cpu $(L2CPU ) --disk $(DISK_IMAGE ) --cloud-init user-data.img --network
161161
162162# ################################
@@ -205,7 +205,7 @@ build_opensbi: _need_riscv64_toolchain _need_gcc _need_python _need_opensbi_tree
205205 ln -f opensbi/build/platform/generic/firmware/fw_jump.bin fw_jump.bin
206206
207207# Build tt-bh-linux
208- build_hosttool : _need_gcc _need_libvdeslirp
208+ build_hosttool : _need_gcc _need_libvdeslirp _need_libfdt
209209 $(MAKE ) -C console -j $(nproc ) $(quiet_make )
210210
211211# Generate a SSH key and add it to the image
@@ -240,7 +240,7 @@ clean_opensbi:
240240# Clean host tool tree and remove binary
241241clean_hosttool :
242242 if [ -d console ]; then $( MAKE) -C console -j $( nproc) $( quiet_make) clean; fi
243- rm -f console/tt-bh-linux
243+ rm -f console/tt-bh-linux console/boot
244244
245245# Clean cloned trees
246246clean_clones :
@@ -286,7 +286,7 @@ install_tool_pkgs:
286286
287287# Install libraries for compiling the host tool and modifying disk images
288288install_hosttool_pkgs :
289- $(call install,libvdeslirp-dev libslirp-dev unzip e2tools tmux cloud-image-utils)
289+ $(call install,libvdeslirp-dev libslirp-dev libfdt-dev unzip e2tools tmux cloud-image-utils)
290290
291291install_tt_installer : _need_tt_installer
292292 TT_MODE_NON_INTERACTIVE=0 TT_SKIP_INSTALL_HUGEPAGES=0 TT_SKIP_UPDATE_FIRMWARE=0 TT_SKIP_INSTALL_PODMAN=0 TT_SKIP_INSTALL_METALLIUM_CONTAINER=0 TT_REBOOT_OPTION=2 ./tt-installer-v1.1.0.sh
@@ -377,6 +377,7 @@ _need_rootfs:
377377
378378_need_hosttool :
379379 $(call _need_file,console/tt-bh-linux,build,build_hosttool)
380+ $(call _need_file,console/boot,build,build_hosttool)
380381
381382_need_ttkmd :
382383 $(call _need_file,/dev/tenstorrent/0,install,install_tt_installer)
@@ -430,6 +431,9 @@ _need_tmux:
430431_need_libvdeslirp :
431432 $(call _need_file,/usr/include/slirp/libvdeslirp.h,install,install_hosttool_pkgs)
432433
434+ _need_libfdt :
435+ $(call _need_file,/usr/include/libfdt.h,install,install_hosttool_pkgs)
436+
433437_need_qemu_img :
434438 $(call _need_prog,qemu-img,install,install_tool_pkgs)
435439
0 commit comments