Merge pull request #607 from jquagga/for_pull_request

chromebook revised package builds
This commit is contained in:
Kevin Mihelich 2013-11-14 17:59:41 -08:00
commit 71af61d25e
3 changed files with 105 additions and 55 deletions

View file

@ -1,3 +1,4 @@
# Samsung/HP Chromebook Kernel
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
# Maintainer: stratum nine <strata@dropswitch.net>
@ -5,100 +6,114 @@ buildarch=4
pkgbase=linux-chromebook
pkgname=('linux-chromebook' 'linux-headers-chromebook')
pkgver=20130813
pkgver=20131105
_kernelname=${pkgname#linux}
pkgdesc="ChromiumOS kernel with ArchLinux ARM tweaks"
_basever=3.4
pkgrel=1
pkgdesc="Chromium OS kernel with ArchLinux ARM tweaks for SAMSUNG ARM Chromebook."
arch=('armv7h')
url="http://git.chromium.org/gitweb/?p=chromiumos/third_party/kernel.git;a=summary"
url="https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.4"
license=('GPL2')
makedepends=('uboot-mkimage' 'dtc' 'git')
source=('config'
makedepends=('uboot-mkimage' 'dtc')
options=('!strip')
_commit=90b982ed9d47345a8f0ed57ce2a28b942188db6d
source=("https://chromium.googlesource.com/chromiumos/third_party/kernel/+archive/${_commit}.tar.gz"
'config'
'kernel.its')
md5sums=('9ef2273a0befbc005260ebbaf8b912f7'
'1ee7e0f62516ba3af19022c25636011c')
noextract=("${_commit}.tar.gz")
md5sums=('fcc4b2d0b0ac8850dff2f6217f293a3c'
'5e255ae340bad3a32d9f1d1559fe3995'
'56f8343875b928b6aa4e83921e5df25f')
_gitroot='https://git.chromium.org/git/chromiumos/third_party/kernel.git'
_gitname='chromeos-3.4'
_gitbranch='chromeos-3.4'
prepare() {
#Set up and extract kernel
mkdir -p ${srcdir}/chromeos-${_basever}
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
tar -xf ${_commit}.tar.gz -C ${srcdir}/chromeos-${_basever}
if [[ -d "$_gitname" ]]; then
cd "$_gitname" && git pull origin
msg "The local files are updated."
else
git clone --depth 1 --branch="${_gitbranch}" "$_gitroot" "$_gitname"
fi
msg "GIT checkout done or server timeout"
msg "Starting build..."
cd "$srcdir/${_gitname}"
cd ${srcdir}/chromeos-${_basever}
# Kernel configuration
cp "${srcdir}/config" .config
cp "${srcdir}/config" .config
msg "Get kernel version ..."
make prepare
msg "Building kernel and modules ..."
make uImage modules
msg "Creating .dtb's ..."
make dtbs
msg "Creating FIT image for nv-U-boot ..."
# .its files for FIT Images
cp "${srcdir}/kernel.its" arch/arm/boot/kernel.its
}
build() {
cd ${srcdir}/chromeos-${_basever}
# get kernel version
make prepare
# load configuration
# Configure the kernel. Replace the line below with one of your choice.
#make menuconfig # CLI menu for configuration
#make nconfig # new CLI menu for configuration
#make xconfig # X-based configuration
#make oldconfig # using old config from previous kernel version
# ... or manually edit .config
# Copy back our configuration (use with new kernel version)
#cp ./.config ../${pkgbase}.config
####################
# stop here
# this is useful to configure the kernel
#msg "Stopping build"
#return 1
####################
#yes "" | make config
# build!
make ${MAKEFLAGS} zImage modules dtbs
cd arch/arm/boot
mkimage -f kernel.its zImage
cp -v zImage vmlinux.uimg
mkimage -f kernel.its vmlinux.uimg
}
package_linux-chromebook() {
pkgdesc="The Linux Kernel and modules - SAMSUNG ARM Chromebook kernel and modules"
pkgdesc="The Linux Kernel and modules - ARM Chromebook kernel and modules"
depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.16')
optdepends=('crda: to set the correct wireless channels of your country')
provides=('linux26' "linux=${pkgver}")
install=${pkgname}.install
cd "${srcdir}/${_gitname}"
cd ${srcdir}/chromeos-${_basever}
KARCH=arm
# get kernel version
_kernver="$(make kernelrelease)"
_basekernel=${_kernver%%-*}
_basekernel=${_basekernel%.*}
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot/dtbs}
make INSTALL_MOD_PATH="${pkgdir}" modules_install
cp arch/arm/boot/vmlinux.uimg "${pkgdir}/boot/vmlinux.uimg"
# set correct depmod command for install
sed \
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
-i "${startdir}/${pkgname}.install"
# remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
rm -rf "${pkgdir}/lib/firmware"
# gzip -9 all modules to save 100MB of space
find "${pkgdir}" -name '*.ko' | xargs -P 2 -n 1 gzip -9
find "${pkgdir}" -name '*.ko' |xargs -P 2 -n 1 gzip -9
# make room for external modules
ln -s "../extramodules-${_basekernel}-${_kernelname:-ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
# add real version for building modules and running depmod from post_install/upgrade
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basever}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basever}/version"
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_kernelname:-ARCH}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_kernelname:-ARCH}/version"
# Now we call depmod...
depmod -b "$pkgdir" -F System.map "$_kernver"
# move the module tree /lib -> /usr/lib
# move module tree /lib -> /usr/lib
mkdir -p "${pkgdir}/usr"
mv "$pkgdir/lib" "$pkgdir/usr"
}
@ -113,7 +128,7 @@ package_linux-headers-chromebook() {
cd "${pkgdir}/usr/lib/modules/${_kernver}"
ln -sf ../../../src/linux-${_kernver} build
cd "${srcdir}/${_gitname}"
cd ${srcdir}/chromeos-${_basever}
install -D -m644 Makefile \
"${pkgdir}/usr/src/linux-${_kernver}/Makefile"
install -D -m644 kernel/Makefile \

View file

@ -432,7 +432,7 @@ CONFIG_MULTI_IRQ_HANDLER=y
CONFIG_ARM_ERRATA_766421=y
CONFIG_ARM_ERRATA_773022=y
CONFIG_ARM_ERRATA_774769=y
# CONFIG_ARM_ERRATA_798181 is not set
CONFIG_ARM_ERRATA_798181=y
CONFIG_ARM_GIC=y
#
@ -990,7 +990,7 @@ CONFIG_BT=m
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
# CONFIG_BT_BNEP is not set
# CONFIG_BT_HIDP is not set
CONFIG_BT_HIDP=m
#
# Bluetooth device drivers
@ -2706,6 +2706,7 @@ CONFIG_SND_SOC_I2C_AND_SPI=y
# CONFIG_SND_SOC_ALL_CODECS is not set
CONFIG_SND_SOC_WM_HUBS=y
CONFIG_SND_SOC_MAX98088=y
CONFIG_SND_SOC_MAX98090=y
CONFIG_SND_SOC_MAX98095=y
CONFIG_SND_SOC_WM8994=y
# CONFIG_SOUND_PRIME is not set
@ -2734,6 +2735,7 @@ CONFIG_HID_CHERRY=m
# CONFIG_HID_CYPRESS is not set
# CONFIG_HID_DRAGONRISE is not set
# CONFIG_HID_EMS_FF is not set
# CONFIG_HID_ELECOM is not set
# CONFIG_HID_EZKEY is not set
# CONFIG_HID_HOLTEK is not set
# CONFIG_HID_KEYTOUCH is not set
@ -2752,6 +2754,7 @@ CONFIG_HID_LOGITECH_HIDPP=m
# CONFIG_LOGIRUMBLEPAD2_FF is not set
# CONFIG_LOGIG940_FF is not set
# CONFIG_LOGIWHEELS_FF is not set
CONFIG_HID_MAGICMOUSE=m
CONFIG_HID_MICROSOFT=m
# CONFIG_HID_MONTEREY is not set
CONFIG_HID_MULTITOUCH=m
@ -2772,6 +2775,8 @@ CONFIG_HID_SONY=m
# CONFIG_HID_TIVO is not set
# CONFIG_HID_TOPSEED is not set
# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_WACOM is not set
# CONFIG_HID_WIIMOTE is not set
# CONFIG_HID_ZEROPLUS is not set
# CONFIG_HID_ZYDACRON is not set
CONFIG_USB_ARCH_HAS_OHCI=y
@ -3510,9 +3515,11 @@ CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
# CONFIG_CIFS_UPCALL is not set
# CONFIG_CIFS_XATTR is not set
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_DFS_UPCALL is not set
# CONFIG_CIFS_ACL is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

View file

@ -15,8 +15,28 @@
entry = <0>;
};
fdt@1{
description = "exynos5250-snow.dtb";
data = /incbin/("exynos5250-snow.dtb");
description = "exynos5250-snow-rev4.dtb";
data = /incbin/("exynos5250-snow-rev4.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
hash@1{
algo = "sha1";
};
};
fdt@2{
description = "exynos5250-spring.dtb";
data = /incbin/("exynos5250-spring.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
hash@1{
algo = "sha1";
};
};
fdt@3{
description = "exynos5250-snow-rev5.dtb";
data = /incbin/("exynos5250-snow-rev5.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
@ -31,5 +51,13 @@
kernel = "kernel@1";
fdt = "fdt@1";
};
conf@2{
kernel = "kernel@1";
fdt = "fdt@2";
};
conf@3{
kernel = "kernel@1";
fdt = "fdt@3";
};
};
};