rootfs.mk 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. ROOTFS:= root=/dev/vda1
  14. else
  15. ROOTFS:= root=/dev/sda1 rootwait
  16. endif
  17. endif
  18. endif
  19. ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB532),y)
  20. ROOTFS:= root=/dev/sda2
  21. MTDDEV:= root=/dev/mtdblock1
  22. endif
  23. ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB4XX),y)
  24. MTDDEV:= root=/dev/mtdblock7
  25. endif
  26. ifeq ($(ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20),y)
  27. ROOTFS:= root=/dev/mmcblk0p2 rootwait
  28. endif
  29. ifeq ($(ADK_TARGET_SYSTEM_SHARP_ZAURUS),y)
  30. ROOTFS:= root=/dev/sda1 rootwait
  31. endif
  32. ifeq ($(ADK_TARGET_SYSTEM_CUBOX_I),y)
  33. ROOTFS:= root=/dev/mmcblk0p1 rootwait
  34. endif
  35. ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
  36. USB:= rootwait root=/dev/sdc1
  37. else
  38. USB:= rootdelay=2
  39. endif
  40. $(eval $(call rootfs_template,usb,USB,$(USB)))
  41. $(eval $(call rootfs_template,archive,ARCHIVE,$(ROOTFS)))
  42. $(eval $(call rootfs_template,initramfs,INITRAMFS,rootfstype=tmpfs))
  43. $(eval $(call rootfs_template,initramfspiggyback,INITRAMFSPIGGYBACK,rootfstype=tmpfs))
  44. $(eval $(call rootfs_template,initramfsarchive,INITRAMFSARCHIVE,rootfstype=tmpfs))
  45. $(eval $(call rootfs_template,squashfs,SQUASHFS,$(MTDDEV) rootfstype=squashfs))
  46. $(eval $(call rootfs_template,yaffs,YAFFS,$(MTDDEV) panic=3))
  47. $(eval $(call rootfs_template,jffs2,JFFS2,$(MTDDEV) rootfstype=jffs2))
  48. $(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp))
  49. $(eval $(call rootfs_template,encrypted,ENCRYPTED))
  50. $(eval $(call rootfs_template,iso,ISO))
  51. export ADK_TARGET_FS