On Tue, Jul 7, 2015 at 1:02 PM, Robert Nelson <[email protected]> wrote: > On Tue, Jul 7, 2015 at 12:43 PM, <[email protected]> wrote: >> I have a new BeagleBone Black (rev C) and got it booting from SD with the >> Debian 4GB SD image from 2015-03-01 >> >> My goal is to cross compile a custom kernel on my Linux PC and update the >> necessary items on the Debian SD card. >> >> So.... I got the 4.1.1 Linux kernel from here: >> >> git clone git://github.com/beagleboard/linux.git >> >> >> And then built the new kernel like this from what I gleaned on the web: >> >> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- bb.org_defconfig >> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage am335x-boneblack.dtb >> LOADADDR=0x80008000 > > We no longer use uImage, just build zImage > > make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- zImage > > >> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules >> mkdir MODULES >> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules_install >> INSTALL_MOD_PATH=./MODULES >> cd MODULES >> tar czf target_modules.tgz lib > > you need the *.dtb's: > > make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs > mkdir DTBS > make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs_install > INSTALL_DTBS_PATH=./DTBS > >> Success! Compiled with no errors. Now I have a uImage, a dtb, and a tarball >> of the modules to move the SD card. >> BUT, when I look at the /boot dir on the Debian SD it seems to need vmlinuz >> and and initrd? > >> Can someone please advise on either how to use what I have built, or how to >> build what I need to update the SD card. >> I'm not looking for an automated solution, I would rather understand the >> details at this point. > > Grab the kernel version from: cat include/generated/utsrelease.h | awk > '{print $3}' | sed 's/\"//g' > > This will be "uname_r" > > copy zimage as /boot/vmlinuz-$(uname_r) > copy *.dtbs as /boot/dtbs/$(uname_r)/*.dtb > > copy modules as /lib/modules/$(uname_r) > > boot and run, to generate the initrd... > > sudo update-initramfs -ck `uname -r`
btw, there's an even easier method to build/install: make ARCH=arm LOCALVERSION=-r1 CROSS_COMPILE=arm-linux-gnueabi- KDEB_PKGVERSION=1cross deb-pkg Then from your bbb, just "sudo dpkg -i linux-image*.deb ; sudo reboot" Regards, -- Robert Nelson https://rcn-ee.com/ -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
