Initial Commit
- initial default booting image
This commit is contained in:
62
board/microchip/mpfs_icicle/README.txt
Normal file
62
board/microchip/mpfs_icicle/README.txt
Normal file
@@ -0,0 +1,62 @@
|
||||
Microchip PolarFire SoC Icicle Kit
|
||||
==================================
|
||||
|
||||
This file describes how to use the pre-defined Buildroot
|
||||
configuration for Microchip's PolarFire SoC Icicle Kit.
|
||||
|
||||
Further information about the PolarFire SoC Icicle Kit can be found
|
||||
at https://github.com/polarfire-soc/polarfire-soc-documentation
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
Configure Buildroot using the default board configuration:
|
||||
|
||||
'$ make microchip_mpfs_icicle_defconfig'
|
||||
|
||||
Customise the build as necessary:
|
||||
|
||||
'$ make menuconfig'
|
||||
|
||||
Start the build:
|
||||
|
||||
'$ make'
|
||||
|
||||
Result of the build
|
||||
===================
|
||||
|
||||
Once the build has finished you will have the following files:
|
||||
|
||||
output/images/
|
||||
+-- boot.scr
|
||||
+-- boot.vfat
|
||||
+-- Image
|
||||
+-- mpfs_icicle.itb
|
||||
+-- mpfs_icicle.its
|
||||
+-- mpfs-icicle-kit.dtb
|
||||
+-- payload.bin
|
||||
+-- rootfs.ext2
|
||||
+-- rootfs.ext4
|
||||
+-- rootfs.tar
|
||||
+-- sdcard.img
|
||||
+-- u-boot.bin
|
||||
|
||||
|
||||
Creating a bootable SD card with genimage
|
||||
=========================================
|
||||
|
||||
By default Buildroot builds a SD card image for you. The first partition
|
||||
of this image contains a U-Boot binary, embedded in a Hart Software
|
||||
Services (HSS) payload. The second partition contains a FAT filesystem
|
||||
with a U-Boot env and an ITB file containing the kernel and the device
|
||||
tree. The third partition contains the file system. This image can be
|
||||
written directly to the eMMC or an SD card. All you need to do is dd the
|
||||
image to the eMMC or your SD card, which can be done with the following
|
||||
command on your development host:
|
||||
|
||||
'$ sudo dd if=output/images/sdcard.img of=/dev/sdb bs=1M'
|
||||
|
||||
For instructions on how to transfer the image to the eMMC/SD, please refer to
|
||||
the "Programming the Linux image" section of our guide on updating
|
||||
PolarFire SoC dev kits:
|
||||
https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/reference-designs-fpga-and-development-kits/updating-mpfs-kit.md.
|
||||
28
board/microchip/mpfs_icicle/config.yaml
Normal file
28
board/microchip/mpfs_icicle/config.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# HSS Payload Generator - buildroot configuration file
|
||||
#
|
||||
|
||||
# First, we can optionally set a name for our image, otherwise one will be created dynamically
|
||||
set-name: 'PolarFire-SoC-HSS::U-Boot'
|
||||
|
||||
#
|
||||
# Next, we'll define the entry point addresses for each hart, as follows:
|
||||
#
|
||||
hart-entry-points: {u54_1: '0x80200000', u54_2: '0x80200000', u54_3: '0x80200000', u54_4: '0x80200000'}
|
||||
#
|
||||
# Finally, we'll define a payloads (source binary file) that will be placed at certain regions in memory
|
||||
# The payload section is defined with the keyword payloads, and then a number of individual
|
||||
# payload descriptors.
|
||||
#
|
||||
# Each payload has a name (path to its ELF/bin file), an owner-hart, and optionally 1-3 secondary-harts.
|
||||
#
|
||||
# Additionally, it has a privilege mode in which it will start execution.
|
||||
# * Valid privilege modes are PRV_M, PRV_S and PRV_U.
|
||||
#
|
||||
#
|
||||
# In this case, the only payload is the u-boot s-mode binary.
|
||||
#
|
||||
# Case only matters for the ELF path names, not the keywords.
|
||||
#
|
||||
payloads:
|
||||
u-boot.bin: {exec-addr: '0x80200000', owner-hart: u54_1, secondary-hart: u54_2, secondary-hart: u54_3, secondary-hart: u54_4, priv-mode: prv_s}
|
||||
34
board/microchip/mpfs_icicle/genimage.cfg
Normal file
34
board/microchip/mpfs_icicle/genimage.cfg
Normal file
@@ -0,0 +1,34 @@
|
||||
# Image for eMMC or SDCard boot on the Microchip PolarFire SOC Icicle Board
|
||||
#
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"mpfs_icicle.itb",
|
||||
}
|
||||
|
||||
file boot.scr {
|
||||
image = "boot.scr"
|
||||
}
|
||||
}
|
||||
size = 60M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
partition-table-type = "gpt"
|
||||
}
|
||||
|
||||
partition uboot {
|
||||
partition-type-uuid = 21686148-6449-6E6F-744E-656564454649
|
||||
image = "payload.bin"
|
||||
}
|
||||
|
||||
partition kernel {
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition root {
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
1
board/microchip/mpfs_icicle/linux.fragment
Normal file
1
board/microchip/mpfs_icicle/linux.fragment
Normal file
@@ -0,0 +1 @@
|
||||
CONFIG_POLARFIRE_SOC_DMA_NONCOHERENT=y
|
||||
75
board/microchip/mpfs_icicle/mpfs_icicle.its
Normal file
75
board/microchip/mpfs_icicle/mpfs_icicle.its
Normal file
@@ -0,0 +1,75 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Flattened Image Tree file for Icicle Kit
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
description = "U-Boot fitImage for the MPFS";
|
||||
address-cells = <1>;
|
||||
|
||||
images {
|
||||
kernel {
|
||||
description = "Linux kernel";
|
||||
data = /incbin/("./Image");
|
||||
type = "kernel";
|
||||
arch = "riscv";
|
||||
os = "linux";
|
||||
compression = "none";
|
||||
load = <0x80200000>;
|
||||
entry = <0x80200000>;
|
||||
hash-1 {
|
||||
algo = "sha256";
|
||||
};
|
||||
};
|
||||
fdt-mpfs-icicle-kit.dtb {
|
||||
description = "Flattened Device Tree blob";
|
||||
data = /incbin/("./mpfs-icicle-kit.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "riscv";
|
||||
compression = "none";
|
||||
load = <0x8a000000>;
|
||||
hash-1 {
|
||||
algo = "sha256";
|
||||
};
|
||||
};
|
||||
fdt-mpfs-icicle-kit-prod.dtb {
|
||||
description = "Flattened Device Tree blob";
|
||||
data = /incbin/("./mpfs-icicle-kit-prod.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "riscv";
|
||||
compression = "none";
|
||||
load = <0x8a000000>;
|
||||
hash-1 {
|
||||
algo = "sha256";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
default = "conf-microchip,mpfs-icicle-kit-prod";
|
||||
conf-microchip,mpfs-icicle-kit {
|
||||
description = "1 Linux kernel, FDT blob";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-mpfs-icicle-kit.dtb";
|
||||
};
|
||||
|
||||
conf-microchip,mpfs-icicle-kit-prod {
|
||||
description = "1 Linux kernel, FDT blob";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-mpfs-icicle-kit-prod.dtb";
|
||||
};
|
||||
|
||||
conf-microchip,fdt-mpfs-icicle-kit.dtb {
|
||||
description = "Base FDT blob for MPFS Icicle board";
|
||||
fdt = "fdt-mpfs-icicle-kit.dtb";
|
||||
};
|
||||
|
||||
conf-microchip,fdt-mpfs-icicle-kit-prod.dtb {
|
||||
description = "Base FDT blob for MPFS Icicle Production board";
|
||||
fdt = "fdt-mpfs-icicle-kit-prod.dtb";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
../linux/linux.hash
|
||||
2
board/microchip/mpfs_icicle/patches/linux/linux.hash
Normal file
2
board/microchip/mpfs_icicle/patches/linux/linux.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally calculated
|
||||
sha256 37191994758d521dc7223cb5010a67ef83bd061bf70194ea522abc9ef2b17391 linux-linux4microchip+fpga-2025.10.tar.gz
|
||||
2
board/microchip/mpfs_icicle/patches/uboot/uboot.hash
Normal file
2
board/microchip/mpfs_icicle/patches/uboot/uboot.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally calculated
|
||||
sha256 591c80f7e16d6f43192deb7ab7587ae81b31ba7c7de1a668c14b9997b6c976c8 uboot-linux4microchip+fpga-2025.10.tar.gz
|
||||
13
board/microchip/mpfs_icicle/post-image.sh
Executable file
13
board/microchip/mpfs_icicle/post-image.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
HSS_PAYLOAD_GENERATOR="${HOST_DIR}"/bin/hss-payload-generator
|
||||
MKIMAGE="${HOST_DIR}"/bin/mkimage
|
||||
BOARD_DIR="$(pwd)"/"${0%/*}"
|
||||
|
||||
pushd "${BINARIES_DIR}"
|
||||
"${HSS_PAYLOAD_GENERATOR}" -c "${BOARD_DIR}"/config.yaml payload.bin
|
||||
cp "${BOARD_DIR}"/mpfs_icicle.its "${BINARIES_DIR}"/mpfs_icicle.its
|
||||
"${MKIMAGE}" -f mpfs_icicle.its mpfs_icicle.itb
|
||||
popd
|
||||
support/scripts/genimage.sh -c "${BOARD_DIR}"/genimage.cfg
|
||||
19
board/microchip/mpfs_icicle/uboot-env.txt
Normal file
19
board/microchip/mpfs_icicle/uboot-env.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
# this assumes ${scriptaddr} is already set!!
|
||||
|
||||
# Try to boot a fitImage from eMMC/SD
|
||||
|
||||
setenv fdt_high 0xffffffffffffffff
|
||||
setenv initrd_high 0xffffffffffffffff
|
||||
|
||||
fdt addr ${fdtcontroladdr}
|
||||
fdt get value board_compatible / compatible 1
|
||||
|
||||
setenv fitconf conf-${board_compatible}
|
||||
|
||||
load mmc 0:${distro_bootpart} ${scriptaddr} mpfs_icicle.itb
|
||||
bootm start ${scriptaddr}#${fitconf}
|
||||
bootm loados ${scriptaddr}
|
||||
bootm ramdisk
|
||||
bootm prep
|
||||
run design_overlays
|
||||
bootm go
|
||||
4
board/microchip/mpfs_icicle/uboot-fragment-rootfs.config
Normal file
4
board/microchip/mpfs_icicle/uboot-fragment-rootfs.config
Normal file
@@ -0,0 +1,4 @@
|
||||
CONFIG_USE_BOOTARGS=y
|
||||
CONFIG_BOOTARGS="root=/dev/mmcblk0p3 rootwait uio_pdrv_genirq.of_id=generic-uio"
|
||||
CONFIG_MPFS_PRIORITISE_QSPI_BOOT=n
|
||||
CONFIG_OF_BOARD=y
|
||||
32
board/microchip/sam9x60ek_mmc/genimage.cfg
Normal file
32
board/microchip/sam9x60ek_mmc/genimage.cfg
Normal file
@@ -0,0 +1,32 @@
|
||||
# Image for SD card boot on Microchip SAM9X60-EK
|
||||
#
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"at91-sam9x60ek.dtb",
|
||||
"boot.bin",
|
||||
"u-boot.bin"
|
||||
}
|
||||
}
|
||||
|
||||
size = 16M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 1M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
||||
32
board/microchip/sama5d2_icp/genimage.cfg
Normal file
32
board/microchip/sama5d2_icp/genimage.cfg
Normal file
@@ -0,0 +1,32 @@
|
||||
# Image for SD card boot on Microchip SAMA5D2 ICP (Industrial Connectivity Platform)
|
||||
#
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"at91-sama5d2_icp.dtb",
|
||||
"boot.bin",
|
||||
"u-boot.bin"
|
||||
}
|
||||
}
|
||||
|
||||
size = 16M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 1M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
||||
31
board/microchip/sama7g5ek/genimage.cfg
Normal file
31
board/microchip/sama7g5ek/genimage.cfg
Normal file
@@ -0,0 +1,31 @@
|
||||
# Image for SD card boot on Microchip SAMA7G5EK (sama7g5 evaluation kit)
|
||||
#
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"at91-sama7g5ek.dtb",
|
||||
"boot.bin",
|
||||
"u-boot.bin"
|
||||
}
|
||||
}
|
||||
size = 16M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 1M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user