Kaydet (Commit) 60aa5cba authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

kernel için ilk düzenlemeler

üst 3c5a380d
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from inary.actionsapi import kerneltools
from inary.actionsapi import shelltools
from inary.actionsapi import autotools
from inary.actionsapi import inarytools
from inary.actionsapi import get
import time
NoStrip = ["/lib", "/boot"]
shelltools.export("KBUILD_BUILD_USER", "sulin")
shelltools.export("KBUILD_BUILD_HOST", "uludag")
shelltools.export("PYTHONDONTWRITEBYTECODE", "1")
shelltools.export("KBUILD_BUILD_TIMESTAMP", time.asctime())
def setup():
kerneltools.configure()
def build():
kerneltools.build(debugSymbols=False)
def install():
kerneltools.install()
# add objtool for external module building and enabled VALIDATION_STACK option
inarytools.insinto("/usr/src/linux-headers-%s-sulinos/tools/objtool" % get.srcVERSION(), "%s/tools/objtool/objtool" % get.curDIR())
# Install kernel headers needed for out-of-tree module compilation
kerneltools.installHeaders()
kerneltools.installLibcHeaders()
# Generate some module lists to use within mkinitramfs
shelltools.system("./generate-module-list %s/lib/modules/%s" % (get.installDIR(), kerneltools.__getSuffix()))
#mkinitcpio default config
inarytools.dodir("/etc/mkinitcpio.d")
shelltools.touch("linux.preset")
shelltools.echo("linux.preset", "# mkinitcpio preset file for the 'linux' package\n" +
'ALL_config="/etc/mkinitcpio.conf"\n'+
'ALL_kver="/boot/kernel-%s"\n\n'% get.srcVERSION() +
"PRESETS=('default' 'fallback') \n\n" +
'#default_config="/etc/mkinitcpio.conf"\n' +
'default_image="/boot/initramfs-%s.img"\n'% get.srcVERSION() +
'#default_options=""\n\n' +
'#fallback_config="/etc/mkinitcpio.conf"\n'+
'fallback_image="/boot/initramfs-%s-fallback.img"\n'% get.srcVERSION() +
'fallback_options="-S autodetect"\n')
inarytools.insinto("/etc/mkinitcpio.d", "linux.preset")
#!/bin/bash
# Generate modules.{networking, block, drm, modesetting}
# lists for further usage
# Adapted from Fedora
#
# Ozan Caglayan (C) 2010
collect_modules_list()
{
sed -r -n -e "s/^([^ ]+) \\.?($2)\$/\\1/p" $TMP_MODUNDEF |
LC_ALL=C sort -u > modules.$1
}
MOD_DIR=$1
TMP_MODNAMES=`mktemp`
TMP_MODUNDEF=`mktemp`
find $MOD_DIR -name "*.ko" -type f > $TMP_MODNAMES
cat $TMP_MODNAMES | xargs nm -upA |
sed -n 's,^.*/\([^/]*\.ko\): *U \(.*\)$,\1 \2,p' > $TMP_MODUNDEF
# Start collecting module lists
# based on undefined symbols
cd $MOD_DIR
collect_modules_list networking \
'register_netdev|ieee80211_register_hw|usbnet_probe|phy_driver_register'
collect_modules_list block \
'ata_scsi_ioctl|scsi_add_host|scsi_add_host_with_dma|blk_init_queue|register_mtd_blktrans|scsi_esp_register|scsi_register_device_handler'
collect_modules_list drm \
'drm_open|drm_init'
collect_modules_list modesetting \
'drm_crtc_init'
# Clean temporary files
rm -f $TMP_MODNAMES $TMP_MODUNDEF
<?xml version="1.0" ?>
<!DOCTYPE INARY SYSTEM "https://raw.githubusercontent.com/Zaryob/inary/master/inary-spec.dtd">
<INARY>
<Source>
<Name>linux-libre</Name>
<Homepage>http://www.kernel.org</Homepage>
<Packager>
<Name>Süleyman POYRAZ</Name>
<Email>zaryob.dev@gmail.com</Email>
</Packager>
<License>GPLv2</License>
<IsA>kernel</IsA>
<PartOf>kernel.linux</PartOf>
<Summary>The Linux libre kernel (the core of the Linux operating system) for Sulin</Summary>
<Description>kernel contains the Linux kernel, the core of any Linux operating system. ddtionally libre kernel is a cleant up version of original kernel. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc.</Description>
<Archive sha1sum="e34c3da2dae6895513c52915d772fadb891e5e94" type="tarxz">https://gitlab.com/sulinos/linux/libre/-/archive/v5.4-libre/libre-v5.4-libre.tar.gz</Archive>
<AdditionalFiles>
<AdditionalFile permission="0755" target="generate-module-list">scripts/generate-module-list</AdditionalFile>
<AdditionalFile permission="0755" target=".config">configs/kernel-x86_64-config-5.4.2-gnu</AdditionalFile>
</AdditionalFiles>
<BuildDependencies>
<Dependency>bc</Dependency>
<Dependency>cpio</Dependency>
<Dependency>docbook-xsl</Dependency>
<Dependency>diffutils</Dependency>
<Dependency>xmlto</Dependency>
<Dependency>zlib-devel</Dependency>
<Dependency>xz-devel</Dependency>
</BuildDependencies>
</Source>
<Package>
<Name>libre</Name>
<Files>
<Path fileType="executable" permanent="true">/boot</Path>
<Path fileType="library" permanent="true">/lib/modules</Path>
<Path fileType="data">/etc/kernel</Path>
<Path fileType="config" permanent="true">/etc/mkinitcpio.d</Path>
</Files>
<Provides>
<SCOM script="package.py">System.Package</SCOM>
</Provides>
<BuildFlags>
<Flag>noDelta</Flag>
</BuildFlags>
</Package>
<Package>
<Name>libre-module-headers</Name>
<Summary>Kernel header files for external module building</Summary>
<Description>kernel-module-headers includes the C header files and the necessary Kbuild files for being able to build external kernel modules.</Description>
<Files>
<Path fileType="header">/usr/src/linux-headers*</Path>
<Path fileType="header">/tmp-headers*</Path>
</Files>
</Package>
<Package>
<Name>libre-docs</Name>
<Summary>Documentation and scripts for the Linux kernel</Summary>
<Description>kernel-docs includes several documentation files and scripts for managing several debugging and other tasks.</Description>
<Files>
<Path fileType="header">/usr/src/linux-headers*/Documentation</Path>
</Files>
</Package>
<History>
<Update release="1">
<Date>2019-12-08</Date>
<Version>5.4.0</Version>
<Comment>First release of libre kernel.</Comment>
<Type package="kernel">security</Type>
<Name>Süleyman POYRAZ</Name>
<Email>zaryob.dev@gmail.com</Email>
</Update>
</History>
</INARY>
#!/usr/bin/python
import os
def read_file(path):
with open(path) as f:
return f.read().strip()
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
gcf = "/boot/grub2/grub.cfg"
if not os.path.isfile(gcf): return
os.environ["PATH"] = "/usr/sbin:/usr/bin:/sbin:/bin"
os.system("grub2-mkconfig -o %s" % gcf)
# Update GRUB entry
#if os.path.exists("/boot/grub/grub.conf"):
# call("grub", "Boot.Loader", "updateKernelEntry", (KVER, ""))
def preRemove():
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment