summaryrefslogtreecommitdiff
path: root/packages/linux
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2007-09-15 17:06:12 +0000
committerMichael Lauer <mickey@vanille-media.de>2007-09-15 17:06:12 +0000
commite17d2f225ed63c45ba56e83a88c19c06c5c722d7 (patch)
treeb83e30f94f39b15f1b883ef27a800930b7909db9 /packages/linux
parent5029cab313e9450764fafcb904d8c2cb9183bd86 (diff)
linux.inc: add sizecheck, add convenient support for root-nfs-over-usb
Diffstat (limited to 'packages/linux')
-rw-r--r--packages/linux/linux.inc36
1 files changed, 35 insertions, 1 deletions
diff --git a/packages/linux/linux.inc b/packages/linux/linux.inc
index a25dc44083..4fef1f98ef 100644
--- a/packages/linux/linux.inc
+++ b/packages/linux/linux.inc
@@ -18,7 +18,7 @@ DEPENDS_append_fic-gta01 = " u-boot-mkimage-openmoko-native "
DEPENDS_append_fic-gta02 = " u-boot-mkimage-openmoko-native "
-# Specify the commandline for you device
+# Specify the commandline for your device
#boot from mmc
CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext2 rootdelay=5"
@@ -28,12 +28,18 @@ CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootfs
do_configure_prepend() {
echo "" > ${S}/.config
+ #
+ # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used
+ #
if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then
install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
echo "CONFIG_LOGO=y" >> ${S}/.config
echo "CONFIG_LOGO_LINUX_CLUT224=y" >> ${S}/.config
fi
+ #
+ # oabi / eabi support
+ #
if [ "${TARGET_OS}" == "linux-gnueabi" -o "${TARGET_OS}" == "linux-uclibcgnueabi" ]; then
echo "CONFIG_AEABI=y" >> ${S}/.config
echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
@@ -51,9 +57,36 @@ do_configure_prepend() {
-e '/CONFIG_LOGO_LINUX_CLUT224=/d' \
< '${WORKDIR}/defconfig' >>'${S}/.config'
+ #
+ # root-over-nfs-over-usbgadget support. Limited, but should cover some cases.
+ # Note that you need to have a proper CMDLINE_NFSROOT_USB set for this to work.
+ #
+ if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
+ oenote "Configuring the kernel for root-over-nfs-over-usbgadget with CMDLINE ${CMDLINE_NFSROOT_USB}"
+ echo "CONFIG_INET=y" >> ${S}/.config
+ echo "CONFIG_IP_PNP=y" >> ${S}/.config
+ echo "CONFIG_USB_GADGET=y" >> ${S}/.config
+ echo "CONFIG_USB_ETH=y" >> ${S}/.config
+ echo "CONFIG_NFS_FS=y" >> ${S}/.config
+ echo "CONFIG_ROOT_NFS=y" >> ${S}/.config
+ echo "CONFIG_CMDLINE=\"${CMDLINE_NFSROOT_USB}\"" >> ${S}/.config
+ fi
+
yes '' | oe_runmake oldconfig
}
+# Support checking the kernel size since some kernels need to reside in partitions
+# with a fixed length or there is a limit in transferring the kernel to memory
+do_sizecheck() {
+ if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
+ size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'`
+ if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
+ rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
+ die "This kernel (size=$size) is too big for your device. Please reduce the size of the kernel by making more of it modular."
+ fi
+ fi
+}
+
do_install_prepend() {
if test -e arch/${ARCH}/boot/Image ; then
ln -f arch/${ARCH}/boot/Image arch/${ARCH}/boot/uImage
@@ -90,5 +123,6 @@ do_deploy() {
do_deploy[dirs] = "${S}"
+addtask sizecheck before do_install after do_compile
addtask deploy before do_package after do_install