“The following packages have been kept back” ?

debian
We might see this during a “apt-get upgrade” command on Ubuntu:

Calculating upgrade... Done
The following packages have been kept back:
  linux-cloud-tools-virtual linux-generic linux-headers-generic 
  linux-image-generic linux-signed-generic linux-signed-image-generic
  mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.

According to [this article]:

There we can see packages haven’t been upgraded, even though newer packages are available. This is because two new packages were introduced, and these upgrades depend upon it.

To upgrade it, and you’re ABSOLUTELY SURE that you want to install the new introduced packages:

apt-get dist-upgrade

The following message will appear and you’re good to go:

The following NEW packages will be installed:
  libevent-core-2.0-5 linux-cloud-tools-4.4.0-38 linux-cloud-tools-4.4.0-38-generic linux-headers-4.4.0-38 linux-headers-4.4.0-38-generic
  linux-image-4.4.0-38-generic linux-image-extra-4.4.0-38-generic linux-signed-image-4.4.0-38-generic
The following packages will be upgraded:
  linux-cloud-tools-virtual linux-generic linux-headers-generic linux-image-generic linux-signed-generic linux-signed-image-generic
  mysql-server-5.7 mysql-server-core-5.7
8 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.

Note that this command may also remove your existing packages while upgrading – which means there are possibilities your system could be messed up.

Change i2c bus frequency on Beaglebone Black

Normally one can inspect the i2c bus frequency by

dmesg |grep i2c

According and thanks to the discussion at here

The i2c bus frequency can be changed by edit the Linux device tree dtb file:

1. backup the original .dtb

cp /boot/am335x-boneblack.dtb /boot/am335x-boneblack.dtb.orig

2. generate the dts from the dtb

dtc -I dtb -O dts -o am335x-boneblack.dts /boot/am335x-boneblack.dtb

3. modify the dts with a text editor

i2c@4819c000 {
compatible = "ti,omap4-i2c";
#address-cells = <0x1>;
#size-cells = <0x0>;
ti,hwmods = "i2c3";
reg = <0x4819c000 0x1000>;
interrupts = <0x1e>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <0x7>;
clock-frequency = <0x186a0>;
linux,phandle = <0x27>;
phandle = <0x27>;

4. generate the dtb from the modified dts

dtc -I dts -O dtb -o am335x-boneblack.dtb am335x-boneblack.dts

Where the i2c@4819c000 is the i2c address:

  • i2c0: 0x44E0B000 (Not available on header)
  • i2c1: 0x4802A000 (Not enabled by default)
  • i2c2: 0x4819C000 (The actual one for configured i2c-1 in Linux, although the register name/expansion port is i2c2)

And the clock-frequency = <0x186a0> is the frequency, 0x186a0 = 100000 = 100KHz here is the default i2c-1 (Expansion port i2c2) frequency for stock beaglebone black image.

5. and finally copy the dtb back to /boot/

cp am335x-boneblack.dtb /boot/am335x-boneblack.dtb

Boris_Tux_PNG