kernel: add arm7 multiplatform kernel.

not booting on panda yet.
This commit is contained in:
Arne Fitzenreiter
2013-09-15 18:41:16 +02:00
parent d1a84dd38d
commit 7284262a5e
13 changed files with 8908 additions and 121 deletions

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2011 IPFire Team <info@ipfire.org> #
# Copyright (C) 2007-2013 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -95,9 +95,10 @@ ifeq "$(MACHINE_TYPE)" "arm"
# kirkwood kernel
/sbin/dracut --force --verbose --strip /boot/ipfirerd-$(KVER)-kirkwood.img $(KVER)-ipfire-kirkwood
cd /boot && mkimage -A arm -T ramdisk -C lzma -d ipfirerd-$(KVER)-kirkwood.img uInit-ipfire-kirkwood
# omap kernel
/sbin/dracut --force --verbose --strip /boot/ipfirerd-$(KVER)-omap.img $(KVER)-ipfire-omap
cd /boot && mkimage -A arm -T ramdisk -C lzma -d ipfirerd-$(KVER)-omap.img uInit-ipfire-omap
# arm7 multi kernel
/sbin/dracut --force --verbose --strip /boot/ipfirerd-$(KVER)-multi.img $(KVER)-ipfire-multi
cd /boot && mkimage -A arm -T ramdisk -C lzma -d ipfirerd-$(KVER)-multi.img uInit-ipfire-multi
# cd /boot && cp -f ipfirerd-$(KVER)-multi.img zInit-ipfire-multi
else
/sbin/dracut --force --verbose --strip /boot/ipfirerd-$(KVER).img $(KVER)-ipfire
endif

View File

@@ -86,7 +86,7 @@ endif
# Install MLO and uboot first
ifeq "$(MACHINE_TYPE)" "arm"
cp -v /boot/MLO $(MNThdd)/boot/
cp -v /boot/u-boot.bin $(MNThdd)/boot/
cp -v /boot/u-boot.img $(MNThdd)/boot/
sync
umount $(MNThdd)/boot
mount -o loop $(IMGboot) $(MNThdd)/boot
@@ -182,7 +182,7 @@ ifneq "$(MACHINE_TYPE)" "arm"
sed -i -e "s| panic=10 | console=ttyS0,115200n8 panic=10 |g" $(MNThdd)/boot/grub/grub.conf
else
sed -i -e "s| console=tty1 | console=ttyAMA0,115200n8 |g" $(MNThdd)/boot/cmdline.txt
sed -i -e "s| console=tty1 omapfb.mode=dvi:800x600MR-16@60 | console=ttyO2,115200n8 |g" $(MNThdd)/boot/boot.script
sed -i -e "s| console=tty1 | console=ttyO2,115200n8 |g" $(MNThdd)/boot/boot.script
cd $(MNThdd)/boot && ./convert_bootscript
endif

View File

@@ -157,18 +157,11 @@ ifeq "$(KCFG)" "-kirkwood"
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10.10-mv_cesa_disable_failing_hmac_sha1.patch
endif
ifeq "$(MACHINE_TYPE)" "arm"
# cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.45_align_ssb_modtable_32bit_boundary.patch
# Reverse some asm optimizations that are incompatible with older gcc
# cd $(DIR_APP) && patch -p1 -R < $(DIR_SRC)/src/patches/linux-2.6-arm-asm-constraint.patch
endif
ifeq "$(KCFG)" "-omap"
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.2-0001-panda-wlan-fix.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.2-0002-panda-i2c.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.2-panda-reboot.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.x-smsc95xx-add_mac_addr_param.patch
ifeq "$(KCFG)" "-multi"
# cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.2-0001-panda-wlan-fix.patch
# cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.2-0002-panda-i2c.patch
# cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.2-panda-reboot.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10-smsc95xx-add_mac_addr_param.patch
endif
ifeq "$(KCFG)" "-rpi"
@@ -199,10 +192,10 @@ ifeq "$(KCFG)" "-kirkwood"
cd $(DIR_APP) && cp -v arch/arm/boot/uImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
cd $(DIR_APP) && cp -v arch/arm/boot/uImage /boot/uImage-$(VERSUFIX)
else
ifeq "$(KCFG)" "-omap"
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" uImage
cd $(DIR_APP) && cp -v arch/arm/boot/uImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
cd $(DIR_APP) && cp -v arch/arm/boot/uImage /boot/uImage-$(VERSUFIX)
ifeq "$(KCFG)" "-multi"
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" zImage
cd $(DIR_APP) && cp -v arch/arm/boot/zImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
cd $(DIR_APP) && cp -v arch/arm/boot/zImage /boot/zImage-$(VERSUFIX)
else
ifeq "$(KCFG)" "-rpi"
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" zImage
@@ -222,6 +215,14 @@ endif
cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install
cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) firmware_install
ifeq "$(MACHINE_TYPE)" "arm"
cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) dtbs
cd $(DIR_APP) && for f in $$(find arch/arm/boot/dts/ -name *.dtb); do \
mkdir -p /boot/dtb-$(VER)-$(VERSUFIX) ; \
install -m 644 $$f /boot/dtb-$(VER)-$(VERSUFIX)/ ; \
done
endif
ifeq "$(LASTKERNEL)" "1"
# Only do this once
cd $(DIR_APP) && install -m 755 usr/gen_init_cpio /sbin/

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# Copyright (C) 2007-2013 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -79,8 +79,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
-mkdir -pv /usr/share/u-boot/pandaboard
cd $(DIR_APP) && make CROSS_COMPILE="" omap4_panda_config
cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
cd $(DIR_APP) && install -v -m 644 MLO u-boot.bin u-boot.img \
cd $(DIR_APP) && install -v -m 644 MLO u-boot.img \
/usr/share/u-boot/pandaboard
# Install pandaboard uboot as default
cd $(DIR_APP) && install MLO /boot/
cd $(DIR_APP) && install u-boot.img /boot/
cp -vf $(DIR_SRC)/config/u-boot/* /boot/
cd $(DIR_APP) && make distclean
# Wandboard Quad

View File

@@ -1,85 +0,0 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 2011.12
# Linare version: git clone git://git.linaro.org/boot/u-boot-linaro-stable.git
# Branch: origin/Linaro-u-boot-2011.12
THISAPP = uboot-panda-$(VER)
DL_FILE = $(THISAPP).tar.xz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
SUP_ARCH = armv5tel
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 19975e9bb4b10d8e67db84e51fcaa43b
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
dist:
@$(PAK)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar Jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && make omap4_panda_config
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && install MLO /boot/
cd $(DIR_APP) && install u-boot.bin /boot/
cp -vf $(DIR_SRC)/config/u-boot/* /boot/
@rm -rf $(DIR_APP)
@$(POSTBUILD)