0% found this document useful (0 votes)
64 views9 pages

Untitled

The document describes the steps taken to set up a virtual machine environment on an Ubuntu system and build a Linux kernel and FreeRTOS system for a Raspberry Pi 4B device. It details installing tools, setting environment variables, cloning repositories, building and deploying the kernel, device tree, Bao hypervisor, and firmware. Upon deploying to an SD card and booting the device, the system was unable to load any images from the SD card or network boot.

Uploaded by

yzl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views9 pages

Untitled

The document describes the steps taken to set up a virtual machine environment on an Ubuntu system and build a Linux kernel and FreeRTOS system for a Raspberry Pi 4B device. It details installing tools, setting environment variables, cloning repositories, building and deploying the kernel, device tree, Bao hypervisor, and firmware. Upon deploying to an SD card and booting the device, the system was unable to load any images from the SD card or network boot.

Uploaded by

yzl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

I'm using a VMware Ubuntu virtual machine as the host.

The details of the system are as


follows:

ubuntu@ubuntu:~$ cat /etc/os-release


NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

1、I installed the dependent tools, and the installation results are as follows:

2、The CROSS_COMPILE environment variable is as follows:

3、download bao

4、Set the PLATFORM and DEMO environment variables with the IDs in Appendix I. My hardware
platform is Raspberry Pi 4b, configured with linux+freertos:
Follow the step-by-step guide for Plan B:

5、Manually set the ARCH environment variable. For example, for Raspberry Pi 4b platform:

6、Create a working directory:

7、Build guests according to the target demo: linux+FreeRTOS


(1)Build freeRTOS:
Set the FREERYTOS_PARAMS environment variable.

Set environment variables for the FreeRTOS repository:

Clone freeRTOS from the demo (I've always had problems trying to clone the freertos-over-
bao repo in several experiments, especially getting the submodule src/baremetal-runtime). The
compilation results are as follows:

8、build linux guest:


When the linux compilation is completed, the printed prompt information is as follows:
9、Build device tree and wrap with kernel image
when i execute
dtc $BAO_DEMOS/demos/$DEMO/devicetrees/$PLATFORM/$BAO_DEMO_LINUX_VM.dts
>\
$BAO_DEMOS_WRKDIR_IMGS/$BAO_DEMO_LINUX_VM.dtb
The printed prompt information is as follows:

I don't think this will affect my subsequent operations, so I ignore this warning and continue to
operate.
Wrapping the kernel image and device tree blob in a single binary executes the following:

10、Build Bao
implement

make -C $BAO_DEMOS_BAO\

PLATFORM=$PLATFORM\

CONFIG_REPO=$BAO_DEMOS_WRKDIR_IMGS/config\

CONFIG=$DEMO\

CPPFLAGS=-DBAO_DEMOS_WRKDIR_IMGS=$BAO_DEMOS_WRKDIR_IMGS,
The printed prompt information is as follows:

And copy the resulting binary into the final image directory。

11、Build Firmware and Deploy (Raspberry 4 Model B as an example)

After executing the following command, the printed prompt information is as follows:

12、Build TF-A

execute command:

prompt information:
13、preparing your sd card,:
Before performing the operation, I formatted the sd card with SD Card Formatter, and the
following operations are performed on a blank sd card. After performing the operation of Prepare
SD card, the prompt information is as follows:

14、After I execute the following command

Insert the sd card into the sd slot of the development board.

Connect to the Raspberry Pi's UART using a USB to TTL adapter to connect to the Raspberry Pi's
GPIO header UART pins. Using the terminal application minicom:

sudo minicom -D /dev/ttyUSB0 -b 115200

The information printed on the interface is as follows: (quickly pressing any key does not respond,
and the automatic boot cannot be skipped, and the serial port continues to print information until
U-boot> appears) After u-boot> appears, I still cannot enter any information on the terminal. Also
unable to enter the command: fatload mmc 0 0x200000 bao.bin; go 0x200000

Welcome to minicom 2.7.1

OPTIONS: I18n

Compiled on Dec 23 2019, 02:06:26.

Port /dev/ttyUSB0, 19:41:52

Press CTRL-A Z for help on special keys

NOTICE: BL31: v2.8(release):4487d59

NOTICE: BL31: Built : 08:51:07, Apr 17 2023

U-Boot 2022.10 (Apr 17 2023 - 08:45:51 -0700)

DRAM: 7.9 GiB

RPI 4 Model B (0xd03114)

Core: 202 devices, 16 uclasses, devicetree: board

MMC: mmcnr@7e300000: 1, emmc2@7e340000: 0

Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...

In: serial

Out: serial

Err: serial

Net: eth0: ethernet@7d580000

PCIe BRCM: link up, 5.0 Gbps x1 (SSC)

starting USB...

Bus xhci_pci: Register 5000420 NbrPorts 5

Starting the controller

USB XHCI 1.00

scanning bus xhci_pci for devices... 2 USB Device(s) found

scanning usb for storage devices... 0 Storage Device(s) found


Hit any key to stop autoboot: 0

switch to partitions #0, OK

mmc0 is current device

Scanning mmc 0:1...

Card did not respond to voltage select! : -110

No EFI system partition

BootOrder not defined

EFI boot manager: Cannot load any image

Card did not respond to voltage select! : -110

MMC Device 2 not found

no mmc device at slot 2

Device 0: unknown device

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

missing environment variable: pxeuuid

Retrieving file: pxelinux.cfg/01-e4-5f-01-40-9c-76

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/00000000

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/0000000

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/000000

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !


bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/00000

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/0000

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/000

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/00

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/0

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/default-arm-bcm283x-rpi

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/default-arm-bcm283x

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/default-arm

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

Retrieving file: pxelinux.cfg/default

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !


bcmgenet: PHY startup failed: -110

Config file not found

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

bcmgenet: PHY startup failed: -110

U-Boot>

You might also like