Kernel 3.8 install

OK, I've gotten and built the 3.8 kernel for BeagleBone. Now how do I
install the thing? Hopefully there's a web page to guide the process.

John

John,

Taken from the beagle kernel github:

copy over uImage and am335x-bone.dtb to /boot

Setup your uEnv depending on if you are using Angstrom or a vanilla u-boot as specificed here:

https://github.com/beagleboard/kernel/tree/3.8

Then boot. You may have an old u-boot which doesn't support devicetree, in which case you will have to recompile that too with the am335x config.

Hey Jack,

I found that page but it doesn't seem to handle everything. Maybe a
dumb question but what IS the kernel, uImage or vmlinux?

I based my install effort last night on this page

http://beagleboard.org/linux

That process got the kernel and accessories compiled, mostly to
INSTALL_MOD_PATH but doesn't cover installation. I set INSTALL_MOD_PATH to

/home/jgd/BeagleBone_Dev/BeagleBone_3.8/kernel/deploy

I'm entertaining the notion of modifying Jack's tools/install.sh to fit
this version.

I did a little reverse-engineering on Jack's install script, read
README.md and came up with the following (from my log):

cd kernel
cp ../configs/beaglebone .config
make uImage dtbs (use my makeall.sh script)

cd /home/jgd/BeagleBone_Dev/BeagleBone_3.8/kernel/kernel/arch/arm/boot

copy over uImage to /boot  (/media/BEAGLE_BONE)

cd dtb

copy am335x-bone.dtb to /boot (/media/BEAGLE_BONE)

Edit uEnv.txt and add the following for the angstrom u-boot 2012.10:

devtree=/boot/am335x-bone.dtb
dtboot=run mmcargs; ext2load mmc ${mmcdev}:2 ${kloadaddr} ${bootfile} ;
ext2load mmc ${mmcdev}:2 ${fdtaddr} ${devtree} ; bootm ${kloadaddr} -
${fdtaddr}
uenvcmd=run dtboot
optargs=consoleblank=0

```

# Install kernel on the linux partition

cd /home/jgd/BeagleBone_Dev/BeagleBone_3.8/kernel/deploy/kernel/rootfs

$ tar -cvzf linux_3.8_kernel_tar.bz *

$ move tar to /root (/media/Angstrom-Cloud9-)

sudo mv linux_3.8_kernel.tar.bz /media/Angstrom-Cloud9-

cd /media/Angstrom-Cloud9-

sudo tar -xvf linux_3.8_kernel.tar.bz

sudo rm linux_3.8_kernel.tar.bz

$ dismount the card and boot.

The tar contained the contents of /lib/firmware and /lib/modules

I think that I should have deleted the contents of those two directories
before un-taring because both contained stuff not in the tar, stuff left
over from 2.8 I'm assuming.

This made a bootable card but it's strange. uname -a reports

3.2.33-psp26.1

and all three SPI devices are enumerated in /dev but now my test program
locks up even at 128 byte transfer. This time on the scope I see one
read cycle before lockup. Before I'd see the *chip_select go low and
sometimes a single clock cycle would appear before lockup.

If the above is correct then the DMA is still broken.

A critique of the above process is most welcome.

John

<snip>

I did the same procedure this morning except that before untaring the
contents of /lib/modules and /lib/firmware, I deleted all the previous
contents.

THIS TIME I get a system that uname -a reports as

Linux Maggie 3.2.33-psp26.1 #29 Fri Mar 8 01:43:31 EST 2013 armv7l GNU/Linux

The /dev/spi* are gone. There is a whole mess of spi-related files and
directories in /sys. find . -name 'spi*' -print returns 24 different
items. I'm just getting started exploring but so far nothing has done
anything when I tried to either open it or echo 1 to it or read it.
What a mess.

Anyone have any ideas?

John

I usually run:

#make the kernel and its modules, build the compressed image with the
proper address
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- ZRELADDR=0x80008000
uImage modules
#Copy the compiled kernel image to the boot directory of the
beaglebone, I usually change the name to something useful
sudo cp ${KSRC}/arch/arm/boot/uImage
/media/Angstrom-Cloud9-/boot/uImage-<version>-notes
#Save the old uImage, or delete it if it was a sym link
sudo mv uImage uImage-old
#Link your new kernel image to uImage
sudo ln -s uImage-<version>-notes uImage
Install your modules
sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules_install
INSTALL_MOD_PATH=/media/Angstrom-Cloud9-

You'll need to replace /media/Angstrom-Cloud9- with your beagle bone
root dir if it's different.

The modules_install target should take care of the placement and
depmod for you. I'm guessing you remembered to enable SPI in the
config process. Forgetting modules_install made my SPI devices not
show up because spidev was compiled as a module.

-Jon

I usually run:

#make the kernel and its modules, build the compressed image with the
proper address
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- ZRELADDR=0x80008000
uImage modules
#Copy the compiled kernel image to the boot directory of the
beaglebone, I usually change the name to something useful
sudo cp ${KSRC}/arch/arm/boot/uImage
/media/Angstrom-Cloud9-/boot/uImage-<version>-notes
#Save the old uImage, or delete it if it was a sym link
sudo mv uImage uImage-old
#Link your new kernel image to uImage
sudo ln -s uImage-<version>-notes uImage

uImage goes on the VFAT partition, right? So linking isn't allowed.

Install your modules
sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules_install
INSTALL_MOD_PATH=/media/Angstrom-Cloud9-

The modules_install target should take care of the placement and
depmod for you. I'm guessing you remembered to enable SPI in the
config process. Forgetting modules_install made my SPI devices not
show up because spidev was compiled as a module.

Other than the ln issue, I did exactly your procedure. Put it in a
script just to be sure I got everything right.

There wasn't any config process but I checked kernel/kernel/.config to
make sure SPI was turned on. I can tell there is something happening
because I see a single toggle of the *CS line during boot, just like I
did with 2.8 kernel.

I did not get any devices in /dev/spi*. Are you having success in that
area?

One thing I did notice was something having to do with this new Device
Tree. In kernel/kernel/arch/arm/boot/dts, the file am335x-bone.dts had
SPI disabled. So I compiled it using dtc into a .dtb and copied that
over to the boot directory. One of the make files I was using earlier
concatenated this file on the end of uImage but apparently it can be
stand-alone too. I think.

In any event, I don't have any SPI that I can find.

Help!

John

I usually run:

#make the kernel and its modules, build the compressed image with the
proper address
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- ZRELADDR=0x80008000
uImage modules
#Copy the compiled kernel image to the boot directory of the
beaglebone, I usually change the name to something useful
sudo cp ${KSRC}/arch/arm/boot/uImage
/media/Angstrom-Cloud9-/boot/uImage-<version>-notes
#Save the old uImage, or delete it if it was a sym link
sudo mv uImage uImage-old
#Link your new kernel image to uImage
sudo ln -s uImage-<version>-notes uImage

uImage goes on the VFAT partition, right? So linking isn't allowed.

No the partition labeled Angstrom-Cloud9- should be ext4 by default,
that's the root file system. It houses /boot which is where the uImage
should be placed.

Install your modules
sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules_install
INSTALL_MOD_PATH=/media/Angstrom-Cloud9-

The modules_install target should take care of the placement and
depmod for you. I'm guessing you remembered to enable SPI in the
config process. Forgetting modules_install made my SPI devices not
show up because spidev was compiled as a module.

Other than the ln issue, I did exactly your procedure. Put it in a
script just to be sure I got everything right.

There wasn't any config process but I checked kernel/kernel/.config to
make sure SPI was turned on. I can tell there is something happening
because I see a single toggle of the *CS line during boot, just like I
did with 2.8 kernel.

you can run "make ARCH=arm menuconfig" to edit the config. You aren't
"supposed" to edit the file manually because it is overwritten without
warning.

I did not get any devices in /dev/spi*. Are you having success in that
area?

Yes, but I am running 3.2.21 and don't have device tree to contend with.

One thing I did notice was something having to do with this new Device
Tree. In kernel/kernel/arch/arm/boot/dts, the file am335x-bone.dts had
SPI disabled. So I compiled it using dtc into a .dtb and copied that
over to the boot directory. One of the make files I was using earlier
concatenated this file on the end of uImage but apparently it can be
stand-alone too. I think.

In any event, I don't have any SPI that I can find.

Help!

John

--
John DeArmond
Tellico Plains, Occupied TN
http://www.fluxeon.com <-- THE source for induction heaters
http://www.neon-john.com <-- email from here
http://www.johndearmond.com <-- Best damned Blog on the net
PGP key: wwwkeys.pgp.net: BCB68D77

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Your problems may lie in the device tree configuration. I've never
used it myself. Hopefully someone more experienced can chime in on
that subject.

-Jon