Questions about building Raspberry Pi image on SEL4
Hi, I am Zhonghao Liao, a graduate student from Iowa State University. We are doing a security related project and would like to deploy the code to the SEL 4. The hardware we use is Raspberry Pi 3 B+. We follow the tutorial here <https://docs.sel4.systems/Hardware/Rpi3.html> and have successfully loaded the SEL4 test image. We think the next step should be building the image for the application and run it on the Raspberry Pi. We followed the CAmKES tutorial <https://docs.sel4.systems/CAmkES/> and tried to use the command: ../init-build.sh -DPLATFORM=sabre -DAARCH32=1 -DCAMKES_APP=adder -DSIMULATION=1 to build the image for the Raspberry Pi but we failed. In fact, we change the settings.cmake file in the camkes-project folder and add "rpi3" at line 36: set(valid_arm_platform "am335x;sabre;kzm;exynos5410;exynos5422;tx1;tx2;zynq7000;rpi3") and the command we used is: ../init-build.sh -DPLATFORM=rpi3-DAARCH32=1 -DCAMKES_APP=adder -DSIMULATION=1 We did get an image but we cannot simulate using QEMU: ninja: Image Name: Created: Tue Sep 17 09:30:30 2019 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2110464 Bytes = 2061.00 KiB = 2.01 MiB Load Address: 0157c000 Entry Point: 0157c000 ./simulate: Unsupported platform or architecture for simulation Also we tried to load the image into the RPi3 but we are also defeated: bootelf {loadaddr} ## No elf image at address {loadaddr} I think our problem is that we don't provide enough dependencies to support building the RPi image. But we have no idea where to start. Could you please give us any advice? Otherwise, If the CAmkES can not be used, how do I build an application on SEL4 and run it on the Raspberry Pi? Thanks for your patient and looking forward to your reply. Thank you! Best, Zhonghao
to build the image for the Raspberry Pi but we failed. In fact, we change the settings.cmake file in the camkes-project folder and add "rpi3" at line 36: set(valid_arm_platform "am335x;sabre;kzm;exynos5410;exynos5422;tx1;tx2;zynq7000;rpi3") and the command we used is: ../init-build.sh -DPLATFORM=rpi3-DAARCH32=1 -DCAMKES_APP=adder -DSIMULATION=1 We did get an image but we cannot simulate using QEMU: A simulation target isn't supported. If someone knows how to convince the qemu rpi3 platform to accept an aarch32 kernel then this could change. If you have already run a sel4test image on hardware, then following the same procedure for camkes should also work. ../init-build.sh -DPLATFORM=rpi3 -DCAMKES_APP=adder -DAARCH32=ON ninja And then when loading on hardware I get the following: U-Boot> setenv autoload no && dhcp && tftpboot 0x10000000 rpi3/sel4-image setenv autoload no && dhcp && tftpboot 0x10000000 rpi3/sel4-image Waiting for Ethernet connection... done. BOOTP broadcast 1 BOOTP broadcast 2 BOOTP broadcast 3 DHCP client bound to address 10.13.1.66 (1005 ms) Waiting for Ethernet connection... done. Using sms0 device TFTP from server 10.13.0.28; our IP address is 10.13.1.66 Filename 'rpi3/sel4-image'. Load address: 0x10000000 Loading: ################################################################# ################################################################# ############################################### 3.1 MiB/s done Bytes transferred = 2588852 (2780b4 hex) U-Boot> bootelf bootelf ## Starting application at 0x015a6000 ...
ELF-loader started on CPU: ARM Ltd. Cortex-A53 r0p4 paddr=[15a6000..1826037] No DTB passed in from boot loader. Looking for DTB in CPIO archive...found at 16a4760. Loaded DTB from 16a4760. paddr=[1037000..103afff] ELF-loading image 'kernel' paddr=[1000000..1036fff] vaddr=[e0000000..e0036fff] virt_entry=e0000000 ELF-loading image 'capdl-loader' paddr=[103b000..11b3fff] vaddr=[10000..188fff] virt_entry=18674 ELF loader relocated, continuing boot... Enabling MMU and paging Jumping to kernel-image entry point... Bootstrapping kernel Booting all finished, dropped to user space client: what's the answer to 342 + 74 + 283 + 37 + 534 ? adder: Adding 342 adder: Adding 74 adder: Adding 283 adder: Adding 37 adder: Adding 534 client: result was 1270
participants (2)
-
Mcleod, Kent (Data61, Kensington NSW)
-
Zhonghao Liao