summaryrefslogtreecommitdiff
path: root/eclass/kogaion-kernel.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-10-22 22:34:16 +0100
committerV3n3RiX <venerix@rogentos.ro>2016-10-22 22:34:16 +0100
commit193e87e81a0f07b9f13566030abeb24850c0bae3 (patch)
treeb9882cd15a4e96182726a2527081c6a4c0ba303c /eclass/kogaion-kernel.eclass
parent7f7373679a508cefc3ec2752615eb60c29744620 (diff)
drop arm bits
Diffstat (limited to 'eclass/kogaion-kernel.eclass')
-rw-r--r--eclass/kogaion-kernel.eclass96
1 files changed, 2 insertions, 94 deletions
diff --git a/eclass/kogaion-kernel.eclass b/eclass/kogaion-kernel.eclass
index 8266a895..0cfd23e3 100644
--- a/eclass/kogaion-kernel.eclass
+++ b/eclass/kogaion-kernel.eclass
@@ -319,23 +319,8 @@ _is_config_file_set() {
[[ ${_config_file_set} = 1 ]]
}
-# Returns the arm kernel config file extension for the current subarch
-_get_arm_subarch() {
- local target="${CTARGET:-${CHOST}}"
- local arm_arch=${target%%-*}
- if [[ ${arm_arch} == armv7? ]]; then
- echo "armv7"
- elif [[ ${arm_arch} == armv6? ]]; then
- echo "armv6"
- elif [[ ${arm_arch} == armv5? ]]; then
- echo "armv5"
- fi
-}
-
_get_arch() {
- if use arm; then
- _get_arm_subarch
- elif use amd64; then
+ if use amd64; then
echo "amd64"
elif use x86; then
echo "x86"
@@ -552,15 +537,9 @@ _kernel_src_compile() {
if [ -n "${K_KERNEL_IMAGE_NAME}" ]; then
GKARGS+=( "--kernel-target=${K_KERNEL_IMAGE_NAME}" )
- elif use arm; then
- # backward compat + provide sane defaults.
- GKARGS+=( "--kernel-target=uImage" )
fi
if [ -n "${K_KERNEL_IMAGE_PATH}" ]; then
GKARGS+=( "--kernel-binary=${K_KERNEL_IMAGE_PATH}" )
- elif use arm; then
- # backward compat + provide sane defaults.
- GKARGS+=( "--kernel-binary=arch/arm/boot/uImage" )
fi
# Workaround bug in splash_geninitramfs corrupting the initramfs
@@ -601,23 +580,6 @@ _kernel_src_compile() {
ARCH=${OLDARCH}
}
-_setup_mkimage_ramdisk() {
- local initramfs=$(ls "${WORKDIR}"/boot/${KERN_INITRAMFS_SEARCH_NAME}* 2> /dev/null)
- if [ ! -e "${initramfs}" ] || [ ! -f "${initramfs}" ]; then
- ewarn "No initramfs at ${initramfs}, cannot run mkimage on it!"
- elif [ "${K_MKIMAGE_WRAP_INITRAMFS}" = "1" ]; then
- einfo "Setting up u-boot initramfs for: ${initramfs}"
- mkimage -A arm -O linux -T ramdisk -C none -a \
- "${K_MKIMAGE_RAMDISK_ADDRESS}" \
- -e "${K_MKIMAGE_RAMDISK_ENTRYPOINT}" -d "${initramfs}" \
- "${initramfs}.u-boot" || return 1
- mv "${initramfs}.u-boot" "${initramfs}" || return 1
- else
- einfo "mkimage won't be called for: ${initramfs}"
- fi
- return 0
-}
-
kogaion-kernel_src_install() {
if [ -n "${K_FIRMWARE_PACKAGE}" ]; then
_firmwares_src_install
@@ -655,10 +617,6 @@ _kernel_sources_src_install() {
}
_kernel_src_install() {
- if use arm; then
- _setup_mkimage_ramdisk || die "cannot setup mkimage"
- fi
-
dodir "${KV_OUT_DIR}"
insinto "${KV_OUT_DIR}"
@@ -695,20 +653,6 @@ _kernel_src_install() {
doins "${WORKDIR}"/boot/* || die "cannot copy /boot over"
cp -Rp "${WORKDIR}"/lib/* "${D}/" || die "cannot copy /lib over"
- # Install dtbs if found
- if use arm; then
- local dtb_dir="/lib/dts/${KV_FULL}"
- elog "Installing .dtbs (if any) into ${dtb_dir}"
- insinto "${dtb_dir}"
- local dtb=
- for dtb in "${S}/arch/arm/boot/dts"/*.dtb; do
- if [ -f "${dtb}" ]; then
- elog "Installing dtb: ${dtb}"
- doins "${dtb}"
- fi
- done
- fi
-
# This doesn't always work because KV_FULL (when K_NOSETEXTRAVERSION=1) doesn't
# reflect the real value used in Makefile
#dosym "../../..${KV_OUT_DIR}" "/lib/modules/${KV_FULL}/source" || die "cannot install source symlink"
@@ -780,38 +724,6 @@ _get_release_level() {
fi
}
-kogaion-kernel_uimage_config() {
- # Two cases here:
- # 1. /boot/uImage symlink is broken (pkg_postrm)
- # 2. /boot/uImage symlink doesn't exist (pkg_postinst)
-
- if ! has_version app-eselect/uimage; then
- ewarn "app-eselect/uimage not installed"
- ewarn "If you are using this tool, please install it"
- return 0
- fi
-
- local uimage_file=$(eselect uimage show --quiet 2> /dev/null)
- if [ -z "${uimage_file}" ]; then
- # pick the first listed, sorry!
- local eselect_list=$(eselect uimage list --quiet 2> /dev/null)
- if [ -n "${eselect_list}" ]; then
- eselect uimage set 1
- else
- echo
- ewarn "No more kernels available, you won't be able to boot"
- echo
- fi
- else
- echo
- elog "If you use eselect-bzimage, you are currently booting with kernel:"
- elog "${uimage_file}"
- elog
- elog "Use 'eselect uimage' in order to switch between the available ones"
- echo
- fi
-}
-
_dracut_initramfs_create() {
if use amd64 || use x86; then
if use amd64; then
@@ -851,10 +763,6 @@ kogaion-kernel_pkg_postinst() {
# Update kernel initramfs to match user customizations
use splash && update_kogaion_kernel_initramfs_splash
- # Setup newly installed kernel on ARM
- if use arm; then
- kogaion-kernel_uimage_config
- fi
# generate initramfs with dracut
if use dracut ; then
_dracut_initramfs_create
@@ -890,7 +798,7 @@ kogaion-kernel_pkg_postrm() {
if _is_kernel_binary; then
# Setup newly installed kernel on ARM
if use arm; then
- kogaion-kernel_uimage_config
+ elog ""
fi
fi
}