Script to Flash a Linux System into a SD card

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

Script to Flash a Linux System into a SD card

Script to Flash a Linux System into a SD card

This is a generic script which flashes a Linux System (U-boot, uImage and root filesystem) into a SD card.

Steps:

    1. Download the script into a Linux system

    2. Make the script executable (chmod +x mk_mx_sd)

    3. Run it with '-H' to know its usage.

    4. Run the script with real parameters, specifying the paths for U-boot, uImage and the root filesystem as seen above

    5. Plug the SD into your target, boot the board and change the corresponding U-boot variables

$ IMAGE=/data/BSP/L2.6.35_11.09.01_ER/L2.6.35_11.09.01_ER_images_MX5X

$ ./mk_mx_sd  -d /dev/sdc \

                      -u $IMAGE/u-boot-mx53-loco.bin \

                      -k $IMAGE/uImage \

                      -r $IMAGE/rootfs

    6. In case you only want to flash a single binary (like U-boot), just specify the U-boot parameter (-u)

Labels (1)
%3CLINGO-SUB%20id%3D%22lingo-sub-1103777%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EScript%20to%20Flash%20a%20Linux%20System%20into%20a%20SD%20card%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1103777%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThis%20is%20a%20generic%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Flsandoval%2FiMX%2Fblob%2Fmaster%2Fflash%2Fmk_mx_sd%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Escript%20%3C%2FA%3Ewhich%20flashes%20a%20Linux%20System%20(U-boot%2C%20uImage%20and%20root%20filesystem)%20into%20a%20SD%20card.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ESteps%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%201.%20Download%20the%20script%20into%20a%20Linux%20system%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%202.%20Make%20the%20script%20executable%20(chmod%20%2Bx%20mk_mx_sd)%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%203.%20Run%20it%20with%20'-H'%20to%20know%20its%20usage.%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%204.%20Run%20the%20script%20with%20real%20parameters%2C%20specifying%20the%20paths%20for%20U-boot%2C%20uImage%20and%20the%20root%20filesystem%20as%20seen%20above%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%205.%20Plug%20the%20SD%20into%20your%20target%2C%20boot%20the%20board%20and%20change%20the%20corresponding%20U-boot%20variables%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%24%20IMAGE%3D%2Fdata%2FBSP%2FL2.6.35_11.09.01_ER%2FL2.6.35_11.09.01_ER_images_MX5X%3C%2FP%3E%3CP%3E%24%20.%2Fmk_mx_sd%26nbsp%3B%20-d%20%2Fdev%2Fsdc%20%5C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-u%20%24IMAGE%2Fu-boot-mx53-loco.bin%20%5C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-k%20%24IMAGE%2FuImage%20%5C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-r%20%24IMAGE%2Frootfs%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%206.%20In%20case%20you%20only%20want%20to%20flash%20a%20single%20binary%20(like%20U-boot)%2C%20just%20specify%20the%20U-boot%20parameter%20(-u)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1103777%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎12-11-2012 09:20 AM
Updated by: