Booting to Linux from an SD Card/MMC for P2010

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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.

 

Labels (1)
%3CLINGO-SUB%20id%3D%22lingo-sub-1112814%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBooting%20to%20Linux%20from%20an%20SD%20Card%2FMMC%20for%20P2010%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1112814%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ETo%20boot%20to%20Linux%20from%20an%20SD%20card%2FMMC%2C%20it%20is%20assumed%20that%20all%20following%20configuration%20files%20for%20booting%20are%20in%20the%20same%20directory%20under%20a%20Linux%20machine%3A%3C%2FP%3E%3CUL%3E%3CLI%3ERAM-based%20U-Boot%20image%20(u-boot.bin)%3C%2FLI%3E%3CLI%3EKernel%20image%20(uImage)%3C%2FLI%3E%3CLI%3EFlat%20device%20tree%20file%20(mpc8536ds.dtb)%3C%2FLI%3E%3CLI%3ERoot%20file%20syste%20(rootfs.ext2.gz.uboot)%3C%2FLI%3E%3CLI%3ELatest%20boot-format%3C%2FLI%3E%3C%2FUL%3E%3CP%3EPerform%20the%20following%20sequence%20of%20tasks%20to%20boot%20to%20Linux%20from%20an%20SD%20card%2FMMC%3B%20note%20that%20the%20MPC8536DS%20system%20is%20used%20as%20an%20example%3A%3C%2FP%3E%3CUL%3E%3CLI%3EPlug%20an%20empty%20SD%20card%2FMMC%20into%20the%20Linux%20machine.%3C%2FLI%3E%3CLI%3EUse%20Linux%20command%20fdisk%20to%20create%20two%20partitions%3A%20one%20512-Mbyte%20FAT16%20and%20one%20ext2%2Fext3%20with%20remainder%20of%20the%20available%20disk%20size.%3C%2FLI%3E%3CLI%3EUse%20Linux%20command%20mkfs%20to%20create%20the%20FAT%20file%20system%20for%20the%20first%20partition.%3C%2FLI%3E%3CLI%3EUse%20mkfs%20to%20create%20the%20ext2%2Fext3%20file%20system%20for%20the%20second%20partitions%3C%2FLI%3E%3CLI%3EFollow%20the%20procedure%20for%20putting%20a%20Boot%20Image%20on%20an%20SD%20Card%2FMMC.%3C%2FLI%3E%3CLI%3EUse%20boot_format%20to%20put%20the%20boot%20image%20on%20the%20card.%3C%2FLI%3E%3CLI%3EPut%20the%20root%20file%20system%20(rootfs.ext2.gz.uboot)%20on%20the%20second%20partition%20using%20the%20following%20commands%3A%3C%2FLI%3E%3C%2FUL%3E%3CPRE%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%3EMount%20the%20FAT%20system%20(mount%20%2Fdev%2Fsdc1%20%2Fmnt%2Ftmp).%3C%2FLI%3E%3CLI%3ECopy%20the%20kernel%20file%20(cp%20uImage%20%2Fmnt%2Ftmp)%20and%20flat%20device%20tree%20file%20(cp%20mpc8536ds.dtb%20%2Fmnt%2Ftmp)%20to%20the%20root%20directory%20of%20the%20FAT%20system.%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%3EAfter%20above%20step%20is%20performed%20properly%2C%20all%20the%20required%20files%20and%20information%20are%20on%20the%20SD%20card%2FMMC.%3C%2FLI%3E%3CLI%3EUnmount%20the%20FAT%20system%20(umount%20%2Fmnt%2Ftmp).%3C%2FLI%3E%3CLI%3EIf%20a%20Linux%20desk%20PC%20is%20used%3A%3C%2FLI%3E%3C%2FUL%3E%3CP%3Ea)%20Unplug%20the%20SD%20card%2FMMC%20from%20this%20PC.%20b)%20Plug%20the%20SD%20card%2FMMC%20into%20a%20system%20that%20is%20going%20to%20boot%20from%20this%20card.%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%20Devices%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎09-10-2020 02:19 AM
Updated by: