mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
core/linux-linux-odroid-xu3 to 6.6.36
- Config copied directly from23a9f75564/arch/arm/configs/odroidxu4_defconfig
- Update config resulting from build Based on options used elsewhere in this repo. - Remove unneeded 60-linux.hook and 90-linux.hook - 60-linux.hook is redundant as 60-depmod.hook provided by kmod handles it - 90-linux.hook is redundant and causes mkinitcpio to run twice under certain circumstances so instead, simply write a 0-byte file to trigger 90-mkinitcpio-install.hook from mkinitcpio. Reflects change from0f2bbe5123
- Consistency fixes Bring linux-odroid-xu3 more in line with the linux-aarch64 package.
This commit is contained in:
parent
1ace92a9be
commit
bfc9b67fad
6 changed files with 3824 additions and 2509 deletions
|
@ -1,320 +0,0 @@
|
|||
diff -ruN a/drivers/net/wireless/rtl8812au/core/rtw_mp.c b/drivers/net/wireless/rtl8812au/core/rtw_mp.c
|
||||
--- a/drivers/net/wireless/rtl8812au/core/rtw_mp.c 2020-08-20 02:08:41.000000000 -0600
|
||||
+++ b/drivers/net/wireless/rtl8812au/core/rtw_mp.c 2021-05-12 20:51:59.858880819 -0600
|
||||
@@ -1871,7 +1871,7 @@
|
||||
} else {
|
||||
psd_data = rtw_GetPSDData(pAdapter, i);
|
||||
}
|
||||
- sprintf(data, "%s%x ", data, psd_data);
|
||||
+ sprintf(data + strlen(data), "%x ", psd_data);
|
||||
i++;
|
||||
}
|
||||
|
||||
diff -ruN a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_linux.c
|
||||
--- a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_linux.c 2020-08-20 02:08:41.000000000 -0600
|
||||
+++ b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_linux.c 2021-05-12 20:53:45.926325818 -0600
|
||||
@@ -9068,19 +9068,19 @@
|
||||
sprintf(extra, "\n");
|
||||
for (i = 0; i < EFUSE_MAP_SIZE; i += 16) {
|
||||
// DBG_871X("0x%02x\t", i);
|
||||
- sprintf(extra, "%s0x%02x\t", extra, i);
|
||||
+ sprintf(extra + strlen(extra), "0x%02x\t", i);
|
||||
for (j=0; j<8; j++) {
|
||||
// DBG_871X("%02X ", data[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, PROMContent[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", PROMContent[i+j]);
|
||||
}
|
||||
// DBG_871X("\t");
|
||||
- sprintf(extra, "%s\t", extra);
|
||||
+ sprintf(extra + strlen(extra), "\t");
|
||||
for (; j<16; j++) {
|
||||
// DBG_871X("%02X ", data[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, PROMContent[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", PROMContent[i+j]);
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
- sprintf(extra,"%s\n",extra);
|
||||
+ sprintf(extra + strlen(extra), "\n");
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
} else if (strcmp(tmp[0], "realmap") == 0) {
|
||||
@@ -9095,19 +9095,19 @@
|
||||
sprintf(extra, "\n");
|
||||
for (i = 0; i < EFUSE_MAP_SIZE; i += 16) {
|
||||
// DBG_871X("0x%02x\t", i);
|
||||
- sprintf(extra, "%s0x%02x\t", extra, i);
|
||||
+ sprintf(extra + strlen(extra), "0x%02x\t", i);
|
||||
for (j=0; j<8; j++) {
|
||||
// DBG_871X("%02X ", data[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeEfuseInitMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->fakeEfuseInitMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\t");
|
||||
- sprintf(extra, "%s\t", extra);
|
||||
+ sprintf(extra + strlen(extra), "\t");
|
||||
for (; j<16; j++) {
|
||||
// DBG_871X("%02X ", data[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeEfuseInitMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->fakeEfuseInitMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
- sprintf(extra,"%s\n",extra);
|
||||
+ sprintf(extra + strlen(extra), "\n");
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
} else if (strcmp(tmp[0], "rmap") == 0) {
|
||||
@@ -9146,7 +9146,7 @@
|
||||
*extra = 0;
|
||||
for (i=0; i<cnts; i++) {
|
||||
// DBG_871X("0x%02x ", data[i]);
|
||||
- sprintf(extra, "%s0x%02X ", extra, data[i]);
|
||||
+ sprintf(extra + strlen(extra), "0x%02X ", data[i]);
|
||||
}
|
||||
// DBG_871X("}\n");
|
||||
} else if (strcmp(tmp[0], "realraw") == 0) {
|
||||
@@ -9162,17 +9162,17 @@
|
||||
sprintf(extra, "\n0x00\t");
|
||||
for (i=0; i< mapLen; i++) {
|
||||
// DBG_871X("%02X", rawdata[i]);
|
||||
- sprintf(extra, "%s%02X", extra, rawdata[i]);
|
||||
+ sprintf(extra + strlen(extra), "%02X", rawdata[i]);
|
||||
if ((i & 0xF) == 0xF) {
|
||||
// DBG_871X("\n");
|
||||
- sprintf(extra, "%s\n", extra);
|
||||
- sprintf(extra, "%s0x%02x\t", extra, i+1);
|
||||
+ sprintf(extra + strlen(extra), "\n");
|
||||
+ sprintf(extra + strlen(extra), "0x%02x\t", i+1);
|
||||
} else if ((i & 0x7) == 0x7) {
|
||||
// DBG_871X("\t");
|
||||
- sprintf(extra, "%s \t", extra);
|
||||
+ sprintf(extra + strlen(extra), " \t");
|
||||
} else {
|
||||
// DBG_871X(" ");
|
||||
- sprintf(extra, "%s ", extra);
|
||||
+ sprintf(extra + strlen(extra), " ");
|
||||
}
|
||||
}
|
||||
// DBG_871X("}\n");
|
||||
@@ -9257,10 +9257,10 @@
|
||||
*extra = 0;
|
||||
for (i=0; i<cnts; i++) {
|
||||
// DBG_871X("%02X", data[i]);
|
||||
- sprintf(extra, "%s%02X", extra, data[i]);
|
||||
+ sprintf(extra + strlen(extra), "%02X", data[i]);
|
||||
if (i != (cnts-1)) {
|
||||
// DBG_871X(":");
|
||||
- sprintf(extra,"%s:",extra);
|
||||
+ sprintf(extra + strlen(extra), ":");
|
||||
}
|
||||
}
|
||||
// DBG_871X("}\n");
|
||||
@@ -9318,10 +9318,10 @@
|
||||
*extra = 0;
|
||||
for (i=0; i<cnts; i++) {
|
||||
// DBG_871X("0x%02x", data[i]);
|
||||
- sprintf(extra, "%s0x%02X", extra, data[i]);
|
||||
+ sprintf(extra + strlen(extra), "0x%02X", data[i]);
|
||||
if (i != (cnts-1)) {
|
||||
// DBG_871X(",");
|
||||
- sprintf(extra,"%s,",extra);
|
||||
+ sprintf(extra + strlen(extra), ",");
|
||||
}
|
||||
}
|
||||
// DBG_871X("}\n");
|
||||
@@ -9343,19 +9343,19 @@
|
||||
sprintf(extra, "\n");
|
||||
for (i=0; i<512; i+=16) { // set 512 because the iwpriv's extra size have limit 0x7FF
|
||||
// DBG_871X("0x%03x\t", i);
|
||||
- sprintf(extra, "%s0x%03x\t", extra, i);
|
||||
+ sprintf(extra + strlen(extra), "0x%03x\t", i);
|
||||
for (j=0; j<8; j++) {
|
||||
// DBG_871X("%02X ", pEfuseHal->BTEfuseInitMap[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->BTEfuseInitMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\t");
|
||||
- sprintf(extra,"%s\t",extra);
|
||||
+ sprintf(extra + strlen(extra), "\t");
|
||||
for (; j<16; j++) {
|
||||
// DBG_871X("%02X ", pEfuseHal->BTEfuseInitMap[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->BTEfuseInitMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
- sprintf(extra, "%s\n", extra);
|
||||
+ sprintf(extra + strlen(extra), "\n");
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
} else if (strcmp(tmp[0],"btbmap") == 0) {
|
||||
@@ -9372,19 +9372,19 @@
|
||||
sprintf(extra, "\n");
|
||||
for (i=512; i<1024 ; i+=16) {
|
||||
// DBG_871X("0x%03x\t", i);
|
||||
- sprintf(extra, "%s0x%03x\t", extra, i);
|
||||
+ sprintf(extra + strlen(extra), "0x%03x\t", i);
|
||||
for (j=0; j<8; j++) {
|
||||
// DBG_871X("%02X ", data[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->BTEfuseInitMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\t");
|
||||
- sprintf(extra,"%s\t",extra);
|
||||
+ sprintf(extra + strlen(extra), "\t");
|
||||
for (; j<16; j++) {
|
||||
// DBG_871X("%02X ", data[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->BTEfuseInitMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
- sprintf(extra, "%s\n", extra);
|
||||
+ sprintf(extra + strlen(extra), "\n");
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
} else if (strcmp(tmp[0],"btrmap") == 0) {
|
||||
@@ -9424,7 +9424,7 @@
|
||||
// DBG_871X("%s: bt efuse data={", __FUNCTION__);
|
||||
for (i=0; i<cnts; i++) {
|
||||
// DBG_871X("0x%02x ", data[i]);
|
||||
- sprintf(extra, "%s 0x%02X ", extra, data[i]);
|
||||
+ sprintf(extra + strlen(extra), " 0x%02X ", data[i]);
|
||||
}
|
||||
// DBG_871X("}\n");
|
||||
DBG_871X(FUNC_ADPT_FMT ": BT MAC=[%s]\n", FUNC_ADPT_ARG(padapter), extra);
|
||||
@@ -9433,19 +9433,19 @@
|
||||
sprintf(extra, "\n");
|
||||
for (i=0; i<512; i+=16) {
|
||||
// DBG_871X("0x%03x\t", i);
|
||||
- sprintf(extra, "%s0x%03x\t", extra, i);
|
||||
+ sprintf(extra + strlen(extra), "0x%03x\t", i);
|
||||
for (j=0; j<8; j++) {
|
||||
// DBG_871X("%02X ", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\t");
|
||||
- sprintf(extra, "%s\t", extra);
|
||||
+ sprintf(extra + strlen(extra), "\t");
|
||||
for (; j<16; j++) {
|
||||
// DBG_871X("%02X ", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
- sprintf(extra, "%s\n", extra);
|
||||
+ sprintf(extra + strlen(extra), "\n");
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
} else if (strcmp(tmp[0],"btbfake") == 0) {
|
||||
@@ -9453,19 +9453,19 @@
|
||||
sprintf(extra, "\n");
|
||||
for (i=512; i<1024; i+=16) {
|
||||
// DBG_871X("0x%03x\t", i);
|
||||
- sprintf(extra, "%s0x%03x\t", extra, i);
|
||||
+ sprintf(extra + strlen(extra), "0x%03x\t", i);
|
||||
for (j=0; j<8; j++) {
|
||||
// DBG_871X("%02X ", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\t");
|
||||
- sprintf(extra, "%s\t", extra);
|
||||
+ sprintf(extra + strlen(extra), "\t");
|
||||
for (; j<16; j++) {
|
||||
// DBG_871X("%02X ", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
- sprintf(extra, "%s\n", extra);
|
||||
+ sprintf(extra + strlen(extra), "\n");
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
} else if (strcmp(tmp[0],"wlrfkmap")== 0) {
|
||||
@@ -9473,19 +9473,19 @@
|
||||
sprintf(extra, "\n");
|
||||
for (i=0; i<EFUSE_MAP_SIZE; i+=16) {
|
||||
// DBG_871X("\t0x%02x\t", i);
|
||||
- sprintf(extra, "%s0x%02x\t", extra, i);
|
||||
+ sprintf(extra + strlen(extra), "0x%02x\t", i);
|
||||
for (j=0; j<8; j++) {
|
||||
// DBG_871X("%02X ", pEfuseHal->fakeEfuseModifiedMap[i+j]);
|
||||
- sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), "%02X ", pEfuseHal->fakeEfuseModifiedMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\t");
|
||||
- sprintf(extra, "%s\t", extra);
|
||||
+ sprintf(extra + strlen(extra), "\t");
|
||||
for (; j<16; j++) {
|
||||
// DBG_871X("%02X ", pEfuseHal->fakeEfuseModifiedMap[i+j]);
|
||||
- sprintf(extra, "%s %02X", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);
|
||||
+ sprintf(extra + strlen(extra), " %02X", pEfuseHal->fakeEfuseModifiedMap[i+j]);
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
- sprintf(extra, "%s\n", extra);
|
||||
+ sprintf(extra + strlen(extra), "\n");
|
||||
}
|
||||
// DBG_871X("\n");
|
||||
|
||||
@@ -9511,7 +9511,7 @@
|
||||
*extra = 0;
|
||||
for (i=0; i<cnts; i++) {
|
||||
DBG_871X("wlrfkrmap = 0x%02x \n", pEfuseHal->fakeEfuseModifiedMap[addr+i]);
|
||||
- sprintf(extra, "%s0x%02X ", extra, pEfuseHal->fakeEfuseModifiedMap[addr+i]);
|
||||
+ sprintf(extra + strlen(extra), "0x%02X ", pEfuseHal->fakeEfuseModifiedMap[addr+i]);
|
||||
}
|
||||
} else if (strcmp(tmp[0],"btrfkrmap")== 0) {
|
||||
if ((tmp[1]==NULL) || (tmp[2]==NULL)) {
|
||||
@@ -9535,7 +9535,7 @@
|
||||
*extra = 0;
|
||||
for (i=0; i<cnts; i++) {
|
||||
DBG_871X("wlrfkrmap = 0x%02x \n", pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);
|
||||
- sprintf(extra, "%s0x%02X ", extra, pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);
|
||||
+ sprintf(extra + strlen(extra), "0x%02X ", pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);
|
||||
}
|
||||
} else {
|
||||
sprintf(extra, "Command not found!");
|
||||
@@ -10378,7 +10378,7 @@
|
||||
pnext++;
|
||||
if ( *pnext != '\0' ) {
|
||||
strtout = simple_strtoul (pnext , &ptmp, 16);
|
||||
- sprintf( extra, "%s %d" ,extra ,strtout );
|
||||
+ sprintf(extra + strlen(extra), " %d" ,strtout );
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@@ -10412,7 +10412,7 @@
|
||||
pnext++;
|
||||
if ( *pnext != '\0' ) {
|
||||
strtout = simple_strtoul (pnext , &ptmp, 16);
|
||||
- sprintf( extra, "%s %d" ,extra ,strtout );
|
||||
+ sprintf(extra + strlen(extra), " %d" ,strtout );
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@@ -10525,7 +10525,7 @@
|
||||
pnext++;
|
||||
if ( *pnext != '\0' ) {
|
||||
strtou = simple_strtoul (pnext , &ptmp, 16);
|
||||
- sprintf( extra, "%s %d" ,extra ,strtou );
|
||||
+ sprintf(extra + strlen(extra), " %d" ,strtou );
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@@ -11985,14 +11985,14 @@
|
||||
goto exit;
|
||||
|
||||
#ifdef CONFIG_RTL8723A
|
||||
- sprintf(extra, "%s %d ", extra, (pMptCtx->mptOutBuf[i]& 0x3f));
|
||||
+ sprintf(extra + strlen(extra), " %d ", (pMptCtx->mptOutBuf[i]& 0x3f));
|
||||
#else
|
||||
- sprintf(extra, "%s %d ", extra, (pMptCtx->mptOutBuf[i]& 0x1f));
|
||||
+ sprintf(extra + strlen(extra), " %d ", (pMptCtx->mptOutBuf[i]& 0x1f));
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
for (i=4; i<pMptCtx->mptOutLen; i++) {
|
||||
- sprintf(extra, "%s 0x%x ", extra, pMptCtx->mptOutBuf[i]);
|
||||
+ sprintf(extra + strlen(extra), " 0x%x ", pMptCtx->mptOutBuf[i]);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[Trigger]
|
||||
Type = File
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Target = boot/zImage
|
||||
Target = usr/lib/initcpio/*
|
||||
|
||||
[Action]
|
||||
Description = Updating %PKGBASE% initcpios
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/mkinitcpio -p %PKGBASE%
|
|
@ -4,67 +4,40 @@
|
|||
buildarch=4
|
||||
|
||||
pkgbase=linux-odroid-xu3
|
||||
_commit=864c4519b77763274b61a035b33bc92f71084b59
|
||||
_commit=ff2422d0b03367d454c7c1fc579f19993cb9b9f5
|
||||
_srcname=linux-${_commit}
|
||||
_kernelname=${pkgbase#linux}
|
||||
_desc="ODROID-XU3/XU4/HC1"
|
||||
pkgver=4.14.180
|
||||
pkgrel=3
|
||||
pkgver=6.6.36
|
||||
pkgrel=1
|
||||
arch=('armv7h')
|
||||
url="https://github.com/hardkernel/linux"
|
||||
license=('GPL2')
|
||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git')
|
||||
options=('!strip')
|
||||
source=("https://github.com/hardkernel/linux/archive/${_commit}.tar.gz"
|
||||
'0001-rtl8812au-sprintf-fix-gcc10.patch'
|
||||
source=("linux-odroid-$_commit.tar.gz::https://github.com/hardkernel/linux/archive/${_commit}.tar.gz"
|
||||
'config'
|
||||
'linux.preset'
|
||||
'99-linux.hook')
|
||||
md5sums=('249d4767373ab56ae16a0a23a69c61a2'
|
||||
'20bf3136f2725be5b6a2eb7a5a8682bf'
|
||||
'170cdff5ddd12492e205c61261e9ff74'
|
||||
'a84976d500db50cee07177eccfe2f455'
|
||||
'79fa396e3f9a09a85156d6d7c2d34b58')
|
||||
'linux.preset')
|
||||
md5sums=('6a7d24b936d98cae82cf8c07c60b6c75'
|
||||
'6779c133ce155d8ec39704bc9b6aba8a'
|
||||
'86d4a35722b5410e3b29fc92dae15d4b')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
cd $_srcname
|
||||
|
||||
echo "Setting version..."
|
||||
echo "-$pkgrel" > localversion.10-pkgrel
|
||||
echo "${pkgbase#linux}" > localversion.20-pkgname
|
||||
|
||||
cat "${srcdir}/config" > ./.config
|
||||
|
||||
patch -Np1 -i ../0001-rtl8812au-sprintf-fix-gcc10.patch
|
||||
|
||||
# add pkgrel to extraversion
|
||||
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile
|
||||
|
||||
# don't run depmod on 'make install'. We'll do this ourselves in packaging
|
||||
sed -i '2iexit 0' scripts/depmod.sh
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
cd $_srcname
|
||||
|
||||
# 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
|
||||
make -s kernelrelease > version
|
||||
|
||||
# build!
|
||||
make ${MAKEFLAGS} zImage modules dtbs
|
||||
|
@ -73,59 +46,40 @@ build() {
|
|||
_package() {
|
||||
pkgdesc="The Linux Kernel and modules - ${_desc}"
|
||||
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
|
||||
optdepends=('crda: to set the correct wireless channels of your country')
|
||||
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
||||
provides=('kernel26' "linux=${pkgver}")
|
||||
optdepends=('wireless-regdb: to set the correct wireless channels of your country')
|
||||
provides=("linux=${pkgver}" "WIREGUARD-MODULE")
|
||||
conflicts=('linux')
|
||||
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
||||
install=${pkgname}.install
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
cd $_srcname
|
||||
local kernver="$(<version)"
|
||||
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
|
||||
|
||||
KARCH=arm
|
||||
|
||||
# get kernel version
|
||||
_kernver="$(make kernelrelease)"
|
||||
_basekernel=${_kernver%%-*}
|
||||
_basekernel=${_basekernel%.*}
|
||||
|
||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware}
|
||||
make INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||
echo "Installing boot image and dtbs..."
|
||||
install -Dm644 arch/arm/boot/zImage -t "${pkgdir}/boot"
|
||||
make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install
|
||||
cp arch/$KARCH/boot/zImage "${pkgdir}/boot/zImage"
|
||||
|
||||
# set correct depmod command for install
|
||||
sed \
|
||||
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
|
||||
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
||||
-i "${startdir}/${pkgname}.install"
|
||||
echo "Installing modules..."
|
||||
make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install
|
||||
|
||||
# install mkinitcpio preset file for kernel
|
||||
install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||
sed \
|
||||
-e "1s|'linux.*'|'${pkgbase}'|" \
|
||||
-e "s|ALL_kver=.*|ALL_kver=\"${_kernver}\"|" \
|
||||
-i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||
# remove build link
|
||||
rm "$modulesdir"/build
|
||||
|
||||
# install pacman hook for initramfs regeneration
|
||||
sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/99-linux.hook" |
|
||||
install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/99-${pkgbase}.hook"
|
||||
# sed expression for following substitutions
|
||||
local _subst="
|
||||
s|%PKGBASE%|${pkgbase}|g
|
||||
s|%KERNVER%|${kernver}|g
|
||||
"
|
||||
|
||||
# remove build and source links
|
||||
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
|
||||
# remove the firmware
|
||||
rm -rf "${pkgdir}/lib/firmware"
|
||||
# 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-${_basekernel}${_kernelname:--ARCH}"
|
||||
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
|
||||
# install mkinitcpio preset file
|
||||
sed "${_subst}" ../linux.preset |
|
||||
install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||
|
||||
# Now we call depmod...
|
||||
depmod -b "$pkgdir" -F System.map "$_kernver"
|
||||
|
||||
# move module tree /lib -> /usr/lib
|
||||
mkdir -p "${pkgdir}/usr"
|
||||
mv "$pkgdir/lib" "$pkgdir/usr"
|
||||
# rather than use another hook (90-linux.hook) rely on mkinitcpio's 90-mkinitcpio-install.hook
|
||||
# which avoids a double run of mkinitcpio that can occur
|
||||
install -d "${pkgdir}/usr/lib/initcpio/"
|
||||
echo "dummy file to trigger mkinitcpio to run" > "${pkgdir}/usr/lib/initcpio/$kernver"
|
||||
}
|
||||
|
||||
_package-headers() {
|
||||
|
@ -133,112 +87,75 @@ _package-headers() {
|
|||
provides=("linux-headers=${pkgver}")
|
||||
conflicts=('linux-headers')
|
||||
|
||||
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
|
||||
cd $_srcname
|
||||
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
install -D -m644 Makefile \
|
||||
"${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
|
||||
install -D -m644 kernel/Makefile \
|
||||
"${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
|
||||
install -D -m644 .config \
|
||||
"${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
|
||||
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
|
||||
|
||||
for i in acpi asm-generic config crypto drm generated keys linux math-emu \
|
||||
media net pcmcia scsi soc sound trace uapi video xen; do
|
||||
cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
|
||||
done
|
||||
|
||||
# copy arch includes for external modules
|
||||
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH
|
||||
cp -a arch/$KARCH/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/
|
||||
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/mach-exynos
|
||||
cp -a arch/$KARCH/mach-exynos/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/mach-exynos/
|
||||
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/plat-samsung
|
||||
cp -a arch/$KARCH/plat-samsung/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/plat-samsung/
|
||||
|
||||
# copy files necessary for later builds, like nvidia and vmware
|
||||
cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||
cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||
|
||||
# fix permissions on scripts dir
|
||||
chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
|
||||
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
|
||||
|
||||
cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
|
||||
|
||||
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
|
||||
|
||||
# add dm headers
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
||||
cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
||||
|
||||
# add inotify.h
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
|
||||
cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
|
||||
|
||||
# add wireless headers
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
||||
cp net/mac80211/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
||||
|
||||
# add dvb headers for external modules
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/9912
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core"
|
||||
cp drivers/media/dvb-core/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core/"
|
||||
# and...
|
||||
# http://bugs.archlinux.org/task/11194
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
|
||||
cp include/config/dvb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
|
||||
|
||||
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/13146
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||
cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
|
||||
cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
|
||||
|
||||
# add dvb headers
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/20402
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb"
|
||||
cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb/"
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends"
|
||||
cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners"
|
||||
cp drivers/media/tuners/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners/"
|
||||
echo "Installing build files..."
|
||||
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
|
||||
localversion.* version vmlinux
|
||||
install -Dt "$builddir/kernel" -m644 kernel/Makefile
|
||||
install -Dt "$builddir/arch/arm" -m644 arch/arm/Makefile
|
||||
cp -t "$builddir" -a scripts
|
||||
|
||||
# add xfs and shmem for aufs building
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs"
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
|
||||
mkdir -p "$builddir"/{fs/xfs,mm}
|
||||
|
||||
# copy in Kconfig files
|
||||
for i in $(find . -name "Kconfig*"); do
|
||||
mkdir -p "${pkgdir}"/usr/lib/modules/${_kernver}/build/`echo ${i} | sed 's|/Kconfig.*||'`
|
||||
cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}"
|
||||
echo "Installing headers..."
|
||||
cp -t "$builddir" -a include
|
||||
|
||||
install -Dt "$builddir/arch/arm/kernel" -m644 arch/arm/kernel/asm-offsets.s
|
||||
|
||||
cp -t "$builddir/arch/arm" -a arch/arm/include
|
||||
|
||||
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
|
||||
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
|
||||
|
||||
# https://bugs.archlinux.org/task/13146
|
||||
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||
|
||||
# https://bugs.archlinux.org/task/20402
|
||||
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
|
||||
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||
|
||||
echo "Installing KConfig files..."
|
||||
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
|
||||
|
||||
echo "Removing unneeded architectures..."
|
||||
local arch
|
||||
for arch in "$builddir"/arch/*/; do
|
||||
[[ $arch == */arm/ ]] && continue
|
||||
echo "Removing $(basename "$arch")"
|
||||
rm -r "$arch"
|
||||
done
|
||||
|
||||
chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||
find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;
|
||||
echo "Removing documentation..."
|
||||
rm -r "$builddir/Documentation"
|
||||
|
||||
# strip scripts directory
|
||||
find "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
|
||||
case "$(file -bi "${binary}")" in
|
||||
*application/x-sharedlib*) # Libraries (.so)
|
||||
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
|
||||
*application/x-archive*) # Libraries (.a)
|
||||
/usr/bin/strip ${STRIP_STATIC} "${binary}";;
|
||||
*application/x-executable*) # Binaries
|
||||
/usr/bin/strip ${STRIP_BINARIES} "${binary}";;
|
||||
echo "Removing broken symlinks..."
|
||||
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
|
||||
|
||||
echo "Removing loose objects..."
|
||||
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
|
||||
|
||||
echo "Stripping build tools..."
|
||||
local file
|
||||
while read -rd '' file; do
|
||||
case "$(file -bi "$file")" in
|
||||
application/x-sharedlib\;*) # Libraries (.so)
|
||||
strip -v $STRIP_SHARED "$file" ;;
|
||||
application/x-archive\;*) # Libraries (.a)
|
||||
strip -v $STRIP_STATIC "$file" ;;
|
||||
application/x-executable\;*) # Binaries
|
||||
strip -v $STRIP_BINARIES "$file" ;;
|
||||
application/x-pie-executable\;*) # Relocatable binaries
|
||||
strip -v $STRIP_SHARED "$file" ;;
|
||||
esac
|
||||
done
|
||||
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
|
||||
|
||||
# remove unneeded architectures
|
||||
rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,x86,xtensa}
|
||||
echo "Adding symlink..."
|
||||
mkdir -p "$pkgdir/usr/src"
|
||||
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
|
||||
}
|
||||
|
||||
pkgname=("${pkgbase}" "${pkgbase}-headers")
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,21 +1,3 @@
|
|||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
|
||||
KERNEL_NAME=-odroid-xu3
|
||||
KERNEL_VERSION=4.14.180-3-ARCH
|
||||
|
||||
post_install () {
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
rm -f boot/initramfs-linux.img
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# mkinitcpio preset file for the linux-odroid-xu3 package
|
||||
# mkinitcpio preset file for the '%PKGBASE%' package
|
||||
|
||||
ALL_config="/etc/mkinitcpio.conf"
|
||||
ALL_kver="4.9.13-1-ARCH"
|
||||
ALL_kver="%KERNVER%"
|
||||
|
||||
PRESETS=('default')
|
||||
|
||||
|
|
Loading…
Reference in a new issue