Skip to content

Commit ccee81c

Browse files
authored
use updated device tree, avoid oom
workaround `fatal error: th1520-lichee-cluster-4a-16g.dts: No such file or directory`
1 parent 4fddfe2 commit ccee81c

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

bare-metal/elastic-metal/reference-content/elastic-metal-rv1-guidelines.mdx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,35 +72,43 @@ Linux kernel.
7272
cd linux/
7373
make revyos_defconfig
7474
# This can take several hours.
75-
make -j
75+
make -j4
7676
sudo make modules_install
7777
cd ..
7878
```
7979
5. Build OpenSBI.
8080
```bash
8181
cd opensbi/
82-
make PLATFORM=generic -j
82+
make PLATFORM=generic -j4
8383
cd ..
8484
```
8585
6. Build and install the FIT image.
8686
```bash
8787
cd em-rv1/fit/
8888

89+
# Fix path to board device tree
90+
ls -lF ../../linux/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a-16g.dts
91+
vi em-rv1-c4m16s128-a.dts
92+
93+
#include "th1520-lichee-pi-4a-16g.dts"
94+
8995
# Build the device tree
9096
cpp \
9197
-nostdinc \
92-
-I ../linux/arch/riscv/boot/dts/thead/ \
93-
-I ../linux/include/ \
98+
-I ../../linux/arch/riscv/boot/dts/thead/ \
99+
-I ../../linux/include/ \
94100
-undef \
95101
-x assembler-with-cpp \
96102
em-rv1-c4m16s128-a.dts \
97103
| dtc -o em-rv1-c4m16s128-a.dtb
98104

99-
# Build the FIT image
105+
# Build the FIT image and check
100106
sudo mv /boot/boot.itb /boot/boot.itb.bak
101107
sudo mkimage -f em-rv1-c4m16s128-a-boot.its /boot/boot.itb
108+
sha256sum ../../linux/arch/riscv/boot/Image
109+
sudo mkimage -l /boot/boot.itb
102110

103-
cd -
111+
cd ../..
104112
```
105113
7. Reboot the server to load the new kernel.
106114

0 commit comments

Comments
 (0)