Intermittent Boot Issues
#12
(06-03-2020, 08:50 PM)lot378 Wrote: Were any error checks omitted in the excerpt above? The dd commands send stdout and stderr to null nothing to read.

Doing that without checking for errors or testing to verify may be a bad action.

The script I am looking at does a file check to make sure the image files exist. That is pretty much it...


Code:
echo "Updating U-Boot..."
SYSPART=$(findmnt -n -o SOURCE /)
if echo $SYSPART | grep -qE 'p[0-9]$' ; then
DEVID=$(echo $SYSPART | sed -e s+'p[0-9]$'+''+)
else
DEVID=$(echo $SYSPART | sed -e s+'[0-9]$'++)
fi
echo Identified $DEVID as device to flash uboot to...
if [ -f $DIR/idbloader.img ] ; then
echo "Upgrading idbloader.img..."
dd if=$DIR/idbloader.img of=$DEVID bs=32k seek=1 conv=fsync &>/dev/null
fi
if [ -f $DIR/uboot.img ] ; then
echo "Upgrading uboot.img..."
dd if=$DIR/uboot.img of=$DEVID bs=64k seek=128 conv=fsync &>/dev/null
fi
if [ -f $DIR/trust.img ] ; then
echo "Upgrading trust.img..."
dd if=$DIR/trust.img of=$DEVID bs=64k seek=192 conv=fsync &>/dev/null
fi


I wanted to sanity check before I ran it; so, echoed the dd commands instead.

The wiki identifies the eMMC as mmcblk1 (see: https://wiki.pine64.org/index.php/Pinebo...le_Storage). It enumerates as mmcblk2 on my PBP. All the partitions match up otherwise.


Messages In This Thread
Intermittent Boot Issues - by MrRoosevelt - 06-02-2020, 12:46 AM
RE: Intermittent Boot Issues - by KiteX3 - 06-02-2020, 09:15 AM
RE: Intermittent Boot Issues - by jiyong - 06-02-2020, 12:54 PM
RE: Intermittent Boot Issues - by khanku - 06-03-2020, 02:55 AM
RE: Intermittent Boot Issues - by yurievitch - 06-03-2020, 12:01 PM
RE: Intermittent Boot Issues - by Arwen - 06-03-2020, 09:07 AM
RE: Intermittent Boot Issues - by yurievitch - 06-04-2020, 07:20 AM
RE: Intermittent Boot Issues - by MrRoosevelt - 06-04-2020, 10:35 AM
RE: Intermittent Boot Issues - by boggle - 06-11-2020, 09:15 PM
RE: Intermittent Boot Issues - by Twig - 06-03-2020, 09:08 AM
RE: Intermittent Boot Issues - by tophneal - 06-03-2020, 11:32 AM
RE: Intermittent Boot Issues - by Arwen - 06-03-2020, 12:05 PM
RE: Intermittent Boot Issues - by MrRoosevelt - 06-03-2020, 07:29 PM
RE: Intermittent Boot Issues - by charlespine - 06-03-2020, 09:35 PM
RE: Intermittent Boot Issues - by khanku - 06-04-2020, 12:56 AM
RE: Intermittent Boot Issues - by lot378 - 06-03-2020, 08:50 PM
RE: Intermittent Boot Issues - by MrRoosevelt - 06-03-2020, 09:16 PM
RE: Intermittent Boot Issues - by Arwen - 06-12-2020, 09:54 AM
RE: Intermittent Boot Issues - by KiteX3 - 06-12-2020, 11:57 AM
RE: Intermittent Boot Issues - by khanku - 06-21-2020, 06:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  uboot wont boot to SD card after upgrade jbradley419 7 847 01-19-2024, 02:29 PM
Last Post: wdt
  Video Flashing/adjusting on boot and reboot jbradley419 0 296 01-16-2024, 09:17 AM
Last Post: jbradley419
  Brand new Pinebook Pro doesn't boot after Manjaro update johnboiles 8 2,247 12-15-2023, 02:11 PM
Last Post: wdt
  PBP won't boot after trying to reinstall Manjaro ARM soupgirl 3 708 12-13-2023, 08:17 PM
Last Post: trillobite
  Various freezes during boot & while running several Linux distros - hardware error? donuts 1 593 11-22-2023, 11:47 AM
Last Post: fxc
  Issues with T-Mobile Home Internet? skinnyonthebebop 3 1,101 10-17-2023, 07:42 AM
Last Post: skinnyonthebebop
  Cannot boot to Kali SD card after uboot upgrade jbradley419 4 1,190 09-19-2023, 08:48 AM
Last Post: dachalife
  Does latest Tow-Boot install/work correctly for everyone? tophneal 4 1,889 08-03-2023, 03:30 PM
Last Post: tophneal
  Boot into NVME drive, no wifi, sound, buttons... PaulQ 0 808 07-13-2023, 01:50 PM
Last Post: PaulQ
  New Pinebook pro won’t boot Generaltuxenburg 4 1,954 06-14-2023, 07:20 AM
Last Post: KC9UDX

Forum Jump:


Users browsing this thread: 1 Guest(s)