* [yocto][meta-rockchip][PATCH] rk3288: Convert to using wic
@ 2019-12-11 19:36 Joshua Watt
2019-12-12 6:22 ` Trevor Woerner
0 siblings, 1 reply; 2+ messages in thread
From: Joshua Watt @ 2019-12-11 19:36 UTC (permalink / raw)
To: yocto; +Cc: twoerner, Joshua Watt
Coverts the firefly-rk3288, tinker-rk3288, and vyasa-rk3288 machines to
use wic instead of the rockchip-gpt-img class. The rock2-squared machine
has to keep the older image class because u-boot doesn't provided a
combined idbloader for it.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
conf/machine/firefly-rk3288.conf | 15 ++++++++++++++-
conf/machine/include/rk3288.inc | 2 --
conf/machine/rock2-square.conf | 6 ++++++
conf/machine/tinker-rk3288.conf | 15 ++++++++++++++-
conf/machine/vyasa-rk3288.conf | 14 ++++++++++++++
wic/firefly-rk3288.wks | 26 ++++++++++++++++++++++++++
wic/tinker-rk3288.wks | 26 ++++++++++++++++++++++++++
wic/vyasa-rk3288.wks | 27 +++++++++++++++++++++++++++
8 files changed, 127 insertions(+), 4 deletions(-)
create mode 100644 wic/firefly-rk3288.wks
create mode 100644 wic/tinker-rk3288.wks
create mode 100644 wic/vyasa-rk3288.wks
diff --git a/conf/machine/firefly-rk3288.conf b/conf/machine/firefly-rk3288.conf
index 0900440..71e0bc3 100644
--- a/conf/machine/firefly-rk3288.conf
+++ b/conf/machine/firefly-rk3288.conf
@@ -10,4 +10,17 @@ require conf/machine/include/rk3288.inc
KERNEL_DEVICETREE = "rk3288-firefly.dtb"
UBOOT_MACHINE = "firefly-rk3288_defconfig"
-GPTIMG_APPEND = "console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk0p7 rootfstype=ext4 init=/sbin/init"
+
+WKS_FILE = "firefly-rk3288.wks"
+IMAGE_FSTYPES += "wic"
+
+WKS_FILE_DEPENDS ?= " \
+ mtools-native \
+ dosfstools-native \
+ virtual/bootloader \
+ virtual/kernel \
+ "
+IMAGE_BOOT_FILES ?= "\
+ ${KERNEL_IMAGETYPE} \
+ ${KERNEL_DEVICETREE} \
+ "
diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
index 6e9a09a..b261692 100644
--- a/conf/machine/include/rk3288.inc
+++ b/conf/machine/include/rk3288.inc
@@ -12,5 +12,3 @@ SERIAL_CONSOLES = "115200;ttyS2"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
SPL_BINARY ?= "idbloader.img"
-IMAGE_FSTYPES += "rockchip-gpt-img"
-IMAGE_CLASSES += "rockchip-gpt-img"
diff --git a/conf/machine/rock2-square.conf b/conf/machine/rock2-square.conf
index 737d3ae..46064ee 100644
--- a/conf/machine/rock2-square.conf
+++ b/conf/machine/rock2-square.conf
@@ -11,3 +11,9 @@ require conf/machine/include/rk3288.inc
SPL_BINARY = "u-boot-spl-dtb.bin"
KERNEL_DEVICETREE = "rk3288-rock2-square.dtb"
UBOOT_MACHINE = "rock2_defconfig"
+
+# This board doesn't support the combined idbloader, so resort to the older
+# image class
+IMAGE_FSTYPES += "rockchip-gpt-img"
+IMAGE_CLASSES += "rockchip-gpt-img"
+
diff --git a/conf/machine/tinker-rk3288.conf b/conf/machine/tinker-rk3288.conf
index 9e23f8d..e460d43 100644
--- a/conf/machine/tinker-rk3288.conf
+++ b/conf/machine/tinker-rk3288.conf
@@ -9,4 +9,17 @@ require conf/machine/include/rk3288.inc
KERNEL_DEVICETREE = "rk3288-tinker.dtb"
UBOOT_MACHINE = "tinker-rk3288_defconfig"
-GPTIMG_APPEND = "console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk0p7 rootfstype=ext4 init=/sbin/init"
+
+WKS_FILE = "tinker-rk3288.wks"
+IMAGE_FSTYPES += "wic"
+
+WKS_FILE_DEPENDS ?= " \
+ mtools-native \
+ dosfstools-native \
+ virtual/bootloader \
+ virtual/kernel \
+ "
+IMAGE_BOOT_FILES ?= "\
+ ${KERNEL_IMAGETYPE} \
+ ${KERNEL_DEVICETREE} \
+ "
diff --git a/conf/machine/vyasa-rk3288.conf b/conf/machine/vyasa-rk3288.conf
index bfbd09b..03a436a 100644
--- a/conf/machine/vyasa-rk3288.conf
+++ b/conf/machine/vyasa-rk3288.conf
@@ -12,3 +12,17 @@ KERNEL_DEVICETREE = "rk3288-vyasa.dtb"
KERNEL_EXTRA_ARGS += "LOADADDR=0x02000000"
UBOOT_MACHINE = "vyasa-rk3288_defconfig"
+
+WKS_FILE = "vyasa-rk3288.wks"
+IMAGE_FSTYPES += "wic"
+
+WKS_FILE_DEPENDS ?= " \
+ mtools-native \
+ dosfstools-native \
+ virtual/bootloader \
+ virtual/kernel \
+ "
+IMAGE_BOOT_FILES ?= "\
+ ${KERNEL_IMAGETYPE} \
+ ${KERNEL_DEVICETREE} \
+ "
diff --git a/wic/firefly-rk3288.wks b/wic/firefly-rk3288.wks
new file mode 100644
index 0000000..5013aea
--- /dev/null
+++ b/wic/firefly-rk3288.wks
@@ -0,0 +1,26 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidiaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+#
+# Disk layout
+# Note that the reference documentation refers to 512 byte disk sectors, but
+# wic uses 1KB blocks
+#
+# Partition Start Sector Number of Sectors
+# loader1 64 8000
+# reserved1 8064 128
+# reserved2 8192 8192
+# loader2 16384 8192
+# atf 24576 8192
+# boot 32768 229376
+# root 262144 -
+#
+
+part loader1 --ondisk mmcblk0 --align 32 --size 4000K --source rawcopy --sourceparams="file=idbloader.img"
+part reserved1 --ondisk mmcblk0 --align 4032 --size 64K
+part reserved2 --ondisk mmcblk0 --align 4096 --size 4096K
+part loader2 --ondisk mmcblk0 --align 8192 --size 4096K --source rawcopy --sourceparams="file=u-boot.bin"
+part atf --ondisk mmcblk0 --align 12288 --size 4096K
+part /boot --ondisk mmcblk0 --align 16384 --size=114688K --active --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
+part / --ondisk mmcblk0 --align 131072 --source rootfs --fstype=ext4 --label root
+
+bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk0p7 rootfstype=ext4 init=/sbin/init"
diff --git a/wic/tinker-rk3288.wks b/wic/tinker-rk3288.wks
new file mode 100644
index 0000000..5013aea
--- /dev/null
+++ b/wic/tinker-rk3288.wks
@@ -0,0 +1,26 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidiaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+#
+# Disk layout
+# Note that the reference documentation refers to 512 byte disk sectors, but
+# wic uses 1KB blocks
+#
+# Partition Start Sector Number of Sectors
+# loader1 64 8000
+# reserved1 8064 128
+# reserved2 8192 8192
+# loader2 16384 8192
+# atf 24576 8192
+# boot 32768 229376
+# root 262144 -
+#
+
+part loader1 --ondisk mmcblk0 --align 32 --size 4000K --source rawcopy --sourceparams="file=idbloader.img"
+part reserved1 --ondisk mmcblk0 --align 4032 --size 64K
+part reserved2 --ondisk mmcblk0 --align 4096 --size 4096K
+part loader2 --ondisk mmcblk0 --align 8192 --size 4096K --source rawcopy --sourceparams="file=u-boot.bin"
+part atf --ondisk mmcblk0 --align 12288 --size 4096K
+part /boot --ondisk mmcblk0 --align 16384 --size=114688K --active --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
+part / --ondisk mmcblk0 --align 131072 --source rootfs --fstype=ext4 --label root
+
+bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk0p7 rootfstype=ext4 init=/sbin/init"
diff --git a/wic/vyasa-rk3288.wks b/wic/vyasa-rk3288.wks
new file mode 100644
index 0000000..3fc9a5b
--- /dev/null
+++ b/wic/vyasa-rk3288.wks
@@ -0,0 +1,27 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidiaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+#
+# Disk layout
+# Note that the reference documentation refers to 512 byte disk sectors, but
+# wic uses 1KB blocks
+#
+# Partition Start Sector Number of Sectors
+# loader1 64 8000
+# reserved1 8064 128
+# reserved2 8192 8192
+# loader2 16384 8192
+# atf 24576 8192
+# boot 32768 229376
+# root 262144 -
+#
+
+part loader1 --ondisk mmcblk2 --align 32 --size 4000K --source rawcopy --sourceparams="file=idbloader.img"
+part reserved1 --ondisk mmcblk2 --align 4032 --size 64K
+part reserved2 --ondisk mmcblk2 --align 4096 --size 4096K
+part loader2 --ondisk mmcblk2 --align 8192 --size 4096K --source rawcopy --sourceparams="file=u-boot.bin"
+part atf --ondisk mmcblk2 --align 12288 --size 4096K
+part /boot --ondisk mmcblk2 --align 16384 --size=114688K --active --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
+part / --ondisk mmcblk2 --align 131072 --source rootfs --fstype=ext4 --label root
+
+bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk2p7 rootfstype=ext4 init=/sbin/init"
+
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [yocto][meta-rockchip][PATCH] rk3288: Convert to using wic
2019-12-11 19:36 [yocto][meta-rockchip][PATCH] rk3288: Convert to using wic Joshua Watt
@ 2019-12-12 6:22 ` Trevor Woerner
0 siblings, 0 replies; 2+ messages in thread
From: Trevor Woerner @ 2019-12-12 6:22 UTC (permalink / raw)
To: Joshua Watt; +Cc: yocto
Super awesome! Applied, thanks :-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-12 6:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 19:36 [yocto][meta-rockchip][PATCH] rk3288: Convert to using wic Joshua Watt
2019-12-12 6:22 ` Trevor Woerner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.