rootfs.mk 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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_HARDWARE_QEMU),y)
  10. MTDDEV:= root=/dev/mtdblock0
  11. ifeq ($(ADK_TARGET_ROOTFS_ARCHIVE),y)
  12. ROOTFS:= root=/dev/sda1
  13. endif
  14. ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
  15. ROOTFS:= root=/dev/vda1
  16. endif
  17. endif
  18. ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB532),y)
  19. ROOTFS:= root=/dev/sda2
  20. MTDDEV:= root=/dev/mtdblock1
  21. endif
  22. ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB4XX),y)
  23. MTDDEV:= root=/dev/mtdblock2
  24. endif
  25. ifeq ($(ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20),y)
  26. ROOTFS:= root=/dev/mmcblk0p2 rootwait
  27. endif
  28. ifeq ($(ADK_TARGET_SYSTEM_SHARP_ZAURUS),y)
  29. ROOTFS:= root=/dev/sda1 rootwait
  30. endif
  31. ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
  32. USB:= rootwait
  33. else
  34. USB:= rootdelay=2
  35. endif
  36. $(eval $(call rootfs_template,genext2fs,GENEXT2FS,$(ROOTFS)))
  37. $(eval $(call rootfs_template,cf,CF,$(ROOTFS)))
  38. $(eval $(call rootfs_template,mmc,MMC,$(ROOTFS)))
  39. $(eval $(call rootfs_template,usb,USB,$(USB)))
  40. $(eval $(call rootfs_template,archive,ARCHIVE,$(ROOTFS)))
  41. $(eval $(call rootfs_template,initramfs,INITRAMFS))
  42. $(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK))
  43. $(eval $(call rootfs_template,squashfs,SQUASHFS,$(ROOTFS)))
  44. $(eval $(call rootfs_template,yaffs,YAFFS,$(MTDDEV) panic=3))
  45. $(eval $(call rootfs_template,jffs2,JFFS2,$(MTDDEV) rootfstype=jffs2))
  46. $(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp init=/init))
  47. $(eval $(call rootfs_template,encrypted,ENCRYPTED))
  48. $(eval $(call rootfs_template,iso,ISO))
  49. export ADK_TARGET_FS