Trouble building linux-am33x kernel with PKGBUILD from git

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

Trouble building linux-am33x kernel with PKGBUILD from git

Postby tdio » Sun Jun 09, 2013 9:13 pm

I am trying to rebuild the linux-am33x kernel on my BeagleBoneBlack using the PKGBUILD from git but I receive the error:

$this->bbcode_second_pass_code('', '
MK_FW firmware/am335x-pm-firmware.bin.gen.S
make[1]: *** No rule to make target `firmware/am335x-pm-firmware.bin', needed by `firmware/am335x-pm-firmware.bin.gen.o'. Stop.
make: *** [firmware] Error 2
==> ERROR: A failure occurred in build().
Aborting...
')

I received a very similar error when trying to cross compiling on an x86_64 machine and it was suggested on IRC that I build on the actual hardware. So I created a fresh install on an SD Card, SSH'd into the BeagleBoneBlack and ran exactly the following commands:
$this->bbcode_second_pass_code('', '

# Update system and boot into latest kernel

pacman -Syu
reboot

# Install depends and create regular user

pacman -S git base-devel
useradd -m -g users -s /bin/bash tdio
passwd tdio
visudo
exit

# Login as regular user, clone repo, run makepkg

git clone git://github.com/archlinuxarm/PKGBUILDs.git
cd PKGBUILDs/core/linux-am33x
makepkg -A -s

# The kernel will start compiling, several hours later it will fail will the error above.
')

Could anyone point out what I am doing wrong? I am obviously missing something. I was instructed on the IRC channel to run makepkg with the ignore-arch flag (makepkg -A).

Thanks
tdio
 
Posts: 3
Joined: Sun May 26, 2013 3:27 pm

Re: Trouble building linux-am33x kernel with PKGBUILD from g

Postby PLyttle » Sat Jun 15, 2013 8:28 am

I don't have a straight answer, (one involving PKGBUILD) however if you want to build a kernel this works:

http://eewiki.net/display/linuxonarm/Be ... ildScript:

in essence:
$this->bbcode_second_pass_code('', 'git clone git://github.com/RobertCNelson/linux-dev.git
cd linux-dev
git checkout origin/am33x-v3.8 -b am33x-3.8
cp system.sh.sample system.sh
')edit system.sh (this is not really necessary, it will work out of the box) then:
after reading the READMEs:
$this->bbcode_second_pass_code('', './build_kernel.sh
')

After the downloading and the patching you will be presented with the menuconfig screen. When you finish your configuration the actual kernel will be built. Go to sleep, go party, have fun, the 'bone will be busy for a very long time (expect the whole process to take something like 8 hours, depemding on your internet connection)

NO NOT USE THE INSTALL INSTALL SCRIPT (tools/Kernel_install.sh) it uses wrong install directories
instead, read it and install manually

save the files you want to keep, then:

$this->bbcode_second_pass_code('', '
cd KERNEL
sudo cp -v arch/arm/boot/zImage /boot/zImage
sudo make modules_install INSTALL_MOD_PATH=/usr
make firmware_install INSTALL_FW_PATH=tmp
sudo cp -v tmp/*.dtbo /usr/lib/firmware/
sudo find ./arch/arm/boot/ -iname "*.dtb" -exec cp -v '{}' /boot/dtbs/ \;
')
please sync before rebooting

Warning: In my case there was a bug in KERNEL/arch/arm/mach-omap2/twl-common.c
line 152 read:
$this->bbcode_second_pass_code('', 'static struct twl4030_power_data omap3_power_pdata = {')
which should be:
$this->bbcode_second_pass_code('', 'static struct twl4030_power_data omap3_power_pdata __initdata = {')
You will get a "Section mismatch error" in the modules build if it is not fixed.
Most likely this is already sorted out. but worth a check.

When you want to make a new build, it is faster to run the process by hand, instead of using the scripts

this is what you do: In KERNEL type

$this->bbcode_second_pass_code('', 'make nconfig (or menuconfig, or xconfig, whatever takes your fancy)
make LOCALVERSION=-bone20.3 zImage modules
make LOCALVERSION=-bone20.3 dtbs
')

and you can install again
success
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: Trouble building linux-am33x kernel with PKGBUILD from g

Postby PLyttle » Sat Jun 15, 2013 3:26 pm

when you try this you will notice that the version is now bone21
so change accordingly:
LOCALVERSION=-bone21
KERNEL/arch/arm/mach-omap2/twl-common.c still needs changing, do that while menuconfig runs (after patching)
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am


Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 38 guests