SD card, eMMC cure, about Bootloader Linux

Source: Internet
Author: User

I. Burn the bootloader into the SD card

1. Format SD card (not mounted): fdisk/dev/sdx-d Delete-N New partition-W save exit 6~default sdx1

Two ways to format: Mkfs-t vfat/dev/sdx1

Mkfs.vfat/dev/sdx1

2. Burn the bootloader into the SD card: NOTE-no mount

./SD_FUSING.SH/DEV/SDX the SD card into the Development board after execution and starts in minicom

Note: Partitioning is the operation of the entire device (SDX) instead of (SDX1)

Two. Burn the linux/andriod system into the SD card, and then solidify the EMMC operation.

1. Format SD card (not mounted): fdisk/dev/sdx-d Delete-N New partition-W save exit 6~default sdx1

Two ways to format: Mkfs-t vfat/dev/sdx1

Mkfs.vfat/dev/sdx1

2. Burn the linux/andriod system into the SD card (without mounting):

./sd_write/dev/sdb. /images/superboot.bin

3. Copy image to Sdx1 (Mount first):

Mount/dev/sdx1/media

CP images/media/*

Three. Burning the Linux kernel

Minicom Common commands:

PRINTENV: Print Environment variables

Bootargs: Startup parameters that determine how the root file system mounts after kernel boot

Bootcmd: For self-booting of the kernel

HELP,BOOTM,MMC List,mmcinfo 0,ext2format,ext2load

1. Partition: Fdisk-p 1 Print partition information

Fdisk-c 1 320 2057 520 (can and only) be divided into four partitions (the remaining space is automatically a partition)

2. Format: Fatformat MMC 1:1

Ext3format MMC 1:2

Ext3format MMC 1:3

Ext3format MMC 1:4

3. Burn write bootloader to eMMC:

eMMC Open 1--opening EMMC

MMC write 1 40000000 0 10

MMC write 1 40000000 10 20 The number of logical blocks is 16 binary

MMC write 1 40000000 30 290

MMC write 1 40000000 2c0 ba

eMMC Close 1--Close eMMC

Note: To this step, you can restart the EMMC mode, transfer the Linux kernel from the PC to the Development Board, and use the minicom to transmit

Then BOOTM 40008000//boot the kernel

  

4. Burn write Linu kernel and root file system to eMMC 23rd partition:

First step: Attach the Board to the NFS virtual file system

Mkdir/nfsroot

Add/nfsroot * (rm,sync,no_root_squash) to file/etc/exports

Restart the NFS Services service NFS Restart

Copy inittab file CP inittab/nfsroot/etc

Set Startup parameters set Bootargs "Root=/dev/nfs nfsroot=192.168.0.222:/nfsroot ip=192.168.0.20

LCD=S70 console=ttysac0,115200 INIT=LINUXRC "

Saving Save

Note: Ctrl + A (release) W: Turn on wrap (because there are too many variables, you must wrap the line)

Second step: Copy the kernel and root file system with virtual file system

Copy the kernel to the second partition of eMMC

Mount Mount/dev/mmcblk0p2/mnt

Copy the kernel CP zimage/mnt (copy the zimage to the shared directory Nfsroot in the PC)

Uninstall EMMC Second Partition umount/mnt

          

Copy the root file system to the third partition of eMMC

Mount Mount/dev/mmcblk0p3/mnt

Copy root file system CP root_qt*/mnt (first copy root_qt* to shared directory Nfsroot in PC)//Error

Uninstall eMMC Third Partition umount/mnt

Copy inittab--root file system missing part

PC-side: CP inittab/nfsroot/etc/

Minicom Development Board: CP/ETC/INITTAB/MNT/ETC

Note: After manual reset, start from eMMC, next set environment variable in minicom

5. Set the variable:

Set kernel self-boot set bootcmd "ext2load mmc 0:2 40008000 zimage;bootm 40008000"

Set Startup parameters set Bootargs "Root=/dev/mmcblk0p3 console=ttysac0,115200 init=linuxrc lcd=s70"

Saving Save

Note: The EMMC has four partitions, where: the first partition bootloader

Second Partition kernel

Third Partition root file system

2016-01-19

SD card, eMMC cure, about Bootloader Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.