Added Hardkernel C1 to the build script. Building is working while result untested. WIP
This commit is contained in:
parent
56321ffb69
commit
8f65189709
@ -129,8 +129,10 @@ install_board_specific (){
|
||||
cp $SRC/lib/config/boot-guitar.cmd $CACHEDIR/sdcard/boot/boot.cmd
|
||||
elif [[ $BOARD == armada* ]]; then
|
||||
cp $SRC/lib/config/boot-marvell.cmd $CACHEDIR/sdcard/boot/boot.cmd
|
||||
elif [[ $BOARD == odroid* ]]; then
|
||||
cp $SRC/lib/config/boot-odroid.ini $CACHEDIR/sdcard/boot/boot.ini
|
||||
elif [[ $BOARD == odroidxu4 ]]; then
|
||||
cp $SRC/lib/config/boot-odroid-xu4.ini $CACHEDIR/sdcard/boot/boot.ini
|
||||
elif [[ $BOARD == odroidc1 ]]; then
|
||||
cp $SRC/lib/config/boot-odroid-c1.ini $CACHEDIR/sdcard/boot/boot.ini
|
||||
else
|
||||
cp $SRC/lib/config/boot.cmd $CACHEDIR/sdcard/boot/boot.cmd
|
||||
# orangepi h3 temp exceptions
|
||||
|
||||
21
common.sh
21
common.sh
@ -80,12 +80,17 @@ if [[ \$DPKG_MAINTSCRIPT_PACKAGE == *cubox* ]] ; then
|
||||
elif [[ \$DPKG_MAINTSCRIPT_PACKAGE == *guitar* ]] ; then
|
||||
( dd if=/usr/lib/$uboot_name/bootloader.bin of=\$DEVICE bs=512 seek=4097 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/usr/lib/$uboot_name/u-boot-dtb.bin of=\$DEVICE bs=512 seek=6144 conv=fsync ) > /dev/null 2>&1
|
||||
elif [[ \$DPKG_MAINTSCRIPT_PACKAGE == *odroid* ]] ; then
|
||||
elif [[ \$DPKG_MAINTSCRIPT_PACKAGE == *odroidxu4* ]] ; then
|
||||
( dd if=/usr/lib/$uboot_name/bl1.bin.hardkernel of=\$DEVICE seek=1 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/usr/lib/$uboot_name/bl2.bin.hardkernel of=\$DEVICE seek=31 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/usr/lib/$uboot_name/u-boot.bin of=\$DEVICE bs=512 seek=63 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/usr/lib/$uboot_name/tzsw.bin.hardkernel of=\$DEVICE seek=719 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/dev/zero of=\$DEVICE seek=1231 count=32 bs=512 conv=fsync ) > /dev/null 2>&1
|
||||
elif [[ \$DPKG_MAINTSCRIPT_PACKAGE == *odroidc1* ]] ; then
|
||||
( dd if=/usr/lib/$uboot_name/bl1.bin.hardkernel of=\$DEVICE seek=1 seek=442 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/usr/lib/$uboot_name/bl1.bin.hardkernel of=\$DEVICE seek=512 skip=1 seek=1 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/usr/lib/$uboot_name/u-boot.bin of=\$DEVICE bs=512 seek=64 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/dev/zero of=\$DEVICE seek=1024 count=32 bs=512 conv=fsync ) > /dev/null 2>&1
|
||||
elif [[ \$DPKG_MAINTSCRIPT_PACKAGE == *udoo* ]] ; then
|
||||
( dd if=/usr/lib/$uboot_name/SPL of=\$DEVICE bs=1k seek=1 status=noxfer ) > /dev/null 2>&1
|
||||
( dd if=/usr/lib/$uboot_name/u-boot.img of=\$DEVICE bs=1K seek=69 status=noxfer ) > /dev/null 2>&1
|
||||
@ -118,11 +123,14 @@ END
|
||||
elif [[ $BOARD == guitar* ]] ; then
|
||||
[ ! -f "u-boot-dtb.bin" ] || cp u-boot-dtb.bin $DEST/debs/$uboot_name/usr/lib/$uboot_name
|
||||
[ ! -f "$SRC/lib/bin/s500-bootloader.bin" ] || cp $SRC/lib/bin/s500-bootloader.bin $DEST/debs/$uboot_name/usr/lib/$uboot_name/bootloader.bin
|
||||
elif [[ $BOARD == odroid* ]] ; then
|
||||
elif [[ $BOARD == odroidxu4 ]] ; then
|
||||
[ ! -f "sd_fuse/hardkernel/bl1.bin.hardkernel" ] || cp sd_fuse/hardkernel/bl1.bin.hardkernel $DEST/debs/$uboot_name/usr/lib/$uboot_name
|
||||
[ ! -f "sd_fuse/hardkernel/bl2.bin.hardkernel" ] || cp sd_fuse/hardkernel/bl2.bin.hardkernel $DEST/debs/$uboot_name/usr/lib/$uboot_name
|
||||
[ ! -f "sd_fuse/hardkernel/tzsw.bin.hardkernel" ] || cp sd_fuse/hardkernel/tzsw.bin.hardkernel $DEST/debs/$uboot_name/usr/lib/$uboot_name
|
||||
[ ! -f "u-boot.bin" ] || cp u-boot.bin $DEST/debs/$uboot_name/usr/lib/$uboot_name/
|
||||
elif [[ $BOARD == odroidc1 ]] ; then
|
||||
[ ! -f "sd_fuse/bl1.bin.hardkernel" ] || cp sd_fuse/bl1.bin.hardkernel $DEST/debs/$uboot_name/usr/lib/$uboot_name
|
||||
[ ! -f "sd_fuse/u-boot.bin" ] || cp sd_fuse/u-boot.bin $DEST/debs/$uboot_name/usr/lib/$uboot_name
|
||||
elif [[ $BOARD == udoo* ]] ; then
|
||||
[ ! -f "u-boot.img" ] || cp SPL u-boot.img $DEST/debs/$uboot_name/usr/lib/$uboot_name
|
||||
elif [[ $BOARD == armada* ]] ; then
|
||||
@ -404,12 +412,17 @@ write_uboot()
|
||||
elif [[ $BOARD == *guitar* ]] ; then
|
||||
( dd if=/tmp/usr/lib/${CHOSEN_UBOOT}_${REVISION}_armhf/bootloader.bin of=$LOOP bs=512 seek=4097 conv=fsync > /dev/null 2>&1)
|
||||
( dd if=/tmp/usr/lib/${CHOSEN_UBOOT}_${REVISION}_armhf/u-boot-dtb.bin of=$LOOP bs=512 seek=6144 conv=fsync > /dev/null 2>&1)
|
||||
elif [[ $BOARD == *odroid* ]] ; then
|
||||
elif [[ $BOARD == *odroidxu4* ]] ; then
|
||||
( dd if=/tmp/usr/lib/${CHOSEN_UBOOT}_${REVISION}_armhf/bl1.bin.hardkernel of=$LOOP seek=1 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/tmp/usr/lib/${CHOSEN_UBOOT}_${REVISION}_armhf/bl2.bin.hardkernel of=$LOOP seek=31 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/tmp/usr/lib/${CHOSEN_UBOOT}_${REVISION}_armhf/u-boot.bin of=$LOOP bs=512 seek=63 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/tmp/usr/lib/${CHOSEN_UBOOT}_${REVISION}_armhf/tzsw.bin.hardkernel of=$LOOP seek=719 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/dev/zero of=$LOOP seek=1231 count=32 bs=512 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/dev/zero of=$LOOP seek=1231 count=32 bs=512 conv=fsync ) > /dev/null 2>&1
|
||||
elif [[ $BOARD == *odroidc1* ]] ; then
|
||||
( dd if=/tmp/usr/lib/${CHOSEN_UBOOT}_${REVISION}_armhf/bl1.bin.hardkernel of=$LOOP seek=1 seek=442 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/tmp/usr/lib/${CHOSEN_UBOOT}_${REVISION}_armhf/bl1.bin.hardkernel of=$LOOP seek=512 skip=1 seek=1 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/tmp/usr/lib/${CHOSEN_UBOOT}_${REVISION}_armhf/u-boot.bin of=$LOOP bs=512 seek=64 conv=fsync ) > /dev/null 2>&1
|
||||
( dd if=/dev/zero of=\$DEVICE seek=1024 count=32 bs=512 conv=fsync ) > /dev/null 2>&1
|
||||
else
|
||||
( dd if=/tmp/usr/lib/${CHOSEN_UBOOT}_${REVISION}_armhf/u-boot-sunxi-with-spl.bin of=$LOOP bs=1024 seek=8 status=noxfer >/dev/null 2>&1)
|
||||
fi
|
||||
|
||||
33
config/boot-odroid-c1.ini
Normal file
33
config/boot-odroid-c1.ini
Normal file
@ -0,0 +1,33 @@
|
||||
ODROIDC-UBOOT-CONFIG
|
||||
|
||||
# Possible screen resolutions
|
||||
# Uncomment only a single Line! The line with setenv written.
|
||||
# At least one mode must be selected.
|
||||
|
||||
# setenv m "vga" # VGA 640x480
|
||||
# setenv m "480p" # 480p 720x480
|
||||
# setenv m "576p" # 576p 720x576
|
||||
# setenv m "800x480p60hz" # WVGA 800x480
|
||||
# setenv m "720p" # 720p 1280x720
|
||||
# setenv m "800p" # 800p(WXGA) 1280x800
|
||||
# setenv m "sxga" # SXGA 1280x1024
|
||||
setenv m "1080p" # 1080P 1920x1080
|
||||
# setenv m "1920x1200" # 1920x1200
|
||||
|
||||
# HDMI/DVI Mode Configuration
|
||||
setenv vout_mode "hdmi"
|
||||
# setenv vout_mode "dvi"
|
||||
|
||||
# HDMI BPP Mode
|
||||
setenv m_bpp "32"
|
||||
# setenv m_bpp "16"
|
||||
|
||||
# UHS Card Configuration
|
||||
# Uncomment the line below to __DISABLE__ UHS-1 MicroSD support
|
||||
# This might break boot for some brand/models of cards.
|
||||
setenv disableuhs "disableuhs"
|
||||
|
||||
setenv bootargs "console=ttyS0,115200n8 console=tty0 root=${ROOT_DEV} rootwait rw no_console_suspend vdaccfg=0xa000 logo=osd1,loaded,0x7900000,720p,full dmfc=3 cvbsmode=576cvbs hdmimode=${m} m_bpp=${m_bpp} vout=${vout_mode} ${disableuhs}"
|
||||
setenv bootcmd "fatload mmc 0:1 0x21000000 zImage; fatload mmc 0:1 0x21800000 dtb/meson8b_odroidc.dtb; bootz 0x21000000 0x21800000"
|
||||
run bootcmd
|
||||
|
||||
4695
config/linux-odroidc1-default.config
Normal file
4695
config/linux-odroidc1-default.config
Normal file
File diff suppressed because it is too large
Load Diff
@ -318,6 +318,7 @@ case $BOARD in
|
||||
#build 1
|
||||
LINUXFAMILY="odroidxu4"
|
||||
BOOTSIZE="16"
|
||||
OFFSET="2"
|
||||
BOOTCONFIG="odroid_config"
|
||||
MODULES="bonding"
|
||||
MODULES_NEXT=""
|
||||
@ -326,6 +327,20 @@ case $BOARD in
|
||||
DESKTOP_TARGET="jessie,default"
|
||||
;;
|
||||
|
||||
odroidc1)#enabled
|
||||
#description S805 C1 quad core
|
||||
#build 1wip
|
||||
LINUXFAMILY="odroidc1"
|
||||
BOOTSIZE="16"
|
||||
OFFSET="2"
|
||||
BOOTCONFIG="odroidc_config"
|
||||
MODULES="bonding"
|
||||
MODULES_NEXT=""
|
||||
SERIALCON="ttyS0"
|
||||
CLI_TARGET="%,%"
|
||||
DESKTOP_TARGET="jessie,default"
|
||||
;;
|
||||
|
||||
toradex)#disabled
|
||||
LINUXFAMILY="toradex"
|
||||
BOOTCONFIG="colibri_imx6_defconfig"
|
||||
@ -397,7 +412,7 @@ case $LINUXFAMILY in
|
||||
odroidxu4)
|
||||
KERNEL_DEFAULT='https://github.com/hardkernel/linux'
|
||||
KERNEL_DEFAULT_BRANCH="odroidxu3-3.10.y"
|
||||
KERNEL_DEFAULT_SOURCE="linux-odroidxu"
|
||||
KERNEL_DEFAULT_SOURCE="linux-odroid"
|
||||
KERNEL_NEXT='https://github.com/tobetter/linux'
|
||||
KERNEL_NEXT_BRANCH="odroidxu4-v4.2"
|
||||
KERNEL_NEXT_SOURCE="linux-odroidxu-next"
|
||||
@ -412,6 +427,24 @@ case $LINUXFAMILY in
|
||||
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
|
||||
;;
|
||||
|
||||
odroidc1)
|
||||
KERNEL_DEFAULT='https://github.com/hardkernel/linux'
|
||||
KERNEL_DEFAULT_BRANCH="odroidc-3.10.y"
|
||||
KERNEL_DEFAULT_SOURCE="linux-odroid"
|
||||
KERNEL_NEXT='https://github.com/tobetter/linux'
|
||||
KERNEL_NEXT_BRANCH="odroidxu4-v4.2"
|
||||
KERNEL_NEXT_SOURCE="linux-odroidxu-next"
|
||||
UBOOT_DEFAULT="https://github.com/hardkernel/u-boot.git"
|
||||
UBOOT_DEFAULT_BRANCH="odroidc-v2011.03"
|
||||
UBOOT_DEFAULT_SOURCE="u-boot-odroidxu"
|
||||
UBOOT_NEXT=$UBOOT_DEFAULT
|
||||
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
|
||||
UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
|
||||
UBOOT_DEV=$UBOOT_DEFAULT
|
||||
UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
|
||||
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
|
||||
;;
|
||||
|
||||
udoo)
|
||||
KERNEL_DEFAULT="https://github.com/UDOOboard/linux_kernel"
|
||||
KERNEL_DEFAULT_BRANCH="3.14-1.0.x-udoo"
|
||||
|
||||
12012
patch/kernel/odroidc1-default/fbtft_drivers.patch
Normal file
12012
patch/kernel/odroidc1-default/fbtft_drivers.patch
Normal file
File diff suppressed because it is too large
Load Diff
311
patch/kernel/odroidc1-default/packagin-guitar.patch
Normal file
311
patch/kernel/odroidc1-default/packagin-guitar.patch
Normal file
@ -0,0 +1,311 @@
|
||||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index 3001ec5..d6b844d
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -35,15 +35,17 @@ create_package() {
|
||||
sparc*)
|
||||
debarch=sparc ;;
|
||||
s390*)
|
||||
- debarch=s390 ;;
|
||||
+ debarch=s390$(grep -q CONFIG_64BIT=y $KCONFIG_CONFIG && echo x || true) ;;
|
||||
ppc*)
|
||||
- debarch=powerpc ;;
|
||||
+ debarch=$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo ppc64el || echo powerpc) ;;
|
||||
parisc*)
|
||||
debarch=hppa ;;
|
||||
mips*)
|
||||
- debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y .config && echo el) ;;
|
||||
+ debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
|
||||
+ arm64)
|
||||
+ debarch=arm64 ;;
|
||||
arm*)
|
||||
- debarch=arm$(grep -q CONFIG_AEABI=y .config && echo el) ;;
|
||||
+ debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
|
||||
*)
|
||||
echo "" >&2
|
||||
echo "** ** ** WARNING ** ** **" >&2
|
||||
@@ -62,7 +64,7 @@ create_package() {
|
||||
fi
|
||||
|
||||
# Create the package
|
||||
- dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
|
||||
+ dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
}
|
||||
|
||||
@@ -78,49 +80,76 @@ tmpdir="$objtree/debian/tmp"
|
||||
fwdir="$objtree/debian/fwtmp"
|
||||
kernel_headers_dir="$objtree/debian/hdrtmp"
|
||||
libc_headers_dir="$objtree/debian/headertmp"
|
||||
-packagename=linux-image-$version
|
||||
-fwpackagename=linux-firmware-image
|
||||
-kernel_headers_packagename=linux-headers-$version
|
||||
-libc_headers_packagename=linux-libc-dev
|
||||
+dtb_dir="$objtree/debian/dtbtmp"
|
||||
+dbg_dir="$objtree/debian/dbgtmp"
|
||||
+packagename=linux-image"$LOCALVERSION"
|
||||
+fwpackagename=linux-firmware-image"$LOCALVERSION"
|
||||
+kernel_headers_packagename=linux-headers"$LOCALVERSION"
|
||||
+dtb_packagename=linux-dtb"$LOCALVERSION"
|
||||
+libc_headers_packagename=linux-libc-dev"$LOCALVERSION"
|
||||
+dbg_packagename=$packagename-dbg
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
packagename=user-mode-linux-$version
|
||||
fi
|
||||
|
||||
+# Not all arches have the same installed path in debian
|
||||
+# XXX: have each arch Makefile export a variable of the canonical image install
|
||||
+# path instead
|
||||
+case $ARCH in
|
||||
+um)
|
||||
+ installed_image_path="usr/bin/linux-$version"
|
||||
+ ;;
|
||||
+parisc|mips|powerpc)
|
||||
+ installed_image_path="boot/vmlinux-$version"
|
||||
+ ;;
|
||||
+*)
|
||||
+ installed_image_path="boot/vmlinuz-$version"
|
||||
+esac
|
||||
+
|
||||
+BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
|
||||
+
|
||||
# Setup the directory structure
|
||||
-rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir"
|
||||
+rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$dtb_dir"
|
||||
mkdir -m 755 -p "$tmpdir/DEBIAN"
|
||||
mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
|
||||
mkdir -m 755 -p "$fwdir/DEBIAN"
|
||||
mkdir -p "$fwdir/lib/firmware/$version/" "$fwdir/usr/share/doc/$fwpackagename"
|
||||
mkdir -m 755 -p "$libc_headers_dir/DEBIAN"
|
||||
mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename"
|
||||
+
|
||||
+mkdir -m 755 -p "$dtb_dir/DEBIAN"
|
||||
+mkdir -p "$dtb_dir/boot/dtb" "$dtb_dir/usr/share/doc/$dtb_packagename"
|
||||
+
|
||||
mkdir -m 755 -p "$kernel_headers_dir/DEBIAN"
|
||||
mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename"
|
||||
mkdir -p "$kernel_headers_dir/lib/modules/$version/"
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin"
|
||||
fi
|
||||
+if [ -n "$BUILD_DEBUG" ] ; then
|
||||
+ mkdir -p "$dbg_dir/usr/share/doc/$dbg_packagename"
|
||||
+ mkdir -m 755 -p "$dbg_dir/DEBIAN"
|
||||
+fi
|
||||
|
||||
# Build and install the kernel
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
$MAKE linux
|
||||
cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
|
||||
- cp .config "$tmpdir/usr/share/doc/$packagename/config"
|
||||
+ cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config"
|
||||
gzip "$tmpdir/usr/share/doc/$packagename/config"
|
||||
- cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version"
|
||||
-else
|
||||
+else
|
||||
cp System.map "$tmpdir/boot/System.map-$version"
|
||||
- cp .config "$tmpdir/boot/config-$version"
|
||||
- # Not all arches include the boot path in KBUILD_IMAGE
|
||||
- if [ -e $KBUILD_IMAGE ]; then
|
||||
- cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
|
||||
- else
|
||||
- cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
|
||||
- fi
|
||||
+ cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version"
|
||||
+fi
|
||||
+# Not all arches include the boot path in KBUILD_IMAGE
|
||||
+if [ -e $KBUILD_IMAGE ]; then
|
||||
+ cp $KBUILD_IMAGE "$tmpdir/$installed_image_path"
|
||||
+else
|
||||
+ cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path"
|
||||
fi
|
||||
|
||||
-if grep -q '^CONFIG_MODULES=y' .config ; then
|
||||
+if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_install
|
||||
rm -f "$tmpdir/lib/modules/$version/build"
|
||||
rm -f "$tmpdir/lib/modules/$version/source"
|
||||
@@ -128,6 +157,24 @@ if grep -q '^CONFIG_MODULES=y' .config ; then
|
||||
mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/"
|
||||
rmdir "$tmpdir/lib/modules/$version"
|
||||
fi
|
||||
+ if [ -n "$BUILD_DEBUG" ] ; then
|
||||
+ for module in $(find $tmpdir/lib/modules/ -name *.ko -printf '%P\n'); do
|
||||
+ module=lib/modules/$module
|
||||
+ mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
|
||||
+ # only keep debug symbols in the debug file
|
||||
+ $OBJCOPY --only-keep-debug $tmpdir/$module $dbg_dir/usr/lib/debug/$module
|
||||
+ # strip original module from debug symbols
|
||||
+ $OBJCOPY --strip-debug $tmpdir/$module
|
||||
+ # then add a link to those
|
||||
+ $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $tmpdir/$module
|
||||
+ done
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
+if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
|
||||
+ mkdir -p "$tmpdir/boot/dtb"
|
||||
+ cp $objtree/arch/arm/boot/dts/*.dtb $dtb_dir/boot/dtb
|
||||
+ #INSTALL_DTBS_PATH="$dtb_dir/boot/dtb" $MAKE KBUILD_SRC= dtbs_install
|
||||
fi
|
||||
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
@@ -137,8 +184,15 @@ fi
|
||||
|
||||
# Install the maintainer scripts
|
||||
# Note: hook scripts under /etc/kernel are also executed by official Debian
|
||||
-# kernel packages, as well as kernel packages built using make-kpkg
|
||||
+# kernel packages, as well as kernel packages built using make-kpkg.
|
||||
+# make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and
|
||||
+# so do we; recent versions of dracut and initramfs-tools will obey this.
|
||||
debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
|
||||
+if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then
|
||||
+ want_initrd=Yes
|
||||
+else
|
||||
+ want_initrd=No
|
||||
+fi
|
||||
for script in postinst postrm preinst prerm ; do
|
||||
mkdir -p "$tmpdir$debhookdir/$script.d"
|
||||
cat <<EOF > "$tmpdir/DEBIAN/$script"
|
||||
@@ -147,14 +201,43 @@ for script in postinst postrm preinst prerm ; do
|
||||
set -e
|
||||
|
||||
# Pass maintainer script parameters to hook scripts
|
||||
+
|
||||
export DEB_MAINT_PARAMS="\$*"
|
||||
|
||||
-test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d
|
||||
+# Tell initramfs builder whether it's wanted
|
||||
+
|
||||
+export INITRD=$want_initrd
|
||||
+
|
||||
+test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d
|
||||
exit 0
|
||||
EOF
|
||||
chmod 755 "$tmpdir/DEBIAN/$script"
|
||||
done
|
||||
|
||||
+##
|
||||
+## Create sym link to kernel image
|
||||
+##
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
|
||||
+cat >> $tmpdir/DEBIAN/postinst <<EOT
|
||||
+if [ "\$(grep nand /proc/partitions)" != "" ] && [ "\$(grep mmc /proc/partitions)" = "" ]; then
|
||||
+mkimage -A arm -O linux -T kernel -C none -a "0x40008000" -e "0x40008000" -n "Linux kernel" -d /$installed_image_path /boot/uImage > /dev/null 2>&1
|
||||
+rm -f /$installed_image_path /boot/zImage
|
||||
+else
|
||||
+ln -sf $(basename $installed_image_path) /boot/zImage > /dev/null 2>&1 || mv /$installed_image_path /boot/zImage
|
||||
+fi
|
||||
+rm -f /boot/.next
|
||||
+exit 0
|
||||
+EOT
|
||||
+##
|
||||
+## FAT install workaround
|
||||
+##
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/preinst
|
||||
+cat >> $tmpdir/DEBIAN/preinst <<EOT
|
||||
+rm -f /boot/System.map* /boot/config* /$installed_image_path /boot/zImage
|
||||
+EOT
|
||||
+echo "exit 0" >> $tmpdir/DEBIAN/preinst
|
||||
+
|
||||
+
|
||||
# Try to determine maintainer and email values
|
||||
if [ -n "$DEBEMAIL" ]; then
|
||||
email=$DEBEMAIL
|
||||
@@ -242,21 +325,30 @@ EOF
|
||||
|
||||
fi
|
||||
|
||||
-# Build header package
|
||||
-(cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles")
|
||||
-(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles")
|
||||
-(cd $objtree; find arch/$SRCARCH/include .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles")
|
||||
+# Build kernel header package
|
||||
+(cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles"
|
||||
+(cd $srctree; find arch/$SRCARCH/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
+(cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles"
|
||||
+(cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
+(cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles"
|
||||
destdir=$kernel_headers_dir/usr/src/linux-headers-$version
|
||||
mkdir -p "$destdir"
|
||||
-(cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -)
|
||||
-(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
|
||||
+######################## headers patch
|
||||
+ZACNI=$(pwd)
|
||||
+cd $destdir
|
||||
+patch -p1 < /tmp/headers-debian-byteshift.patch
|
||||
+cd $ZACNI
|
||||
+######################## headers patch
|
||||
+(cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)
|
||||
+(cd $objtree; tar -c -f - -T -) < "$objtree/debian/hdrobjfiles" | (cd $destdir; tar -xf -)
|
||||
+(cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be
|
||||
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
|
||||
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $kernel_headers_packagename
|
||||
-Provides: linux-headers, linux-headers-2.6
|
||||
+Provides: linux-headers
|
||||
Architecture: any
|
||||
Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
|
||||
This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
|
||||
@@ -282,6 +374,16 @@ fi
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
+Package: $dtb_packagename
|
||||
+Architecture: any
|
||||
+Description: Linux DTB, version $version
|
||||
+ This package contains device blobs from the Linux kernel, version $version.
|
||||
+EOF
|
||||
+
|
||||
+create_package "$dtb_packagename" "$dtb_dir"
|
||||
+
|
||||
+cat <<EOF >> debian/control
|
||||
+
|
||||
Package: $libc_headers_packagename
|
||||
Section: devel
|
||||
Provides: linux-kernel-headers
|
||||
@@ -293,9 +395,35 @@ EOF
|
||||
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
||||
- create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+# create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
fi
|
||||
|
||||
create_package "$packagename" "$tmpdir"
|
||||
|
||||
-exit 0
|
||||
+if [ -n "$BUILD_DEBUG" ] ; then
|
||||
+ # Build debug package
|
||||
+ # Different tools want the image in different locations
|
||||
+ # perf
|
||||
+ mkdir -p $dbg_dir/usr/lib/debug/lib/modules/$version/
|
||||
+ cp vmlinux $dbg_dir/usr/lib/debug/lib/modules/$version/
|
||||
+ # systemtap
|
||||
+ mkdir -p $dbg_dir/usr/lib/debug/boot/
|
||||
+ ln -s ../lib/modules/$version/vmlinux $dbg_dir/usr/lib/debug/boot/vmlinux-$version
|
||||
+ # kdump-tools
|
||||
+ ln -s lib/modules/$version/vmlinux $dbg_dir/usr/lib/debug/vmlinux-$version
|
||||
+
|
||||
+ cat <<EOF >> debian/control
|
||||
+
|
||||
+Package: $dbg_packagename
|
||||
+Section: debug
|
||||
+Provides: linux-debug, linux-debug-$version
|
||||
+Architecture: any
|
||||
+Description: Linux kernel debugging symbols for $version
|
||||
+ This package will come in handy if you need to debug the kernel. It provides
|
||||
+ all the necessary debug symbols for the kernel and its modules.
|
||||
+EOF
|
||||
+
|
||||
+ create_package "$dbg_packagename" "$dbg_dir"
|
||||
+fi
|
||||
+
|
||||
+exit 0
|
||||
\ No newline at end of file
|
||||
2341
patch/kernel/odroidc1-default/patch-3.10.96-97.patch
Normal file
2341
patch/kernel/odroidc1-default/patch-3.10.96-97.patch
Normal file
File diff suppressed because it is too large
Load Diff
1792
patch/kernel/odroidc1-default/patch-3.10.97-98.patch
Normal file
1792
patch/kernel/odroidc1-default/patch-3.10.97-98.patch
Normal file
File diff suppressed because it is too large
Load Diff
2573
patch/kernel/odroidc1-default/patch-3.10.98-99.patch
Normal file
2573
patch/kernel/odroidc1-default/patch-3.10.98-99.patch
Normal file
File diff suppressed because it is too large
Load Diff
1156
patch/kernel/odroidc1-default/patch-3.10.99-100.patch
Normal file
1156
patch/kernel/odroidc1-default/patch-3.10.99-100.patch
Normal file
File diff suppressed because it is too large
Load Diff
1493
patch/kernel/odroidc1-default/rpatch-3.10.100-101.patch
Normal file
1493
patch/kernel/odroidc1-default/rpatch-3.10.100-101.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user