Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 27 Nov 2018 03:19 PM by  Qui Le
Error on resetting board to boot RAMDisk image from SD card
 24 Replies
Sort:
You are not authorized to post a reply.
Page 2 of 2 << < 12
Author Messages
Adam Ford
Advanced Member
Advanced Member
Posts:793


--
27 Nov 2018 11:00 AM
I think you used partition by 'b' and I use 'c' so there is a small difference

adam
Qui Le
New Member
New Member
Posts:12


--
27 Nov 2018 12:31 PM
I followed your steps and I still get the same results:


Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0p1: 3.8 GiB, 4012868096 bytes, 7837633 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Command (m for help): d
No partition is defined yet!
Could not delete partition 94661085347609

Command (m for help): p

Disk /dev/mmcblk0p1: 3.8 GiB, 4012868096 bytes, 7837633 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-7837632, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-7837632, default 7837632): +250M

Created a new partition 1 of type 'Linux' and of size 250 MiB.

Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): c
Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

Command (m for help): p
Disk /dev/mmcblk0p1: 3.8 GiB, 4012868096 bytes, 7837633 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1p1 2048 514047 512000 250M c W95 FAT32 (LBA)

Command (m for help): a
Selected partition 1
The bootable flag on partition 1 is enabled now.

Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2):
First sector (514048-7837632, default 514048):
Last sector, +sectors or +size{K,M,G,T,P} (514048-7837632, default 7837632):

Created a new partition 2 of type 'Linux' and of size 3.5 GiB.

Command (m for help): w
The partition table has been altered.
Failed to add partition 1 to system: Invalid argument
Failed to add partition 2 to system: Invalid argument

The kernel still uses the old partitions. The new table will be used at the next reboot.
Syncing disks.


$ sudo fdisk /dev/mmcblk0p1

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0p1: 3.8 GiB, 4012868096 bytes, 7837633 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1p1 * 2048 514047 512000 250M c W95 FAT32 (LBA)
/dev/mmcblk0p1p2 514048 7837632 7323585 3.5G 83 Linux

Command (m for help): q

I then copied the MLO, u-boot.img and other files into the sd card, insert the card into the target board, and power up. Same thing.

Am I missing something?

Also, I tried "dd". Should I use if=/dev/null or if=/dev/zero? The if=/dev/null doesn't seem to anything, whereas the if=/dev/zero did write:
7837634+0 records in
7837633+0 records out
4012868096 bytes (4.0 GB, 3.7 GiB) copied, 494.91 s, 8.1 MB/s
Adam Ford
Advanced Member
Advanced Member
Posts:793


--
27 Nov 2018 02:25 PM
After you partition the card, you need to format the card. Once you've partitioned the card, you shouldn't need to run dd. I was only suggesting using dd to erase the partition table if fdisk wasn't successfull in deleting the partition.

On my computer the SD card is sdb, but it might be something different on yours.

sudo mkfs.vfat /dev/sdb1 -n boot

sudo mkfs.ext4 /dev/sdb2 -L rootfs
Adam Ford
Advanced Member
Advanced Member
Posts:793


--
27 Nov 2018 02:29 PM
Once the card is partitioned, then formatted, you'll need to mount the SD card. When mounted, copy MLO first.

If you're using Ubuntu 16, it should appear in the file cabinet and you should be able to double click to open. It will mount. If not, you may need to manually mount

adam
Qui Le
New Member
New Member
Posts:12


--
27 Nov 2018 03:19 PM
Hi Adam,

I am doing that. I tried fdisk to partition, mkfs to format and then copied MLO first and then the rest of the files. I also tried dd to partition, mkfs to format and then the copying. Both did not work for me.

I also ran the create_sdcard.sh script that I got from your website, and then copied the MLO file first and then the rest. That also did not work for me.

I am about to try and get a hold of another Logic target board to see. The other target board that we have is in a different location/state.


-Qui
You are not authorized to post a reply.
Page 2 of 2 << < 12