Filesystems 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /*
  2. * File: Documentation/blackfin/Filesystems
  3. * Based on:
  4. * Author:
  5. *
  6. * Created:
  7. * Description: This file contains the simple DMA Implementation for Blackfin
  8. *
  9. * Rev: $Id: Filesystems 2384 2006-11-01 04:12:43Z magicyang $
  10. *
  11. * Modified:
  12. * Copyright 2004-2006 Analog Devices Inc.
  13. *
  14. * Bugs: Enter bugs at http://blackfin.uclinux.org/
  15. *
  16. */
  17. How to mount the root file system in uClinux/Blackfin
  18. -----------------------------------------------------
  19. 1 Mounting EXT3 File system.
  20. ------------------------
  21. Creating an EXT3 File system for uClinux/Blackfin:
  22. Please follow the steps to form the EXT3 File system and mount the same as root
  23. file system.
  24. a Make an ext3 file system as large as you want the final root file
  25. system.
  26. mkfs.ext3 /dev/ram0 <your-rootfs-size-in-1k-blocks>
  27. b Mount this Empty file system on a free directory as:
  28. mount -t ext3 /dev/ram0 ./test
  29. where ./test is the empty directory.
  30. c Copy your root fs directory that you have so carefully made over.
  31. cp -af /tmp/my_final_rootfs_files/* ./test
  32. (For ex: cp -af uClinux-dist/romfs/* ./test)
  33. d If you have done everything right till now you should be able to see
  34. the required "root" dir's (that's etc, root, bin, lib, sbin...)
  35. e Now unmount the file system
  36. umount ./test
  37. f Create the root file system image.
  38. dd if=/dev/ram0 bs=1k count=<your-rootfs-size-in-1k-blocks> \
  39. > ext3fs.img
  40. Now you have to tell the kernel that will be mounting this file system as
  41. rootfs.
  42. So do a make menuconfig under kernel and select the Ext3 journaling file system
  43. support under File system --> submenu.
  44. 2. Mounting EXT2 File system.
  45. -------------------------
  46. By default the ext2 file system image will be created if you invoke make from
  47. the top uClinux-dist directory.
  48. 3. Mounting CRAMFS File System
  49. ----------------------------
  50. To create a CRAMFS file system image execute the command
  51. mkfs.cramfs ./test cramfs.img
  52. where ./test is the target directory.
  53. 4. Mounting ROMFS File System
  54. --------------------------
  55. To create a ROMFS file system image execute the command
  56. genromfs -v -V "ROMdisk" -f romfs.img -d ./test
  57. where ./test is the target directory
  58. 5. Mounting the JFFS2 Filesystem
  59. -----------------------------
  60. To create a compressed JFFS filesystem (JFFS2), please execute the command
  61. mkfs.jffs2 -d ./test -o jffs2.img
  62. where ./test is the target directory.
  63. However, please make sure the following is in your kernel config.
  64. /*
  65. * RAM/ROM/Flash chip drivers
  66. */
  67. #define CONFIG_MTD_CFI 1
  68. #define CONFIG_MTD_ROM 1
  69. /*
  70. * Mapping drivers for chip access
  71. */
  72. #define CONFIG_MTD_COMPLEX_MAPPINGS 1
  73. #define CONFIG_MTD_BF533 1
  74. #undef CONFIG_MTD_UCLINUX
  75. Through the u-boot boot loader, use the jffs2.img in the corresponding
  76. partition made in linux-2.6.x/drivers/mtd/maps/bf533_flash.c.
  77. NOTE - Currently the Flash driver is available only for EZKIT. Watch out for a
  78. STAMP driver soon.
  79. 6. Mounting the NFS File system
  80. -----------------------------
  81. For mounting the NFS please do the following in the kernel config.
  82. In Networking Support --> Networking options --> TCP/IP networking -->
  83. IP: kernel level autoconfiguration
  84. Enable BOOTP Support.
  85. In Kernel hacking --> Compiled-in kernel boot parameter add the following
  86. root=/dev/nfs rw ip=bootp
  87. In File system --> Network File system, Enable
  88. NFS file system support --> NFSv3 client support
  89. Root File system on NFS
  90. in uClibc menuconfig, do the following
  91. In Networking Support
  92. enable Remote Procedure Call (RPC) support
  93. Full RPC Support
  94. On the Host side, ensure that /etc/dhcpd.conf looks something like this
  95. ddns-update-style ad-hoc;
  96. allow bootp;
  97. subnet 10.100.4.0 netmask 255.255.255.0 {
  98. default-lease-time 122209600;
  99. max-lease-time 31557600;
  100. group {
  101. host bf533 {
  102. hardware ethernet 00:CF:52:49:C3:01;
  103. fixed-address 10.100.4.50;
  104. option root-path "/home/nfsmount";
  105. }
  106. }
  107. ensure that /etc/exports looks something like this
  108. /home/nfsmount *(rw,no_root_squash,no_all_squash)
  109. run the following commands as root (may differ depending on your
  110. distribution) :
  111. - service nfs start
  112. - service portmap start
  113. - service dhcpd start
  114. - /usr/sbin/exportfs