From 957b77bf113827ec000ec3b83e6a553df28c22bb Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Mon, 5 Aug 2024 18:21:25 +0200 Subject: [PATCH] tizen: add bootcode.bin with RV64 code to jump to sector 34 The bootcode written to the protective MBR (sector zero) has to be proviced by the uboot package instead of being hardcoded in sd_fusing.py script. This makes the SD card flashing proceduce a bit more flexible and prepares sd_fusing for handling more complicated bootcode for other boards. Signed-off-by: Marek Szyprowski Change-Id: I875760aea53acc638a7daffb49927d876367186d --- board/thead/light-c910/tizen/bootcode.bin | Bin 0 -> 4 bytes board/thead/light-c910/tizen/bootcode.txt | 1 + packaging/u-boot-lpi4a-16g.spec | 2 ++ packaging/u-boot-lpi4a-8g.spec | 2 ++ 4 files changed, 5 insertions(+) create mode 100644 board/thead/light-c910/tizen/bootcode.bin create mode 100644 board/thead/light-c910/tizen/bootcode.txt diff --git a/board/thead/light-c910/tizen/bootcode.bin b/board/thead/light-c910/tizen/bootcode.bin new file mode 100644 index 0000000000000000000000000000000000000000..c95ce88e409a65e858c1bb7c8576bb16f3d40ddb GIT binary patch literal 4 Lcmd0IU~m8c0>A+9 literal 0 HcmV?d00001 diff --git a/board/thead/light-c910/tizen/bootcode.txt b/board/thead/light-c910/tizen/bootcode.txt new file mode 100644 index 00000000..a198e618 --- /dev/null +++ b/board/thead/light-c910/tizen/bootcode.txt @@ -0,0 +1 @@ +RV64 'J 0x4400' (sector 34, which is the first free sector after GPT partition table) \ No newline at end of file diff --git a/packaging/u-boot-lpi4a-16g.spec b/packaging/u-boot-lpi4a-16g.spec index de813e60..97659973 100644 --- a/packaging/u-boot-lpi4a-16g.spec +++ b/packaging/u-boot-lpi4a-16g.spec @@ -58,6 +58,7 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/boot mkdir -p %{buildroot}/var/tmp install -m 755 u-boot-with-spl.bin %{buildroot}/var/tmp/ +install -m 755 board/thead/light-c910/tizen/bootcode.bin %{buildroot}/var/tmp/ install -m 755 uboot.env %{buildroot}/boot/ install -m 755 boot.scr.uimg %{buildroot}/boot/ install -m 755 lpi4a/fw_dynamic.bin %{buildroot}/boot/ @@ -70,6 +71,7 @@ install -m 755 lpi4a/light_c906_audio.bin %{buildroot}/boot/ %manifest u_boot_lpi4a-16g.manifest %defattr(-,root,root,-) /var/tmp/u-boot-with-spl.bin +/var/tmp/bootcode.bin /boot/uboot.env /boot/boot.scr.uimg /boot/fw_dynamic.bin diff --git a/packaging/u-boot-lpi4a-8g.spec b/packaging/u-boot-lpi4a-8g.spec index 643dde06..0d6df23a 100644 --- a/packaging/u-boot-lpi4a-8g.spec +++ b/packaging/u-boot-lpi4a-8g.spec @@ -58,6 +58,7 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/boot mkdir -p %{buildroot}/var/tmp install -m 755 u-boot-with-spl.bin %{buildroot}/var/tmp/ +install -m 755 board/thead/light-c910/tizen/bootcode.bin %{buildroot}/var/tmp/ install -m 755 uboot.env %{buildroot}/boot/ install -m 755 boot.scr.uimg %{buildroot}/boot/ install -m 755 lpi4a/fw_dynamic.bin %{buildroot}/boot/ @@ -70,6 +71,7 @@ install -m 755 lpi4a/light_c906_audio.bin %{buildroot}/boot/ %manifest u_boot_lpi4a-8g.manifest %defattr(-,root,root,-) /var/tmp/u-boot-with-spl.bin +/var/tmp/bootcode.bin /boot/uboot.env /boot/boot.scr.uimg /boot/fw_dynamic.bin -- 2.34.1