Author: jcrouse Date: 2007-11-22 00:07:15 +0100 (Thu, 22 Nov 2007) New Revision: 58
Modified: buildrom-devel/Config.in buildrom-devel/bin/checkrom.sh buildrom-devel/config/payloads/Config.in buildrom-devel/config/platforms/Config.in buildrom-devel/config/platforms/alix1c.conf buildrom-devel/config/platforms/db800.conf buildrom-devel/config/platforms/dbe61.conf buildrom-devel/config/platforms/ga-2761gxdk.conf buildrom-devel/config/platforms/m57sli.conf buildrom-devel/config/platforms/msm800sev.conf buildrom-devel/config/platforms/norwich.conf buildrom-devel/config/platforms/platforms.conf buildrom-devel/config/platforms/serengeti_cheetah.conf buildrom-devel/config/platforms/tyan-s2882.conf buildrom-devel/config/platforms/tyan-s2891.conf buildrom-devel/packages/busybox/busybox.mk buildrom-devel/packages/kernel/kernel.inc buildrom-devel/packages/kernel/m57sli-kernel.mk buildrom-devel/packages/kernel/serengeti_cheetah-kernel.mk buildrom-devel/packages/kernel/tyan-s2882-kernel.mk buildrom-devel/packages/kernel/tyan-s2891-kernel.mk buildrom-devel/packages/linuxbios/generic-linuxbios.mk buildrom-devel/packages/linuxbios/linuxbios.inc buildrom-devel/packages/linuxbios/patches/s-c-buildrom-payload.patch buildrom-devel/packages/uclibc/uclibc.mk buildrom-devel/scripts/Build.settings buildrom-devel/scripts/Makefile.lab buildrom-devel/skeleton/device.txt Log: [BUILDROM]] 32/64 bit support
Adds support for building both 32 and 64 bit LAB images from within buildrom. Many changes by Ward Vandewege, Myles Watson and Jordan Crouse.
Signed-off-by: Myles Watson myles@pel.cs.byu.edu Acked-by: Jordan Crouse jordan.crouse@amd.com Acked-by: Ward Vandewege ward@gnu.org
Modified: buildrom-devel/Config.in =================================================================== --- buildrom-devel/Config.in 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/Config.in 2007-11-21 23:07:15 UTC (rev 58) @@ -62,9 +62,22 @@ bool default n
-config PAYLOAD +config PLATFORM_SUPPORT_64BIT bool default n
+config PAYLOAD_64BIT + bool + default n + +config TARGET_32BIT + bool + depends !TARGET_64BIT + default y + +config TARGET_64BIT + bool + default n + source config/platforms/Config.in source config/payloads/Config.in
Modified: buildrom-devel/bin/checkrom.sh =================================================================== --- buildrom-devel/bin/checkrom.sh 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/bin/checkrom.sh 2007-11-21 23:07:15 UTC (rev 58) @@ -1,13 +1,8 @@ #!/bin/sh
size=`du -b $1 | cut -f1` -delta=`expr 884736 - $size` -echo "Bytes left in ROM: $delta" +echo "******************" +echo "Payload takes $size Bytes (`expr $size / 1024` KBytes) in ROM:" +echo "******************"
-if [ $delta -lt 0 ]; then - echo "ERROR! ERROR! ERROR!" - echo "The ELF image $1 is too big!" - exit -1 -fi - exit 0
Modified: buildrom-devel/config/payloads/Config.in =================================================================== --- buildrom-devel/config/payloads/Config.in 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/payloads/Config.in 2007-11-21 23:07:15 UTC (rev 58) @@ -11,42 +11,54 @@
config PAYLOAD_CUSTOM bool "Custom Payload" - select PAYLOAD
config PAYLOAD_ETHERBOOT depends !PLATFORM_M57SLI depends !PLATFORM_TYAN_S2891 bool "Etherboot" - select PAYLOAD
config PAYLOAD_FILO bool "FILO" - select PAYLOAD
config PAYLOAD_KERNEL depends !PLATFORM_GA_2761GXDK bool "Linux kernel payload" - select PAYLOAD + select PAYLOAD_64BIT
config PAYLOAD_LAB depends !PLATFORM_GA_2761GXDK bool "Linux As Bootloader" - select PAYLOAD + select PAYLOAD_64BIT
#config PAYLOAD_OFW # depends !PLATFORM_M57SLI # depends !PLATFORM_TYAN_S2891 # bool "OpenFirmware" -# select PAYLOAD
config PAYLOAD_MEMTEST depends !PLATFORM_M57SLI depends !PLATFORM_TYAN_S2891 bool "Memtest86+" - select PAYLOAD
endchoice
+choice + prompt "Desired target architecture" + depends PLATFORM_SUPPORT_64BIT && PAYLOAD_64BIT + default CHOOSE_32BIT + help + Chose the target architecture for the payload. + +config CHOOSE_64BIT + bool "x86_64 (64 bit)" + select TARGET_64BIT + +config CHOOSE_32BIT + bool "x86 (32 bit)" + select TARGET_32BIT + +endchoice + menu "Custom Payload" depends PAYLOAD_CUSTOM config CUSTOM_PAYLOAD
Modified: buildrom-devel/config/platforms/Config.in =================================================================== --- buildrom-devel/config/platforms/Config.in 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/Config.in 2007-11-21 23:07:15 UTC (rev 58) @@ -60,25 +60,31 @@ bool "GIGABYTE GA-M57SLI-S4" depends VENDOR_GIGABYTE select PLATFORM + select PLATFORM_SUPPORT_64BIT
config PLATFORM_GA_2761GXDK bool "GIGABYTE GA-2761GXDK" depends VENDOR_GIGABYTE select PLATFORM + select PLATFORM_SUPPORT_64BIT
config PLATFORM_TYAN_S2882 bool "Tyan S2882" depends VENDOR_TYAN select PLATFORM + select PLATFORM_SUPPORT_64BIT
config PLATFORM_TYAN_S2891 bool "Tyan S2891" depends VENDOR_TYAN select PLATFORM + select PLATFORM_SUPPORT_64BIT
config PLATFORM_SERENGETI_CHEETAH bool "AMD Serengeti-Cheetah" depends VENDOR_AMD select PLATFORM + select PLATFORM_SUPPORT_64BIT + endchoice endmenu
Modified: buildrom-devel/config/platforms/alix1c.conf =================================================================== --- buildrom-devel/config/platforms/alix1c.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/alix1c.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -17,7 +17,7 @@ # kernel configuration (for LAB)
KERNEL_VERSION=2.6.20.2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/alix1c-defconfig +KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-alix1c UCLIBC_ARCH=i386
# Etherboot configuration
Modified: buildrom-devel/config/platforms/db800.conf =================================================================== --- buildrom-devel/config/platforms/db800.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/db800.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -20,7 +20,7 @@ # Use the same settings as the Norwich platform
KERNEL_VERSION=2.6.20.2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/norwich-defconfig +KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-norwich UCLIBC_ARCH=i386
# Etherboot configuration
Modified: buildrom-devel/config/platforms/dbe61.conf =================================================================== --- buildrom-devel/config/platforms/dbe61.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/dbe61.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -19,7 +19,7 @@ # kernel configuration (for LAB)
KERNEL_VERSION=2.6.20.2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/norwich-defconfig +KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-norwich UCLIBC_ARCH=i386
# Etherboot configuration
Modified: buildrom-devel/config/platforms/ga-2761gxdk.conf =================================================================== --- buildrom-devel/config/platforms/ga-2761gxdk.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/ga-2761gxdk.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -6,8 +6,13 @@ STRIP=strip AS=as
+ifeq ($(CONFIG_TARGET_64BIT),y) +TARGET_ARCH=x86_64 +CFLAGS_platform = +else TARGET_ARCH=i686 -CFLAGS_platform = -m32 +CFLAGS_platform = +endif
# Targets
@@ -20,7 +25,7 @@ # Disable for now - I don't know the right kernel for this platform #KERNEL_VERSION=2.6.22.2 #KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/ -UCLIBC_ARCH=i386 +#UCLIBC_ARCH=$(TARGET_ARCH)
# Etherboot configuration ETHERBOOT_ARCH=i386
Modified: buildrom-devel/config/platforms/m57sli.conf =================================================================== --- buildrom-devel/config/platforms/m57sli.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/m57sli.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -6,8 +6,13 @@ STRIP=strip AS=as
+ifeq ($(CONFIG_TARGET_64BIT),y) +TARGET_ARCH=x86_64 +CFLAGS_platform = +else TARGET_ARCH=i686 -CFLAGS_platform = -m32 +CFLAGS_platform = +endif
# Targets
@@ -17,9 +22,15 @@ # kernel configuration (for LAB)
KERNEL_VERSION=2.6.22.2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/m57sli-defconfig -UCLIBC_ARCH=i386
+ifeq ($(CONFIG_TARGET_64BIT),y) +$(error You must specify a kernel configuration for 64 bit) +else +KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-m57sli +endif + +#UCLIBC_ARCH=$(TARGET_ARCH) + # Etherboot configuration ETHERBOOT_ARCH=i386
Modified: buildrom-devel/config/platforms/msm800sev.conf =================================================================== --- buildrom-devel/config/platforms/msm800sev.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/msm800sev.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -18,7 +18,7 @@ # kernel configuration (for LAB)
KERNEL_VERSION=2.6.20.2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/msm800sev-defconfig +KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-msm800sev UCLIBC_ARCH=i386
# Etherboot configuration
Modified: buildrom-devel/config/platforms/norwich.conf =================================================================== --- buildrom-devel/config/platforms/norwich.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/norwich.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -18,7 +18,7 @@ # kernel configuration (for LAB)
KERNEL_VERSION=2.6.20.2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/norwich-defconfig +KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-norwich UCLIBC_ARCH=i386
# Etherboot configuration
Modified: buildrom-devel/config/platforms/platforms.conf =================================================================== --- buildrom-devel/config/platforms/platforms.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/platforms.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -15,6 +15,7 @@ PLATFORM-$(CONFIG_PLATFORM_TYAN_S2882) = tyan-s2882.conf PLATFORM-$(CONFIG_PLATFORM_TYAN_S2891) = tyan-s2891.conf PLATFORM-$(CONFIG_PLATFORM_SERENGETI_CHEETAH) = serengeti_cheetah.conf +PLATFORM-$(CONFIG_PLATFORM_SERENGETI_CHEETAH_64) = serengeti_cheetah-x86_64.conf PLATFORM-$(CONFIG_PLATFORM_GA_2761GXDK) = ga-2761gxdk.conf
include $(CONFIG_DIR)/platforms/$(PLATFORM-y)
Modified: buildrom-devel/config/platforms/serengeti_cheetah.conf =================================================================== --- buildrom-devel/config/platforms/serengeti_cheetah.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/serengeti_cheetah.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -7,20 +7,36 @@ STRIP=strip AS=as
-TARGET_ARCH=i586 +ifeq ($(CONFIG_TARGET_64BIT),y) +TARGET_ARCH=x86_64 CFLAGS_platform = +else +TARGET_ARCH=i686 +CFLAGS_platform = +endif
# Targets
KERNEL_MK=$(PACKAGE_DIR)/kernel/serengeti_cheetah-kernel.mk -LINUXBIOS_MK=$(PACKAGE_DIR)/linuxbios/generic-linuxbios.mk +LINUXBIOS_MK=$(PACKAGE_DIR)/linuxbios/serengeti_cheetah.mk
# kernel configuration (for LAB)
+ifeq ($(CONFIG_TARGET_64BIT),y) +KERNEL_VERSION=2.6.22.2 +KERNEL_MK=$(PACKAGE_DIR)/kernel/serengeti_cheetah-kernel-x86_64.mk +KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-serengeti_cheetah-x86_64 +BUSYBOX_CONFIG=defconfig-serengeti_cheetah-x86_64 +UCLIBC_VER=0.9.29 +UCLIBC_CONFIG=defconfig-x86_64 +else KERNEL_VERSION=2.6.20.2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/serengeti_cheetah-defconfig -UCLIBC_ARCH=i386 +KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-serengeti_cheetah +UCLIBC_VER=0.9.28 +endif
+#UCLIBC_ARCH=$(TARGET_ARCH) + # Etherboot configuration ETHERBOOT_ARCH=i386
@@ -30,7 +46,7 @@ LINUXBIOS_BOARD=serengeti_cheetah LINUXBIOS_CONFIG=Config.lb LINUXBIOS_TDIR=serengeti_cheetah -LINUXBIOS_TAG=2880 +LINUXBIOS_TAG=2950 LINUXBIOS_ROM_NAME=serengeti_cheetah.rom
# FILO configuration
Modified: buildrom-devel/config/platforms/tyan-s2882.conf =================================================================== --- buildrom-devel/config/platforms/tyan-s2882.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/tyan-s2882.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -6,8 +6,13 @@ STRIP=strip AS=as
+ifeq ($(CONFIG_TARGET_64BIT), y) +TARGET_ARCH=x86_64 +CFLAGS_platform = +else TARGET_ARCH=i686 -CFLAGS_platform = -m32 +CFLAGS_platform = +endif
# Targets
@@ -17,9 +22,15 @@ # kernel configuration (for LAB)
KERNEL_VERSION=2.6.22.2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/tyan-s2882-defconfig -UCLIBC_ARCH=i386
+ifeq ($(CONFIG_TARGET_64BIT), y) +$(error You must specify a kernel configuration for 64 bit) +else +KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-tyan-s2882 +endif + +#UCLIBC_ARCH=i386 + # Etherboot configuration ETHERBOOT_ARCH=i386
Modified: buildrom-devel/config/platforms/tyan-s2891.conf =================================================================== --- buildrom-devel/config/platforms/tyan-s2891.conf 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/config/platforms/tyan-s2891.conf 2007-11-21 23:07:15 UTC (rev 58) @@ -6,8 +6,13 @@ STRIP=strip AS=as
+ifeq ($(CONFIG_TARGET_64BIT), y) +TARGET_ARCH=x86_64 +CFLAGS_platform = +else TARGET_ARCH=i686 -CFLAGS_platform = -m32 +CFLAGS_platform = +endif
# Targets
@@ -17,9 +22,15 @@ # kernel configuration (for LAB)
KERNEL_VERSION=2.6.22.2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/tyan-s2891-defconfig -UCLIBC_ARCH=i386
+ifeq ($(CONFIG_TARGET_64BIT),y) +$(error You must specify a kernel configuration for 64 bit) +else +KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-tyan-s2891 +endif + +#UCLIBC_ARCH=i386 + # Etherboot configuration ETHERBOOT_ARCH=i386
Modified: buildrom-devel/packages/busybox/busybox.mk =================================================================== --- buildrom-devel/packages/busybox/busybox.mk 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/packages/busybox/busybox.mk 2007-11-21 23:07:15 UTC (rev 58) @@ -15,6 +15,8 @@ BUSYBOX_INSTALL_LOG=$(BUSYBOX_LOG_DIR)/install.log endif
+BUSYBOX_CONFIG ?= defconfig + $(SOURCE_DIR)/$(BUSYBOX_SOURCE): @ mkdir -p $(SOURCE_DIR) @ wget -P $(SOURCE_DIR) $(BUSYBOX_URL)/$(BUSYBOX_SOURCE) @@ -30,7 +32,7 @@ @ touch $@
$(BUSYBOX_SRC_DIR)/.config: $(BUSYBOX_STAMP_DIR)/.patched - @ cp $(PACKAGE_DIR)/busybox/conf/defconfig $@ + @ cp $(PACKAGE_DIR)/busybox/conf/$(BUSYBOX_CONFIG) $@
$(BUSYBOX_SRC_DIR)/busybox: $(BUSYBOX_SRC_DIR)/.config @ echo "Building busybox..."
Modified: buildrom-devel/packages/kernel/kernel.inc =================================================================== --- buildrom-devel/packages/kernel/kernel.inc 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/packages/kernel/kernel.inc 2007-11-21 23:07:15 UTC (rev 58) @@ -7,6 +7,14 @@ KERNEL_STAMP_DIR=$(KERNEL_DIR)/stamps KERNEL_LOG_DIR=$(KERNEL_DIR)/logs
+ifeq ($(CONFIG_TARGET_64BIT),y) +KERNEL_BZIMAGE=$(KERNEL_SRC_DIR)/arch/x86_64/boot/bzImage +KERNEL_BUILD_ARCH=x86_64 +else +KERNEL_BZIMAGE=$(KERNEL_SRC_DIR)/arch/i386/boot/bzImage +KERNEL_BUILD_ARCH=i386 +endif + ifeq ($(CONFIG_VERBOSE),y) KERNEL_FETCH_LOG=/dev/stdout KERNEL_BUILD_LOG=/dev/stdout @@ -42,23 +50,23 @@ $(KERNEL_SRC_DIR)/.config: $(KERNEL_STAMP_DIR)/.patched @ cat $(KERNEL_CONFIG) | sed -e s:^CONFIG_LOCALVERSION=.*:CONFIG_LOCALVERSION="$(ROM_VERSION)": > $(KERNEL_SRC_DIR)/.config
-$(KERNEL_SRC_DIR)/arch/i386/boot/bzImage: $(KERNEL_SRC_DIR)/.config +$(KERNEL_BZIMAGE): $(KERNEL_SRC_DIR)/.config @ echo "Building kernel..." - @ $(MAKE) -C $(KERNEL_SRC_DIR) ARCH=i386 \ + @ $(MAKE) -C $(KERNEL_SRC_DIR) ARCH=$(KERNEL_BUILD_ARCH) \ KERNEL_CC="$(CC)" KERNEL_LD="$(LD)" > $(KERNEL_BUILD_LOG) 2>&1
-$(OUTPUT_DIR)/bzImage: $(KERNEL_SRC_DIR)/arch/i386/boot/bzImage +$(OUTPUT_DIR)/bzImage: $(KERNEL_BZIMAGE) @ install -d $(OUTPUT_DIR) @ install -m 0644 $< $@
-$(OUTPUT_DIR)/vmlinux: $(KERNEL_SRC_DIR)/arch/i386/boot/bzImage +$(OUTPUT_DIR)/vmlinux: $(KERNEL_BZIMAGE) @ install -d $(OUTPUT_DIR) @ install -m 0644 $(KERNEL_SRC_DIR)/vmlinux $@ $(KERNEL_STAMP_DIR)/.headers: $(KERNEL_SRC_DIR)/.config $(STAGING_DIR)/host/bin/unifdef @ echo "Installing kernel headers..." @( export PATH=$(PATH):$(STAGING_DIR)/host/bin; \ - $(MAKE) -C $(KERNEL_SRC_DIR) ARCH=i386 \ + $(MAKE) -C $(KERNEL_SRC_DIR) ARCH=$(KERNEL_BUILD_ARCH) \ INSTALL_HDR_PATH=$(STAGING_DIR)/ headers_install > $(KERNEL_INSTALL_LOG) 2>&1) @ touch $@
Modified: buildrom-devel/packages/kernel/m57sli-kernel.mk =================================================================== --- buildrom-devel/packages/kernel/m57sli-kernel.mk 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/packages/kernel/m57sli-kernel.mk 2007-11-21 23:07:15 UTC (rev 58) @@ -2,8 +2,9 @@
KERNEL_URL=http://kernel.org/pub/linux/kernel/v2.6/ KERNEL_SOURCE=linux-$(KERNEL_VERSION).tar.bz2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-m57sli
+# KERNEL_CONFIG is defined in the platform configuration + TINY_URL=http://elinux.org/images/0/0e/ TINY_SOURCE=Tiny-quilt-2.6.22.1-1.tar.gz TINY_DIR=$(KERNEL_DIR)/tiny/patches
Modified: buildrom-devel/packages/kernel/serengeti_cheetah-kernel.mk =================================================================== --- buildrom-devel/packages/kernel/serengeti_cheetah-kernel.mk 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/packages/kernel/serengeti_cheetah-kernel.mk 2007-11-21 23:07:15 UTC (rev 58) @@ -2,12 +2,9 @@
KERNEL_URL=http://kernel.org/pub/linux/kernel/v2.6/ KERNEL_SOURCE=linux-$(KERNEL_VERSION).tar.bz2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-serengeti_cheetah
-#TINY_DIR=$(PACKAGE_DIR)/kernel/patches/tiny -#KERNEL_PATCHES += $(shell ls $(TINY_DIR)/*.patch) +# Kernel config is set in the platform configuration
- $(SOURCE_DIR)/$(KERNEL_SOURCE): @ mkdir -p $(SOURCE_DIR) @ wget -P $(SOURCE_DIR) $(KERNEL_URL)/$(KERNEL_SOURCE)
Modified: buildrom-devel/packages/kernel/tyan-s2882-kernel.mk =================================================================== --- buildrom-devel/packages/kernel/tyan-s2882-kernel.mk 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/packages/kernel/tyan-s2882-kernel.mk 2007-11-21 23:07:15 UTC (rev 58) @@ -2,8 +2,9 @@
KERNEL_URL=http://kernel.org/pub/linux/kernel/v2.6/ KERNEL_SOURCE=linux-$(KERNEL_VERSION).tar.bz2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-tyan-s2882
+# KERNEL_CONFIG is defined in the platform configuration + TINY_URL=http://elinux.org/images/0/0e/ TINY_SOURCE=Tiny-quilt-2.6.22.1-1.tar.gz TINY_DIR=$(KERNEL_DIR)/tiny/patches
Modified: buildrom-devel/packages/kernel/tyan-s2891-kernel.mk =================================================================== --- buildrom-devel/packages/kernel/tyan-s2891-kernel.mk 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/packages/kernel/tyan-s2891-kernel.mk 2007-11-21 23:07:15 UTC (rev 58) @@ -2,8 +2,9 @@
KERNEL_URL=http://kernel.org/pub/linux/kernel/v2.6/ KERNEL_SOURCE=linux-$(KERNEL_VERSION).tar.bz2 -KERNEL_CONFIG=$(PACKAGE_DIR)/kernel/conf/defconfig-tyan-s2891
+# KERNEL_CONFIG is defined in the platform configuration + TINY_URL=http://elinux.org/images/0/0e/ TINY_SOURCE=Tiny-quilt-2.6.22.1-1.tar.gz TINY_DIR=$(KERNEL_DIR)/tiny/patches
Modified: buildrom-devel/packages/linuxbios/generic-linuxbios.mk =================================================================== --- buildrom-devel/packages/linuxbios/generic-linuxbios.mk 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/packages/linuxbios/generic-linuxbios.mk 2007-11-21 23:07:15 UTC (rev 58) @@ -7,20 +7,11 @@ endif
LINUXBIOS_BASE_DIR=svn -LINUXBIOS_URL=svn://openbios.org/repos/trunk/LinuxBIOSv2 +LINUXBIOS_URL=svn://linuxbios.org/repos/trunk/LinuxBIOSv2 LINUXBIOS_TARBALL=linuxbios-svn-$(LINUXBIOS_TAG).tar.gz LINUXBIOS_PAYLOAD_TARGET=$(LINUXBIOS_BUILD_DIR)/payload.elf TARGET_ROM = $(LINUXBIOS_VENDOR)-$(LINUXBIOS_BOARD).rom
-# Make sure we have the tools we need to accomplish this -HAVE_IASL:=$(call find-tool,iasl) - -ifeq ($(HAVE_IASL),n) -$(error To build LinuxBIOS, you need to install the 'iasl' tool) -endif - -LINUXBIOS_PATCHES += $(PACKAGE_DIR)/linuxbios/patches/s-c-buildrom-payload.patch - include $(PACKAGE_DIR)/linuxbios/linuxbios.inc
$(SOURCE_DIR)/$(LINUXBIOS_TARBALL):
Modified: buildrom-devel/packages/linuxbios/linuxbios.inc =================================================================== --- buildrom-devel/packages/linuxbios/linuxbios.inc 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/packages/linuxbios/linuxbios.inc 2007-11-21 23:07:15 UTC (rev 58) @@ -68,7 +68,7 @@ @ touch $@
$(LINUXBIOS_STAMP_DIR)/.configured: $(LINUXBIOS_STAMP_DIR)/.patched - @ echo "Building target config file..." + @ echo "Building target..." @( cd $(LINUXBIOS_TARGET_DIR); \ ./buildtarget $(LINUXBIOS_CONFIG_NAME) > $(LINUXBIOS_CONFIG_LOG) 2>&1) @ touch $@
Modified: buildrom-devel/packages/linuxbios/patches/s-c-buildrom-payload.patch =================================================================== --- buildrom-devel/packages/linuxbios/patches/s-c-buildrom-payload.patch 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/packages/linuxbios/patches/s-c-buildrom-payload.patch 2007-11-21 23:07:15 UTC (rev 58) @@ -1,45 +0,0 @@ -Index: svn/targets/amd/serengeti_cheetah/Config.lb -=================================================================== ---- svn.orig/targets/amd/serengeti_cheetah/Config.lb -+++ svn/targets/amd/serengeti_cheetah/Config.lb -@@ -29,7 +29,7 @@ romimage "normal" - # payload ../../../payloads/tg3.zelf - # payload ../../../../payloads/tg3_vga.zelf - # payload ../../../../payloads/tg3--filo_hda2_vga.zelf -- payload ../../../../payloads/tg3--filo_hda2_vga_5.4.1.zelf -+# payload ../../../../payloads/tg3--filo_hda2_vga_5.4.1.zelf - # payload ../../../../payloads/e1000_vga.zelf - # payload ../../../../payloads/tg3--filo_hda2_vga_5_4.zelf - # payload ../../../payloads/tg3_com2.zelf -@@ -38,6 +38,7 @@ romimage "normal" - # payload ../../../payloads/tg3--eepro100--e1000--filo_hda2.zelf - # payload ../../../payloads/tg3--eepro100--e1000--filo_hda2_5.3.zelf - # payload ../../../payloads/tg3--eepro100--e1000--filo_hda2_com2.zelf -+ payload ../payload.elf - end - - romimage "fallback" -@@ -62,7 +63,7 @@ romimage "fallback" - # payload ../../../../payloads/filo_hda.zelf - # payload ../../../../payloads/tg3--filo_hda2_vga.zelf - # payload ../../../../payloads/tg3--filo_hda2_vga_5_4.zelf -- payload ../../../../payloads/tg3--filo_hda2_vga_5.4.1.zelf -+# payload ../../../../payloads/tg3--filo_hda2_vga_5.4.1.zelf - # payload ../../../../payloads/filo_hda2_novga.zelf - # payload ../../../payloads/tg3_com2.zelf - # payload ../../../payloads/e1000--filo.zelf -@@ -70,6 +71,7 @@ romimage "fallback" - # payload ../../../payloads/tg3--eepro100--e1000--filo_hda2.zelf - # payload ../../../payloads/tg3--eepro100--e1000--filo_hda2_5.3.zelf - # payload ../../../payloads/tg3--eepro100--e1000--filo_hda2_com2.zelf -+ payload ../payload.elf - end - - romimage "failover" -@@ -81,5 +83,5 @@ romimage "failover" - end - - --buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback" "failover" -+buildrom ./serengeti_cheetah.rom ROM_SIZE "normal" "fallback" "failover" - #buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback"
Modified: buildrom-devel/packages/uclibc/uclibc.mk =================================================================== --- buildrom-devel/packages/uclibc/uclibc.mk 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/packages/uclibc/uclibc.mk 2007-11-21 23:07:15 UTC (rev 58) @@ -1,7 +1,18 @@ +# Defaults, if not set in the platform config +ifeq ($(CONFIG_TARGET_64BIT),y) +UCLIBC_VER ?= 0.9.29 +UCLIBC_ARCH ?= x86_64 +UCLIBC_CONFIG ?= defconfig-x86_64 +else +UCLIBC_VER ?= 0.9.28 +UCLIBC_ARCH ?= i386 +UCLIBC_CONFIG ?= defconfig +endif + UCLIBC_URL=http://www.uclibc.org/downloads -UCLIBC_SOURCE=uClibc-0.9.28.tar.bz2 +UCLIBC_SOURCE=uClibc-$(UCLIBC_VER).tar.bz2 UCLIBC_DIR=$(BUILD_DIR)/uclibc -UCLIBC_SRC_DIR=$(UCLIBC_DIR)/uClibc-0.9.28 +UCLIBC_SRC_DIR=$(UCLIBC_DIR)/uClibc-$(UCLIBC_VER) UCLIBC_STAMP_DIR=$(UCLIBC_DIR)/stamps UCLIBC_LOG_DIR=$(UCLIBC_DIR)/logs
@@ -13,9 +24,6 @@ UCLIBC_INSTALL_LOG=$(UCLIBC_LOG_DIR)/install.log endif
-# Default, if its not set in the platform config -UCLIBC_ARCH ?= $(TARGET_ARCH) - $(SOURCE_DIR)/$(UCLIBC_SOURCE): @ mkdir -p $(SOURCE_DIR) @ wget -P $(SOURCE_DIR) $(UCLIBC_URL)/$(UCLIBC_SOURCE) @@ -26,7 +34,7 @@ @ touch $@
$(UCLIBC_SRC_DIR)/.config: $(UCLIBC_STAMP_DIR)/.unpacked - @ cp $(PACKAGE_DIR)/uclibc/conf/defconfig $(UCLIBC_SRC_DIR)/.config + @ cat $(PACKAGE_DIR)/uclibc/conf/$(UCLIBC_CONFIG) | sed -e s:^KERNEL_HEADERS=.*:KERNEL_HEADERS="$(KERNEL_SRC_DIR)/include": > $(UCLIBC_SRC_DIR)/.config
$(UCLIBC_SRC_DIR)/lib/libc.a: $(UCLIBC_SRC_DIR)/.config @ echo "Building uclibc..."
Modified: buildrom-devel/scripts/Build.settings =================================================================== --- buildrom-devel/scripts/Build.settings 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/scripts/Build.settings 2007-11-21 23:07:15 UTC (rev 58) @@ -26,6 +26,7 @@ CROSS_CFLAGS= CROSS_ASFLAGS= CROSS_LDFLAGS= +UCLIBC_LOADER = /lib/ld-uClibc.so.0
ifeq ($(BUILD_ARCH),x86_64) ifneq ($(BUILD_ARCH), $(TARGET_ARCH)) @@ -34,6 +35,8 @@ CROSS_CFLAGS=-m32 CROSS_LDFLAGS=-melf_i386
+else +UCLIBC_LOADER = /lib/ld64-uClibc.so.0 endif endif
@@ -63,7 +66,7 @@ # (without any cross flags) for at least busybox, and probably others too
LDFLAGS_orig = -nostdlib -L$(STAGING_DIR)/lib \ --Wl,-rpath-link,$(STAGING_DIR)/lib -Wl,--dynamic-linker,/lib/ld-uClibc.so.0 \ +-Wl,-rpath-link,$(STAGING_DIR)/lib -Wl,--dynamic-linker,$(UCLIBC_LOADER) \ $(LDFLAGS_platform)
LDFLAGS=$(CROSS_LDFLAGS) $(LDFLAGS_orig)
Modified: buildrom-devel/scripts/Makefile.lab =================================================================== --- buildrom-devel/scripts/Makefile.lab 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/scripts/Makefile.lab 2007-11-21 23:07:15 UTC (rev 58) @@ -1,5 +1,11 @@ # Targets specifically for the LAB payload
+ifeq ($(CONFIG_TARGET_64BIT), y) +MKELFIMAGE_KERNEL = bzImage +else +MKELFIMAGE_KERNEL = vmlinux +endif + $(OUTPUT_DIR)/initrd.uncompressed: $(PAYLOAD-y) @ cp -af $(SKELETON_DIR)/* $(INITRD_DIR) @ chmod 0755 $(INITRD_DIR)/linuxrc @@ -30,14 +36,14 @@ @ rm -f $@ @ $(STAGING_DIR)/sbin/mkelfImage --command-line="$(COMMAND_LINE)" \ --ramdisk=$(OUTPUT_DIR)/initrd.uncompressed \ - $(OUTPUT_DIR)/vmlinux $@ + $(OUTPUT_DIR)/$(MKELFIMAGE_KERNEL) $@ @ chmod 0644 $@
$(OUTPUT_DIR)/lab-payload.elf: $(OUTPUT_DIR)/initrd @ echo "Building the ELF payload..." @ rm -f $@ @ $(STAGING_DIR)/sbin/mkelfImage --command-line="$(COMMAND_LINE)" \ - --ramdisk=$(OUTPUT_DIR)/initrd $(OUTPUT_DIR)/bzImage $@ + --ramdisk=$(OUTPUT_DIR)/initrd $(OUTPUT_DIR)/$(MKELFIMAGE_KERNEL) $@ @ chmod 0644 $@ @ $(BIN_DIR)/checkrom.sh $@
Modified: buildrom-devel/skeleton/device.txt =================================================================== --- buildrom-devel/skeleton/device.txt 2007-11-13 22:22:30 UTC (rev 57) +++ buildrom-devel/skeleton/device.txt 2007-11-21 23:07:15 UTC (rev 58) @@ -1,17 +1,25 @@ -null c 640 0 0 1 3 -zero c 640 0 0 1 5 -tty c 640 0 0 5 0 -tty0 c 640 0 0 4 0 -tty1 c 640 0 0 4 1 -console c 640 0 0 5 1 -sda b 660 0 0 8 0 -sda1 b 660 0 0 8 1 -sda2 b 660 0 0 8 2 -sda3 b 660 0 0 8 3 -sda4 b 660 0 0 8 4 -sda5 b 660 0 0 8 5 -sda6 b 660 0 0 8 6 -sda7 b 660 0 0 8 7 -sda8 b 660 0 0 8 8 -mem c 640 0 0 1 1 -fb0 c 640 0 0 29 0 +null c 640 0 0 1 3 +zero c 640 0 0 1 5 +tty c 640 0 0 5 0 +tty0 c 640 0 0 4 0 +tty1 c 660 0 0 4 1 +hda b 660 0 0 3 0 +hda1 b 660 0 0 3 1 +hda2 b 660 0 0 3 2 +hdb b 660 0 0 3 64 +hdb1 b 660 0 0 3 65 +hdb2 b 660 0 0 3 66 +hdc b 660 0 0 22 0 +fd0 b 660 0 0 2 0 +console c 640 0 0 5 1 +sda b 660 0 0 8 0 +sda1 b 660 0 0 8 1 +sda2 b 660 0 0 8 2 +sda3 b 660 0 0 8 3 +sda4 b 660 0 0 8 4 +sda5 b 660 0 0 8 5 +sda6 b 660 0 0 8 6 +sda7 b 660 0 0 8 7 +sda8 b 660 0 0 8 8 +mem c 640 0 0 1 1 +fb0 c 640 0 0 29 0