How To: install a newly built kernel for use from uboot on a trimslice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Having just done the above I thought I would advertise the magic. So,
below is a crib sheet for anyone on the fedora armlist who does not
already know how to do this or needs a crib sheet to remind them of the
details.

regards,


Andrew Dinn
-----------

Building the kernel from source
-------------------------------

I inherited a pre-patched src tarball and config file for my build which
I untarred on the trimslice and then built as per the instructions in
the README

  # cd linux-xxxxx
  # make mrproper
  # cp/path/to/provided/config ./config
  # make oldconfig
  # make -j 6

It is probably quicker to cross-compile if you have the relevant tool
chain available. Of course, after building you will need to make the src
tree available on the trimslice to install.

Installing the kernel
---------------------

As root in the src tree top-level dir:

  # make modules_install install

This should put the vmlinux and initramfs images into /boot or
/boot/uboot or wherever your boot scripts and images are located. The
destination may vary depending on how your system is configured. The
target dir for the install should be the one defined by the setting for
UBOOT_DIR in /etc/sysconfig/uboot)

Next you need to generate the uInitrd and uImage files in your boot
directory

  # cd /boot                     # or whatever UBOOT_DIR is
  # export VERSION=3.4.0-rc4     # or whatever the kernel version is
  # mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e
0x00008000 -n $VERSION -d ./vmlinuz-$VERSION uImage-$VERSION-armv7hl-tegra
  # mkimage -A arm -O linux -T ramdisk -C none -n $VERSION -d
./initramfs-$VERSION.img uInitrd-$VERSION-armv7hl-tegra

You can then copy the files uImage-$VERSION-armv7hl-tegra and
uInitrd-$VERSION-armv7hl-tegra over the current ones referenced from
boot.scr so they are used for booting (in my case it loads uImage and
uInitrd). Or alternatively rebuild boot.scr to point at the new files.

The 3.4.0 kernel shown here is a lot bigger than the one I was using
prviously. If that is true for you this might mean that you need to
change the load addresses used in your boot.cmd to load the uInitrd file
at a higher initial address. Rebuild boot.scr using this command:

  # mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Trim Slice
F17 boot script" -d boot.cmd boot.scr

Currently my boot.cmd contains the following

  setenv bootargs mem=384M@0M mem=512M@512M nvmem=128M@384M vmalloc=248M
video=tegrafb console=ttyS0,115200n8 rw root=/dev/sdb1 nohdparm rootwait
earlyprintk rd_NO_PLYMOUTH
  ext2load usb 0:1 4080000 /boot/uImage
  ext2load usb 0:1 4480000 /boot/uInitrd
  bootm 4080000 4480000

wcohen/jcm recommended replacing 4480000 with 8400000 but all you need
to do is make sure that the uImage file extend does not overlap the
uInitrd file extent

  setenv bootargs mem=384M@0M mem=512M@512M nvmem=128M@384M vmalloc=248M
video=tegrafb console=ttyS0,115200n8 rw root=/dev/sdb1 nohdparm rootwait
earlyprintk rd_NO_PLYMOUTH
  ext2load usb 0:1 4080000 /boot/uImage
  ext2load usb 0:1 8400000 /boot/uInitrd
  bootm 4080000 8400000

n.b. don't forget to set the correct device in boot.cmd -- usb 0:1 is
for my usb stick but you may need to specify the memory card or local
disk and the location may be different. Check UBOOT_DEVICE in
/etc/sysconfig/uboot which ought to match the value in boot.cmd/boot.scr
_______________________________________________
arm mailing list
arm@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/arm



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM (Vger)]     [Linux ARM]     [ARM Kernel]     [Fedora User Discussion]     [Older Fedora Users Discussion]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

Powered by Linux