rootfs.mk 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. define rootfs_template
  4. ifeq ($(ADK_TARGET_ROOTFS_$(2)),y)
  5. ADK_TARGET_FS:=$(1)
  6. FS_CMDLINE:=$(3)
  7. endif
  8. endef
  9. ifeq ($(ADK_TARGET_QEMU),y)
  10. MTDDEV:= root=/dev/mtdblock0
  11. ifeq ($(ADK_TARGET_ROOTFS_ARCHIVE),y)
  12. ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
  13. BLOCKDEV:= root=/dev/vda1
  14. else
  15. BLOCKDEV:= root=/dev/sda1
  16. endif
  17. endif
  18. ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9),y)
  19. BLOCKDEV:= root=/dev/mmcblk0p1
  20. endif
  21. endif
  22. ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB532),y)
  23. BLOCKDEV:= root=/dev/sda2
  24. MTDDEV:= root=/dev/mtdblock1
  25. endif
  26. ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB4XX),y)
  27. MTDDEV:= root=/dev/mtdblock7
  28. endif
  29. ifeq ($(ADK_TARGET_SYSTEM_PHYTEC_WEGA),y)
  30. BLOCKDEV:= root=/dev/mmcblk0p2
  31. endif
  32. ifeq ($(ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20),y)
  33. BLOCKDEV:= root=/dev/mmcblk0p2
  34. endif
  35. ifeq ($(ADK_TARGET_SYSTEM_SHARP_ZAURUS),y)
  36. BLOCKDEV:= root=/dev/sda1
  37. endif
  38. ifeq ($(ADK_TARGET_BOARD_BCM28XX),y)
  39. BLOCKDEV:= root=/dev/mmcblk0p2
  40. endif
  41. ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y)
  42. BLOCKDEV:= root=/dev/mmcblk1p1
  43. endif
  44. ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
  45. USBDEV:= root=/dev/sdb1
  46. endif
  47. $(eval $(call rootfs_template,usb,USB,$(USBDEV) rootwait))
  48. $(eval $(call rootfs_template,archive,ARCHIVE,$(BLOCKDEV) rootwait))
  49. $(eval $(call rootfs_template,initramfs,INITRAMFS,rootfstype=tmpfs))
  50. $(eval $(call rootfs_template,initramfspiggyback,INITRAMFSPIGGYBACK,rootfstype=tmpfs))
  51. $(eval $(call rootfs_template,initramfsarchive,INITRAMFSARCHIVE,rootfstype=tmpfs))
  52. $(eval $(call rootfs_template,squashfs,SQUASHFS,$(MTDDEV) rootfstype=squashfs))
  53. $(eval $(call rootfs_template,ubifs,UBIFS,ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs))
  54. $(eval $(call rootfs_template,jffs2,JFFS2,$(MTDDEV) rootfstype=jffs2))
  55. $(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp))
  56. $(eval $(call rootfs_template,encrypted,ENCRYPTED))
  57. $(eval $(call rootfs_template,iso,ISO))
  58. $(eval $(call rootfs_template,genimage,GENIMAGE))
  59. export ADK_TARGET_FS