aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ipq40xx')
-rw-r--r--target/linux/ipq40xx/image/chromium.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/image/chromium.mk b/target/linux/ipq40xx/image/chromium.mk
new file mode 100644
index 0000000000..15d4c1a077
--- /dev/null
+++ b/target/linux/ipq40xx/image/chromium.mk
@@ -0,0 +1,22 @@
+define Build/cros-gpt
+ cp $@ $@.tmp 2>/dev/null || true
+ ptgen -o $@.tmp -g \
+ -T cros_kernel -N kernel -p $(CONFIG_TARGET_KERNEL_PARTSIZE)m \
+ -N rootfs -p $(CONFIG_TARGET_ROOTFS_PARTSIZE)m
+ cat $@.tmp >> $@
+ rm $@.tmp
+endef
+
+define Build/append-kernel-part
+ dd if=$(IMAGE_KERNEL) bs=$(CONFIG_TARGET_KERNEL_PARTSIZE)M conv=sync >> $@
+endef
+
+# NB: Chrome OS bootloaders replace the '%U' in command lines with the UUID of
+# the kernel partition it chooses to boot from. This gives a flexible way to
+# consistently build and sign kernels that always use the subsequent
+# (PARTNROFF=1) partition as their rootfs.
+define Build/cros-vboot
+ $(STAGING_DIR_HOST)/bin/cros-vbutil \
+ -k $@ -c "root=PARTUUID=%U/PARTNROFF=1" -o $@.new
+ @mv $@.new $@
+endef