RE: PICO-PI-IMX7 and Siging In/Um?


#77

@RobertCNelson,

Sir…Seth here. I am still trying here. Um, The u-boot cli is stuck on:

=> reset
resetting ...

I figured it is b/c of the dfu 0 mmc 0 command in u-boot. I tried to use it and then I went to my dev. desktop to put in the sudo dfu-util -D SPL -a spl command. I was unable to do so again. Now, when I listen to the instructions you gave me for,

    sudo dd if=/dev/zero of=${DISK} bs=1M count=10
    sudo sfdisk /dev/sdb <<-__EOF__
    1M,,L,*
    __EOF__

    sudo mkfs.ext4 -L rootfs /dev/sdb1

I get an error.

Seth

P.S. The error is the same as above, i.e.

torx@forket:~/u-boot$ sudo dfu-util -D SPL -a spl
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util: No DFU capable USB device available

#78

@silver2row, What does U-Boot console show?

Regards,


#79
=> ums 0 mmc 0
UMS: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x720000
CTRL+C - Operation aborted
=> reset
resetting ...

Right now, this is what u-boot console shows. While the cmd dfu 0 mmc 0 is typed and after I press enter, nothing.

It just makes me think that I need to use the cmd in the development desktop.

Seth


#80

@silver2row, you only need to use run “dfu 0 mmc 0” once, it’s mostly about updating the ancient default bootloader (while in USB Boot Mode) to mainline U-Boot, so we can boot in eMMC Boot mode with a U-Boot that has a good version of “ums 0 mmc 0”…

At this point you have a good version of U-Boot in the eMMC, just mount the drive with “ums 0 mmc 0” and write the rootfs to the drive.

Regards,


#81

Sir,

I am confused on this section: https://www.digikey.com/eewiki/display/linuxonarm/PICO-PI-IMX7#PICO-PI-IMX7-SetupmicroSDcard.

Where it states this cmd: export DISK=/dev/mmcblk0

Should I use /dev/sdb or /dev/sdb0?

Seth

P.S. I have more questions. I am fooled by that section b/c of errors I am coming across. Just for reference, I have tried under /dev /sdb, /sdb0, and /sdb1. All of which have given me errors.


#82

@silver2row, i re-wrote that section to better explain the two common block names that occur with microSD cards. You need to use “lsblk” and use the base storage device name shown for the DISK variable. In your case you would use “/dev/sdb” as that would be the device… “/dev/sdb0” would be invalid, partitions do not start with “0”…

Regards,


#83

@RobertCNelson:

Sir,

I think this is what I did. I typed in export DISK=/dev/sdb0 as in zero. I also may have, b/c I could not get the instructions to work, used export DISK=/dev/sdb1.

Anyway, now is the time when I cannot get my board booted. I cannot use the dfu 0 mmc 0 cmd in u-boot any longer and I am stuck.

Please send suggestions.

Seth

P.S. If I used sdb0 or sdb1, please let me know if you know of a workaround. Also sir, on the mount and format partitions sections, I have been clumsy to say the least. I used sdb, sdb0, and sdb1.


#84

@silver2row, why did you add a “0” at the end of /dev/sdb? You should have used “export DISK=/dev/sdb”

Start again from the beginning, your eMMC is likely in a corrupted state.

Regards,


#85

Yes Sir,

Should I rm -r and then reinstall everything?

Seth

P.S. B/c if that is the issue I have made myself come into, I cannot use dfu 0 mmc 0 still. Is there any workaround?


#86

why?

No, can you get to u-boot prompt?

Regards,


#87

Yes Sir,

I can get to u-boot in USB Boot Mode.

Seth

P.S. Oh and sir, the reason I used sdb0 was b/c of this line in the instructions, " Example: for DISK=/dev/mmcblkX, when X was 0 in the old instruction log. I just thought I could exchange X (0) from mmcblk0 to sdb0. That is the answer. My fault. I know now.


#88

Okay, do this again:

First run on the Pico:

ums 0 mmc 0

Next, on your development machine: (replace DISK with /dev/sdX, look at lsblk and use the new driver that’s the pico…)

sudo dd if=/dev/zero of=${DISK} bs=1M count=10

sudo sfdisk ${DISK} <<-__EOF__
1M,,L,*
__EOF__

sudo mkfs.ext4 -L rootfs ${DISK}1

Now in u-boot kill the “ums 0 mmc 0” and rerun the “dfu 0 mmc 0”…

The “/dev/mmcblkX” node is special when compare to a normal block device…

Normal Block devices go: /dev/sda -> /dev/sdb -> /dev/sdc, with partitions starting with “1, 2, 3…”

Where as the “/dev/mmcblkX” devices goes: /dev/mmcblk0 -> /dev/mmcblk1 -> /dev/mmcblk2 with partitions starting, p1, p2, p3…

Regards,


#91

Sir,

sudo sfdisk ${DISK} <<-__EOF__
> 1m,,L,*
> __EOF__
Checking that no-one is using this disk right now ... FAILED

This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.

sfdisk: Use the --force flag to overrule all checks.

Seth

P.S. This is when I run: sudo sfdisk ${DISK} <<-EOF and I have gotten this error before. I tried things I know but I have failed so far.


#92

@silver2row, have you disabled your kde/gnome/xfce/cinnamon/lxqt’s auto drive mounter?

Regards,


#93

No sir,

I have not done that yet. I will get on it.

Seth


#94

Sir,

Do I need to build the Linux Kernel every time I make errors w/ the instructions or is it there for future use, as is?

Seth

P.S. I removed automount in my Ubuntu Desktop. I guess I will restart the machine and see if it took place.


#95

Sir,

Well, I have a new error:

Checking that no-one is using this disk right now ... OK

Disk /dev/sdb: 539.5 KiB, 552448 bytes, 1079 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

>>> Created a new DOS disklabel with disk identifier 0xd5747866.
/dev/sdb1: Start sector 2048 out of range.
Failed to add #1 partition: Numerical result out of range
Leaving.

This is w/ the cmd in the dev. desktop: sudo sfdisk ${DISK} <<-__EOF__

Seth

P.S. I am moving on from here and trying more items. If you come up w/ any ideas, please contact me when you have some time.


#96

@silver2row

Disk /dev/sdb: 539.5 KiB, 552448 bytes, 1079 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

So the “eMMC” on your PICO is now 539.5KiB in size…

umount the drive

sudo umount /dev/sdb

Fully unplug the PICO…

and delete the invalid device node…

sudo rm -rf /dev/sdb

and start again… It sounds like you dd’ed SPL/u-boot.img before you mounted the eMMC…

Regards,


#97

Yes Sir,

I tried to set up from scratch again. I am getting an error at dfu 0 mmc 0 in the u-boot console.

Seth

P.S. Here it is: I know we walked through this before. I erased/removed the /dev/sdb dir. and tried to umount the board but umount stated that the board was not mounted.

=> dfu 0 mmc 0
Couldn’t find part #1 on mmc device #0
DFU entities configuration failed!
(partition table does not match dfu_alt_info?)
dfu - Device Firmware Upgrade

Usage:
dfu <USB_controller> [list]

  • device firmware upgrade via <USB_controller>
    on device , attached to interface
    [list] - list available alt settings

#98
dfu 0 mmc 0
Couldn’t find part #1 on mmc device #0
DFU entities configuration failed!

DFU needs a valid partition, so do this again…

First run on the Pico:

ums 0 mmc 0

Next, on your development machine: (replace DISK with /dev/sdX, look at lsblk and use the new driver that’s the pico…)

sudo dd if=/dev/zero of=${DISK} bs=1M count=10

sudo sfdisk ${DISK} <<-__EOF__
1M,,L,*
__EOF__

sudo mkfs.ext4 -L rootfs ${DISK}1

Regards,