BeagleV-Fire 2

1. Prepare For BeagleV-Fire Ubuntu

Based on my previous blog BeagleV-Fire-1.md, we firstly checkout BeagleV-Fire Ubuntu, and do the following updates.

1.1 01_git_sync.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash

GIT_DEPTH="20"
GCC_VERSION="14.2.0"

HSS_BRANCH="v2024.09"
HSS_REPO="https://github.com/polarfire-soc/hart-software-services.git"

#UBOOT_BRANCH="mpfs-uboot-2022.01"
UBOOT_BRANCH="linux4microchip+fpga-2024.09"
UBOOT_REPO="https://github.com/linux4microchip/u-boot-mchp.git"
#UBOOT_BRANCH="v2023.02-BeagleV-Fire"
#UBOOT_REPO="https://openbeagle.org/beaglev-fire/beaglev-fire-u-boot.git"
#UBOOT_REPO="git@openbeagle.org:beaglev-fire/beaglev-fire-u-boot.git"

DT_BRANCH="v6.6.x-Beagle"
DT_REPO="https://openbeagle.org/beagleboard/BeagleBoard-DeviceTrees.git"
#DT_REPO="git@openbeagle.org:beagleboard/BeagleBoard-DeviceTrees.git"

LINUX_BRANCH="linux4microchip+fpga-2024.09.1"
LINUX_REPO="https://github.com/linux4microchip/linux.git"
#LINUX_REPO="https://openbeagle.org/beaglev-fire/beaglev-fire-linux.git"
#LINUX_REPO="git@openbeagle.org:beaglev-fire/beaglev-fire-linux.git"

#LINUX_BRANCH="master"
#LINUX_REPO="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"

if [ ! -f ./mirror/x86_64-gcc-${GCC_VERSION}-nolibc-riscv64-linux.tar.xz ] ; then
echo "wget -c --directory-prefix=./mirror/ https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/${GCC_VERSION}/x86_64-gcc-${GCC_VERSION}-nolibc-riscv64-linux.tar.xz"
wget -c --directory-prefix=./mirror/ https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/${GCC_VERSION}/x86_64-gcc-${GCC_VERSION}-nolibc-riscv64-linux.tar.xz
fi

if [ ! -f ./riscv-toolchain/bin/riscv64-linux-gcc-${GCC_VERSION} ] ; then
echo "tar xf ./mirror/x86_64-gcc-${GCC_VERSION}-nolibc-riscv64-linux.tar.xz --strip-components=2 -C ./riscv-toolchain/"
tar xf ./mirror/x86_64-gcc-${GCC_VERSION}-nolibc-riscv64-linux.tar.xz --strip-components=2 -C ./riscv-toolchain/
fi

if [ -d ./hart-software-services/ ] ; then
rm -rf ./hart-software-services/ || true
fi

echo "git clone -b ${HSS_BRANCH} ${HSS_REPO} ./hart-software-services/ --depth=${GIT_DEPTH}"
git clone -b ${HSS_BRANCH} ${HSS_REPO} ./hart-software-services/ --depth=${GIT_DEPTH}

if [ -d ./u-boot ] ; then
rm -rf ./u-boot || true
fi

echo "git clone -b ${UBOOT_BRANCH} ${UBOOT_REPO} ./u-boot/ --depth=${GIT_DEPTH}"
git clone -b ${UBOOT_BRANCH} ${UBOOT_REPO} ./u-boot/ --depth=${GIT_DEPTH}

if [ -d ./device-tree ] ; then
rm -rf ./device-tree || true
fi

echo "git clone -b ${DT_BRANCH} ${DT_REPO} ./device-tree/ --depth=${GIT_DEPTH}"
git clone -b ${DT_BRANCH} ${DT_REPO} ./device-tree/ --depth=${GIT_DEPTH}

if [ -d ./linux ] ; then
rm -rf ./linux || true
fi

echo "git clone -b ${LINUX_BRANCH} ${LINUX_REPO} ./linux/ --depth=${GIT_DEPTH}"
git clone --reference-if-able ~/linux-src/ -b ${LINUX_BRANCH} ${LINUX_REPO} ./linux/ --depth=${GIT_DEPTH}

#BUILDROOT_BRANCH="bvf"
#BUILDROOT_REPO="https://openbeagle.org/beaglev-fire/buildroot-external-microchip.git"
#
#if [ -d ./buildroot ] ; then
#rm -rf ./buildroot || true
#fi
#
#echo "git clone -b ${BUILDROOT_BRANCH} ${BUILDROOT_REPO} ./buildroot/ --depth=${GIT_DEPTH}"
#git clone -b ${BUILDROOT_BRANCH} ${BUILDROOT_REPO} ./buildroot/ --depth=${GIT_DEPTH}

#

1.2 04_build_linux.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
#!/bin/bash

CORES=$(getconf _NPROCESSORS_ONLN)
wdir=`pwd`
CC=${CC:-"${wdir}/riscv-toolchain/bin/riscv64-linux-"}

cd ./linux/

if [ ! -f ./.patched ] ; then
if [ -f arch/riscv/configs/mpfs_defconfig ] ; then
git am ../patches/linux/0002-PCIe-Change-controller-and-bridge-base-address.patch
git am ../patches/linux/0003-GPIO-Add-Microchip-CoreGPIO-driver.patch
git am ../patches/linux/0004-ADC-Add-Microchip-MCP356X-driver.patch
git am ../patches/linux/0005-Microchip-QSPI-Add-regular-transfers.patch
git am ../patches/linux/0006-BeagleV-Fire-Add-printk-to-IM219-driver-for-board-te.patch
git am ../patches/linux/0007-MMC-SPI-Hack-to-support-non-DMA-capable-SPI-ctrl.patch
git am ../patches/linux/0008-Add-wireless-regdb-regulatory-database-file.patch
git am ../patches/linux/0009-Makefile-build-mpfs-beaglev-fire.dtb.patch
git am ../patches/linux/0010-BeagleV-Fire-Add-MPFS-TVS-auxiliary-driver.patch
fi
touch .patched
fi

if [ -f arch/riscv/configs/mpfs_defconfig ] ; then
# cp -v ../patches/linux/Makefile arch/riscv/boot/dts/microchip/Makefile
cp -v ../device-tree/src/riscv/microchip/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/
cp -v ../device-tree/src/riscv/microchip/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/
cp -v ../device-tree/src/riscv/microchip/mpfs-beaglev-fire-pinmux.dtsi arch/riscv/boot/dts/microchip/
#echo "************************************"
#git diff arch/riscv/boot/dts/microchip/ > log.txt ; cat log.txt ; rm log.txt
#echo "************************************"
#echo "Current Device Tree Changes (5 second wait)"
#sleep 5
#else
# cp -v ../patches/linux/mainline/Makefile arch/riscv/boot/dts/microchip/Makefile
# cp -v ../patches/linux/mainline/dts/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/
# cp -v ../patches/linux/mainline/dts/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/
fi

echo "make ARCH=riscv CROSS_COMPILE=${CC} clean"
make ARCH=riscv CROSS_COMPILE=${CC} clean

if [ -f arch/riscv/configs/mpfs_defconfig ] ; then
cp -v ../patches/linux/mpfs_defconfig ./arch/riscv/configs/mpfs_defconfig

echo "make ARCH=riscv CROSS_COMPILE=${CC} mpfs_defconfig"
make ARCH=riscv CROSS_COMPILE=${CC} mpfs_defconfig

./scripts/config --set-str CONFIG_LOCALVERSION "-$(date +%Y%m%d)"

./scripts/config --enable CONFIG_OF_OVERLAY
./scripts/config --disable CONFIG_MODULE_DECOMPRESS

#enable CONFIG_DYNAMIC_FTRACE
./scripts/config --enable CONFIG_FUNCTION_TRACER
./scripts/config --enable CONFIG_DYNAMIC_FTRACE

./scripts/config --disable CONFIG_MODULE_COMPRESS_ZSTD
./scripts/config --enable CONFIG_MODULE_COMPRESS_XZ
./scripts/config --enable CONFIG_GPIO_AGGREGATOR

./scripts/config --enable CONFIG_CRYPTO_USER_API_HASH
./scripts/config --enable CONFIG_CRYPTO_USER_API_SKCIPHER
./scripts/config --enable CONFIG_KEY_DH_OPERATIONS
./scripts/config --enable CONFIG_CRYPTO_ECB
./scripts/config --enable CONFIG_CRYPTO_MD4
./scripts/config --enable CONFIG_CRYPTO_MD5
./scripts/config --enable CONFIG_CRYPTO_CBC
./scripts/config --enable CONFIG_CRYPTO_SHA256
./scripts/config --enable CONFIG_CRYPTO_AES
./scripts/config --enable CONFIG_CRYPTO_DES
./scripts/config --enable CONFIG_CRYPTO_CMAC
./scripts/config --enable CONFIG_CRYPTO_HMAC
./scripts/config --enable CONFIG_CRYPTO_SHA512
./scripts/config --enable CONFIG_CRYPTO_SHA1

./scripts/config --enable CONFIG_SENSORS_TVS_MPFS

echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} olddefconfig"
make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} olddefconfig
else
echo "make ARCH=riscv CROSS_COMPILE=${CC} defconfig"
make ARCH=riscv CROSS_COMPILE=${CC} defconfig

./scripts/config --enable CONFIG_PCIE_MICROCHIP_HOST

./scripts/config --enable CONFIG_OF_OVERLAY
./scripts/config --enable CONFIG_MODULE_COMPRESS_ZSTD

./scripts/config --enable CONFIG_I2C
./scripts/config --enable CONFIG_EEPROM_AT24
./scripts/config --enable CONFIG_I2C_MICROCHIP_CORE

./scripts/config --enable CONFIG_SPI_MICROCHIP_CORE
./scripts/config --enable CONFIG_SPI_MICROCHIP_CORE_QSPI
./scripts/config --module CONFIG_SPI_SPIDEV

./scripts/config --enable CONFIG_GPIO_SYSFS

./scripts/config --enable CONFIG_HW_RANDOM_POLARFIRE_SOC

./scripts/config --enable CONFIG_USB_MUSB_HDRC
./scripts/config --enable CONFIG_NOP_USB_XCEIV
./scripts/config --enable CONFIG_USB_MUSB_POLARFIRE_SOC
./scripts/config --enable CONFIG_USB_MUSB_DUAL_ROLE

./scripts/config --enable CONFIG_MAILBOX
./scripts/config --enable CONFIG_POLARFIRE_SOC_MAILBOX
./scripts/config --disable CONFIG_SUN6I_MSGBOX

./scripts/config --enable CONFIG_REMOTEPROC
./scripts/config --enable CONFIG_REMOTEPROC_CDEV

./scripts/config --enable CONFIG_POLARFIRE_SOC_SYS_CTRL

./scripts/config --enable CONFIG_USB_GADGET
./scripts/config --enable CONFIG_USB_CONFIGFS
./scripts/config --enable CONFIG_CONFIGFS_FS
./scripts/config --enable CONFIG_USB_CONFIGFS_SERIAL
./scripts/config --enable CONFIG_USB_CONFIGFS_ACM
./scripts/config --enable CONFIG_USB_CONFIGFS_OBEX
./scripts/config --enable CONFIG_USB_CONFIGFS_NCM
./scripts/config --enable CONFIG_USB_CONFIGFS_ECM
./scripts/config --enable CONFIG_USB_CONFIGFS_ECM_SUBSET
./scripts/config --enable CONFIG_USB_CONFIGFS_RNDIS
./scripts/config --enable CONFIG_USB_CONFIGFS_EEM
./scripts/config --enable CONFIG_USB_CONFIGFS_PHONET
./scripts/config --enable CONFIG_USB_CONFIGFS_MASS_STORAGE
./scripts/config --enable CONFIG_USB_CONFIGFS_F_LB_SS
./scripts/config --enable CONFIG_USB_CONFIGFS_F_FS
./scripts/config --enable CONFIG_USB_CONFIGFS_F_UAC1
./scripts/config --enable CONFIG_USB_CONFIGFS_F_UAC2
./scripts/config --enable CONFIG_USB_CONFIGFS_F_MIDI
./scripts/config --enable CONFIG_USB_CONFIGFS_F_HID
./scripts/config --enable CONFIG_USB_CONFIGFS_F_UVC
./scripts/config --enable CONFIG_USB_CONFIGFS_F_PRINTER

./scripts/config --module CONFIG_MEDIA_SUPPORT
./scripts/config --enable CONFIG_MEDIA_SUPPORT_FILTER
./scripts/config --enable CONFIG_MEDIA_SUBDRV_AUTOSELECT
./scripts/config --enable CONFIG_MEDIA_CAMERA_SUPPORT
./scripts/config --module CONFIG_VIDEO_IMX219

./scripts/config --module CONFIG_IIO

#Cleanup large DRM...
./scripts/config --disable CONFIG_DRM
./scripts/config --disable CONFIG_DRM_RADEON
./scripts/config --disable CONFIG_DRM_NOUVEAU
./scripts/config --disable CONFIG_DRM_SUN4I

#Optimize:
./scripts/config --enable CONFIG_IP_NF_IPTABLES
./scripts/config --enable CONFIG_NETFILTER_XTABLES
./scripts/config --enable CONFIG_NLS_ISO8859_1
./scripts/config --enable CONFIG_BLK_DEV_DM

./scripts/config --set-str CONFIG_LOCALVERSION "-$(date +%Y%m%d)"

echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} olddefconfig"
make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} olddefconfig
fi

echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs"
make -j${CORES} ARCH=riscv CROSS_COMPILE="ccache ${CC}" Image modules dtbs

if [ ! -f ./arch/riscv/boot/Image ] ; then
echo "Build Failed"
exit 2
fi

KERNEL_UTS=$(cat "${wdir}/linux/include/generated/utsrelease.h" | awk '{print $3}' | sed 's/\"//g' )

if [ -d "${wdir}/deploy/tmp/" ] ; then
rm -rf "${wdir}/deploy/tmp/"
fi
mkdir -p "${wdir}/deploy/tmp/"

make -s ARCH=riscv CROSS_COMPILE=${CC} modules_install INSTALL_MOD_PATH="${wdir}/deploy/tmp"

if [ -f "${wdir}/deploy/${KERNEL_UTS}-modules.tar.gz" ] ; then
rm -rf "${wdir}/deploy/${KERNEL_UTS}-modules.tar.gz" || true
fi
echo "Compressing ${KERNEL_UTS}-modules.tar.gz..."
echo "${KERNEL_UTS}" > "${wdir}/deploy/.modules"
cd "${wdir}/deploy/tmp" || true
tar --create --gzip --file "../${KERNEL_UTS}-modules.tar.gz" ./*
cd "${wdir}/linux/" || exit
rm -rf "${wdir}/deploy/tmp" || true

if [ -f arch/riscv/configs/mpfs_defconfig ] ; then
cp -v ./.config ../patches/linux/mpfs_defconfig
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts ../patches/linux/dts/mpfs-beaglev-fire.dts
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi ../patches/linux/dts/mpfs-beaglev-fire-fabric.dtsi
else
cp -v ./.config ../patches/linux/mainline/defconfig
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts ../patches/linux/mainline/dts/mpfs-beaglev-fire.dts
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi ../patches/linux/mainline/dts/mpfs-beaglev-fire-fabric.dtsi
fi
if [ ! -d ../deploy/input/ ] ; then
mkdir -p ../deploy/input/ || true
fi
cp -v ./arch/riscv/boot/Image ../deploy/input/
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dtb ../deploy/input/

cd ../

cp -v ./patches/linux/beaglev_fire.its ./deploy/input/
cd ./deploy/input/
gzip -9 Image -c > Image.gz
if [ -f ../../u-boot/tools/mkimage ] ; then
../../u-boot/tools/mkimage -f beaglev_fire.its beaglev_fire.itb
fi
#

1.3 06_generate_ubuntu_console_root.sh

Just update 23.04 to 24.04

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash

if ! id | grep -q root; then
echo "./06_generate_ubuntu_console_root.sh must be run as root:"
echo "sudo ./06_generate_ubuntu_console_root.sh"
exit
fi

wdir=`pwd`

if [ -f /tmp/latest ] ; then
rm -rf /tmp/latest | true
fi
wget --quiet --directory-prefix=/tmp/ https://rcn-ee.net/rootfs/ubuntu-riscv64-24.04-minimal/latest || true
if [ -f /tmp/latest ] ; then
latest_rootfs=$(cat "/tmp/latest")
datestamp=$(cat "/tmp/latest" | awk -F 'riscv64-' '{print $2}' | awk -F '.' '{print $1}')

if [ ! -f ./deploy/ubuntu-24.04.1-console-riscv64-${datestamp}/riscv64-rootfs-ubuntu-lunar.tar ] ; then
if [ -f ./.gitlab-runner ] ; then
wget -c --directory-prefix=./deploy http://192.168.1.98/mirror/rcn-ee.us/rootfs/ubuntu-riscv64-24.04-minimal/${datestamp}/${latest_rootfs}
else
wget -c --directory-prefix=./deploy https://rcn-ee.net/rootfs/ubuntu-riscv64-24.04-minimal/${datestamp}/${latest_rootfs}
fi
cd ./deploy/
tar xf ${latest_rootfs}
cd ../
fi
else
echo "Failure: getting image"
exit 2
fi

if [ -d ./ignore/.root ] ; then
rm -rf ./ignore/.root || true
fi
mkdir -p ./ignore/.root

echo "Extracting: ubuntu-24.04.1-console-riscv64-${datestamp}/riscv64-rootfs-ubuntu-lunar.tar"
tar xfp ./deploy/ubuntu-24.04.1-console-riscv64-${datestamp}/riscv64-rootfs-ubuntu-lunar.tar -C ./ignore/.root
sync

mkdir -p ./deploy/input/ || true
cp -v ./deploy/boot.scr deploy/input/
cp -v ./deploy/sysconf.txt deploy/input/

echo "label Linux eMMC" > ./deploy/input/extlinux.conf
echo " kernel /Image" >> ./deploy/input/extlinux.conf
#echo " append root=/dev/mmcblk0p3 ro rootfstype=ext4 rootwait console=ttyS0,115200 earlycon uio_pdrv_genirq.of_id=generic-uio net.ifnames=0" >> ./deploy/input/extlinux.conf
echo " fdtdir /" >> ./deploy/input/extlinux.conf
echo " fdt /mpfs-beaglev-fire.dtb" >> ./deploy/input/extlinux.conf
echo " #fdtoverlays /overlays/<file>.dtbo" >> ./deploy/input/extlinux.conf

#echo "extlinux/extlinux.conf"
#cat ./deploy/input/extlinux.conf

mkdir -p ./ignore/.root/boot/firmware/ || true

echo '/dev/mmcblk0p2 /boot/firmware/ vfat user,uid=1000,gid=1000,defaults 0 2' >> ./ignore/.root/etc/fstab
echo '/dev/mmcblk0p3 / auto errors=remount-ro 0 1' >> ./ignore/.root/etc/fstab
echo 'debugfs /sys/kernel/debug debugfs mode=755,uid=root,gid=gpio,defaults 0 0' >> ./ignore/.root/etc/fstab

#Network-Manager, ignore eth1
#cp -v ./rootfs/etc/NetworkManager/conf.d/*.conf ./ignore/.root/etc/NetworkManager/conf.d/

cp -v ./ignore/.root/etc/bbb.io/templates/eth0-DHCP.network ./ignore/.root/etc/systemd/network/eth0.network || true
cp -v ./ignore/.root/etc/bbb.io/templates/eth1-DHCP.network ./ignore/.root/etc/systemd/network/eth1.network || true

# setuid root ping+ping6
chmod u+s ./ignore/.root/usr/bin/ping ./ignore/.root/usr/bin/ping6

#Default nginx export
rm -f ./ignore/.root/etc/nginx/sites-enabled/default || true
cp -v ./ignore/.root/etc/bbb.io/templates/nginx/nginx-autoindex ./ignore/.root/etc/nginx/sites-enabled/default
cp -v ./ignore/.root/etc/bbb.io/templates/nginx/*.html ./ignore/.root/var/www/html/
rm -f ./ignore/.root/var/www/html/index.nginx-debian.html || true

if [ -f ./deploy/.modules ] ; then
version=$(cat ./deploy/.modules || true)
if [ -f ./deploy/${version}-modules.tar.gz ] ; then
tar xf ./deploy/${version}-modules.tar.gz -C ./ignore/.root/usr/
fi
fi

echo '---------------------'
echo 'File Size'
du -sh ignore/.root/ || true
echo '---------------------'

dd if=/dev/zero of=./deploy/input/root.ext4 bs=1 count=0 seek=3800M
mkfs.ext4 -F ./deploy/input/root.ext4 -d ./ignore/.root

if [ -f ./.06_generate_root.sh ] ; then
rm -f ./.06_generate_root.sh || true
fi

1.4 git_linux_mainline.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash

GCC_VERSION="14.2.0"

HSS_BRANCH="v2024.09"
HSS_REPO="https://github.com/polarfire-soc/hart-software-services.git"

#UBOOT_BRANCH="mpfs-uboot-2022.01"
UBOOT_BRANCH="linux4microchip+fpga-2024.09"
UBOOT_REPO="https://github.com/linux4microchip/u-boot-mchp"

#LINUX_BRANCH="linux4microchip+fpga-2023.06"
#LINUX_REPO="https://github.com/linux4microchip/linux.git"

LINUX_BRANCH="master"
LINUX_REPO="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"

#Use custom device tree and Makefile in patches/linux directory...
#LINUX_BRANCH="linux-6.4.y"
#LINUX_BRANCH="linux-6.3.y"
#LINUX_BRANCH="linux-6.2.y"
#LINUX_BRANCH="linux-6.1.y"
#LINUX_REPO="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"

GIT_DEPTH="20"

if [ ! -f ./mirror/x86_64-gcc-${GCC_VERSION}.0-nolibc-riscv64-linux.tar.xz ] ; then
echo "wget -c --directory-prefix=./mirror/ https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/14.2.0/x86_64-gcc-14.2.0-nolibc-riscv64-linux.tar.xz"
wget -c --directory-prefix=./mirror/ https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/14.2.0/x86_64-gcc-14.2.0-nolibc-riscv64-linux.tar.xz
fi

if [ ! -f ./riscv-toolchain/bin/riscv64-linux-gcc-${GCC_VERSION}.0 ] ; then
echo "tar xf ./mirror/x86_64-gcc-14.2.0-nolibc-riscv64-linux.tar.xz --strip-components=2 -C ./riscv-toolchain/"
tar xf ./mirror/x86_64-gcc-14.2.0-nolibc-riscv64-linux.tar.xz --strip-components=2 -C ./riscv-toolchain/
fi

#if [ ! -f ./mirror/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz ] ; then
# echo "wget -c --directory-prefix=./mirror/ https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz"
# wget -c --directory-prefix=./mirror/ https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz
#fi

#if [ ! -f ./riscv-toolchain/bin/riscv64-linux-gcc-13.2.0 ] ; then
# echo "tar xf ./mirror/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz --strip-components=2 -C ./riscv-toolchain/"
# tar xf ./mirror/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz --strip-components=2 -C ./riscv-toolchain/
#fi

#if [ -d ./hart-software-services/ ] ; then
# rm -rf ./hart-software-services/ || true
#fi

#echo "git clone -b ${HSS_BRANCH} ${HSS_REPO} ./hart-software-services/ --depth=${GIT_DEPTH}"
#git clone -b ${HSS_BRANCH} ${HSS_REPO} ./hart-software-services/ --depth=${GIT_DEPTH}

#if [ -d ./u-boot ] ; then
# rm -rf ./u-boot || true
#fi

#echo "git clone -b ${UBOOT_BRANCH} ${UBOOT_REPO} ./u-boot/ --depth=${GIT_DEPTH}"
#git clone -b ${UBOOT_BRANCH} ${UBOOT_REPO} ./u-boot/ --depth=${GIT_DEPTH}

if [ -d ./linux ] ; then
rm -rf ./linux || true
fi

echo "git clone -b ${LINUX_BRANCH} ${LINUX_REPO} ./linux/ --depth=${GIT_DEPTH}"
git clone -b ${LINUX_BRANCH} ${LINUX_REPO} ./linux/ --depth=${GIT_DEPTH}

#

1.5 git_linux_mpfs.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash

GCC_VERSION="14.2.0"

HSS_BRANCH="v2024.09"
HSS_REPO="https://github.com/polarfire-soc/hart-software-services.git"

#UBOOT_BRANCH="mpfs-uboot-2022.01"
UBOOT_BRANCH="u-boot-2024.07-mchp"
UBOOT_REPO="https://github.com/linux4microchip/u-boot-mchp.git"

LINUX_BRANCH="linux4microchip+fpga-2024.09"
LINUX_REPO="https://github.com/linux4microchip/linux.git"

#LINUX_BRANCH="master"
#LINUX_REPO="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"

GIT_DEPTH="20"

if [ ! -f ./mirror/x86_64-gcc-${GCC_VERSION}-nolibc-riscv64-linux.tar.xz ] ; then
echo "wget -c --directory-prefix=./mirror/ https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/${GCC_VERSION}/x86_64-gcc-${GCC_VERSION}-nolibc-riscv64-linux.tar.xz"
wget -c --directory-prefix=./mirror/ https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/${GCC_VERSION}/x86_64-gcc-${GCC_VERSION}-nolibc-riscv64-linux.tar.xz
fi

if [ ! -f ./riscv-toolchain/bin/riscv64-linux-gcc-${GCC_VERSION} ] ; then
echo "tar xf ./mirror/x86_64-gcc-${GCC_VERSION}-nolibc-riscv64-linux.tar.xz --strip-components=2 -C ./riscv-toolchain/"
tar xf ./mirror/x86_64-gcc-${GCC_VERSION}-nolibc-riscv64-linux.tar.xz --strip-components=2 -C ./riscv-toolchain/
fi

#if [ ! -f ./mirror/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz ] ; then
# echo "wget -c --directory-prefix=./mirror/ https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz"
# wget -c --directory-prefix=./mirror/ https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.2.0/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz
#fi

#if [ ! -f ./riscv-toolchain/bin/riscv64-linux-gcc-13.2.0 ] ; then
# echo "tar xf ./mirror/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz --strip-components=2 -C ./riscv-toolchain/"
# tar xf ./mirror/x86_64-gcc-13.2.0-nolibc-riscv64-linux.tar.xz --strip-components=2 -C ./riscv-toolchain/
#fi

#if [ -d ./hart-software-services/ ] ; then
# rm -rf ./hart-software-services/ || true
#fi

#echo "git clone -b ${HSS_BRANCH} ${HSS_REPO} ./hart-software-services/ --depth=${GIT_DEPTH}"
#git clone -b ${HSS_BRANCH} ${HSS_REPO} ./hart-software-services/ --depth=${GIT_DEPTH}

#if [ -d ./u-boot ] ; then
# rm -rf ./u-boot || true
#fi

#echo "git clone -b ${UBOOT_BRANCH} ${UBOOT_REPO} ./u-boot/ --depth=${GIT_DEPTH}"
#git clone -b ${UBOOT_BRANCH} ${UBOOT_REPO} ./u-boot/ --depth=${GIT_DEPTH}

if [ -d ./linux ] ; then
rm -rf ./linux || true
fi

echo "git clone -b ${LINUX_BRANCH} ${LINUX_REPO} ./linux/ --depth=${GIT_DEPTH}"
git clone -b ${LINUX_BRANCH} ${LINUX_REPO} ./linux/ --depth=${GIT_DEPTH}

#

2. Manually Flash BeagleV-Fire Board With ALL Updates - Failed To Boot

2.1 01_git_sync.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
➜  BeagleV-Fire-ubuntu git:(main) ✗ ./01_git_sync.sh 
git clone -b v2024.09 https://github.com/polarfire-soc/hart-software-services.git ./hart-software-services/ --depth=20
Cloning into './hart-software-services'...
remote: Enumerating objects: 1927, done.
remote: Counting objects: 100% (1927/1927), done.
remote: Compressing objects: 100% (1269/1269), done.
remote: Total 1927 (delta 750), reused 1310 (delta 594), pack-reused 0 (from 0)
Receiving objects: 100% (1927/1927), 4.34 MiB | 9.74 MiB/s, done.
Resolving deltas: 100% (750/750), done.
Note: switching to 'd4f264196f6549a41eab246e1df4ab58b5744950'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c <new-branch-name>

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

git clone -b linux4microchip+fpga-2024.09 https://github.com/linux4microchip/u-boot-mchp.git ./u-boot/ --depth=20
Cloning into './u-boot'...
remote: Enumerating objects: 21768, done.
remote: Counting objects: 100% (21768/21768), done.
remote: Compressing objects: 100% (18900/18900), done.
remote: Total 21768 (delta 3895), reused 13023 (delta 2479), pack-reused 0 (from 0)
Receiving objects: 100% (21768/21768), 28.80 MiB | 21.37 MiB/s, done.
Resolving deltas: 100% (3895/3895), done.
Note: switching to 'f3858c18fa163210ebcb95d44e2ab181a234cdf0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c <new-branch-name>

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Updating files: 100% (19998/19998), done.
git clone -b v6.6.x-Beagle https://openbeagle.org/beagleboard/BeagleBoard-DeviceTrees.git ./device-tree/ --depth=20
Cloning into './device-tree'...
remote: Enumerating objects: 461, done.
remote: Counting objects: 100% (461/461), done.
remote: Compressing objects: 100% (301/301), done.
remote: Total 461 (delta 202), reused 303 (delta 133), pack-reused 0 (from 0)
Receiving objects: 100% (461/461), 421.34 KiB | 8.60 MiB/s, done.
Resolving deltas: 100% (202/202), done.
git clone -b linux4microchip+fpga-2024.09.1 https://github.com/linux4microchip/linux.git ./linux/ --depth=20
Cloning into './linux'...
info: Could not add alternate for '/home/lvision/linux-src/': path '/home/lvision/linux-src/' does not exist
remote: Enumerating objects: 104359, done.
remote: Counting objects: 100% (104359/104359), done.
remote: Compressing objects: 100% (86274/86274), done.
remote: Total 104359 (delta 20278), reused 99348 (delta 17156), pack-reused 0 (from 0)
Receiving objects: 100% (104359/104359), 269.63 MiB | 16.51 MiB/s, done.
Resolving deltas: 100% (20278/20278), done.
Note: switching to 'eed24b95b006240f806e6e7730ff3782a16074df'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c <new-branch-name>

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Updating files: 100% (81932/81932), done.
➜ BeagleV-Fire-ubuntu git:(main) ✗

2.2 ./02_build_hss.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
➜  BeagleV-Fire-ubuntu git:(main) ✗ ./02_build_hss.sh 
make: Entering directory '....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator'
RM ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/hss-payload-generator ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/main.o ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/yaml_parser.o ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/blob_handler.o ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/elf_parser.o ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/elf_strings.o ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/crc32.o ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/generate_payload.o ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/dump_payload.o ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/debug_printf.o
make: Leaving directory '....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator'
make -C hart-software-services/tools/hss-payload-generator/
make: Entering directory '....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator'
CC ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/main.o
CC ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/yaml_parser.o
CC ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/blob_handler.o
CC ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/elf_parser.o
CC ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/elf_strings.o
CC ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/crc32.o
CC ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/generate_payload.o
CC ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/dump_payload.o
CC ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/debug_printf.o
LD ....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator/hss-payload-generator
make: Leaving directory '....../BeagleV-Fire-ubuntu/hart-software-services/tools/hss-payload-generator'
'./hart-software-services/tools/hss-payload-generator/hss-payload-generator' -> './deploy/hss-payload-generator'

2.3 ./03_build_u-boot.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
➜  BeagleV-Fire-ubuntu git:(main) ✗ ./03_build_u-boot.sh 
make: Entering directory '....../BeagleV-Fire-ubuntu/u-boot'
make: Leaving directory '....../BeagleV-Fire-ubuntu/u-boot'
make: Entering directory '....../BeagleV-Fire-ubuntu/u-boot'
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
LEX scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
make: Leaving directory '....../BeagleV-Fire-ubuntu/u-boot'
make: Entering directory '....../BeagleV-Fire-ubuntu/u-boot'
scripts/kconfig/conf --olddefconfig Kconfig
#
# configuration written to .config
#
make: Leaving directory '....../BeagleV-Fire-ubuntu/u-boot'
make: Entering directory '....../BeagleV-Fire-ubuntu/u-boot'
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
make: Leaving directory '....../BeagleV-Fire-ubuntu/u-boot'
'./u-boot/defconfig' -> './u-boot/configs/microchip_mpfs_icicle_defconfig'
'./u-boot/defconfig' -> './patches/u-boot/beaglev-fire/microchip_mpfs_icicle_defconfig'
make -C u-boot -j48 ARCH=riscv CROSS_COMPILE=....../BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux- all
make: Entering directory '....../BeagleV-Fire-ubuntu/u-boot'
scripts/kconfig/conf --syncconfig Kconfig
UPD include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk.dep
GEN include/autoconf.mk
UPD include/generated/dt.h
ENVC include/generated/env.txt
UPD include/generated/timestamp_autogenerated.h
ENVP include/generated/env.in
ENVT include/generated/environment.h
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
LEX scripts/dtc/dtc-lexer.lex.c
YACC scripts/dtc/dtc-parser.tab.h
YACC scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/yamltree.o
UPD include/config/uboot.release
UPD include/generated/version_autogenerated.h
CC lib/asm-offsets.s
CC arch/riscv/lib/asm-offsets.s
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTCC scripts/dtc/dtc-lexer.lex.o
UPD include/generated/generic-asm-offsets.h
UPD include/generated/asm-offsets.h
LDS u-boot.lds
HOSTLD scripts/dtc/dtc
HOSTCC tools/gen_eth_addr
HOSTCC tools/gen_ethaddr_crc.o
WRAP tools/lib/crc8.c
HOSTCC tools/img2srec
HOSTCC tools/mkenvimage.o
HOSTCC tools/os_support.o
WRAP tools/lib/crc32.c
HOSTCC tools/aisimage.o
HOSTCC tools/atmelimage.o
HOSTCC tools/fit_common.o
HOSTCC tools/fit_image.o
HOSTCC tools/image-host.o
WRAP tools/boot/image-fit.c
HOSTCC tools/image-sig-host.o
WRAP tools/boot/image-fit-sig.c
WRAP tools/boot/image-cipher.c
WRAP tools/boot/fdt_region.c
WRAP tools/boot/bootm.c
HOSTCC tools/lib/crc32.o
HOSTCC tools/default_image.o
WRAP tools/lib/fdtdec_common.c
WRAP tools/lib/fdtdec.c
WRAP tools/boot/image.c
WRAP tools/boot/image-host.c
HOSTCC tools/imagetool.o
HOSTCC tools/imximage.o
HOSTCC tools/imx8image.o
HOSTCC tools/imx8mimage.o
HOSTCC tools/kwbimage.o
WRAP tools/lib/md5.c
HOSTCC tools/lpc32xximage.o
HOSTCC tools/mxsimage.o
HOSTCC tools/omapimage.o
HOSTCC tools/pblimage.o
HOSTCC tools/pbl_crc32.o
HOSTCC tools/renesas_spkgimage.o
HOSTCC tools/vybridimage.o
HOSTCC tools/stm32image.o
WRAP tools/lib/rc4.c
HOSTCC tools/rkcommon.o
HOSTCC tools/rkimage.o
HOSTCC tools/rksd.o
HOSTCC tools/rkspi.o
HOSTCC tools/socfpgaimage.o
HOSTCC tools/sunxi_egon.o
WRAP tools/lib/crc16-ccitt.c
WRAP tools/lib/hash-checksum.c
WRAP tools/lib/sha1.c
WRAP tools/lib/sha256.c
WRAP tools/lib/sha512.c
WRAP tools/common/hash.c
HOSTCC tools/ublimage.o
HOSTCC tools/zynqimage.o
HOSTCC tools/zynqmpimage.o
HOSTCC tools/zynqmpbif.o
WRAP tools/lib/fdt-libcrypto.c
HOSTCC tools/sunxi_toc0.o
HOSTCC tools/libfdt/fdt.o
HOSTCC tools/libfdt/fdt_ro.o
HOSTCC tools/libfdt/fdt_wip.o
HOSTCC tools/libfdt/fdt_sw.o
HOSTCC tools/libfdt/fdt_rw.o
HOSTCC tools/libfdt/fdt_strerror.o
HOSTCC tools/libfdt/fdt_empty_tree.o
HOSTCC tools/libfdt/fdt_addresses.o
HOSTCC tools/libfdt/fdt_overlay.o
HOSTCC tools/libfdt/fdt_check.o
HOSTCC tools/gpimage.o
HOSTCC tools/gpimage-common.o
HOSTCC tools/mtk_image.o
HOSTCC tools/mtk_nand_headers.o
WRAP tools/lib/ecdsa/ecdsa-libcrypto.c
WRAP tools/lib/rsa/rsa-sign.c
WRAP tools/lib/rsa/rsa-verify.c
WRAP tools/lib/rsa/rsa-mod-exp.c
WRAP tools/lib/aes/aes-encrypt.c
WRAP tools/lib/aes/aes-decrypt.c
HOSTCC tools/dumpimage.o
HOSTCC tools/boot/image-fit.o
HOSTCC tools/boot/image-fit-sig.o
HOSTCC tools/boot/image-cipher.o
HOSTCC tools/boot/fdt_region.o
HOSTCC tools/boot/bootm.o
HOSTCC tools/lib/fdtdec_common.o
HOSTCC tools/lib/fdtdec.o
HOSTCC tools/boot/image.o
HOSTCC tools/boot/image-host.o
HOSTCC tools/lib/md5.o
HOSTCC tools/lib/rc4.o
HOSTCC tools/lib/crc16-ccitt.o
HOSTCC tools/lib/hash-checksum.o
HOSTCC tools/lib/sha1.o
HOSTCC tools/lib/sha256.o
HOSTCC tools/lib/sha512.o
HOSTCC tools/common/hash.o
HOSTCC tools/lib/fdt-libcrypto.o
HOSTCC tools/lib/ecdsa/ecdsa-libcrypto.o
HOSTCC tools/lib/rsa/rsa-sign.o
HOSTCC tools/lib/rsa/rsa-verify.o
HOSTCC tools/lib/rsa/rsa-mod-exp.o
HOSTCC tools/lib/aes/aes-encrypt.o
HOSTCC tools/lib/aes/aes-decrypt.o
HOSTCC tools/mkimage.o
HOSTCC tools/fit_info.o
HOSTCC tools/fit_check_sign.o
HOSTCC tools/fdt_add_pubkey.o
HOSTCC tools/proftool.o
WRAP tools/lib/abuf.c
HOSTCC tools/prelink-riscv
HOSTCC tools/fdtgrep.o
HOSTCC tools/spl_size_limit
HOSTCC tools/lib/crc8.o
HOSTLD tools/mkenvimage
HOSTCC tools/lib/abuf.o
HOSTLD tools/gen_ethaddr_crc
HOSTLD tools/fdtgrep
HOSTLD tools/proftool
HOSTLD tools/dumpimage
HOSTLD tools/mkimage
HOSTLD tools/fit_info
HOSTLD tools/fit_check_sign
HOSTLD tools/fdt_add_pubkey
CC arch/riscv/cpu/cpu.o
AS arch/riscv/cpu/mtrap.o
AS arch/riscv/cpu/start.o
CC arch/riscv/cpu/mpfs/dram.o
CC arch/riscv/cpu/mpfs/cpu.o
CC arch/riscv/lib/bootm.o
CC arch/riscv/lib/image.o
CC arch/riscv/lib/boot.o
CC arch/riscv/lib/cache.o
CC arch/riscv/lib/sbi.o
CC board/microchip/mpfs_icicle/mpfs_icicle.o
CC arch/riscv/lib/interrupts.o
AS arch/riscv/lib/setjmp.o
CC arch/riscv/lib/fdt_fixup.o
AS arch/riscv/lib/memset.o
AS arch/riscv/lib/memmove.o
AS arch/riscv/lib/memcpy.o
AS arch/riscv/lib/crt0_riscv_efi.o
CC boot/bootm.o
CC arch/riscv/lib/reloc_riscv_efi.o
CC boot/bootm_os.o
CC boot/pxe_utils.o
CC boot/image.o
CC boot/image-board.o
CC boot/bootdev-uclass.o
CC boot/bootflow.o
CC boot/bootmeth-uclass.o
CC boot/bootstd-uclass.o
CC boot/bootmeth_extlinux.o
CC cmd/boot.o
CC boot/bootmeth_pxe.o
CC cmd/bootm.o
CC common/main.o
CC boot/bootmeth_efi.o
CC common/exports.o
CC cmd/help.o
CC disk/part.o
CC common/cli_hush.o
CC cmd/panic.o
CC boot/image-fdt.o
CC disk/disk-uclass.o
CC common/init/board_init.o
CC disk/part_dos.o
CC boot/image-fit.o
CC common/autoboot.o
CC disk/part_iso.o
AR cmd/riscv/built-in.o
AR drivers/usb/cdns3/built-in.o
CC disk/part_efi.o
CC cmd/version.o
AR drivers/usb/common/built-in.o
AR drivers/adc/built-in.o
AR drivers/ata/built-in.o
AR drivers/usb/dwc3/built-in.o
AR drivers/axi/built-in.o
CC common/board_f.o
CC common/board_r.o
CC boot/vbe.o
CC common/board_info.o
AR drivers/bus/built-in.o
CC drivers/block/blk-uclass.o
AR drivers/usb/emul/built-in.o
CC cmd/blk_common.o
AR drivers/usb/eth/built-in.o
CC common/fdt_support.o
CC drivers/block/blkcache.o
AR drivers/cache/built-in.o
CC cmd/bootflow.o
AR arch/riscv/cpu/mpfs/built-in.o
CC common/miiphyutil.o
AR drivers/clk/analogbits/built-in.o
AR arch/riscv/cpu/built-in.o
CC drivers/clk/imx/clk-gate2.o
CC boot/vbe_request.o
AR drivers/usb/host/built-in.o
CC drivers/clk/microchip/mpfs_clk.o
AR drivers/clk/tegra/built-in.o
AR drivers/usb/isp1760/built-in.o
CC common/splash.o
AR drivers/usb/mtu3/built-in.o
CC boot/vbe_simple.o
CC boot/vbe_simple_os.o
CC common/menu.o
CC drivers/cpu/cpu-uclass.o
CC drivers/core/device.o
AR common/init/built-in.o
AR drivers/clk/ti/built-in.o
CC drivers/core/fdtaddr.o
CC drivers/clk/imx/clk-pllv3.o
CC common/cli_getch.o
CC cmd/source.o
CC drivers/clk/microchip/mpfs_clk_cfg.o
AR arch/riscv/lib/built-in.o
CC drivers/cpu/riscv_cpu.o
CC drivers/clk/imx/clk-pfd.o
CC drivers/clk/clk-uclass.o
CC drivers/core/lists.o
AR board/microchip/mpfs_icicle/built-in.o
AR drivers/usb/musb/built-in.o
CC drivers/core/root.o
CC drivers/crypto/fsl/sec.o
AR drivers/crypto/aspeed/built-in.o
CC drivers/clk/microchip/mpfs_clk_periph.o
AR drivers/crypto/hash/built-in.o
CC drivers/clk/microchip/mpfs_clk_msspll.o
AR drivers/crypto/nuvoton/built-in.o
CC cmd/bdinfo.o
CC drivers/core/uclass.o
CC common/cli_readline.o
AR drivers/dfu/built-in.o
CC cmd/blkcache.o
AR drivers/usb/phy/built-in.o
AR drivers/gpio/built-in.o
AR drivers/usb/ulpi/built-in.o
CC cmd/bootefi.o
CC drivers/core/util.o
CC drivers/clk/clk_fixed_rate.o
CC drivers/clk/clk_fixed_factor.o
CC env/common.o
CC common/cli_simple.o
CC drivers/i2c/i2c-uclass.o
AR drivers/crypto/rsa_mod_exp/built-in.o
CC cmd/booti.o
CC drivers/input/key_matrix.o
CC drivers/core/tag.o
CC fs/ext4/ext4fs.o
AR drivers/crypto/fsl/built-in.o
CC fs/fat/fat_write.o
AR drivers/crypto/built-in.o
CC drivers/clk/clk.o
AR drivers/usb/musb-new/built-in.o
CC common/console.o
CC common/dlmalloc.o
AR lib/crypto/built-in.o
CC cmd/console.o
CC net/arp.o
AR drivers/iommu/built-in.o
AR drivers/cpu/built-in.o
CC lib/efi_driver/efi_uclass.o
CC env/env.o
CC lib/efi_driver/efi_block_device.o
CC env/attr.o
CC drivers/core/device-remove.o
CC env/flags.o
CC fs/ext4/ext4_common.o
CC fs/ubifs/ubifs.o
CC env/callback.o
CC net/bootp.o
CC cmd/cpu.o
AR drivers/clk/imx/built-in.o
CC cmd/dm.o
CC lib/efi_loader/efi_bootmgr.o
CC lib/efi_loader/efi_boottime.o
CC drivers/core/simple-bus.o
AR drivers/clk/microchip/built-in.o
CC drivers/core/dump.o
CC env/nowhere.o
CC fs/ubifs/io.o
CC net/eth-uclass.o
CC lib/efi_loader/efi_helper.o
CC common/malloc_simple.o
CC fs/ubifs/super.o
AR drivers/block/built-in.o
CC lib/libfdt/fdt.o
CC lib/efi_loader/efi_console.o
CC net/eth_bootdev.o
AR drivers/mailbox/built-in.o
CC net/eth_common.o
CC fs/ext4/dev.o
CC drivers/clk/clk-divider.o
CC lib/libfdt/fdt_ro.o
CC common/event.o
CC net/net.o
AR drivers/input/built-in.o
CC fs/fs.o
CC lib/libfdt/fdt_wip.o
CC fs/ubifs/sb.o
CC fs/fs_internal.o
CC drivers/core/regmap.o
CC common/hash.o
CC drivers/clk/clk-mux.o
CC common/memsize.o
CC drivers/clk/clk-gate.o
CC drivers/clk/clk-fixed-factor.o
CC net/nfs.o
CC lib/efi_loader/efi_device_path.o
AR disk/built-in.o
CC drivers/i2c/i2c-microchip.o
AR env/built-in.o
CC lib/lzma/LzmaDec.o
CC cmd/echo.o
CC lib/efi_loader/efi_device_path_to_text.o
CC cmd/eficonfig.o
CC common/stdio.o
AR lib/efi_driver/built-in.o
CC lib/libfdt/fdt_strerror.o
CC lib/libfdt/fdt_sw.o
CC net/ping.o
CC fs/ubifs/master.o
CC fs/ubifs/lpt.o
CC lib/libfdt/fdt_rw.o
CC fs/ubifs/lpt_commit.o
CC cmd/elf.o
AR drivers/memory/built-in.o
CC drivers/core/syscon-uclass.o
CC net/tftp.o
AR drivers/mfd/built-in.o
CC lib/lzma/LzmaTools.o
CC lib/libfdt/fdt_empty_tree.o
AR drivers/misc/built-in.o
CC lib/lzo/lzo1x_decompress.o
CC lib/libfdt/fdt_check.o
CC lib/libfdt/fdt_addresses.o
CC fs/ubifs/scan.o
CC fs/ubifs/lprops.o
CC lib/efi_loader/efi_device_path_utilities.o
CC drivers/core/of_extra.o
CC drivers/mmc/mmc.o
CC drivers/mmc/mmc-uclass.o
CC lib/libfdt/fdt_overlay.o
CC drivers/mmc/mmc_bootdev.o
CC drivers/core/ofnode.o
CC fs/ubifs/tnc.o
CC drivers/core/read_extra.o
AR fs/ext4/built-in.o
CC fs/ubifs/tnc_misc.o
CC cmd/exit.o
AR boot/built-in.o
CC lib/zlib/zlib.o
AR drivers/clk/built-in.o
CC fs/ubifs/debug.o
AR drivers/i2c/built-in.o
CC fs/ubifs/budget.o
CC cmd/ext4.o
CC cmd/ext2.o
AR drivers/net/mscc_eswitch/built-in.o
AR drivers/mtd/onenand/built-in.o
CC drivers/mtd/nand/spi/core.o
AR drivers/power/pmic/built-in.o
CC drivers/mtd/nand/spi/gigadevice.o
CC drivers/net/phy/phy.o
AR drivers/net/qe/built-in.o
CC drivers/mtd/nand/core.o
CC drivers/mmc/mmc_write.o
AR drivers/power/regulator/built-in.o
CC common/cli.o
CC drivers/mtd/nand/spi/macronix.o
CC lib/efi_loader/efi_dt_fixup.o
CC drivers/mtd/nand/bbt.o
CC fs/ubifs/log.o
AR drivers/power/built-in.o
CC drivers/mtd/spi/sf-uclass.o
CC drivers/net/phy/vitesse.o
CC drivers/mtd/spi/sf_probe.o
CC lib/efi_loader/efi_file.o
CC drivers/mtd/spi/spi-nor-ids.o
CC drivers/mtd/ubi/attach.o
CC drivers/mtd/spi/spi-nor-core.o
CC fs/ubifs/orphan.o
CC lib/charset.o
AR drivers/pwm/built-in.o
CC lib/efi_loader/efi_hii.o
CC cmd/fat.o
CC lib/efi_loader/efi_image_loader.o
CC lib/efi_loader/efi_load_options.o
CC drivers/mtd/nand/spi/micron.o
CC drivers/mtd/ubi/build.o
AR lib/lzo/built-in.o
CC common/command.o
CC drivers/mtd/nand/spi/toshiba.o
AR drivers/net/ti/built-in.o
CC drivers/mmc/sdhci-adma.o
CC cmd/fdt.o
CC common/s_record.o
CC fs/ubifs/recovery.o
CC fs/ubifs/replay.o
CC drivers/mtd/mtdcore.o
CC lib/crc8.o
CC fs/ubifs/gc.o
CC common/xyzModem.o
AR net/built-in.o
CC drivers/mtd/nand/spi/winbond.o
CC drivers/mtd/mtd_uboot.o
CC drivers/mtd/ubi/vtbl.o
CC lib/crc16.o
CC lib/efi_loader/efi_memory.o
CC drivers/mtd/mtd-uclass.o
CC drivers/mmc/sdhci.o
CC drivers/mtd/mtdpart.o
AR lib/libfdt/built-in.o
CC cmd/flash.o
AR drivers/reset/built-in.o
CC drivers/mtd/ubi/upd.o
CC drivers/mtd/ubi/vmt.o
AR drivers/mtd/nand/nandcore.o
AR drivers/rtc/built-in.o
CC lib/efi_loader/efi_root_node.o
AR drivers/scsi/built-in.o
CC drivers/net/macb.o
CC cmd/fs.o
CC lib/efi_loader/efi_runtime.o
CC lib/crc16-ccitt.o
CC lib/efi_loader/efi_setup.o
CC drivers/mmc/sdhci-cadence.o
CC drivers/mtd/ubi/kapi.o
CC drivers/mtd/ubi/eba.o
CC lib/fdtdec_common.o
CC cmd/i2c.o
CC lib/efi_loader/efi_string.o
CC drivers/serial/serial-uclass.o
CC lib/efi_loader/efi_unicode_collation.o
CC drivers/mtd/ubi/io.o
CC lib/smbios.o
AR drivers/smem/built-in.o
AR drivers/soc/built-in.o
CC drivers/mtd/ubi/wl.o
CC drivers/serial/ns16550.o
CC drivers/mtd/ubi/crc32.o
CC drivers/spi/spi-uclass.o
CC drivers/spi/spi-mem.o
AR drivers/sound/built-in.o
CC drivers/mtd/ubi/misc.o
CC drivers/spi/microchip_coreqspi.o
CC drivers/mtd/ubi/debug.o
AR drivers/spmi/built-in.o
CC cmd/itest.o
CC lib/ldiv.o
AR drivers/net/phy/built-in.o
AR lib/lzma/built-in.o
CC lib/net_utils.o
AR common/built-in.o
CC lib/rc4.o
CC lib/efi_loader/efi_var_common.o
CC lib/efi_loader/efi_var_mem.o
CC cmd/load.o
AR drivers/core/built-in.o
CC lib/rbtree.o
CC cmd/mem.o
CC cmd/mii.o
CC drivers/sysreset/sysreset-uclass.o
CC cmd/mdio.o
AR drivers/thermal/built-in.o
CC drivers/sysreset/sysreset_sbi.o
CC cmd/sleep.o
CC lib/list_sort.o
CC lib/efi_loader/efi_var_file.o
CC lib/md5.o
CC lib/efi_loader/efi_variable.o
AR drivers/mtd/nand/spi/spinand.o
CC lib/hash-checksum.o
CC cmd/mmc.o
AR drivers/mtd/nand/spi/built-in.o
CC drivers/timer/timer-uclass.o
AR fs/fat/built-in.o
AR drivers/mtd/nand/built-in.o
CC lib/efi_loader/efi_watchdog.o
CC drivers/timer/riscv_timer.o
CC cmd/mtd.o
AR drivers/ufs/built-in.o
AR drivers/watchdog/built-in.o
CC lib/sha1.o
CC lib/efi_loader/efi_disk.o
AR drivers/video/bridge/built-in.o
CC lib/efi_loader/efi_net.o
AR drivers/video/sunxi/built-in.o
CC cmd/mtdparts.o
CC lib/sha256.o
AR drivers/video/tegra20/built-in.o
AR drivers/video/ti/built-in.o
AR drivers/mtd/mtd.o
CC cmd/legacy-mtd-utils.o
AR drivers/serial/built-in.o
CC lib/gunzip.o
CC cmd/net.o
CC cmd/part.o
AR drivers/video/built-in.o
AR drivers/mtd/spi/spi-nor.o
CC cmd/pxe.o
CC cmd/sf.o
AR drivers/mtd/spi/built-in.o
CC lib/lz4_wrapper.o
CC cmd/setexpr.o
CC lib/efi_loader/efi_smbios.o
CC cmd/sysboot.o
CC lib/efi_loader/efi_riscv.o
CC lib/fdtdec.o
CC cmd/test.o
CC lib/qsort.o
CC lib/efi_loader/efi_load_initrd.o
CC cmd/ubi.o
AR drivers/sysreset/built-in.o
AR drivers/mmc/built-in.o
CC cmd/ubifs.o
CC lib/efi_loader/efi_conformance.o
CC lib/efi_loader/boothart.o
AR drivers/spi/built-in.o
CC lib/hashtable.o
AS lib/efi_loader/efi_crt0.o
CC lib/errno.o
CC cmd/unlz4.o
CC cmd/unzip.o
CC lib/efi_loader/efi_reloc.o
AR drivers/timer/built-in.o
CC lib/efi_loader/efi_freestanding.o
CC lib/display_options.o
CC cmd/lzmadec.o
CC lib/crc32.o
CC lib/ctype.o
AR drivers/net/built-in.o
CC lib/efi_loader/helloworld.o
CC lib/efi_loader/dtbdump.o
CC lib/div64.o
CC cmd/ximg.o
CC lib/hang.o
CC lib/linux_compat.o
CC cmd/nvedit.o
CC lib/linux_string.o
CC lib/lmb.o
CC lib/efi_loader/initrddump.o
CC lib/membuff.o
CC lib/slre.o
CC lib/string.o
CC lib/tables_csum.o
CC lib/time.o
CC lib/hexdump.o
CC lib/uuid.o
CC lib/rand.o
CC lib/panic.o
CC lib/vsprintf.o
CC lib/strto.o
CC lib/abuf.o
CC lib/date.o
CC lib/rtc-lib.o
CC lib/elf.o
AR lib/zlib/built-in.o
LD lib/efi_loader/helloworld_efi.so
LD lib/efi_loader/boothart_efi.so
OBJCOPY lib/efi_loader/helloworld.efi
OBJCOPY lib/efi_loader/boothart.efi
AR lib/efi_loader/built-in.o
AR fs/ubifs/built-in.o
AR fs/built-in.o
AR drivers/mtd/ubi/built-in.o
AR drivers/mtd/built-in.o
LD lib/efi_loader/dtbdump_efi.so
AR drivers/built-in.o
LD lib/efi_loader/initrddump_efi.so
OBJCOPY lib/efi_loader/dtbdump.efi
OBJCOPY lib/efi_loader/initrddump.efi
AR cmd/built-in.o
AR lib/built-in.o
LD u-boot
OBJCOPY u-boot.srec
OBJCOPY u-boot-nodtb.bin
SYM u-boot.sym
DTC arch/riscv/dts/microchip-mpfs-icicle-kit.dtb
DTC arch/riscv/dts/microchip-mpfs-icicle-kit-amp.dtb
DTC arch/riscv/dts/microchip-mpfs-icicle-kit-qspi-nor.dtb
arch/riscv/dts/.microchip-mpfs-icicle-kit.dtb.pre.tmp:74.4-63: Warning (dma_ranges_format): /reserved-memory/non-cached-low-buffer:dma-ranges: "dma-ranges" property has invalid length (24 bytes) (parent #address-cells == 2, child #address-cells == 2, #size-cells == 1)
arch/riscv/dts/.microchip-mpfs-icicle-kit.dtb.pre.tmp:83.4-66: Warning (dma_ranges_format): /reserved-memory/non-cached-high-buffer:dma-ranges: "dma-ranges" property has invalid length (24 bytes) (parent #address-cells == 2, child #address-cells == 2, #size-cells == 1)
arch/riscv/dts/microchip-mpfs.dtsi:476.23-486.5: Warning (spi_bus_bridge): /soc/qspi@21000000: node name for SPI buses should be 'spi'
also defined at arch/riscv/dts/.microchip-mpfs-icicle-kit.dtb.pre.tmp:203.7-216.3
arch/riscv/dts/microchip-mpfs-icicle-kit.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'
arch/riscv/dts/microchip-mpfs.dtsi:37.36-41.6: Warning (interrupt_provider): /cpus/cpu@0/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:69.36-73.6: Warning (interrupt_provider): /cpus/cpu@1/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:101.36-105.6: Warning (interrupt_provider): /cpus/cpu@2/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:133.36-137.6: Warning (interrupt_provider): /cpus/cpu@3/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:165.36-169.6: Warning (interrupt_provider): /cpus/cpu@4/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:220.38-231.5: Warning (interrupt_provider): /soc/interrupt-controller@c000000: Missing #address-cells in interrupt provider
arch/riscv/dts/.microchip-mpfs-icicle-kit-amp.dtb.pre.tmp:75.4-63: Warning (dma_ranges_format): /reserved-memory/non-cached-low-buffer:dma-ranges: "dma-ranges" property has invalid length (24 bytes) (parent #address-cells == 2, child #address-cells == 2, #size-cells == 1)
arch/riscv/dts/.microchip-mpfs-icicle-kit-amp.dtb.pre.tmp:84.4-66: Warning (dma_ranges_format): /reserved-memory/non-cached-high-buffer:dma-ranges: "dma-ranges" property has invalid length (24 bytes) (parent #address-cells == 2, child #address-cells == 2, #size-cells == 1)
arch/riscv/dts/microchip-mpfs.dtsi:476.23-486.5: Warning (spi_bus_bridge): /soc/qspi@21000000: node name for SPI buses should be 'spi'
also defined at arch/riscv/dts/.microchip-mpfs-icicle-kit-amp.dtb.pre.tmp:211.7-223.3
arch/riscv/dts/microchip-mpfs-icicle-kit-amp.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'
arch/riscv/dts/microchip-mpfs.dtsi:37.36-41.6: Warning (interrupt_provider): /cpus/cpu@0/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:69.36-73.6: Warning (interrupt_provider): /cpus/cpu@1/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:101.36-105.6: Warning (interrupt_provider): /cpus/cpu@2/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:133.36-137.6: Warning (interrupt_provider): /cpus/cpu@3/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:165.36-169.6: Warning (interrupt_provider): /cpus/cpu@4/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:220.38-231.5: Warning (interrupt_provider): /soc/interrupt-controller@c000000: Missing #address-cells in interrupt provider
arch/riscv/dts/.microchip-mpfs-icicle-kit-qspi-nor.dtb.pre.tmp:73.4-63: Warning (dma_ranges_format): /reserved-memory/non-cached-low-buffer:dma-ranges: "dma-ranges" property has invalid length (24 bytes) (parent #address-cells == 2, child #address-cells == 2, #size-cells == 1)
arch/riscv/dts/.microchip-mpfs-icicle-kit-qspi-nor.dtb.pre.tmp:82.4-66: Warning (dma_ranges_format): /reserved-memory/non-cached-high-buffer:dma-ranges: "dma-ranges" property has invalid length (24 bytes) (parent #address-cells == 2, child #address-cells == 2, #size-cells == 1)
arch/riscv/dts/microchip-mpfs.dtsi:476.23-486.5: Warning (spi_bus_bridge): /soc/qspi@21000000: node name for SPI buses should be 'spi'
also defined at arch/riscv/dts/.microchip-mpfs-icicle-kit-qspi-nor.dtb.pre.tmp:202.7-214.3
arch/riscv/dts/microchip-mpfs-icicle-kit-qspi-nor.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'
arch/riscv/dts/microchip-mpfs.dtsi:37.36-41.6: Warning (interrupt_provider): /cpus/cpu@0/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:69.36-73.6: Warning (interrupt_provider): /cpus/cpu@1/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:101.36-105.6: Warning (interrupt_provider): /cpus/cpu@2/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:133.36-137.6: Warning (interrupt_provider): /cpus/cpu@3/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:165.36-169.6: Warning (interrupt_provider): /cpus/cpu@4/interrupt-controller: Missing #address-cells in interrupt provider
arch/riscv/dts/microchip-mpfs.dtsi:220.38-231.5: Warning (interrupt_provider): /soc/interrupt-controller@c000000: Missing #address-cells in interrupt provider
SHIPPED dts/dt.dtb
CAT u-boot-dtb.bin
COPY u-boot.dtb
COPY u-boot.bin
OFCHK .config
make: Leaving directory '....../BeagleV-Fire-ubuntu/u-boot'
'./u-boot/u-boot.bin' -> './deploy/u-boot.bin'
'./u-boot/u-boot.bin' -> './deploy/src.bin'

A new file patches/u-boot/beaglev-fire/microchip_mpfs_icicle_defconfig is generated as:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CONFIG_RISCV=y
CONFIG_SYS_MALLOC_LEN=0x800000
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000
CONFIG_ENV_SIZE=0x2000
CONFIG_DEFAULT_DEVICE_TREE="microchip-mpfs-icicle-kit"
CONFIG_SYS_PROMPT="RISC-V # "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x80200000
CONFIG_TARGET_MICROCHIP_ICICLE=y
CONFIG_ARCH_RV64I=y
CONFIG_RISCV_SMODE=y
CONFIG_FIT=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_DISPLAY_CPUINFO=y
CONFIG_DISPLAY_BOARDINFO=y
CONFIG_SYS_CBSIZE=256
CONFIG_SYS_PBSIZE=282
CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-nand0:2m(payload),119m(ubi)"
CONFIG_CMD_UBI=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_DM_MTD=y
CONFIG_SYSRESET=y

2.4 04_build_linux.sh

You may meet the same issues solved in BeagleV-Fire-1.md.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
➜  BeagleV-Fire-ubuntu git:(main) ✗ ./04_build_linux.sh 
Applying: Add wireless-regdb regulatory database file
'../device-tree/src/riscv/microchip/mpfs-beaglev-fire.dts' -> 'arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts'
'../device-tree/src/riscv/microchip/mpfs-beaglev-fire-fabric.dtsi' -> 'arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi'
'../device-tree/src/riscv/microchip/mpfs-beaglev-fire-pinmux.dtsi' -> 'arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-pinmux.dtsi'
make ARCH=riscv CROSS_COMPILE=....../BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux- clean
CLEAN arch/riscv/kernel/compat_vdso
CLEAN arch/riscv/kernel/pi
CLEAN arch/riscv/kernel/vdso
CLEAN arch/riscv/kernel
CLEAN arch/riscv/purgatory
CLEAN certs
CLEAN drivers/base/firmware_loader/builtin
CLEAN drivers/scsi
CLEAN drivers/tty/vt
CLEAN fs/unicode
CLEAN init
CLEAN kernel
CLEAN lib/raid6
CLEAN lib
CLEAN net/wireless
CLEAN usr
CLEAN .
'../patches/linux/mpfs_defconfig' -> './arch/riscv/configs/mpfs_defconfig'
make ARCH=riscv CROSS_COMPILE=....../BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux- mpfs_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/menu.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
make -j48 ARCH=riscv CROSS_COMPILE=....../BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux- olddefconfig
#
# configuration written to .config
#
make -j48 ARCH=riscv CROSS_COMPILE=....../BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux- Image modules dtbs
SYNC include/config/auto.conf.cmd
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
......
......
......
LD [M] net/nsh/nsh.ko
LD [M] net/hsr/hsr.ko
LD [M] net/qrtr/qrtr.ko
LD [M] net/qrtr/qrtr-smd.ko
LD [M] net/qrtr/qrtr-tun.ko
LD [M] net/qrtr/qrtr-mhi.ko
Kernel: arch/riscv/boot/Image is ready
Compressing 6.6.51-linux4microchip+fpga-2024.09.1-20241024+-modules.tar.gz...
'./.config' -> '../patches/linux/mpfs_defconfig'
'./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts' -> '../patches/linux/dts/mpfs-beaglev-fire.dts'
'./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi' -> '../patches/linux/dts/mpfs-beaglev-fire-fabric.dtsi'
'./arch/riscv/boot/Image' -> '../deploy/input/Image'
'./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dtb' -> '../deploy/input/mpfs-beaglev-fire.dtb'
'./patches/linux/beaglev_fire.its' -> './deploy/input/beaglev_fire.its'
FIT description: U-Boot fitImage for the BeagleV-Fire
Created: Thu Oct 24 01:42:47 2024
Image 0 (kernel)
Description: Linux kernel
Created: Thu Oct 24 01:42:47 2024
Type: Kernel Image
Compression: gzip compressed
Data Size: 9687165 Bytes = 9460.12 KiB = 9.24 MiB
Architecture: RISC-V
OS: Linux
Load Address: 0x80200000
Entry Point: 0x80200000
Hash algo: sha256
Hash value: 218c9c8681afb659d7a05c80b95330a2b58398367d812ee22fd718030bdb7ffc
Image 1 (base_fdt)
Description: Flattened Device Tree blob
Created: Thu Oct 24 01:42:47 2024
Type: Flat Device Tree
Compression: uncompressed
Data Size: 19036 Bytes = 18.59 KiB = 0.02 MiB
Architecture: RISC-V
Load Address: 0x8a000000
Hash algo: sha256
Hash value: a254f5825e318de185b473b974d53bc291fe0106944b8bad6038c87296d73f03
Default Configuration: 'kernel_dtb'
Configuration 0 (kernel_dtb)
Description: 1 Linux kernel, FDT blob
Kernel: kernel
FDT: base_fdt
Configuration 1 (base_dtb)
Description: Base FDT blob for BeagleV-Fire board
Kernel: unavailable
FDT: base_fdt
➜ BeagleV-Fire-ubuntu git:(main) ✗

Three files are generated as follows:

  • patches/linux/dts/mpfs-beaglev-fire-fabric.dtsi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2020-2021 Microchip Technology Inc */

#include "dt-bindings/mailbox/miv-ihc.h"

/ {
fabric_clk3: fabric-clk3 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <50000000>;
};

fabric_clk1: fabric-clk1 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <125000000>;
};

fabric-bus@40000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x0 0x40000000 0x0 0x40000000 0x0 0x20000000>, /* FIC3-FAB */
<0x0 0x60000000 0x0 0x60000000 0x0 0x20000000>, /* FIC0, LO */
<0x0 0xe0000000 0x0 0xe0000000 0x0 0x20000000>, /* FIC1, LO */
<0x20 0x0 0x20 0x0 0x10 0x0>, /* FIC0,HI */
<0x30 0x0 0x30 0x0 0x10 0x0>; /* FIC1,HI */

cape_gpios_p8: gpio@41100000 {
compatible = "microchip,coregpio-rtl-v3";
reg = <0x0 0x41100000 0x0 0x1000>;
clocks = <&fabric_clk3>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
gpio-line-names = "P8_PIN31", "P8_PIN32", "P8_PIN33", "P8_PIN34",
"P8_PIN35", "P8_PIN36", "P8_PIN37", "P8_PIN38",
"P8_PIN39", "P8_PIN40", "P8_PIN41", "P8_PIN42",
"P8_PIN43", "P8_PIN44", "P8_PIN45", "P8_PIN46";
};

cape_gpios_p9: gpio@41200000 {
compatible = "microchip,coregpio-rtl-v3";
reg = <0x0 0x41200000 0x0 0x1000>;
clocks = <&fabric_clk3>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <20>;
gpio-line-names = "P9_PIN11", "P9_PIN12", "P9_PIN13", "P9_PIN14",
"P9_PIN15", "P9_PIN16", "P9_PIN17", "P9_PIN18",
"P9_PIN21", "P9_PIN22", "P9_PIN23", "P9_PIN24",
"P9_PIN25", "P9_PIN26", "P9_PIN27", "P9_PIN28",
"P9_PIN29", "P9_PIN31", "P9_PIN41", "P9_PIN42";
};

hsi_gpios: gpio@44000000 {
compatible = "microchip,coregpio-rtl-v3";
reg = <0x0 0x44000000 0x0 0x1000>;
clocks = <&fabric_clk3>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <20>;
gpio-line-names = "B0_HSIO70N", "B0_HSIO71N", "B0_HSIO83N",
"B0_HSIO73N_C2P_CLKN", "B0_HSIO70P", "B0_HSIO71P",
"B0_HSIO83P", "B0_HSIO73N_C2P_CLKP", "XCVR1_RX_VALID",
"XCVR1_LOCK", "XCVR1_ERROR", "XCVR2_RX_VALID",
"XCVR2_LOCK", "XCVR2_ERROR", "XCVR3_RX_VALID",
"XCVR3_LOCK", "XCVR3_ERROR", "XCVR_0B_REF_CLK_PLL_LOCK",
"XCVR_0C_REF_CLK_PLL_LOCK", "B0_HSIO81N";
};
};

ihc: mailbox {
compatible = "microchip,miv-ihc";
interrupt-parent = <&plic>;
interrupts = <IHC_HART1_INT>;
microchip,miv-ihc-remote-context-id = <IHC_CONTEXT_B>;
#mbox-cells = <1>;
status = "disabled";
};

fabric-pcie-bus@3000000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x0 0x40000000 0x0 0x40000000 0x0 0x20000000>,
<0x30 0x0 0x30 0x0 0x10 0x0>;
dma-ranges = <0x0 0x0 0x0 0x80000000 0x0 0x4000000>,
<0x0 0x4000000 0x0 0xc4000000 0x0 0x6000000>,
<0x0 0xa000000 0x0 0x8a000000 0x0 0x8000000>,
<0x0 0x12000000 0x14 0x12000000 0x0 0x10000000>,
<0x0 0x22000000 0x10 0x22000000 0x0 0x5e000000>;

pcie: pcie@3000000000 {
compatible = "microchip,pcie-host-1.0";
#address-cells = <0x3>;
#interrupt-cells = <0x1>;
#size-cells = <0x2>;
device_type = "pci";
dma-noncoherent;
reg = <0x30 0x0 0x0 0x8000000>, <0x0 0x43004000 0x0 0x2000>, <0x0 0x43006000 0x0 0x2000>;
reg-names = "cfg", "bridge", "ctrl";
bus-range = <0x0 0x7f>;
interrupt-parent = <&plic>;
interrupts = <119>;
interrupt-map = <0 0 0 1 &pcie_intc 0>,
<0 0 0 2 &pcie_intc 1>,
<0 0 0 3 &pcie_intc 2>,
<0 0 0 4 &pcie_intc 3>;
interrupt-map-mask = <0 0 0 7>;
clocks = <&ccc_nw CLK_CCC_PLL0_OUT1>,
<&ccc_nw CLK_CCC_PLL0_OUT3>;
clock-names = "fic1", "fic3";
ranges = <0x43000000 0x0 0x9000000 0x30 0x9000000 0x0 0xf000000>,
<0x1000000 0x0 0x8000000 0x30 0x8000000 0x0 0x1000000>,
<0x3000000 0x0 0x18000000 0x30 0x18000000 0x0 0x70000000>;
dma-ranges = <0x3000000 0x0 0x80000000 0x0 0x0 0x0 0x4000000>,
<0x3000000 0x0 0x84000000 0x0 0x4000000 0x0 0x6000000>,
<0x3000000 0x0 0x8a000000 0x0 0xa000000 0x0 0x8000000>,
<0x3000000 0x0 0x92000000 0x0 0x12000000 0x0 0x10000000>,
<0x3000000 0x0 0xa2000000 0x0 0x22000000 0x0 0x5e000000>;
msi-parent = <&pcie>;
msi-controller;
status = "disabled";

pcie_intc: interrupt-controller {
#address-cells = <0>;
#interrupt-cells = <1>;
interrupt-controller;
};
};
};

refclk_ccc: cccrefclk {
compatible = "fixed-clock";
#clock-cells = <0>;
};
};

&ccc_nw {
clocks = <&refclk_ccc>, <&refclk_ccc>, <&refclk_ccc>, <&refclk_ccc>,
<&refclk_ccc>, <&refclk_ccc>;
clock-names = "pll0_ref0", "pll0_ref1", "pll1_ref0", "pll1_ref1",
"dll0_ref", "dll1_ref";
status = "okay";
};
  • patches/linux/dts/mpfs-beaglev-fire.dts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2020-2021 Microchip Technology Inc */

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include "mpfs.dtsi"
#include "mpfs-beaglev-fire-fabric.dtsi"
#include "mpfs-beaglev-fire-pinmux.dtsi"

/* Clock frequency (in Hz) of the rtcclk */
#define RTCCLK_FREQ 1000000

/ {
#address-cells = <2>;
#size-cells = <2>;
model = "BeagleBoard BeagleV-Fire";
compatible = "beagle,beaglev-fire", "microchip,mpfs";

soc {
dma-ranges = <0x14 0x0 0x0 0x80000000 0x0 0x4000000>,
<0x14 0x4000000 0x0 0xc4000000 0x0 0x6000000>,
<0x14 0xa000000 0x0 0x8a000000 0x0 0x8000000>,
<0x14 0x12000000 0x14 0x12000000 0x0 0x10000000>,
<0x14 0x22000000 0x10 0x22000000 0x0 0x5e000000>;
};

aliases {
serial0 = &mmuart0;
serial1 = &mmuart1;
serial2 = &mmuart2;
serial3 = &mmuart3;
serial4 = &mmuart4;
};

chosen {
stdout-path = "serial0:115200n8";
};

cpus {
timebase-frequency = <RTCCLK_FREQ>;
};

kernel: memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x4000000>;
};

ddr_cached_low: memory@8a000000 {
device_type = "memory";
reg = <0x0 0x8a000000 0x0 0x8000000>;
};

ddr_non_cached_low: memory@c4000000 {
device_type = "memory";
reg = <0x0 0xc4000000 0x0 0x6000000>;
};

ddr_cached_high: memory@1022000000 {
device_type = "memory";
reg = <0x10 0x22000000 0x0 0x5e000000>;
};

ddr_non_cached_high: memory@1412000000 {
device_type = "memory";
reg = <0x14 0x12000000 0x0 0x10000000>;
};

reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;

hss: hss-buffer@103fc00000 {
compatible = "shared-dma-pool";
reg = <0x10 0x3fc00000 0x0 0x400000>;
no-map;
};

dma_non_cached_low: non-cached-low-buffer {
compatible = "shared-dma-pool";
size = <0x0 0x4000000>;
no-map;
alloc-ranges = <0x0 0xc4000000 0x0 0x4000000>;
};

dma_non_cached_high: non-cached-high-buffer {
compatible = "shared-dma-pool";
size = <0x0 0x10000000>;
no-map;
linux,dma-default;
alloc-ranges = <0x14 0x12000000 0x0 0x10000000>;
};
};

imx219_vana: fixedregulator-0 {
compatible = "regulator-fixed";
regulator-name = "imx219_vana";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};

imx219_vdig: fixedregulator-1 {
compatible = "regulator-fixed";
regulator-name = "imx219_vdig";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};

imx219_vddl: fixedregulator-2 {
compatible = "regulator-fixed";
regulator-name = "imx219_vddl";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
};

imx219_clk: camera-clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
};
};

&gpio0 {
ngpios=<14>;
gpio-line-names = "", "", "", "", "", "", "",
"", "", "", "", "", "SD_CARD_CS", "USER_BUTTON";
status = "okay";

sd-card-cs-hog {
gpio-hog;
gpios = <12 12>;
output-high;
line-name = "SD_CARD_CS";
};

user-button-hog {
gpio-hog;
gpios = <13 13>;
input;
line-name = "USER_BUTTON";
};
};

&gpio1 {
ngpios=<24>;
gpio-line-names = "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"ADC_IRQn", "", "", "USB_OCn";
status = "okay";

adc-irqn-hog {
gpio-hog;
gpios = <20 20>;
input;
line-name = "ADC_IRQn";
};

usb-ocn-hog {
gpio-hog;
gpios = <23 23>;
input;
line-name = "USB_OCn";
};
};

&gpio2 {
ngpios=<32>;
gpio-line-names = "P8_PIN3_USER_LED_0", "P8_PIN4_USER_LED_1", "P8_PIN5_USER_LED_2",
"P8_PIN6_USER_LED_3", "P8_PIN7_USER_LED_4", "P8_PIN8_USER_LED_5",
"P8_PIN9_USER_LED_6", "P8_PIN10_USER_LED_7", "P8_PIN11_USER_LED_8",
"P8_PIN12_USER_LED_9", "P8_PIN13_USER_LED_10", "P8_PIN14_USER_LED_11",
"P8_PIN15", "P8_PIN16", "P8_PIN17", "P8_PIN18", "P8_PIN19", "P8_PIN20",
"P8_PIN21", "P8_PIN22", "P8_PIN23", "P8_PIN24", "P8_PIN25", "P8_PIN26",
"P8_PIN27", "P8_PIN28", "P8_PIN29", "P8_PIN30", "M2_W_DISABLE1",
"M2_W_DISABLE2", "VIO_ENABLE", "SD_DET";
status = "okay";

vio-enable-hog {
gpio-hog;
gpios = <30 30>;
output-high;
line-name = "VIO_ENABLE";
};

sd-det-hog {
gpio-hog;
gpios = <31 31>;
input;
line-name = "SD_DET";
};
};

&i2c0 {
status = "okay";
};

&i2c1 {
status = "okay";

eeprom: eeprom@50 {
compatible = "at,24c32";
reg = <0x50>;
};

imx219: sensor@10 {
compatible = "sony,imx219";
reg = <0x10>;
clocks = <&imx219_clk>;
VANA-supply = <&imx219_vana>; /* 2.8v */
VDIG-supply = <&imx219_vdig>; /* 1.8v */
VDDL-supply = <&imx219_vddl>; /* 1.2v */

port {
imx219_0: endpoint {
data-lanes = <1 2>;
clock-noncontinuous;
link-frequencies = /bits/ 64 <456000000>;
};
};
};
};

&mac0 {
dma-noncoherent;
status = "okay";
phy-mode = "sgmii";
phy-handle = <&phy0>;
phy0: ethernet-phy@0 {
reg = <0>;
};
};

&mbox {
status = "okay";
};

&mmc {
dma-noncoherent;
bus-width = <4>;
disable-wp;
cap-sd-highspeed;
cap-mmc-highspeed;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;
status = "okay";
};

&mmuart0 {
status = "okay";
};

&mmuart1 {
status = "okay";
};

&refclk {
clock-frequency = <125000000>;
};

&refclk_ccc {
clock-frequency = <50000000>;
};

&rtc {
status = "okay";
};

&spi0 {
status = "okay";
};

&spi1 {
status = "okay";
};

&syscontroller {
microchip,bitstream-flash = <&sys_ctrl_flash>;
status = "okay";
};

&syscontroller_qspi {
status = "okay";

sys_ctrl_flash: flash@0 { // MT25QL01GBBB8ESF-0SIT
compatible = "jedec,spi-nor";
#address-cells = <1>;
#size-cells = <1>;
spi-max-frequency = <20000000>;
spi-rx-bus-width = <1>;
reg = <0>;
};
};

&usb {
dma-noncoherent;
status = "okay";
dr_mode = "otg";
};
  • patches/linux/mpfs_defconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# Automatically generated file; DO NOT EDIT.
# Linux/riscv 6.6.51-linux4microchip+fpga-2024.09 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="riscv64-linux-gcc (GCC) 14.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=140200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24200
CONFIG_LD_IS_BFD=y
......
......
......
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FUNCTION_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_ARCH_HAS_KCOV=y
CONFIG_CC_HAS_SANCOV_TRACE_PC=y
# CONFIG_KCOV is not set
CONFIG_RUNTIME_TESTING_MENU=y
# CONFIG_TEST_DHRY is not set
# CONFIG_LKDTM is not set
# CONFIG_TEST_MIN_HEAP is not set
# CONFIG_TEST_DIV64 is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_TEST_REF_TRACKER is not set
# CONFIG_RBTREE_TEST is not set
# CONFIG_REED_SOLOMON_TEST is not set
# CONFIG_INTERVAL_TREE_TEST is not set
# CONFIG_PERCPU_TEST is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_TEST_HEXDUMP is not set
# CONFIG_STRING_SELFTEST is not set
# CONFIG_TEST_STRING_HELPERS is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_TEST_PRINTF is not set
# CONFIG_TEST_SCANF is not set
# CONFIG_TEST_BITMAP is not set
# CONFIG_TEST_UUID is not set
# CONFIG_TEST_XARRAY is not set
# CONFIG_TEST_MAPLE_TREE is not set
# CONFIG_TEST_RHASHTABLE is not set
# CONFIG_TEST_IDA is not set
# CONFIG_TEST_LKM is not set
# CONFIG_TEST_BITOPS is not set
# CONFIG_TEST_VMALLOC is not set
# CONFIG_TEST_USER_COPY is not set
# CONFIG_TEST_BPF is not set
# CONFIG_TEST_BLACKHOLE_DEV is not set
# CONFIG_FIND_BIT_BENCHMARK is not set
# CONFIG_TEST_FIRMWARE is not set
# CONFIG_TEST_SYSCTL is not set
# CONFIG_TEST_UDELAY is not set
# CONFIG_TEST_STATIC_KEYS is not set
# CONFIG_TEST_DYNAMIC_DEBUG is not set
# CONFIG_TEST_KMOD is not set
# CONFIG_TEST_MEMCAT_P is not set
# CONFIG_TEST_MEMINIT is not set
# CONFIG_TEST_FREE_PAGES is not set
CONFIG_ARCH_USE_MEMTEST=y
# CONFIG_MEMTEST is not set
# end of Kernel Testing and Coverage

#
# Rust hacking
#
# end of Rust hacking
# end of Kernel hacking

2.5 05_generate_payload.bin.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
➜  BeagleV-Fire-ubuntu git:(main) ✗ ./05_generate_payload.bin.sh 
Hart Software Service formatted boot image generator v0.99.37
Copyright (c) 2021-2022 Microchip FPGA Embedded Systems Solutions.

Parsing set-name
Parsing hart entry points
Entry Point U54_1 is 0x80200000
Entry Point U54_2 is 0x80200000
Entry Point U54_3 is 0x80200000
Entry Point U54_4 is 0x80200000
Parsing payload >>src.bin<<
exec_addr is 0x80200000
owner is 1
secondary is 2
secondary is 3
secondary is 4
priv_mode is 1

Processing ELF >>src.bin<<
>>src.bin<< is not an ELF object

Processing blob >>src.bin<< - placing at 0x80200000
lastChunk is 0, numChunks is 1
Set-name is >>PolarFire-SoC-HSS::U-Boot<<
Output filename is >>./input/payload.bin<<
Outputting Payload Header
Outputting Code/Data Chunks
Outputting ZI Chunks
Outputting Binary Data
Outputting Payload Header
Thu 24 Oct 2024 02:26:49 AM PDT
[u-boot.bin: U-Boot 2023.07.02-linux4microchip+fpga-2024.09-dirty (Oct 23 2024 - 23:26:07 -0700)]
[src.bin: U-Boot 2023.07.02-linux4microchip+fpga-2024.09-dirty (Oct 23 2024 - 23:26:07 -0700)]
[payload.bin:U-Boot 2023.07.02-linux4microchip+fpga-2024.09-dirty (Oct 23 2024 - 23:26:07 -0700)]
➜ BeagleV-Fire-ubuntu git:(main) ✗

2.6 sudo ./06_generate_debian_console_root.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
➜  BeagleV-Fire-ubuntu git:(main) ✗ sudo ./06_generate_debian_console_root.sh 
[sudo] password for lvision:
--2024-10-24 02:30:20-- https://rcn-ee.net/rootfs/debian-riscv64-sid-minimal/2024-10-24/debian-sid-console-riscv64-2024-10-24.tar.xz
Resolving rcn-ee.net (rcn-ee.net)... 5.161.107.156
Connecting to rcn-ee.net (rcn-ee.net)|5.161.107.156|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 332982816 (318M) [application/x-xz]
Saving to: ‘./deploy/debian-sid-console-riscv64-2024-10-24.tar.xz’

debian-sid-console-riscv64-2024-10-24.tar.xz 100%[==================================================================================================================================================>] 317.56M 46.0MB/s in 7.5s

2024-10-24 02:30:27 (42.6 MB/s) - ‘./deploy/debian-sid-console-riscv64-2024-10-24.tar.xz’ saved [332982816/332982816]

Extracting: debian-sid-console-riscv64-2024-10-24/riscv64-rootfs-*.tar
'./deploy/boot.scr' -> 'deploy/input/boot.scr'
'./deploy/sysconf.txt' -> 'deploy/input/sysconf.txt'
'./ignore/.root/etc/bbb.io/templates/eth0-DHCP.network' -> './ignore/.root/etc/systemd/network/eth0.network'
'./ignore/.root/etc/bbb.io/templates/eth1-DHCP.network' -> './ignore/.root/etc/systemd/network/eth1.network'
'./ignore/.root/etc/bbb.io/templates/nginx/nginx-autoindex' -> './ignore/.root/etc/nginx/sites-enabled/default'
'./ignore/.root/etc/bbb.io/templates/nginx/Cockpit.html' -> './ignore/.root/var/www/html/Cockpit.html'
'./ignore/.root/etc/bbb.io/templates/nginx/Docs-BeagleBoard.html' -> './ignore/.root/var/www/html/Docs-BeagleBoard.html'
---------------------
File Size
1.4G ignore/.root/
---------------------
0+0 records in
0+0 records out
0 bytes copied, 2.196e-05 s, 0.0 kB/s
mke2fs 1.47.0 (5-Feb-2023)
./deploy/input/root.ext4 contains a ext4 file system
created on Wed Oct 23 02:58:30 2024
Discarding device blocks: done
Creating filesystem with 563200 4k blocks and 140832 inodes
Filesystem UUID: 4630cf75-81d2-47ea-b1ce-79ae03739e62
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Copying files into the device: done
Writing superblocks and filesystem accounting information: done

➜ BeagleV-Fire-ubuntu git:(main) ✗

2.7 sudo ./07_create_sdcard_img.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
➜  BeagleV-Fire-ubuntu git:(main) ✗ sudo ./07_create_sdcard_img.sh 
INFO: cmd: "mkdir -p "....../BeagleV-Fire-ubuntu/deploy/tmp"" (stderr):
INFO: cmd: "rm -rf "....../BeagleV-Fire-ubuntu/deploy/tmp"/*" (stderr):
INFO: cmd: "mkdir -p "....../BeagleV-Fire-ubuntu/deploy/tmp"" (stderr):
INFO: cmd: "cp -a "....../BeagleV-Fire-ubuntu/deploy/root" "....../BeagleV-Fire-ubuntu/deploy/tmp/root"" (stderr):
INFO: cmd: "mkdir -p "....../BeagleV-Fire-ubuntu/deploy/images"" (stderr):
INFO: vfat(boot.vfat): cmd: "mkdosfs '....../BeagleV-Fire-ubuntu/deploy/images/boot.vfat'" (stderr):
INFO: vfat(boot.vfat): adding file 'beaglev_fire.itb' as 'beaglev_fire.itb' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -sp -i '....../BeagleV-Fire-ubuntu/deploy/images/boot.vfat' '....../BeagleV-Fire-ubuntu/deploy/input/beaglev_fire.itb' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'boot.scr' as 'boot.scr' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -sp -i '....../BeagleV-Fire-ubuntu/deploy/images/boot.vfat' '....../BeagleV-Fire-ubuntu/deploy/input/boot.scr' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'sysconf.txt' as 'sysconf.txt' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -sp -i '....../BeagleV-Fire-ubuntu/deploy/images/boot.vfat' '....../BeagleV-Fire-ubuntu/deploy/input/sysconf.txt' '::'" (stderr):
INFO: hdimage(sdcard.img): adding partition 'uboot' (in MBR) from 'payload.bin' ...
INFO: hdimage(sdcard.img): adding partition 'kernel' (in MBR) from 'boot.vfat' ...
INFO: hdimage(sdcard.img): adding partition 'rootfs' (in MBR) from 'root.ext4' ...
INFO: hdimage(sdcard.img): adding partition '[MBR]' ...
INFO: hdimage(sdcard.img): adding partition '[GPT header]' ...
INFO: hdimage(sdcard.img): adding partition '[GPT array]' ...
INFO: hdimage(sdcard.img): adding partition '[GPT backup]' ...
INFO: hdimage(sdcard.img): writing GPT
INFO: hdimage(sdcard.img): writing protective MBR
INFO: hdimage(sdcard.img): writing MBR
➜ BeagleV-Fire-ubuntu git:(main) ✗

2.8 Take A Look At The Image

1
2
3
4
5
6
➜  BeagleV-Fire-ubuntu git:(main) ✗ ll deploy/images 
total 1.5G
4.0K drwxr-xr-x 2 root root 4.0K Oct 23 03:18 ./
4.0K drwxr-xr-x 6 lvision users 4.0K Oct 23 03:18 ../
9.6M -rw-r--r-- 1 root root 128M Oct 23 03:18 boot.vfat
1.5G -rw-r--r-- 1 root root 2.3G Oct 23 03:18 sdcard.img

2.9 Failed To Boot

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
➜  ~ tio /dev/ttyUSB0
[02:34:42.727] tio v2.7
[02:34:42.727] Press ctrl-t q to quit
[02:34:42.741] Connected






HSS: decompressing from eNVM to L2 Scratch ... Passed
DDR training ... Passed ( 5648 ms)

---------------------------------
-- BeagleV-Fire --
---------------------------------

[5.711390] PolarFire(R) SoC Hart Software Services (HSS) - version 0.99.36-BVF-0.3.0
MPFS HAL version 2.2.104 / DDR Driver version 0.4.023 / Mi-V IHC version 0.1.1 / BOARD=bvf
(c) Copyright 2017-2022 Microchip FPGA Embedded Systems Solutions.

incorporating OpenSBI - version 1.2
(c) Copyright 2019-2022 Western Digital Corporation.

[5.742377] Build ID: 3f0ed536ff6a0aaef3c9b81896adaee39ec4d8c1
[5.749235] Built with the following tools:
- riscv64-unknown-elf-gcc (xPack GNU RISC-V Embedded GCC (Microsemi SoftConsole build), 64-bit) 8.3.0
- GNU ld (xPack GNU RISC-V Embedded GCC (Microsemi SoftConsole build), 64-bit) 2.32

[5.771108] NOTICE: Running from L2 Scratchpad

[5.776750] Serial Number:
421ad5e6973fae72de847b6a5a30e90300000000000000000000000000000000000000000000000000000000000000000000
[5.789423] Segment Configuration:
Cached: SEG0_0: offset 0x0080000000, physical DDR 0x00000000
Cached: SEG0_1: offset 0x1000000000, physical DDR 0x00000000
Non-cached: SEG1_2: offset 0x00c0000000, physical DDR 0x00000000
Non-cached: SEG1_3: offset 0x1400000000, physical DDR 0x00000000
Non-cached WCB: SEG1_4: offset 0x00d0000000, physical DDR 0x00000000
Non-cached WCB: SEG1_5: offset 0x1800000000, physical DDR 0x00000000
[5.830306] L2 Cache Configuration:
L2-Scratchpad: 4 ways (512 KiB)
L2-Cache: 8 ways (1024 KiB)
L2-LIM: 4 ways (512 KiB)
[5.844801] DDR-Lo size is 32 MiB
[5.849055] DDR-Hi size is 1888 MiB
[5.872864] Design Info:
Design Name: CI_DEFAULT_FD28A2CA1789CDC1137
Design Version: 02.00.2
[5.883280] Attempting to select eMMC ... Passed
[6.161422] User button NOT pressed
Press a key to enter CLI, ESC to skip
Timeout in 1 second
.[6.281293] Character 13 pressed

[6.285459] Type HELP for list of commands
[6.290320] >> mmc
[18.129310] Selecting SDCARD/MMC (fallback) as boot source ...
[18.135994] Attempting to select eMMC ... Passed
[18.391620] >> usbdmsc
[280.344194] initialize MMC
[280.347840] Attempting to select eMMC ... Passed
[280.603552] MMC - 512 byte pages, 512 byte blocks, 30621696 pages
Waiting for USB Host to connect... (CTRL-C to quit)
. 0 bytes written, 0 bytes readUSB Host connected. Waiting for disconnect... (CTRL-C to quit)
. 1724668416 bytes written, 1806021120 bytes read

3. Flash Official BeagleV-Fire Ubuntu 2023-11-21

3.1 Apply Official Flash

The official website of BeagleV-Fire Board provides the official OS BeagleV-Fire Ubuntu 2023-11-21, which is able to flash onto the board directly.

Bingo! This time, we're good to go.

  • The ONLY 2 commands we need to use before flashing are:
    • mmc
    • usbdmsc
  • And openssh-server has already been installed by default. Namely: ssh is enabled by default.

3.2 ssh Into BeagleV-Fire Board

The username and password are respectively: - username: beagle - password: temppwd

1
2
3
4
5
6
7
8
9
10
➜  ~ uname -a
Linux BeagleV 6.1.33-linux4microchip+fpga-2023.06-20231121+ #1 SMP Tue Nov 21 13:43:17 UTC 2023 riscv64 riscv64 riscv64 GNU/Linux
➜ ~ uname -r
6.1.33-linux4microchip+fpga-2023.06-20231121+
➜ ~ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.04
Release: 23.04
Codename: lunar

BeagleV SSH and Neofetch

3.3 On-board FPGA

1
2
3
4
5
6
7
8
9
10
11
12
13
➜  ~ lspci
00:00.0 Unclassified device [0006]: Actel Device 1556
➜ ~ lspci -v -s 00:00.0

00:00.0 Unclassified device [0006]: Actel Device 1556 (prog-if 04)
!!! Invalid class 0006 for header type 01
Flags: fast devsel
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 1000-1fff [size=4K] [16-bit]
Memory behind bridge: 18000000-181fffff [size=2M] [32-bit]
Prefetchable memory behind bridge: 3009000000-30091fffff [size=2M] [32-bit]
Capabilities: <access denied>