Skip to content

Instantly share code, notes, and snippets.

@ddewaele
Last active September 21, 2022 23:56
Show Gist options
  • Save ddewaele/f1b13545586c78ddb545 to your computer and use it in GitHub Desktop.
Save ddewaele/f1b13545586c78ddb545 to your computer and use it in GitHub Desktop.
Edison Linux boot output
******************************
PSH KERNEL VERSION: b0182727
WR: 20104000
******************************
SCU IPC: 0x800000d0 0xfffce92c
PSH miaHOB version: TNG.B0.VVBD.0000000c
microkernel built 23:15:13 Apr 24 2014
******* PSH loader *******
PCM page cache size = 192 KB
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size) = 0x00080000
*** Ready to receive application ***
U-Boot 2014.04 (Oct 12 2014 - 15:29:52)
Watchdog enabled
DRAM: 980.6 MiB
MMC: tangier_sdhci: 0
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
boot >
******************************
PSH KERNEL VERSION: b0182727
WR: 20104000
******************************
SCU IPC: 0x800000d0 0xfffce92c
PSH miaHOB version: TNG.B0.VVBD.0000000c
microkernel built 23:15:13 Apr 24 2014
******* PSH loader *******
PCM page cache size = 192 KB
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size) = 0x00080000
*** Ready to receive application ***
U-Boot 2014.04 (Oct 12 2014 - 15:29:52)
Watchdog enabled
DRAM: 980.6 MiB
MMC: tangier_sdhci: 0
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
Target:blank
Partitioning already done...
Flashing already done...
GADGET DRIVER: usb_dnl_dfu
Setup Size = 0x00003c00
Magic signature found
Using boot protocol version 2.0c
Linux kernel version 3.10.17-poky-edison+ (sys_dswci@ncsndgbuild04) #1 SMP PREEMPT Wed Aug 20 16:09:18 CEST 2014
Building boot_params at 0x00090000
Loading bzImage at address 00100000 (5108832 bytes)
Magic signature found
Kernel command line: "root=PARTUUID=012b3303-34ac-284d-99b4-34e03a2335f4 rootfstype=ext4 console=ttyMFD2 earlyprintk=ttyMFD2,keep loglevel=4 systemd.unit=rescue.target hardware_id=00 g_multi.iSerialNumber=582175d0ceaf07c716ff241689c0a12e g_multi.dev_addr=02:00:86:c0:a1:2e"
Starting kernel ...
[ 0.769018] pca953x 1-0020: failed reading register
[ 0.769428] pca953x 1-0021: failed reading register
[ 0.779310] pca953x 1-0022: failed reading register
[ 0.779702] pca953x 1-0023: failed reading register
[ 1.626300] pmic_ccsm pmic_ccsm: Error reading battery profile from battid frmwrk
[ 1.635193] pmic_ccsm pmic_ccsm: Battery Over heat exception
Welcome to Linux!
Expecting device dev-disk-by\x2dpartlabel-home.device...
[ OK ] Set up automount Arbitrary Executable File Formats F...utomount Point.
[ OK ] Reached target Swap.
[ OK ] Set up automount boot.automount.
[ OK ] Set up automount home.automount.
[ OK ] Created slice Root Slice.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Listening on Journal Socket.
[ OK ] Created slice System Slice.
[ OK ] Created slice system-systemd\x2dfsck.slice.
Starting Remount Root and Kernel File Systems...
Starting Load Kernel Modules...
Starting udev Coldplug all Devices...
Starting Create list of required static device nodes...rrent kernel...
Mounting Debug File System...
Starting Apply Kernel Variables...
Mounting POSIX Message Queue File System...
Starting Journal Service...
[ OK ] Started Journal Service.
Mounting Temporary Directory...
[ OK ] Set up automount factory.automount.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Mounted Debug File System.
[ OK ] Mounted Temporary Directory.
[ OK ] Started Remount Root and Kernel File Systems.
[ OK ] Started Create list of required static device nodes ...current kernel.
[ OK ] Started Apply Kernel Variables.
[ OK ] Started Load Kernel Modules.
[ OK ] Started udev Coldplug all Devices.
Mounting FUSE Control File System...
Mounting Configuration File System...
Starting Create Static Device Nodes in /dev...
Starting Load/Save Random Seed...
[ OK ] Mounted Configuration File System.
[ OK ] Mounted FUSE Control File System.
[ OK ] Started Create Static Device Nodes in /dev.
[ OK ] Started Load/Save Random Seed.
Starting udev Kernel Device Manager...
[ OK ] Reached target Local File Systems (Pre).
Mounting /var/volatile...
[ OK ] Mounted /var/volatile.
[ OK ] Started udev Kernel Device Manager.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Listening on Journal Socket.
[ OK ] Created slice System Slice.
[ OK ] Created slice system-systemd\x2dfsck.slice.
Starting Remount Root and Kernel File Systems...
Starting Load Kernel Modules...
Starting udev Coldplug all Devices...
Starting Create list of required static device nodes...rrent kernel...
Mounting Debug File System...
Starting Apply Kernel Variables...
Mounting POSIX Message Queue File System...
Starting Journal Service...
[ OK ] Started Journal Service.
Mounting Temporary Directory...
[ OK ] Set up automount factory.automount.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Mounted Debug File System.
[ OK ] Mounted Temporary Directory.
[ OK ] Started Remount Root and Kernel File Systems.
[ OK ] Started Create list of required static device nodes ...current kernel.
[ OK ] Started Apply Kernel Variables.
[ OK ] Started Load Kernel Modules.
[ OK ] Started udev Coldplug all Devices.
Mounting FUSE Control File System...
Mounting Configuration File System...
Starting Create Static Device Nodes in /dev...
Starting Load/Save Random Seed...
[ OK ] Mounted Configuration File System.
[ OK ] Mounted FUSE Control File System.
[ OK ] Started Create Static Device Nodes in /dev.
[ OK ] Started Load/Save Random Seed.
Starting udev Kernel Device Manager...
[ OK ] Reached target Local File Systems (Pre).
Mounting /var/volatile...
[ OK ] Started udev Kernel Device Manager.
[ OK ] Mounted /var/volatile.
[ OK ] Reached target Local File Systems.
Starting Trigger Flushing of Journal to Persistent Storage...
Starting Create Volatile Files and Directories...
[ OK ] Started Create Volatile Files and Directories.
[ OK ] Started Trigger Flushing of Journal to Persistent Storage.
[ OK ] Created slice system-systemd\x2drfkill.slice.
Starting Load/Save RF Kill Switch Status of rfkill2...
Starting Load/Save RF Kill Switch Status of rfkill0...
Starting Load/Save RF Kill Switch Status of rfkill1...
Starting Network Time Synchronization...
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Started Load/Save RF Kill Switch Status of rfkill2.
[ OK ] Started Load/Save RF Kill Switch Status of rfkill0.
[ OK ] Started Load/Save RF Kill Switch Status of rfkill1.
[ OK ] Started Network Time Synchronization.
[ OK ] Found device /dev/disk/by-partlabel/home.
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Reached target Sound Card.
Starting File System Check on /dev/disk/by-partlabel/home...
[ OK ] Reached target System Initialization.
[ 6.777944] systemd-fsck[166]: /dev/mmcblk0p10: recovering journal
[ 6.790838] systemd-fsck[166]: /dev/mmcblk0p10: Superblock last mount time is in the future.
[ 6.793319] systemd-fsck[166]: (by less than a day, probably due to the hardware clock being incorrectly set) FIXED.
[ 6.801348] systemd-fsck[166]: /dev/mmcblk0p10: clean, 11/103584 files, 15310/413691 blocks
[ OK ] Started File System Check on /dev/disk/by-partlabel/home.
Mounting /home...
[ OK ] Mounted /home.
Starting Rescue Shell...
[ OK ] Started Rescue Shell.
[ OK ] Reached target Rescue Mode.
HALTS HERE......
Davys-MacBook-Air:toFlash ddewaele$ sudo ./flashall.sh
Using U-Boot target: edison-blank
Now waiting for dfu device 8087:0a99
dfu-util: Device has DFU interface, but has no DFU functional descriptor
Flashing IFWI
dfu-util: Device has DFU interface, but has no DFU functional descriptor
Transfer size must be specified
Download [=========================] 100% 4194304 bytes
Flashing U-Boot
Download [=========================] 100% 245760 bytes
Flashing U-Boot Environment
Download [=========================] 100% 65536 bytes
Flashing U-Boot Environment Backup and rebooting to apply partiton changes
Download [=========================] 100% 65536 bytes
Now waiting for dfu device 8087:0a99
Timed out while waiting for dfu device 8087:0a99
DEBUG: lsusb
./flashall.sh: line 77: lsusb: command not found
DEBUG: dfu-util -l
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to [email protected]
Did you plug and reboot your board?
If yes, please try a recovery by calling this script with the --recovery option
Davys-MacBook-Air:toFlash ddewaele$ sudo ./flashall.sh
Using U-Boot target: edison-blank
Now waiting for dfu device 8087:0a99
dfu-util: Device has DFU interface, but has no DFU functional descriptor
Flashing IFWI
dfu-util: Device has DFU interface, but has no DFU functional descriptor
dfu-util: Transfer size must be specified
Download [=========================] 100% 4194304 bytes
Flashing U-Boot
Download [=========================] 100% 245760 bytes
Flashing U-Boot Environment
Download [=========================] 100% 65536 bytes
Flashing U-Boot Environment Backup and rebooting to apply partiton changes
Download [=========================] 100% 65536 bytes
Now waiting for dfu device 8087:0a99
dfu-util: Device has DFU interface, but has no DFU functional descriptor
Flashing boot partition (kernel)
dfu-util: Transfer size must be specified
Flashing rootfs, (it can take up to 5 minutes... Please be patient)
Download [=========================] 100% 1610612736 bytes
Rebooting
U-boot & Kernel System Flash Success...
Your board needs to reboot twice to complete the flashing procedure, please do not unplug it for 2 minutes.
Davys-MacBook-Air:toFlash ddewaele$
Davys-MacBook-Air:toFlash ddewaele$
Davys-MacBook-Air:toFlash ddewaele$
Davys-MacBook-Air:toFlash ddewaele$
Davys-MacBook-Air:toFlash ddewaele$
Davys-MacBook-Air:toFlash ddewaele$
Davys-MacBook-Air:toFlash ddewaele$ pwd
/Users/ddewaele/Downloads/toFlash
Davys-MacBook-Air:toFlash ddewaele$ vi flashall.sh
Davys-MacBook-Air:toFlash ddewaele$ sudo ./flashall.sh
Password:
Using U-Boot target: edison-blank
Now waiting for dfu device 8087:0a99
dfu-util: Device has DFU interface, but has no DFU functional descriptor
Flashing IFWI
dfu-util: Device has DFU interface, but has no DFU functional descriptor
dfu-util: Transfer size must be specified
Download [=========================] 100% 4194304 bytes
Flashing U-Boot
Download [=========================] 100% 245760 bytes
Flashing U-Boot Environment
Download [=========================] 100% 65536 bytes
Flashing U-Boot Environment Backup and rebooting to apply partiton changes
Download [=========================] 100% 65536 bytes
Now waiting for dfu device 8087:0a99
Flashing boot partition (kernel)
Download [=========================] 100% 5816320 bytes
Flashing rootfs, (it can take up to 5 minutes... Please be patient)
Download [=========================] 100% 1610612736 bytes
Rebooting
U-boot & Kernel System Flash Success...
Your board needs to reboot twice to complete the flashing procedure, please do not unplug it for 2 minutes.
Davys-MacBook-Air:toFlash ddewaele$
Notice here how the second time we see it flashing the boot partition
@ddewaele
Copy link
Author

Solution :
Interrupt boot process and execute run do_flash

The device will put itself in dfu mode allowing you to execute the do_flash

Davys-MacBook-Pro:edison-image-rel1-maint-rel1-ww42-14 ddewaele$ sudo ./flashall.sh 
Password:
Using U-Boot target: edison-blank
Now waiting for dfu device 8087:0a99
Please plug and reboot the board
dfu-util: Device has DFU interface, but has no DFU functional descriptor
Flashing IFWI
dfu-util: Device has DFU interface, but has no DFU functional descriptor
Copying data from PC to DFU device
Flashing U-Boot
Copying data from PC to DFU device
Flashing U-Boot Environment
Copying data from PC to DFU device
Flashing U-Boot Environment Backup
Copying data from PC to DFU device
Flashing boot partition (kernel)
Download    [=========================] 100%      5799936 bytes
Flashing rootfs, (it can take up to 5 minutes... Please be patient)
Copying data from PC to DFU device
******************************
PSH KERNEL VERSION: b0182727
                WR: 20104000
******************************

SCU IPC: 0x800000d0  0xfffce92c

PSH miaHOB version: TNG.B0.VVBD.0000000c

microkernel built 23:15:13 Apr 24 2014

******* PSH loader *******
PCM page cache size = 192 KB 
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size)          = 0x00080000

*** Ready to receive application *** 


U-Boot 2014.04 (Oct 12 2014 - 15:29:52)

       Watchdog enabled
DRAM:  980.6 MiB
MMC:   tangier_sdhci: 0
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0 
boot > run do_flash
Saving Environment to MMC...
Writing to redundant MMC(0)... done
GADGET DRIVER: usb_dnl_dfu
#
DFU complete CRC32: 0x677be95a
DOWNLOAD ... OK
Ctrl+C to exit ...
#
DFU complete CRC32: 0x7d41232d
DOWNLOAD ... OK
Ctrl+C to exit ...
#
DFU complete CRC32: 0x6d41a02b
DOWNLOAD ... OK
Ctrl+C to exit ...
#
DFU complete CRC32: 0x6d41a02b
DOWNLOAD ... OK
Ctrl+C to exit ...
#
DFU complete CRC32: 0xdaddfa4a
DOWNLOAD ... OK
Ctrl+C to exit ...
#######

@ddewaele
Copy link
Author

To install UbiLinux onto the edison I had to first execute ./flashall.sh unchanged :

However, this simply rebooted again into Yocto because it was unable to flash the root FS.
The issue was in this part of the script.

    echo "Flashing U-Boot Environment Backup and rebooting to apply partiton changes"
    flash-command --alt u-boot-env1 -D "${VARIANT_FILE}" -R

    dfu-wait

So after it has done the partioning and rebooted, simply change the snippet above into this (removing the -R and the dfu-wait

    echo "Flashing U-Boot Environment Backup and rebooting to apply partiton changes"
    flash-command --alt u-boot-env1 -D "${VARIANT_FILE}" 

and the rootFS flash should work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment