Booting to Linux from an SD Card/MMC for P2010

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Booting to Linux from an SD Card/MMC for P2010

Booting to Linux from an SD Card/MMC for P2010

To boot to Linux from an SD card/MMC, it is assumed that all following configuration files for booting are in the same directory under a Linux machine:

  • RAM-based U-Boot image (u-boot.bin)
  • Kernel image (uImage)
  • Flat device tree file (mpc8536ds.dtb)
  • Root file syste (rootfs.ext2.gz.uboot)
  • Latest boot-format

Perform the following sequence of tasks to boot to Linux from an SD card/MMC; note that the MPC8536DS system is used as an example:

  • Plug an empty SD card/MMC into the Linux machine.
  • Use Linux command fdisk to create two partitions: one 512-Mbyte FAT16 and one ext2/ext3 with remainder of the available disk size.
  • Use Linux command mkfs to create the FAT file system for the first partition.
  • Use mkfs to create the ext2/ext3 file system for the second partitions
  • Follow the procedure for putting a Boot Image on an SD Card/MMC.
  • Use boot_format to put the boot image on the card.
  • Put the root file system (rootfs.ext2.gz.uboot) on the second partition using the following commands:
   — dd if=rootfs.ext2.gz.uboot of=rootfs.gz bs=64 skip=64    — gunzip rootfs.gz    — dd if=rootfs of=/dev/sdc2
  • Mount the FAT system (mount /dev/sdc1 /mnt/tmp).
  • Copy the kernel file (cp uImage /mnt/tmp) and flat device tree file (cp mpc8536ds.dtb /mnt/tmp) to the root directory of the FAT system.

 

TIP

  • After above step is performed properly, all the required files and information are on the SD card/MMC.
  • Unmount the FAT system (umount /mnt/tmp).
  • If a Linux desk PC is used:

a) Unplug the SD card/MMC from this PC. b) Plug the SD card/MMC into a system that is going to boot from this card.

 

标签 (1)
%3CLINGO-SUB%20id%3D%22lingo-sub-1112814%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E4%BB%8E%20P2010%20%E7%9A%84%20SD%20%E5%8D%A1%2FMMC%20%E5%90%AF%E5%8A%A8%20Linux%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1112814%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dutf-8%22%20%2F%26gt%3B%0A%3CP%3E%E8%A6%81%E4%BB%8E%20SD%20%E5%8D%A1%2FMMC%20%E5%90%AF%E5%8A%A8%20Linux%EF%BC%8C%E5%81%87%E5%AE%9A%E4%BB%A5%E4%B8%8B%E6%89%80%E6%9C%89%E5%90%AF%E5%8A%A8%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E9%83%BD%E4%BD%8D%E4%BA%8E%20Linux%20%E6%9C%BA%E5%99%A8%E4%B8%8B%E7%9A%84%E5%90%8C%E4%B8%80%E7%9B%AE%E5%BD%95%E4%B8%AD%EF%BC%9A%3C%2FP%3E%3CUL%3E%3CLI%3E%E5%9F%BA%E4%BA%8E%20RAM%20%E7%9A%84%20U-Boot%20%E6%98%A0%E5%83%8F%20(u-boot.bin)%3C%2FLI%3E%3CLI%3EKernel%20image%20(uImage)%3C%2FLI%3E%3CLI%3E%E5%B9%B3%E9%9D%A2%E8%AE%BE%E5%A4%87%E6%A0%91%E6%96%87%E4%BB%B6%EF%BC%88mpc8536ds.dtb%EF%BC%89%3C%2FLI%3E%3CLI%3E%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%EF%BC%88rootfs.ext2.gz.uboot%EF%BC%89%3C%2FLI%3E%3CLI%3E%E6%9C%80%E6%96%B0%E7%9A%84%E5%90%AF%E5%8A%A8%E6%A0%BC%E5%BC%8F%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%E6%89%A7%E8%A1%8C%E4%BB%A5%E4%B8%8B%E4%BB%BB%E5%8A%A1%E5%BA%8F%E5%88%97%E4%BB%8E%20SD%20%E5%8D%A1%2FMMC%20%E5%90%AF%E5%8A%A8%20Linux%EF%BC%9B%E8%AF%B7%E6%B3%A8%E6%84%8F%EF%BC%8C%E4%BB%A5%20MPC8536DS%20%E7%B3%BB%E7%BB%9F%E4%B8%BA%E4%BE%8B%EF%BC%9A%3C%2FP%3E%3CUL%3E%3CLI%3E%E5%B0%86%E7%A9%BA%E7%9A%84%20SD%20%E5%8D%A1%2FMMC%20%E6%8F%92%E5%85%A5%20Linux%20%E6%9C%BA%E5%99%A8%E3%80%82%3C%2FLI%3E%3CLI%3E%E4%BD%BF%E7%94%A8%20Linux%20%E5%91%BD%E4%BB%A4%20fdisk%20%E5%88%9B%E5%BB%BA%E4%B8%A4%E4%B8%AA%E5%88%86%E5%8C%BA%EF%BC%9A%E4%B8%80%E4%B8%AA%20512%20MB%20%E7%9A%84%20FAT16%20%E5%88%86%E5%8C%BA%E5%92%8C%E4%B8%80%E4%B8%AA%20ext2%2Fext3%20%E5%88%86%E5%8C%BA%EF%BC%8C%E5%89%A9%E4%BD%99%E5%8F%AF%E7%94%A8%E7%A3%81%E7%9B%98%E5%A4%A7%E5%B0%8F%E3%80%82%3C%2FLI%3E%3CLI%3E%E4%BD%BF%E7%94%A8Linux%E5%91%BD%E4%BB%A4mkfs%E4%B8%BA%E7%AC%AC%E4%B8%80%E4%B8%AA%E5%88%86%E5%8C%BA%E5%88%9B%E5%BB%BAFAT%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%E3%80%82%3C%2FLI%3E%3CLI%3E%E4%BD%BF%E7%94%A8%20mkfs%20%E4%B8%BA%E7%AC%AC%E4%BA%8C%E4%B8%AA%E5%88%86%E5%8C%BA%E5%88%9B%E5%BB%BA%20ext2%2Fext3%20%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%3C%2FLI%3E%3CLI%3E%E6%8C%89%E7%85%A7%E4%BB%A5%E4%B8%8B%E6%AD%A5%E9%AA%A4%E5%B0%86%E5%90%AF%E5%8A%A8%E6%98%A0%E5%83%8F%E6%94%BE%E5%85%A5%20SD%20%E5%8D%A1%2FMMC%E3%80%82%3C%2FLI%3E%3CLI%3E%E4%BD%BF%E7%94%A8%20boot_format%20%E5%B0%86%E5%90%AF%E5%8A%A8%E6%98%A0%E5%83%8F%E6%94%BE%E5%9C%A8%E5%8D%A1%E4%B8%8A%E3%80%82%3C%2FLI%3E%3CLI%3E%E4%BD%BF%E7%94%A8%E4%BB%A5%E4%B8%8B%E5%91%BD%E4%BB%A4%E5%B0%86%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%EF%BC%88rootfs.ext2.gz.uboot%EF%BC%89%E6%94%BE%E5%9C%A8%E7%AC%AC%E4%BA%8C%E4%B8%AA%E5%88%86%E5%8C%BA%E4%B8%8A%EF%BC%9A%3C%2FLI%3E%3C%2FUL%3E%3CPRE%20translate%3D%22no%22%3E%26nbsp%3B%26nbsp%3B%20%E2%80%94%20dd%20if%3Drootfs.ext2.gz.uboot%20of%3Drootfs.gz%20bs%3D64%20skip%3D64%20%26nbsp%3B%26nbsp%3B%20%E2%80%94%20gunzip%20rootfs.gz%20%26nbsp%3B%26nbsp%3B%20%E2%80%94%20dd%20if%3Drootfs%20of%3D%2Fdev%2Fsdc2%3C%2FPRE%3E%3CUL%3E%3CLI%3E%E6%8C%82%E8%BD%BD%20FAT%20%E7%B3%BB%E7%BB%9F%EF%BC%88mount%20%2Fdev%2Fsdc1%20%2Fmnt%2Ftmp%EF%BC%89%E3%80%82%3C%2FLI%3E%3CLI%3E%E5%B0%86%E5%86%85%E6%A0%B8%E6%96%87%E4%BB%B6%EF%BC%88cp%20uImage%20%2Fmnt%2Ftmp%EF%BC%89%E5%92%8C%E5%B9%B3%E9%9D%A2%E8%AE%BE%E5%A4%87%E6%A0%91%E6%96%87%E4%BB%B6%EF%BC%88cp%20mpc8536ds.dtb%20%2Fmnt%2Ftmp%EF%BC%89%E5%A4%8D%E5%88%B6%E5%88%B0FAT%E7%B3%BB%E7%BB%9F%E7%9A%84%E6%A0%B9%E7%9B%AE%E5%BD%95%E3%80%82%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CEM%3E%26nbsp%3B%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3ETIP%3C%2FEM%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%E6%AD%A3%E7%A1%AE%E6%89%A7%E8%A1%8C%E4%B8%8A%E8%BF%B0%E6%AD%A5%E9%AA%A4%E5%90%8E%EF%BC%8C%E6%89%80%E6%9C%89%E5%BF%85%E9%9C%80%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8C%E4%BF%A1%E6%81%AF%E9%83%BD%E5%9C%A8%20SD%20%E5%8D%A1%2FMMC%20%E4%B8%8A%E3%80%82%3C%2FLI%3E%3CLI%3E%E5%8D%B8%E8%BD%BD%20FAT%20%E7%B3%BB%E7%BB%9F%20(umount%20%2Fmnt%2Ftmp)%E3%80%82%3C%2FLI%3E%3CLI%3E%E5%A6%82%E6%9E%9C%E4%BD%BF%E7%94%A8%20Linux%20%E5%8F%B0%E5%BC%8F%E7%94%B5%E8%84%91%EF%BC%9A%3C%2FLI%3E%3C%2FUL%3E%3CP%3Ea)%20%E4%BB%8E%E8%BF%99%E5%8F%B0%E7%94%B5%E8%84%91%E4%B8%8A%E6%8B%94%E4%B8%8B%20SD%20%E5%8D%A1%2FMMC%E3%80%82b)%20%E5%B0%86%20SD%20%E5%8D%A1%2FMMC%20%E6%8F%92%E5%85%A5%E5%B0%86%E4%BB%8E%E8%AF%A5%E5%8D%A1%E5%90%AF%E5%8A%A8%E7%9A%84%E7%B3%BB%E7%BB%9F%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22mce_paste_marker%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1112814%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EQorIQ%20P2%E8%AE%BE%E5%A4%87%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
无评分
版本历史
最后更新:
‎09-10-2020 02:19 AM
更新人: