chromium.mk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. define Build/cros-gpt
  2. cp $@ [email protected] 2>/dev/null || true
  3. ptgen -o [email protected] -g \
  4. -T cros_kernel -N kernel -p $(CONFIG_TARGET_KERNEL_PARTSIZE)m \
  5. -N rootfs -p $(CONFIG_TARGET_ROOTFS_PARTSIZE)m
  6. cat [email protected] >> $@
  7. rm [email protected]
  8. endef
  9. define Build/append-kernel-part
  10. dd if=$(IMAGE_KERNEL) bs=$(CONFIG_TARGET_KERNEL_PARTSIZE)M conv=sync >> $@
  11. endef
  12. # NB: Chrome OS bootloaders replace the '%U' in command lines with the UUID of
  13. # the kernel partition it chooses to boot from. This gives a flexible way to
  14. # consistently build and sign kernels that always use the subsequent
  15. # (PARTNROFF=1) partition as their rootfs.
  16. define Build/cros-vboot
  17. $(STAGING_DIR_HOST)/bin/cros-vbutil \
  18. -k $@ -c "root=PARTUUID=%U/PARTNROFF=1" -o [email protected]
  19. @mv [email protected] $@
  20. endef
  21. define Device/google_wifi
  22. DEVICE_VENDOR := Google
  23. DEVICE_MODEL := WiFi (Gale)
  24. SOC := qcom-ipq4019
  25. KERNEL_SUFFIX := -fit-zImage.itb.vboot
  26. KERNEL = kernel-bin | fit none $$(KDIR)/image-$$(DEVICE_DTS).dtb | cros-vboot
  27. KERNEL_NAME := zImage
  28. IMAGES += factory.bin
  29. IMAGE/factory.bin := cros-gpt | append-kernel-part | append-rootfs
  30. # Note: Chromium/Depthcharge-based bootloaders insert a reserved-memory
  31. # ramoops node into the Device Tree automatically, so we can use
  32. # kmod-ramoops.
  33. DEVICE_PACKAGES := partx-utils mkf2fs e2fsprogs \
  34. kmod-fs-ext4 kmod-fs-f2fs kmod-google-firmware \
  35. kmod-ramoops
  36. endef
  37. TARGET_DEVICES += google_wifi