I am busy with two part process; first is quick fix to keep our production line running but patching and rebuilding 3.8.13 image to enable flashing to newer eMMC devices, the second is to bring product to more current version.
I am drawing a blank on how I originally created my BBB image after building the kernel, I don’t recall using the script file and am battling finding any relevant links.
Files generated by build are:
-rw-rw-r-- 1 vagrant vagrant 37713 Jan 12 22:37 3.8.13-bone80a-dtbs.tar.gz
-rw-rw-r-- 1 vagrant vagrant 1259472 Jan 12 22:37 3.8.13-bone80a-firmware.tar.gz
-rw-rw-r-- 1 vagrant vagrant 12029365 Jan 12 22:37 3.8.13-bone80a-modules.tar.gz
-rwxrwxr-x 1 vagrant vagrant 5551080 Jan 12 22:37 3.8.13-bone80a.zImage
-rw-rw-r-- 1 vagrant vagrant 110269 Jan 12 22:37 config-3.8.13-bone80a
First prize would be to update the SD card I use to flash the beaglebone, else I guess I could use build-deb, copy deb file to BBB with older kernel and update using the deb and recreate my flasher sd card.
Thanks, will give it a try: I broke my git tree trying to sync so am rebuilding now, but here’s output of startup log:
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw
Hit any key to stop autoboot: 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
1734 bytes read in 19 ms (88.9 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-3.8.13-bone68b ...
5507296 bytes read in 323 ms (16.3 MiB/s)
loading /boot/dtbs/3.8.13-bone68b/am335x-boneblack.dtb ...
26098 bytes read in 22 ms (1.1 MiB/s)
loading /boot/initrd.img-3.8.13-bone68b ...
2843062 bytes read in 175 ms (15.5 MiB/s)
debug: [console=ttyO0,115200n8 capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN root=UUID=328ee82b-3e01-47b0-afdb-fada88f8fa3c ro rootfstype=ext4 rootwait fixrtc quiet init=/lib/systemd/systemd] ...
debug: [bootz 0x82000000 0x88080000:2b61b6 0x88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x5408e0 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Ramdisk to 8fd49000, end 8ffff1b6 ... OK
Loading Device Tree to 8fd3f000, end 8fd485f1 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.353658] omap2_mbox_probe: platform not supported
[ 0.510418] tps65217-bl tps65217-bl: no platform data provided
[ 0.573654] bone-capemgr bone_capemgr.9: slot #0: No cape found
[ 0.610755] bone-capemgr bone_capemgr.9: slot #1: No cape found
[ 0.647864] bone-capemgr bone_capemgr.9: slot #2: No cape found
[ 0.684973] bone-capemgr bone_capemgr.9: slot #3: No cape found
[ 0.703576] omap_hsmmc mmc.5: of_parse_phandle_with_args of 'reset' failed
[ 0.765322] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8
[ 0.777023] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22
[ 0.784312] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single
Loading, please wait...
systemd-fsck[197]: rootfs: clean, 88402/227584 files, 504435/909056 blocks
Debian GNU/Linux 7
BeagleBoard.org Debian Image 2015-03-08
Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
Biocharger (tm) Advanced Biotechnologies LLC
Support: http://biocharger.com
biochargerng login: [ 11.968951] libphy: PHY 4a101000.mdio:01 not found
[ 11.974022] net eth0: phy 4a101000.mdio:01 not found on slave 1
Just use “./build_deb.sh” or “./tools/rebuild_deb.sh” and copy the linux-image*.deb from ./deploy/ and just install it on the board with “sudo dpkg -i linux-image*.deb”
So I wasn’t using am33x-v3.8 although did try it but don’t recall offhand what the issue was. I have been using tag 3.8.13-bone68 as that is what my original build was and I wanted to keep changes to a minimum (as this was meant to be a quick fix).
Am I correct in assuming that am33x-v3.8 is the latest iteration for 3.8.xx - ie could be 3.8.xx-boneYY
I also found an old script I had created. Looks like I transfer output of build to BBB and then ran script below - risk as it’s very specific to the BBB layout.
As mentioned I have been working with 3.8.13-bone68 tag which is STILL building… but will try the am33x-v3.8 which I recall failing but will try and the .deb route does sound the best
#!/bin/sh
#script to be run from insertable SD card to update linux kernel to bone68a patched kernel.
KERNEL_UTS="3.8.13-bone68b"
valid_kernel="3.8.13-bone68a"
#DIR=$PWD
DIR='/media/runner'
LCD='/dev/tty0'
unset current_kernel
current_kernel=$(grep uname_r /boot/uEnv.txt | grep -v '#' | awk -F"=" '{print $2}' || true)
broadcast () {
if [ "x${message}" != "x" ] ; then
echo "${message}"
echo "${message}" > $LCD || true
fi
}
message="Current Kernel $current_kernel";broadcast
if [ $current_kernel != $valid_kernel ]; then
message="Invalid Kernel found, exiting...";broadcast
exit 1
fi
mmc_write_rootfs () {
message="Installing ${KERNEL_UTS}-modules.tar.gz";broadcast
if [ -d "/lib/modules/${KERNEL_UTS}" ] ; then
sudo rm -rf "/lib/modules/${KERNEL_UTS}" || true
fi
sudo tar xf "${DIR}/deploy/${KERNEL_UTS}-modules.tar.gz" -C "/"
sync
if [ -f "${DIR}/deploy/config-${KERNEL_UTS}" ] ; then
if [ -f "/boot/config-${KERNEL_UTS}" ] ; then
sudo rm -f "/boot/config-${KERNEL_UTS}" || true
fi
sudo cp -v "${DIR}/deploy/config-${KERNEL_UTS}" "/boot/config-${KERNEL_UTS}"
sync
fi
message="update initramfs";broadcast
sudo update-initramfs -ck ${KERNEL_UTS}
message="info: [${KERNEL_UTS}] now installed...";broadcast
}
mmc_write_boot_uname () {
message="Installing ${KERNEL_UTS}";broadcast
if [ -f "${location}/vmlinuz-${KERNEL_UTS}_bak" ] ; then
sudo rm -f "${location}/vmlinuz-${KERNEL_UTS}_bak" || true
fi
if [ -f "${location}/vmlinuz-${KERNEL_UTS}" ] ; then
sudo mv "${location}/vmlinuz-${KERNEL_UTS}" "${location}/vmlinuz-${KERNEL_UTS}_bak"
fi
sudo cp -v "${DIR}/deploy/${KERNEL_UTS}.zImage" "${location}/vmlinuz-${KERNEL_UTS}"
if [ -f "${location}/initrd.img-${KERNEL_UTS}" ] ; then
sudo rm -rf "${location}/initrd.img-${KERNEL_UTS}" || true
fi
if [ -f "${DIR}/deploy/${KERNEL_UTS}-dtbs.tar.gz" ] ; then
if [ -d "${location}/dtbs/${KERNEL_UTS}_bak/" ] ; then
sudo rm -rf "${location}/dtbs/${KERNEL_UTS}_bak/" || true
fi
if [ -d "${location}/dtbs/${KERNEL_UTS}/" ] ; then
sudo mv "${location}/dtbs/${KERNEL_UTS}/" "${location}/dtbs/${KERNEL_UTS}_bak/" || true
fi
sudo mkdir -p "${location}/dtbs/${KERNEL_UTS}/"
message="Installing ${KERNEL_UTS}-dtbs.tar.gz to ${location}/dtbs/${KERNEL_UTS}";broadcast
sudo tar xf "${DIR}/deploy/${KERNEL_UTS}-dtbs.tar.gz" -C "${location}/dtbs/${KERNEL_UTS}/"
sync
fi
unset older_kernel
older_kernel=$(grep uname_r "${location}/uEnv.txt" | grep -v '#' | awk -F"=" '{print $2}' || true)
if [ ! "x${older_kernel}" = "x" ] ; then
if [ ! "x${older_kernel}" = "x${KERNEL_UTS}" ] ; then
sudo sed -i -e 's:uname_r='${older_kernel}':uname_r='${KERNEL_UTS}':g' "${location}/uEnv.txt"
fi
message="info: /boot/uEnv.txt: `grep uname_r ${location}/uEnv.txt`";broadcast
fi
}
if [ -f "/boot/uEnv.txt" ] ; then
location="/boot/"
mmc_write_boot_uname
location=""
mmc_write_rootfs
sync
else
message="ERROR, /boot/uEnv.txt not found!";broadcast
exit 1
fi
Another question. for am33x-v3.8 branch how does one prevent downloading of toolchain and linux-stable.git? I must be doing something wrong as each time I run build_kernel it downloads linux src as well as toolchain (I am rerunning as my rebuild.sh failed after my patch and I want to catch logs).
I thought in setting CC and LINUX_GIT in system.sh should be sufficient to prevent download and rather use these static files.
Looking at scripts/git.sh it appears that LINUX_GIT can be full path to folder containing downloaded linux source.