I cannot figure out why the SABRE board does not boot from the SD Card when I put Linux on it.
I have been following the document named i.MX_6Dual6Quad_Sabre-AI_Linux_User's_Guide.pdf. I've attached it at well. The instructions are actually listed under "Chapter 8 Using a Linux Host to Set Up an SD/MMC Card".
The steps I followed are the following:
1) Got a new 8 GB Micro SD with SD Adapter
2) Plugged card into a Ubuntu desktop machine (Ubuntu 12.04.3 LTS) and plugged the card into the slot. The card is recognized as '/dev/sdb'.
3) Next, I called umount '/dev/sdb' to ensure that I could modify the partitions (NOTE: '/dev/sdb1' or '/dev/sdb2', etc.. were not mounted).
4) Executed command to write the bootloader binary image to disk (SD Card):
sudo dd if=/home/user/Downloads/L3.0.35_4.1.0_130816_images_MX6/u-boot-mx6dl-sabreauto.bin of=/dev/sdb bs=512 seek=2 skip=2 conv=fsync
5) Executed command to copy the Linux OS image to disk (SD card):
sudo dd if=/home/user/Downloads/L3.0.35_4.1.0_130816_images_MX6/uImage of=/dev/sdb bs=512 conv=fsync
6) Setup partitioning on the SD card by calling
sudo fdisk /dev/sdb
6-a) Enter the 'u' key until terminal shows it has switched to sectors instead of cylinders ("Changing display/entry units to cylinders (DEPRECATED!)" -> "Changing display/entry units to sectors").
6-b) Enter the 'd' key until the terminal shows there are no more partitions ("No partition is defined yet!").
6-c) Enter the 'n' key to create a partition.
6-d) Enter the 'p' key to create a primary partition.
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
6-e) Enter the '1' key to specify that it is the first partition.
Partition number (1-4, default 1):
6-f) Specify 16384 for the first sector offset.
First sector (2048-15564799, default 2048):
6-g) Nest, press the enter key to take the default value.
Last sector, +sector or +size{K,M,G} (16384-15564799, default 15564799):
6-h) Press the 'w' key to write the partition table to SD card and exit the fdisk application.
7) Format the newly created partition using the following command:
sudo mkfs.ext4 /dev/sdb1
8) Create a new directory.
mkdir /home/user/mountpoint
9) Mount the new partition to that directory:
sudo mount /dev/sdb1 /home/user/mountpoint
10) Unzip the root file system compressed file
gunzip /home/user/Downloads/L3.0.35_4.1.0_130816_images_MX6/rootfs.ext2.gz
11) Create a new directory:
mkdir /home/user/rootfs
12) Mount the uncompressed root file system to the directory
sudo mount -o loop -t ext2 /home/user/Downloads/L3.0.35_4.1.0_130816_images_MX6/rootfs.ext2 /home/user/rootfs
13) Enter the newly created directory and with new mount point.
cd /home/user/rootfs
14) Copy the file system contents to the new partition.
sudo cp -a * /home/kzawada/mountpoint
15) Dismount the SD card partition and give it a little bit of time to finish writing all the data.
sudo umount /home/kzawada/mountpoint
16) Unplug the SD Card once writing is finished and plug in to Freescale SABRE i.MX6 Series board.
17) Plug-in the USB Cable for debug and setup a terminal.
18) Plug in the power cord.
19) Press the reset button.
At this point there is no response at all on the debug board or indication the LCD screen that something is happening.
I am able to boot from an SD card that contains Android and Windows Embedded Compact 7 on the same board. This leads me to believe that the way the the SD card is written (MBR, partitions, etc...) is incorrect and the board cannot boot from this SD card.
What could be wrong with the procedure of programming the SD card?
解決済! 解決策の投稿を見る。
1.
Under items 4) and 5) – looks like – “u-boot-mx6dl-sabreauto.bin” is rewritten
by uImage, assuming uImage size if greater than (512 x 2) bytes.
So, please try at first to write and boot only U-boot.
2.
It makes sense to use the recent Linux BSP (L3.14.28) for i.MX6, please refer
to the following Web.
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6_SW
http://www.freescale.com/webapp/Download?colCode=L3.14.28_1.0.0_iMX6QDLS_BUNDLE
3.
For the SABRE-SD You may use SD demo images (.sdcard fime extention), such as
"fsl-image-qt5-x11-imx6qdlsolo.sdcard".
Please use the next Linux command to deploy it to SD card :
$ sudo dd if= fsl-image-qt5-x11-imx6qdlsolo.sdcard of=/dev/sdb bs=1M
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi!why I can't get the u-Boot-mx6q-sabreauto.bin ,how did you get it?Hope to your repsponse.
Which development hardware are you using?
MCIMX6Q-SDB
MCIMX6Q-SDP
MCIMX6DL-SDP
MCIMX6SX-SDB
where can I enter these commands,in HyperTerminal ??? or something else???
I am using MCIMX6Q-SDP,,
Yep, you can use one of many terminal emulator programs (HyperTerminal, TerraTerm, Putty, or many others). There is a USB cable to connect for debug and terminal emulation on the MCIMX6Q-SDP board (MCIMX6DL-SDP Freescale Semiconductor | MCIMX6DL-SDP-ND | DigiKey ).
In my instance, once I programmed MCIMX6Q-SDP with 'fsl-L3.14.28_1.0.0_iMX6qdls_Bundle/L3.14.28_1.0.0_ga_images_MX6/fsl-image-qt5-x11-imx6qdlsolo.sdcard', I did not need to set any of the parameters with a terminal. It just booted and the GUI was displayed.
You mean that I can enter these commands in hyper terminal,right ? I want to try this first,if can not ,I will try you method. Thank you!
Yes, you can do that through debug terminal. In case you use HyperTerminal then so be it.
Thank you very much!I was be able to set up the board using your method with 'fsl-L3.14.28_1.0.0_iMX6qdls_Bundle/L3.14.28_1.0.0_ga_images_MX6/fsl-image-qt5-x11-imx6qdlsolo.sdcard'!but if I want to patch AVB kernel in the uImage,can I use 'fsl-L3.14.28_1.0.0_iMX6qdls_Bundle/L3.14.28_1.0.0_ga_images_MX6/fsl-image-qt5-x11-imx6qdlsolo.sdcard', if so,would you attach some documents or material?Thank you!
Create a new thread for this.
Hi,would please help me find where goes wrong ?The following is how I do it:
1.
root@ubuntu:/# cat /proc/partitions
major minor #blocks name
7 0 663364 loop0
8 0 20971520 sda
8 1 20049088 sda1
8 2 1 sda2
8 5 915673 sda5
8 48 7885824 sdd
8 49 7885792 sdd1
and then my device is sdd and sdd1,
2.copy the bootloader "u-boot-mx6q-sabresd.bin"
root@ubuntu:/home/alue/L3.0.35_4.1.0_130816_images_MX6# sudo dd if=u-boot-mx6q-sabresd.bin of=/dev/sdd bs=512 seek=2 skip=2 conv=fsync
841+1 records in
841+1 records out
430672 bytes (431 kB) copied, 1.13507 s, 379 kB/s
3.copy the uImage
root@ubuntu:/home/alue/L3.0.35_4.1.0_130816_images_MX6# sudo dd if=uImage of=/dev/sdd bs=512 seek=2048 conv=fsync
7551+1 records in
7551+1 records out
3866508 bytes (3.9 MB) copied, 11.7355 s, 329 kB/s
4.copy the root file system
root@ubuntu:/home/alue/L3.0.35_4.1.0_130816_images_MX6# sudo fdisk /dev/sdd
The number of cylinders for this disk is set to 2139.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): u
Changing display/entry units to sectors
Command (m for help): d
Selected partition 1
Command (m for help): d
No partition is defined yet!
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First sector (39-15771647, default 39): 16384
Last sector, +sectors or +size{K,M,G} (16384-15771647, default 15771647):
Using default value 15771647
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
and then,"sudo mkfs.ext3 /dev/sdd1"
root@ubuntu:/home/alue/L3.0.35_4.1.0_130816_images_MX6# sudo mkfs.ext3 /dev/sdd1
mke2fs 1.41.4 (27-Jan-2009)
/dev/sdd1 is mounted; will not make a filesystem here!
root@ubuntu:/home/alue/L3.0.35_4.1.0_130816_images_MX6# umount /dev/sdd1
root@ubuntu:/home/alue/L3.0.35_4.1.0_130816_images_MX6# sudo mkfs.ext3 /dev/sdd1
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
492880 inodes, 1971448 blocks
98572 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2021654528
61 block groups
32768 blocks per group, 32768 fragments per group
8080 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
after this,
root@ubuntu:/mnt# mkdir /home/user/mountpoint
root@ubuntu:/mnt# sudo mount /dev/sdd1 /home/user/mountpoint
finally,
root@ubuntu:/home/alue# mount -o loop -t ext2 rootfs.ext2 /home/user/rootfs
root@ubuntu:/home/alue# cd /home/user/rootfs
root@ubuntu:/home/user/rootfs# sudo cp -a * /home/user/mountpoint
root@ubuntu:/home/user/rootfs# sudo umount /home/user/mountpoint
but when I
Unplug the SD Card once writing is finished and plug in to Freescale SABRE i.MX6 Series board.
Plug-in the USB Cable for debug and setup a terminal.
Plug in the power cord.
Press the reset button.
At this point there is no response at all on the debug board or indication the LCD screen that something is happening.
Hope to your response!!!
I'm not sure what you are trying to do or what your question is. Why are you programming the *.bin files? Just program the *.sdcard file mentioned above.
Can you please start a new discussion about what the exact issue is on the i.MX community forum:
sorry,I don't understand what you mean,would you please explain more specificly!Thank you !
Hi ,I am using MCIMX6Q-SDP,and I found that.Thank you for your response!
1.
Under items 4) and 5) – looks like – “u-boot-mx6dl-sabreauto.bin” is rewritten
by uImage, assuming uImage size if greater than (512 x 2) bytes.
So, please try at first to write and boot only U-boot.
2.
It makes sense to use the recent Linux BSP (L3.14.28) for i.MX6, please refer
to the following Web.
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6_SW
http://www.freescale.com/webapp/Download?colCode=L3.14.28_1.0.0_iMX6QDLS_BUNDLE
3.
For the SABRE-SD You may use SD demo images (.sdcard fime extention), such as
"fsl-image-qt5-x11-imx6qdlsolo.sdcard".
Please use the next Linux command to deploy it to SD card :
$ sudo dd if= fsl-image-qt5-x11-imx6qdlsolo.sdcard of=/dev/sdb bs=1M
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Yuri, thanks for your feedback. Finally, got something working.
I tried just programming u-boot using the following command:
user_name@computer:~$ sudo dd if=/home/user_name/Downloads/L3.0.35_4.1.0_130816_images_MX6/u-boot-mx6q-sabreauto.bin of=/dev/sdb bs=512 seek=2 conv=fsync
332+1 records in
332+1 records out
170220 bytes (170 kB) copied, 0.114487 s, 1.5 MB/s
user_name@computer:~$
user_name@computer:~$ sudo dd if=/home/user_name/Downloads/L3.0.35_4.1.0_130816_images_MX6/u-boot-mx6dl-sabreauto.bin of=/dev/sdb bs=512 seek=2 conv=fsync
316+1 records in
316+1 records out
162280 bytes (162 kB) copied, 0.06722 s, 2.4 MB/s
user_name@computer:~$
However, still no response from the USB-to-serial debug port. Also, nothing on the LCD (via LVDS) screen either.
The great news is that writing the entire SD Card image worked great.
user_name@computer:~$ sudo dd if=/home/user_name/Downloads/fsl-L3.14.28_1.0.0_iMX6qdls_Bundle/L3.14.28_1.0.0_ga_images_MX6/fsl-image-qt5-x11-imx6qdlsolo.sdcard of=/dev/sdb bs=1M
[sudo] password for user:
1444+0 records in
1444+0 records out
1514143744 bytes (1.5 GB) copied, 69.1884 s, 21.9 MB/s
user_name@computer:~$
I can definitely work with that and move forward.
Still makes me wonder why the following the Freescale instructions does not work to simply program the SD card and see Linux boot.
Please try to use U-boot for SABRE-SD (not sabreauto).
Regards,
Yuri.
Yuri,
Is there anyway to determine which options 'fsl-image-qt5-x11-imx6qdlsolo.sdcard' was built with?
Was it built with the following:
$ MACHINE=imx6qsabresd source fsl-setup-release.sh -b build-x11 -e x11
$ bitbake fsl-image-gt5
How can I determine this? Is there a way to search in the image to determine this?
Hello !
I think it would be reasonable to create new thread regarding demo images creation.
(I have no answer right now, but the topic is intersting)
Regards,
Yuri.
I see what you mean by overwriting uboot with uImage. I was missing a command line parameter (seek=2048):
sudo dd if=uImage of=/dev/sdb bs=512 conv=fsync
sudo dd if=uImage of=/dev/sdb bs=512 seek=2048 conv=fsync
Now, after just programing uboot as suggested:
user_name@computer:~$ sudo dd if=/home/user_name/Downloads/L3.0.35_4.1.0_130816_images_MX6/u-boot-mx6q-sabresd.bin of=/dev/sdb bs=512 seek=2 skip=2 conv=fsync
841+1 records in
841+1 records out
430672 bytes (431 kB) copied, 0.178134 s, 2.4 MB/s
user_name@computer:~$
It worked, I saw the board boot up using uboot. I decided to follow the remainder of the steps and program uImage as well as create a partition and fill it with data.
user_name@computer:~$ sudo dd if=/home/user_name/Downloads/L3.0.35_4.1.0_130816_images_MX6/uImage of=/dev/sdb bs=512 seek=2048 conv=fsync
7551+1 records in
7551+1 records out
3866508 bytes (3.9 MB) copied, 1.16317 s, 3.3 MB/s
user_name@computer:~$
I was able to boot up and uboot showed it was trying to get an image using TFTP.
Therefore, in the terminal executed the following commands (used LVDS0 for the display):
setenv loadaddr 0x10800000
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk1p1 rootwait rw video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666'
setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc dev 2;mmc read ${loadaddr} 0x800 0x2000;bootm'
setenv bootcmd 'run bootcmd_mmc'
saveenv
run bootcmd
This made the LCD show the BusyBox GUI which was great.
I ran into a couple of items which I saw were not working:
- The keyboard would not work in the BusyBox terminal, but the mouse worked.
- Could not login to the debug terminal.
freescale login: linaro
Password:
Login incorrect
freescale login:
Otherwise, really happy that it booted Linux.
A few questiones I want to consult you!
1.After compile LTIB(Linux Target Image Builder),it will generate uImage,however,in your instance ,what you use is uImage you download from the official website,what should I use?
2.In the "user guide"you attached before,it says:first ,copy bootloader,it says we use '‘but it didn't work ,so we change it for '',and it worked;
second,it says ,copy uImage ,here I have a question ,in no1.I have asked;
third,it says,we should copy the root file system,but in you instance ,you did not do this ,why ,should I skip it ?or I miss you mean?
Hope to your replay !Thank you very much!
You may try login "root" (with empty password).
Regards,
Yuri.