3 proposed patches for next 3.8.13-bone5x update

Isn't that also what the --one-file-system rsync switch is for?


-x, --one-file-system don't cross filesystem boundaries

learn something new! :wink:


We remerge every week, so I believe we were already using the latest zz-uenv. The error was caused by trying to match single quotes in the sed command. This can be fixed by replacing the outermost single quotes with double quotes.


Thanks Robert. I’ve started using the 3.14 kernel (although the less
bleeding edge bone8 version), and I built a custom dtb to enable both the
4Dcape-43t and a secondary non-pin-conflicting uart using your bb-kernel
repo. It’s worked beautifully. Apologies to Scott for not being able to
follow up on his 3.8 kernel patch.

I ran into issues when using apt to install the ti-rXX kernels. The apt-get
install command fails due to single quotes in an sed command in a zz-uenv
file. We tried to get it to run by replacing the single quotes around
older_kernel and latest_kernel with ’ " ’ " ', but then something broke on
reset, and I forget now what errors we were seeing. It’s possible these
issues have been resolved recently. I’ll try installing the latest kernel
sometime when it isn’t past 3am. :slight_smile:

it took a couple release to get all the bugs out, can you retest with
the git version?


We’ve been using omap-image-builder, and setup-sdcard.sh exits when a -ti-
kernel is specified. This is another reason, albeit possibly misguided,
that we shied away from using the -ti- kernels and stuck to the bone
kernels. I’m not sure what the difference is?

I’ll hack on this today, i have a bunch of logic for the bone’s to
make sure they got the “-bone” kernel at all cost, i’m going to change
that to a “-bone” || “-ti”.

One more comment about our adventures with omap-image-builder. We added
usbmount to the package list in omap-image-builder, and usbmount uses
/media/usbX as mount points, so it creates those directories.
The init-eMMC-flasher-v3 excludes /media/* from being rsync’ed so we added
the necessary mkdir -p’s after the relevant rsync to fix this.

I think we can safely enable this now. Since the flasher is running at
boot in a single user environment, usbmount shouldn’t mount an
external device, so only the base /media/ should be present while
it’s flashing. The whole point of disabling /media/ from rsync, when
we ran after the board fully booted, there was a risk the user had a
big full usb drive plugged in and was mounted to /media/, this would
have overfilled the eMMC.


so this works for you:

sed -i -e "s:uname_r='${older_kernel}':uname_r='${version}':g" /boot/uEnv.txt


I’ll double check this on Sunday and report back.

Hmm, this didn’t fix the problem.

Preparing to replace linux-image-3.8.13-bone66 1cross (using linux-image-3.8.13-bone66_1cross_armhf.deb) …
Unpacking replacement linux-image-3.8.13-bone66 …
Setting up linux-image-3.8.13-bone66 (1cross) …
update-initramfs: Generating /boot/initrd.img-3.8.13-bone66
zz-uenv_txt: Updating /boot/uEnv.txt [uname_r=3.8.13-bone66]
sed: -e expression #1, char 24: unterminated `s’ command
run-parts: /etc/kernel/postinst.d/zz-uenv_txt exited with return code 1
dpkg: error processing linux-image-3.8.13-bone66 (–install):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:

However, a colleague found this solution, which works fine:

sed -i -e ‘s:uname_r=’"’"’${older_kernel}’"’"’:uname_r=’"’"’${version}’"’"’:g’ /boot/uEnv.txt


That is odd, we shouldn't have to be that crazy, what distro is that
rootfs based on and what version of sed?


This works on wheezy:

sed -i -e "s:uname_r=$older_kernel:uname_r=$version:g" /boot/uEnv.txt

Selecting previously unselected package linux-image-3.14.19-ti-r25.
(Reading database ... 23055 files and directories currently installed.)
Unpacking linux-image-3.14.19-ti-r25 (from
.../linux-image-3.14.19-ti-r25_1wheezy_armhf.deb) ...
Setting up linux-image-3.14.19-ti-r25 (1wheezy) ...
update-initramfs: Generating /boot/initrd.img-3.14.19-ti-r25
zz-uenv_txt: Updating /boot/uEnv.txt [uname_r=3.14.19-ti-r25]

Just remove the middle quotes all together..

I'll fire up jessie/trusty/utopic and make sure it works there too.


I'm using wheezy. GNU sed version 4.2.1. I see what's happening now.
It looks like the uEnv.txt doesn't have quotes around the kernel version
at all, so there shouldn't be any inner quotes. The only reason my
kernel "update" worked was because the kernel version was the same, so
the sed didn't need to catch a match and update the uname_r.

It looks like single or double outer quotes work fine.