Skip to content
View in the app

A better way to browse. Learn more.

Learn more

[odroid c2] Setting up linux-u-boot-odroidc2-default (5.22) fails

Featured Replies

Greetings all.

 

Today I tried updating my Odroid C2 to image 5.22 posted on Oct 22, 2016. And I got the following error during apt-get upgrade:

 

Setting up linux-u-boot-odroidc2-default (5.22) ...
/var/lib/dpkg/info/linux-u-boot-odroidc2-default.postinst: line 5: conditional binary operator expected
/var/lib/dpkg/info/linux-u-boot-odroidc2-default.postinst: line 5: syntax error near `function'
/var/lib/dpkg/info/linux-u-boot-odroidc2-default.postinst: line 5: `[[  == function ]] && setup_write_uboot_platform'

I peaked at the code in /var/lib/dpkg/info/linux-u-boot-odroidc2-default.postinst contains

#!/bin/bash
source /usr/lib/u-boot/platform_install.sh
[[ $DEVICE == /dev/null ]] && exit 0
[[ -z $DEVICE ]] && DEVICE="/dev/mmcblk0"
[[ == function ]] && setup_write_uboot_platform
write_uboot_platform $DIR $DEVICE
exit 0

Which appears broken, so I updated it to:

 

#!/bin/bash
source /usr/lib/u-boot/platform_install.sh
[[ $DEVICE == /dev/null ]] && exit 0
[[ -z $DEVICE ]] && DEVICE="/dev/mmcblk0"
[[ $(type -t setup_write_uboot_platform) == function ]] && setup_write_uboot_platform
write_uboot_platform $DIR $DEVICE
exit 0

 

And the upgrade succeeded. Dunno where else to post this information. Hope it helps someone :)

 

Guest
This topic is now closed to further replies.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.