Browse Source

Add kbd-1.15.

This also requires a patch to linux-headers; while we are at it, make
linux-headers PREFIX agnostic.
master
fosslinux 11 months ago
parent
commit
ddd4f1bc81
  1. 1
      SHA256SUMS.sources
  2. 30
      sysa/kbd-1.15/kbd-1.15.sh
  3. 16
      sysa/kbd-1.15/patches/fcntl.patch
  4. 1821
      sysa/linux-headers-5.10.41/checksums
  5. 15
      sysa/linux-headers-5.10.41/linux-headers-5.10.41.sh
  6. 3
      sysa/linux-headers-5.10.41/patches/winsize.patch
  7. 19
      sysa/run.sh

1
SHA256SUMS.sources

@ -101,3 +101,4 @@ e40b8f018c1da64edd1cc9a6fce5fa63b2e707e404e20cad91fbae337c98a5b7 make-4.2.1.tar
af618de7848142f204b57811f703de3ae7aa3f5bc5d52226db35800fa8fc4dff kexec-tools-2.0.22.tar.gz
f694bee56099b8d72c3843d97e27f2306aa9946741e34a27391f6f6f19c7bcd0 util-linux-2.19.1.tar.gz
4f317112f6662b32018ac3ad2a8bfed7105322cfb5a6beeb920298d04c8d7487 linux-2.6.16.62.tar.gz
203c93e004ac7ad0e50423ff54d89e40fa99f45b207b2b892a4d70211feebe05 kbd-1.15.tar.gz

30
sysa/kbd-1.15/kbd-1.15.sh

@ -0,0 +1,30 @@
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
# Remove flex/bison files
rm src/loadkeys.c src/analyze.c
# Fix musl incompat
sed -i -e 's/u_char/unsigned char/g' \
-e 's/u_short/unsigned short/g' src/dumpkeys.c src/loadkeys.y
AUTOPOINT=true autoreconf -fi
}
src_configure() {
./configure --prefix=${PREFIX}
}
src_compile() {
# Missing dependency in Makefile
flex -o src/analyze.c src/analyze.l
make MAKEINFO=true
}
src_install() {
make MAKEINFO=true DESTDIR=${DESTDIR} install
}

16
sysa/kbd-1.15/patches/fcntl.patch

@ -0,0 +1,16 @@
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: GPL-2.0-or-later
Add missing fcntl header.
--- src/kbdrate.c 2021-07-22 22:35:53.671970814 +1000
+++ src/kbdrate.c 2021-07-22 22:36:10.038096797 +1000
@@ -94,6 +94,7 @@
};
#include <signal.h>
+#include <fcntl.h>
#include "nls.h"
#include "version.h"

1821
sysa/linux-headers-5.10.41/checksums

File diff suppressed because it is too large Load Diff

15
sysa/linux-headers-5.10.41/linux-headers-5.10.41.sh

@ -32,22 +32,23 @@ src_install() {
# We "compile" the headers here because it is easier
for d in include/uapi arch/x86/include/uapi; do
cd "${d}"
find . -type d -exec mkdir "/after/include/{}" -p \;
find . -type d -exec mkdir "${PREFIX}/include/{}" -p \;
headers="$(find . -type f -name "*.h")"
cd "${base_dir}"
for h in ${headers}; do
scripts/headers_install.sh "${d}/${h}" "/after/include/${h}"
scripts/headers_install.sh "${d}/${h}" "${PREFIX}/include/${h}"
done
done
# Pick-and-choose asm-generic headers
cp /after/include/asm-generic/types.h /after/include/asm/types.h
cp /after/include/asm-generic/ioctl.h /after/include/asm/ioctl.h
for i in types ioctl termios termbits ioctls; do
cp ${PREFIX}/include/asm-generic/${i}.h ${PREFIX}/include/asm/${i}.h
done
# Generate asm/unistd_32.h
bash arch/x86/entry/syscalls/syscallhdr.sh \
arch/x86/entry/syscalls/syscall_32.tbl \
/after/include/asm/unistd_32.h i386
${PREFIX}/include/asm/unistd_32.h i386
# Generate linux/version.h
# Rules are from makefile
@ -56,7 +57,7 @@ src_install() {
SUBLEVEL=42
VERSION_CODE="$((${VERSION} * 65536 + ${PATCHLEVEL} * 256 + ${SUBLEVEL}))"
echo '#define LINUX_VERSION_CODE '"${VERSION_CODE}" \
> /after/include/linux/version.h
> ${PREFIX}/include/linux/version.h
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))' \
>> /after/include/linux/version.h
>> ${PREFIX}/include/linux/version.h
}

3
sysa/linux-headers-5.10.41/patches/winsize.patch

@ -1,7 +1,10 @@
<<<<<<< HEAD
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: GPL-2.0-only
=======
>>>>>>> 1bbc946 (Add kbd-1.15.)
--- include/uapi/asm-generic/termios.h.bak 2021-07-23 14:23:51.330460544 +1000
+++ include/uapi/asm-generic/termios.h 2021-07-23 19:08:27.112810109 +1000
@@ -12,13 +12,6 @@

19
sysa/run.sh

@ -11,6 +11,11 @@ set -e
. helpers.sh
. bootstrap.cfg
export PREFIX=/usr
export SOURCES=/after
mkdir "${PREFIX}/sbin"
export PATH="${PREFIX}/bin:${PREFIX}/sbin"
populate_device_nodes() {
# http://www.linuxfromscratch.org/lfs/view/6.1/chapter06/devices.html
mkdir -p "${1}/dev"
@ -28,7 +33,7 @@ create_sysb() {
echo "Creating sysb rootfs"
mkdir -p /sysb/usr
for d in bin include lib libexec sbin share; do
cp -r "/after/${d}" "/sysb/usr/${d}"
cp -r "${PREFIX}/${d}" "/sysb/usr/${d}"
done
populate_device_nodes /sysb
}
@ -40,15 +45,11 @@ go_sysb() {
# kexec time
echo "Loading kernel + sysb initramfs using kexec"
kexec -l "${PREFIX}/boot/linux-2.6.16.62" --console-serial \
--append="console=ttyS0 root=/dev/ram0 init=/init"
--append="root=/dev/ram0 init=/init clocksource=acpi_pm clock=pmtmr"
echo "kexecing into sysb"
kexec -e
}
export PREFIX=/image
export PATH="${PREFIX}/bin"
export SOURCES=/after
build flex-2.5.11
# Patch meslibc to support > 255 command line arguments
@ -179,13 +180,11 @@ if [ "${CHROOT}" = False ]; then
build kexec-tools-2.0.22
build kbd-1.15
create_sysb
build linux-2.6.16.62
<<<<<<< HEAD
exec env -i PATH=${PREFIX}/bin PREFIX=${PREFIX} SOURCES=${SOURCES} bash run2.sh
=======
go_sysb
fi
>>>>>>> a95c6f2 (Add sysb and sysc scaffolding.)

Loading…
Cancel
Save