[BUG][L4T] installing linux-generic breaks apt-get

I’m trying to install linux-generic for the utf8 iocharset for mounting cifs locations. In doing so, the package system breaks until i revert by removing linux-generic and dependencies.

$ sudo apt-get install linux-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apt-clone archdetect-deb dmeventd dmraid dpkg-repack gir1.2-timezonemap-1.0
  gir1.2-xkl-1.0 kpartx kpartx-boot libdebian-installer4
  libdevmapper-event1.02.1 libdmraid1.0.0.rc16 liblockfile-bin liblockfile1
  liblvm2app2.2 liblvm2cmd2.02 libparted-fs-resize0 libreadline5
  lockfile-progs lvm2 os-prober pmount python3-icu python3-pam rdate
  ubiquity-casper ubiquity-ubuntu-artwork
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  devio flash-kernel linux-firmware linux-headers-4.4.0-59
  linux-headers-4.4.0-59-generic linux-headers-generic
  linux-image-4.4.0-59-generic linux-image-generic
Suggested packages:
  u-boot-tools fdutils linux-doc-4.4.0 | linux-source-4.4.0
The following NEW packages will be installed:
  devio flash-kernel linux-firmware linux-generic linux-headers-4.4.0-59
  linux-headers-4.4.0-59-generic linux-headers-generic
  linux-image-4.4.0-59-generic linux-image-generic
0 upgraded, 9 newly installed, 0 to remove and 332 not upgraded.
Need to get 103 MB of archives.
After this operation, 470 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 devio arm64 1.2-1build2 [17.2 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 flash-kernel arm64 3.0~rc.4ubuntu62.1.1 [18.0 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 linux-firmware all 1.157.6 [37.6 MB]
Get:4 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 linux-image-4.4.0-59-generic arm64 4.4.0-59.80 [54.8 MB]
Get:5 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 linux-image-generic arm64 4.4.0.59.62 [2,236 B]
Get:6 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 linux-headers-4.4.0-59 all 4.4.0-59.80 [9,971 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 linux-headers-4.4.0-59-generic arm64 4.4.0-59.80 [748 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 linux-headers-generic arm64 4.4.0.59.62 [2,228 B]
Get:9 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 linux-generic arm64 4.4.0.59.62 [1,790 B]
Fetched 103 MB in 3min 33s (484 kB/s)                                          
Selecting previously unselected package devio.
(Reading database ... 243261 files and directories currently installed.)
Preparing to unpack .../devio_1.2-1build2_arm64.deb ...
Unpacking devio (1.2-1build2) ...
Selecting previously unselected package flash-kernel.
Preparing to unpack .../flash-kernel_3.0~rc.4ubuntu62.1.1_arm64.deb ...
Unpacking flash-kernel (3.0~rc.4ubuntu62.1.1) ...
Selecting previously unselected package linux-firmware.
Preparing to unpack .../linux-firmware_1.157.6_all.deb ...
Unpacking linux-firmware (1.157.6) ...
Selecting previously unselected package linux-image-4.4.0-59-generic.
Preparing to unpack .../linux-image-4.4.0-59-generic_4.4.0-59.80_arm64.deb ...
Done.
Unpacking linux-image-4.4.0-59-generic (4.4.0-59.80) ...
Selecting previously unselected package linux-image-generic.
Preparing to unpack .../linux-image-generic_4.4.0.59.62_arm64.deb ...
Unpacking linux-image-generic (4.4.0.59.62) ...
Selecting previously unselected package linux-headers-4.4.0-59.
Preparing to unpack .../linux-headers-4.4.0-59_4.4.0-59.80_all.deb ...
Unpacking linux-headers-4.4.0-59 (4.4.0-59.80) ...
Selecting previously unselected package linux-headers-4.4.0-59-generic.
Preparing to unpack .../linux-headers-4.4.0-59-generic_4.4.0-59.80_arm64.deb ...
Unpacking linux-headers-4.4.0-59-generic (4.4.0-59.80) ...
Selecting previously unselected package linux-headers-generic.
Preparing to unpack .../linux-headers-generic_4.4.0.59.62_arm64.deb ...
Unpacking linux-headers-generic (4.4.0.59.62) ...
Selecting previously unselected package linux-generic.
Preparing to unpack .../linux-generic_4.4.0.59.62_arm64.deb ...
Unpacking linux-generic (4.4.0.59.62) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up devio (1.2-1build2) ...
Setting up flash-kernel (3.0~rc.4ubuntu62.1.1) ...
Setting up linux-firmware (1.157.6) ...
Setting up linux-image-4.4.0-59-generic (4.4.0-59.80) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-59-generic
cryptsetup: WARNING: failed to detect canonical device of /dev/mmcblk0p1
cryptsetup: WARNING: could not determine root device from /etc/fstab
flash-kernel: deferring update (trigger activated)
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
run-parts: executing /etc/kernel/postinst.d/zz-flash-kernel 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
flash-kernel: deferring update (trigger activated)
Setting up linux-image-generic (4.4.0.59.62) ...
Setting up linux-headers-4.4.0-59 (4.4.0-59.80) ...
Setting up linux-headers-4.4.0-59-generic (4.4.0-59.80) ...
Setting up linux-headers-generic (4.4.0.59.62) ...
Setting up linux-generic (4.4.0.59.62) ...
Processing triggers for flash-kernel (3.0~rc.4ubuntu62.1.1) ...
Unsupported platform.
dpkg: error processing package flash-kernel (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 flash-kernel
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is there another way to get the utf8 iocharset?

I’m not where I can actually look closer, but this URL tends to make it look like the need to enable that character set in a kernel module:
http://askubuntu.com/questions/519796/unable-to-mount-cifs-with-iocharset-utf8-in-trusty

If so, then you need to install just the kernel module. I’m guessing it would go something like this:
You’d start with your existing “/proc/config.gz”, make sure the “CONFIG_LOCALVERSION” matches the suffix in “uname -r”, and then use something like “make nconfig” to find the nls_utf8 feature to enable it as a module. Make the module, and then simply install it to the “/lib/modules/uname -r/kernel/fs/nls/nls_utf8.ko” location.