Update the linux kernel for sysb/c to 4.9.10.
- We do not use latest 4.9.x because it relies on a new version of binutils, while older versions do not. (Note: we should be able to go a bit newer but I didn't bother testing >50 versions to figure this out). - We do not use newer kernel versions because they require one or more of (new perl, new binutils, new make, new gcc, new bison, new tar). - sysb and sysc are updated to use the SATA (libata) subsystem (aka sda) instead of IDE-emulating SATA subsystem (aka hda) which is now available to us. - While theoretically according to docs 4.9 should work OOTB with our version of binutils this is not the case, so we have to do a bit of (interesting) patching. But this does not break anything. - Thankfully serial support in 4.9 is not screwed over like it is in 2.6 so we can revert to that. - 4.9 has the linux-libre project at our disposal, instead of gNewSense. So we use this. Unfortunatley that takes forever because we have to use sed because our version of gawk is too old/buggy. :( I plan to introduce very shortly 1. parallelism 2. 'sysc snapshot' which will start from sysc to avoid this. I do not want to use linux-libre tarballs because they make modificiations directly from this script (aka not easily verifiable, use the source!) and this script allows for much greater flexibility. - We compile the initramfs ahead-of-build using the in-tree cpio generator instead of also building cpio to use less packages. We do NOT build the initramfs into the kernel like 2.6 (unsupported). - Oh and fix a kexec-tools checksum.
This commit is contained in:
parent
e225435983
commit
d429c48d76
|
@ -103,3 +103,6 @@ f694bee56099b8d72c3843d97e27f2306aa9946741e34a27391f6f6f19c7bcd0 util-linux-2.1
|
|||
203c93e004ac7ad0e50423ff54d89e40fa99f45b207b2b892a4d70211feebe05 kbd-1.15.tar.gz
|
||||
ff2bf7656c4d1c6fdda3b8bebb21f09153a736bcba169aaf65eab25fa113bf3a automake-1.16.3.tar.xz
|
||||
3d991b33e604187c5881a0abc2e102d5b9776da5569640e73778f85d617242e7 make-3.82.tar.gz
|
||||
97ff15f9550c6e85c25173b3cf5c7e89a2d39fb923112f2c8bc2729cf64bf6d8 linux-4.9.10.tar.gz
|
||||
db316ba381e5a9916ace64acf822f0de70a724df06f73c18d79c5d16385a0cf1 deblob-4.9
|
||||
62912c9e999cc25c8cf494533d5bab8c22d9e0ee081649d3c05197b3a096aa3b deblob-check
|
||||
|
|
|
@ -32,7 +32,7 @@ def create_configuration_file(args):
|
|||
with open(config_path, "w") as config:
|
||||
config.write("FORCE_TIMESTAMPS=" + str(args.force_timestamps) + "\n")
|
||||
config.write("CHROOT=" + str(args.chroot) + "\n")
|
||||
config.write("DISK=hda1\n")
|
||||
config.write("DISK=sda1\n")
|
||||
|
||||
def main():
|
||||
"""
|
||||
|
@ -128,7 +128,8 @@ print(shutil.which('chroot'))
|
|||
'-hda', system_c.dev_name,
|
||||
'-kernel', args.kernel,
|
||||
'-initrd', system_a.initramfs_path,
|
||||
'-display', 'curses')
|
||||
'-nographic',
|
||||
'-append', 'console=ttyS0')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
5
sysa.py
5
sysa.py
|
@ -297,5 +297,6 @@ class SysA(SysGeneral):
|
|||
self.get_file("http://ftp.gnu.org/gnu/make/make-3.82.tar.gz")
|
||||
|
||||
# linux kernel 2.6.16.62
|
||||
# for some reason this is no longer on kernel.org
|
||||
self.get_file("https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-2.6.16.62.tar.gz")
|
||||
self.get_file(["https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.10.tar.gz",
|
||||
"http://linux-libre.fsfla.org/pub/linux-libre/releases/4.9.10-gnu/deblob-4.9",
|
||||
"http://linux-libre.fsfla.org/pub/linux-libre/releases/4.9.10-gnu/deblob-check"])
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
55636ab04343262e257e2559074e36358b292491a90ff50f2a6ad2f94eb29b28 /usr/lib/kexec-tools/kexec_test
|
||||
d36b4078cc2bfb3fb6c659982ad2356a985fea8290650992e4f023f495e4ec1e /usr/sbin/kexec
|
||||
908da401f056cdc118015014ec1c366a666a3c5e3958726582c245bab5038a41 /usr/sbin/kexec
|
||||
|
|
|
@ -1,123 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# SPDX-FileCopyrightText: 2006 Brian Brazil
|
||||
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
function clean_kconfig {
|
||||
perl -i -ne 'BEGIN{$p=1} if(/^config ('$2')$/){$p=0}elsif(/^(config|endmenu|source)/){$p=1}; print if $p' $1
|
||||
}
|
||||
|
||||
#FORE uses pca200e.data, pca200e_ecd.data and sba200e_ecd.data
|
||||
clean_kconfig ./drivers/atm/Kconfig 'ATM_(AMBASSADOR|FORE).*'
|
||||
sed -i '/CONFIG_ATM_AMBASSADOR/d' ./drivers/atm/Makefile
|
||||
sed -i '/CONFIG_ATM_FORE200E)/d' ./drivers/atm/Makefile
|
||||
|
||||
clean_kconfig ./drivers/char/drm/Kconfig 'DRM_(MGA|R128|RADEON)'
|
||||
sed -i '/\(mga\|r128\|radeon\)(\.o\|-objs)/d' ./drivers/char/drm/Makefile
|
||||
|
||||
#No kconfig for dsp56
|
||||
clean_kconfig ./drivers/char/Kconfig 'COMPUTONE'
|
||||
sed -i '/ATARI_DSP56K\|COMPUTONE/d' ./drivers/char/drm/Makefile
|
||||
|
||||
clean_kconfig ./drivers/media/dvb/frontends/Kconfig 'DVB_(TDA10021|TDA8083|TDA80XX|VES1820|VES1X93)'
|
||||
sed -i '/CONFIG_DVB_\(TDA10021\|TDA8083\|TDA80XX\|VES1820\|VES1X93\)/d' ./drivers/media/dvb/frontends/Makefile
|
||||
|
||||
clean_kconfig ./drivers/media/dvb/ttpci/Kconfig 'DVB_(AV7110.*|BUDGET_CI|BUDGET_AV)'
|
||||
sed -i '/CONFIG_\(AV7110\|BUDGET_CI\|BUDGET_AV\)/d' ./drivers/media/dvb/ttpci/Makefile
|
||||
|
||||
echo > ./drivers/media/dvb/ttusb-budget/Kconfig
|
||||
echo > ./drivers/media/dvb/ttusb-budget/Makefile
|
||||
sed -i 's#ttusb-budget/##' ./drivers/media/dvb/Makefile
|
||||
|
||||
#STRADIS uses cs8420.h
|
||||
clean_kconfig ./drivers/media/video/Kconfig 'VIDEO_STRADIS'
|
||||
sed -i '/CONFIG_VIDEO_STRADIS/d' ./drivers/media/video/Makefile
|
||||
|
||||
clean_kconfig ./drivers/net/Kconfig 'ACENIC|ACENIC_OMIT_TIGON_I|BNX2|CASSINI|DGRS|E100|ADAPTEC_STARFIRE|ADAPTEC_STARFIRE_NAPI|TYPHOON|TIHON3'
|
||||
sed -i '/\(acenic\|bnx2\|cassini\|dgrs\|e100\|starfire\|typhoon\|tg3\)\.o/d' ./drivers/net/Makefile
|
||||
|
||||
clean_kconfig ./drivers/net/appletalk/Kconfig 'COPS.*'
|
||||
sed -i '/CONFIG_COPS/d' ./drivers/net/appletalk/Makefile
|
||||
|
||||
#YAM uses yam1200.h and yam9600.h
|
||||
clean_kconfig ./drivers/net/hamradio/Kconfig 'YAM'
|
||||
sed -i '/CONFIG_YAM/d' ./drivers/net/hamradio/Makefile
|
||||
|
||||
clean_kconfig ./drivers/net/pcmcia/Kconfig 'PCMCIA_SMC91C92'
|
||||
sed -i '/CONFIG_PCMCIA_SMC91C92/d' ./drivers/net/pcmcia/Makefile
|
||||
|
||||
clean_kconfig ./drivers/net/tokenring/Kconfig 'SMCTR|3C359'
|
||||
sed -i '/CONFIG_\(SMCTR\|3C359\)/d' ./drivers/net/tokenring/Makefile
|
||||
|
||||
#CYCLADES_SYNC uses sdladrv.c
|
||||
#WANXL uses wanxlfw.inc_shipped
|
||||
clean_kconfig ./drivers/net/wan/Kconfig 'CYCLADES_SYNC|WANXL.*'
|
||||
sed -i '/CONFIG_\(CYCLADES_SYNC\|WANXL)\)/d' ./drivers/net/wan/Makefile
|
||||
|
||||
#QETH uses qeth_mpc.c
|
||||
clean_kconfig ./drivers/s390/net/Kconfig 'QETH.*'
|
||||
sed -i '/^qeth-/d' ./drivers/s390/net/Makefile
|
||||
|
||||
#AIC79XX uses aic79xx_seq.h_shipped
|
||||
echo > ./drivers/scsi/aic7xxx/Kconfig.aic79xx
|
||||
sed -i '/aic79xx/d' ./drivers/scsi/aic7xxx/Makefile
|
||||
|
||||
#QLOGIC_1280 uses ql1040_fw.h, ql12160_fw.h and ql1280_fw.h
|
||||
clean_kconfig ./drivers/scsi/Kconfig 'SCSI_QLOGIC(_1280|_FC.*|PTI)'
|
||||
sed -i '/qla1280\.o/d; /CONFIG_SCSI_QLOGIC\(_1280\|_FC\|PTI\)/d' ./drivers/scsi/Makefile
|
||||
|
||||
echo > ./drivers/scsi/qla2xxx/Kconfig
|
||||
echo > ./drivers/scsi/qla2xxx/Makefile
|
||||
sed -i '/CONFIG_SCSI_QLA2XXX/d' ./drivers/scsi/Makefile
|
||||
|
||||
clean_kconfig ./drivers/serial/Kconfig 'SERIAL_JSM'
|
||||
echo > ./drivers/serial/jsm/Makefile
|
||||
sed -i '/CONFIG_SERIAL_JSM/d' ./drivers/pci/Makefile
|
||||
|
||||
#DABUSB uses dabfirmware.h
|
||||
#PWC uses pwc-kiara.c and pwc-timon.c
|
||||
clean_kconfig ./drivers/usb/media/Kconfig 'USB_(DABUSB|IBMCAM|VICAM|PWC|SPCA5XX)'
|
||||
sed -i '/CONFIG_USB_\(DABUSB\|IBMCAM\|VICAM\|PWC\|\SPCA5XX\)/d' ./drivers/usb/media/Makefile
|
||||
|
||||
#EMI26 uses emi26_fw.h
|
||||
#EMI62 uses emi62_fw_m.h and emi62_fw_s.h
|
||||
clean_kconfig ./drivers/usb/misc/Kconfig 'USB_EMI(26|62)'
|
||||
sed -i '/CONFIG_USB_EMI\(26\|62\)/d' ./drivers/usb/misc/Makefile
|
||||
|
||||
echo > ./drivers/usb/misc/sisusbvga/Kconfig
|
||||
echo > ./drivers/usb/misc/sisusbvga/Makefile
|
||||
sed -i '/CONFIG_USB_SISUSBVGA/d' ./drivers/usb/misc/Makefile
|
||||
|
||||
#KAWETH uses kawethfw.h
|
||||
clean_kconfig ./drivers/usb/net/Kconfig 'USB_(ATMEL|EAGLE|KAWETH|ZD1211)'
|
||||
sed -i '/CONFIG_USB_\(ATMEL\|EAGLE\|KAWETH\|ZD1211\)/d' ./drivers/usb/net/Makefile
|
||||
|
||||
#EDGEPORT uses io_fw_boot.h, io_fw_boot2.h, io_fw_down.h and io_fw_down2.h
|
||||
#EDGEPORT_TI uses io_fw_down3.h
|
||||
#TI uses ti_fw_3410.h, ti_fw_5052.h
|
||||
#WHITEHEAT uses whiteheat_fw.h
|
||||
#XIRCOM uses xircom_pgs_fw.h
|
||||
#KEYSPAN/KEYSPAN_PDA uses the rest *and* xircom_pgs_fw.h
|
||||
clean_kconfig ./drivers/usb/serial/Kconfig 'USB_SERIAL_(EDGEPORT(_TI)?|KEYSPAN.*|TI||WHITEHEAT|XIRCOM)'
|
||||
sed -i '/CONFIG_USB_SERIAL_\(EDGEPORT\(_TI\)\?\|KEYSPAN\|TI\|WHITEHEAT\|XIRCOM\)/d' ./drivers/usb/serial/Makefile
|
||||
|
||||
#chipsfb.c is unused
|
||||
clean_kconfig ./drivers/video/Kconfig 'FB_ASILIANT'
|
||||
sed -i '/CONFIG_FB_ASILIANT/d' ./drivers/video/Makefile
|
||||
|
||||
clean_kconfig ./sound/pci/Kconfig 'SND_(KORG1212|MAESTRO3|YMFPCI|CS46XX.*)'
|
||||
echo > ./sound/pci/cs46xx/Makefile
|
||||
echo > ./sound/pci/korg1212/Makefile
|
||||
echo > ./sound/pci/ymfpci/Makefile
|
||||
sed -i '/cs46xx\//d' ./sound/pci/Makefile
|
||||
sed -i '/korg1212\//d' ./sound/pci/Makefile
|
||||
sed -i '/ymfpci\//d' ./sound/pci/Makefile
|
||||
sed -i '/SND_MAESTRO3/d' ./sound/pci/Makefile
|
||||
|
||||
#FUSION uses cs461x_image.h
|
||||
clean_kconfig ./sound/oss/Kconfig 'SOUND_(FUSION|MAESTRO3|YMFPCI)'
|
||||
sed -i '/SOUND_FUSION/d' ./sound/pci/Makefile
|
||||
sed -i '/SOUND_MAESTRO3/d' ./sound/pci/Makefile
|
||||
sed -i '/ymfpci.o/d' ./sound/pci/Makefile
|
|
@ -1,136 +0,0 @@
|
|||
arch/arm/boot/compressed/ofw-shark.c
|
||||
arch/cris/arch-v32/drivers/iop_fw_load.c
|
||||
arch/ia64/hp/sim/boot/fw-emu.c
|
||||
arch/m68k/mac/mac_penguin.S
|
||||
arch/m68knommu/platform/68EZ328/bootlogo.h
|
||||
arch/parisc/kernel/perf_images.h
|
||||
arch/s390/kernel/ebcdic.c
|
||||
drivers/atm/atmsar11.data
|
||||
drivers/atm/pca200e.data
|
||||
drivers/atm/pca200e_ecd.data
|
||||
drivers/atm/sba200e_ecd.data
|
||||
drivers/char/drm/mga_ucode.h
|
||||
drivers/char/drm/r128_cce.c
|
||||
drivers/char/drm/radeon_cp.c
|
||||
drivers/char/dsp56k.c
|
||||
drivers/char/ip2/fip_firm.h
|
||||
drivers/char/ser_a2232fw.ax
|
||||
drivers/char/ser_a2232fw.h
|
||||
drivers/char/serial167.c
|
||||
drivers/isdn/i4l/isdn_v110.c
|
||||
drivers/media/dvb/frontends/tda10021.c
|
||||
drivers/media/dvb/frontends/tda8083.c
|
||||
drivers/media/dvb/frontends/ves1820.c
|
||||
drivers/media/dvb/frontends/ves1x93.c
|
||||
drivers/media/dvb/ttpci/av7110.c
|
||||
drivers/media/dvb/ttpci/av7110_hw.c
|
||||
drivers/media/dvb/ttpci/budget-av.c
|
||||
drivers/media/dvb/ttpci/budget-ci.c
|
||||
drivers/media/dvb/ttusb-budget/dvb-ttusb-dspbootcode.h
|
||||
drivers/media/video/bt832.h
|
||||
drivers/media/video/cs8420.h
|
||||
drivers/mtd/chips/fwh_lock.h
|
||||
drivers/mtd/nand/rtc_from4.c
|
||||
drivers/net/acenic_firmware.h
|
||||
drivers/net/appletalk/cops_ffdrv.h
|
||||
drivers/net/appletalk/cops_ltdrv.h
|
||||
drivers/net/bnx2_fw.h
|
||||
drivers/net/cassini.h
|
||||
drivers/net/dgrs_firmware.c
|
||||
drivers/net/e100.c
|
||||
drivers/net/hamradio/yam1200.h
|
||||
drivers/net/hamradio/yam9600.h
|
||||
drivers/net/hamradio/yam.c
|
||||
drivers/net/myri_code.h
|
||||
drivers/net/pcmcia/ositech.h
|
||||
drivers/net/starfire_firmware.h
|
||||
drivers/net/tg3.c
|
||||
drivers/net/tokenring/3c359_microcode.h
|
||||
drivers/net/tokenring/smctr_firmware.h
|
||||
drivers/net/typhoon-firmware.h
|
||||
drivers/net/wan/sdladrv.c
|
||||
drivers/net/wan/wanxlfw.S
|
||||
drivers/s390/crypto/z90hardware.c
|
||||
drivers/s390/crypto/z90main.c
|
||||
drivers/s390/net/qeth_mpc.c
|
||||
drivers/scsi/advansys.c
|
||||
drivers/scsi/aic7xxx_old.c
|
||||
drivers/scsi/fcal.c
|
||||
drivers/scsi/ql1040_fw.h
|
||||
drivers/scsi/ql12160_fw.h
|
||||
drivers/scsi/ql1280_fw.h
|
||||
drivers/scsi/qla2xxx/ql2100_fw.c
|
||||
drivers/scsi/qla2xxx/ql2200_fw.c
|
||||
drivers/scsi/qla2xxx/ql2300_fw.c
|
||||
drivers/scsi/qla2xxx/ql2322_fw.c
|
||||
drivers/scsi/qla2xxx/ql2400_fw.c
|
||||
drivers/scsi/qla2xxx/ql6312_fw.c
|
||||
drivers/scsi/qla2xxx/qla_fw.h
|
||||
drivers/scsi/qlogicfc_asm.c
|
||||
drivers/scsi/qlogicpti_asm.c
|
||||
drivers/scsi/sym53c8xx_2/sym_fw1.h
|
||||
drivers/scsi/sym53c8xx_2/sym_fw2.h
|
||||
drivers/scsi/sym53c8xx_2/sym_fw.c
|
||||
drivers/scsi/sym53c8xx_2/sym_fw.h
|
||||
drivers/serial/jsm/jsm_neo.c
|
||||
drivers/usb/media/dabfirmware.h
|
||||
drivers/usb/media/ibmcam.c
|
||||
drivers/usb/media/pwc/pwc-kiara.c
|
||||
drivers/usb/media/pwc/pwc-timon.c
|
||||
drivers/usb/media/vicam.c
|
||||
drivers/usb/misc/emi26_fw.h
|
||||
drivers/usb/misc/emi62_fw_m.h
|
||||
drivers/usb/misc/emi62_fw_s.h
|
||||
drivers/usb/misc/sisusbvga/sisusb_init.h
|
||||
drivers/usb/net/kawethfw.h
|
||||
drivers/usb/serial/io_fw_boot2.h
|
||||
drivers/usb/serial/io_fw_boot.h
|
||||
drivers/usb/serial/io_fw_down2.h
|
||||
drivers/usb/serial/io_fw_down3.h
|
||||
drivers/usb/serial/io_fw_down.h
|
||||
drivers/usb/serial/keyspan_mpr_fw.h
|
||||
drivers/usb/serial/keyspan_pda_fw.h
|
||||
drivers/usb/serial/keyspan_usa18x_fw.h
|
||||
drivers/usb/serial/keyspan_usa19_fw.h
|
||||
drivers/usb/serial/keyspan_usa19qi_fw.h
|
||||
drivers/usb/serial/keyspan_usa19qw_fw.h
|
||||
drivers/usb/serial/keyspan_usa19w_fw.h
|
||||
drivers/usb/serial/keyspan_usa28_fw.h
|
||||
drivers/usb/serial/keyspan_usa28xa_fw.h
|
||||
drivers/usb/serial/keyspan_usa28xb_fw.h
|
||||
drivers/usb/serial/keyspan_usa28x_fw.h
|
||||
drivers/usb/serial/keyspan_usa49w_fw.h
|
||||
drivers/usb/serial/keyspan_usa49wlc_fw.h
|
||||
drivers/usb/serial/ti_fw_3410.h
|
||||
drivers/usb/serial/ti_fw_5052.h
|
||||
drivers/usb/serial/whiteheat_fw.h
|
||||
drivers/usb/serial/xircom_pgs_fw.h
|
||||
drivers/video/asiliantfb.c
|
||||
drivers/video/cfbimgblt.c
|
||||
drivers/video/chipsfb.c
|
||||
drivers/video/console/font_pearl_8x8.c
|
||||
drivers/video/cyberfb.c
|
||||
drivers/video/i810/i810_dvt.c
|
||||
drivers/video/sis/310vtbl.h
|
||||
drivers/video/sis/init301.h
|
||||
drivers/video/sis/init.h
|
||||
fs/hfsplus/tables.c
|
||||
fs/jffs2/comprtest.c
|
||||
sound/isa/cmi8330.c
|
||||
sound/isa/sb/sb16_csp_codecs.h
|
||||
sound/isa/sb/sb_mixer.c
|
||||
sound/isa/wavefront/wavefront_fx.c
|
||||
sound/oss/awe_wave.c
|
||||
sound/oss/cs461x_image.h
|
||||
sound/oss/gus_linearvol.h
|
||||
sound/oss/maestro3.h
|
||||
sound/oss/nm256_coeff.h
|
||||
sound/oss/ymfpci_image.h
|
||||
sound/oss/yss225.c
|
||||
sound/pci/cs46xx/cs46xx_image.h
|
||||
sound/pci/cs46xx/imgs/cwcbinhack.h
|
||||
sound/pci/korg1212/korg1212-firmware.h
|
||||
sound/pci/maestro3.c
|
||||
sound/pci/vx222/vx222_ops.c
|
||||
sound/pci/ymfpci/ymfpci_image.h
|
||||
sound/synth/emux/emux_synth.c
|
|
@ -1,4 +0,0 @@
|
|||
SPDX-FileCopyrightText: 2006 Brian Brazil
|
||||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
File diff suppressed because it is too large
Load Diff
|
@ -1,33 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
mv config .config
|
||||
# generate include/linux/autoconf.h -- we do not have gperf rn to do it the normal way
|
||||
# Transform each of the CONFIG_* options that are =y into header
|
||||
grep -E '=y$' .config | sed 's/=y$/ 1/' | sed 's/^/#define /' >> include/linux/autoconf.h
|
||||
# Transform each of the CONFIG_* options that are unset into headers
|
||||
grep -E ' is not set$' .config | sed 's/ is not set$//' | sed 's/#/#undef/' >> include/linux/autoconf.h
|
||||
# Transform each of the non-boolean options into headers
|
||||
grep -E '=.*$' .config | grep -v -E '=y$' | sed 's/=/ /' | sed 's/^/#define /' >> include/linux/autoconf.h
|
||||
|
||||
# Remove SHIPPED files
|
||||
find . -name "*_shipped" -delete
|
||||
# Remove binary blobs
|
||||
while read f; do
|
||||
rm $f
|
||||
done < bad-files
|
||||
../../drop-blobs.sh
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
make ARCH=i386
|
||||
}
|
||||
|
||||
src_install() {
|
||||
mkdir -p "${PREFIX}/boot"
|
||||
cp arch/i386/boot/bzImage "${PREFIX}/boot/linux-2.6.16.62"
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
kconfig is bad, it uses gperf :(
|
||||
|
||||
--- Makefile 2021-07-20 13:51:59.750925575 +1000
|
||||
+++ Makefile 2021-07-20 21:11:03.043389176 +1000
|
||||
@@ -440,7 +440,6 @@
|
||||
|
||||
config %config: scripts_basic outputmakefile FORCE
|
||||
$(Q)mkdir -p include/linux
|
||||
- $(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||
$(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
|
||||
|
||||
else
|
||||
@@ -453,6 +452,6 @@
|
||||
$(Q)$(MAKE) $(build)=$(@)
|
||||
|
||||
-scripts_basic: include/linux/autoconf.h
|
||||
+scripts_basic:
|
||||
|
||||
# Objects we will link into vmlinux / subdirs we need to visit
|
||||
init-y := init/
|
|
@ -1,28 +0,0 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Regens flex/bison/kbd stuff.
|
||||
|
||||
--- scripts/kconfig/Makefile 2021-07-19 21:42:19.154935765 +1000
|
||||
+++ scripts/kconfig/Makefile 2021-07-19 21:42:27.450004325 +1000
|
||||
@@ -231,7 +231,7 @@
|
||||
# The following requires flex/bison/gperf
|
||||
# By default we use the _shipped versions, uncomment the following line if
|
||||
# you are modifying the flex/bison src.
|
||||
-# LKC_GENPARSER := 1
|
||||
+LKC_GENPARSER := 1
|
||||
|
||||
ifdef LKC_GENPARSER
|
||||
|
||||
--- drivers/char/Makefile 2021-07-22 16:53:46.898671775 +1000
|
||||
+++ drivers/char/Makefile 2021-07-22 16:53:52.823710936 +1000
|
||||
@@ -111,7 +111,7 @@
|
||||
# Uncomment if you're changing the keymap and have an appropriate
|
||||
# loadkeys version for the map. By default, we'll use the shipped
|
||||
# versions.
|
||||
-# GENERATE_KEYMAP := 1
|
||||
+GENERATE_KEYMAP := 1
|
||||
|
||||
ifdef GENERATE_KEYMAP
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,62 @@
|
|||
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
src_unpack() {
|
||||
default || true # Predictable link errors - not a problem
|
||||
|
||||
cp ../src/deblob-4.9 ../src/deblob-check ${pkg}/
|
||||
|
||||
# Clear up storage space
|
||||
rm -rf ../src
|
||||
}
|
||||
|
||||
generate_autoconf_h() {
|
||||
# generate include/linux/autoconf.h -- we do not have gperf rn to do it the normal way
|
||||
mkdir -p include/generated
|
||||
# Transform each of the CONFIG_* options that are =y into header
|
||||
grep -E '=y$' .config | sed 's/=y$/ 1/' | sed 's/^/#define /' >> include/generated/autoconf.h
|
||||
# Transform each of the CONFIG_* options that are unset into headers
|
||||
grep -E ' is not set$' .config | sed 's/ is not set$//' | sed 's/#/#undef/' >> include/generated/autoconf.h
|
||||
# Transform each of the non-boolean options into headers
|
||||
grep -E '=.*$' .config | grep -v -E '=y$' | sed 's/=/ /' | sed 's/^/#define /' >> include/generated/autoconf.h
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
mv config .config
|
||||
mkdir -p include/config
|
||||
cp .config include/config/auto.conf
|
||||
|
||||
generate_autoconf_h
|
||||
|
||||
# Deblob the kernel
|
||||
chmod +x deblob-4.9 deblob-check
|
||||
# Don't use gawk, use sed
|
||||
AWK=dosentexist ./deblob-4.9
|
||||
|
||||
# Remove shipped files
|
||||
find . -name "*_shipped*" -delete
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Generate the initramfs so we can remove /sysb
|
||||
make ARCH=i386 prepare
|
||||
make ARCH=i386 usr/
|
||||
mkdir -p "${PREFIX}/boot"
|
||||
mv usr/initramfs_data.cpio.gz "${PREFIX}/boot/initramfs-sysb"
|
||||
make clean
|
||||
rm -rf /sysb
|
||||
sed -i 's:/sysb::' .config
|
||||
cp .config include/config/auto.conf
|
||||
rm include/generated/autoconf.h
|
||||
generate_autoconf_h
|
||||
|
||||
make ARCH=i386 prepare
|
||||
make ARCH=i386
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cp arch/i386/boot/bzImage "${PREFIX}/boot/linux-4.9.10"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Remove the 68() which I'm not really sure what it does but still works and
|
||||
breaks our version of binutils.
|
||||
|
||||
--- arch/x86/boot/bioscall.S 2021-07-31 17:50:09.519480274 +1000
|
||||
+++ arch/x86/boot/bioscall.S 2021-07-31 18:21:32.086972277 +1000
|
||||
@@ -65,7 +65,7 @@
|
||||
movw %ax, %es
|
||||
|
||||
/* Copy output state from stack frame */
|
||||
- movw 68(%esp), %di /* Original %cx == 3rd argument */
|
||||
+ movw %sp, %di /* Original %cx == 3rd argument */
|
||||
andw %di, %di
|
||||
jz 4f
|
||||
movw %sp, %si
|
|
@ -0,0 +1,22 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
There's something incorrect with this macro for live-bootstrap, most likely as
|
||||
a result of the dodgy installation of linux-headers. However, there is no
|
||||
problem with this, and it is verified that BITS_PER_LONG __BITS_PER_LONG
|
||||
have functional and correct values.
|
||||
|
||||
--- tools/include/asm-generic/bitsperlong.h 2021-07-31 11:50:26.616768608 +1000
|
||||
+++ tools/include/asm-generic/bitsperlong.h 2021-07-31 11:50:36.786847443 +1000
|
||||
@@ -9,10 +9,6 @@
|
||||
#define BITS_PER_LONG __WORDSIZE
|
||||
#endif
|
||||
|
||||
-#if BITS_PER_LONG != __BITS_PER_LONG
|
||||
-#error Inconsistent word size. Check asm/bitsperlong.h
|
||||
-#endif
|
||||
-
|
||||
#ifndef BITS_PER_LONG_LONG
|
||||
#define BITS_PER_LONG_LONG 64
|
||||
#endif
|
|
@ -0,0 +1,17 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
This seemingly useless statement (redefined a couple of lines later) is
|
||||
not liked by our version of binutils.
|
||||
|
||||
--- arch/x86/kernel/vmlinux.lds.S 2021-07-31 18:45:14.787124887 +1000
|
||||
+++ arch/x86/kernel/vmlinux.lds.S 2021-07-31 18:43:16.234180449 +1000
|
||||
@@ -170,7 +170,6 @@
|
||||
. = __vvar_beginning_hack + PAGE_SIZE;
|
||||
} :data
|
||||
|
||||
- . = ALIGN(__vvar_page + PAGE_SIZE, PAGE_SIZE);
|
||||
|
||||
/* Init code and data - will be freed after init */
|
||||
. = ALIGN(PAGE_SIZE);
|
|
@ -0,0 +1,18 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
We do not use the _shipped version of the keymap generated using loadkeys.
|
||||
For some reason the makefile needs to be patched for this to work...
|
||||
|
||||
--- drivers/tty/vt/Makefile 2021-07-27 21:11:24.743104498 +1000
|
||||
+++ drivers/tty/vt/Makefile 2021-07-27 21:11:34.261186200 +1000
|
||||
@@ -22,7 +22,7 @@
|
||||
# Uncomment if you're changing the keymap and have an appropriate
|
||||
# loadkeys version for the map. By default, we'll use the shipped
|
||||
# versions.
|
||||
-# GENERATE_KEYMAP := 1
|
||||
+GENERATE_KEYMAP := 1
|
||||
|
||||
ifdef GENERATE_KEYMAP
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
Our older version of binutils dosen't play very nicely with binutils for a
|
||||
couple of edgecase macros. It seems that ALTERNATIVE is one of these. As we
|
||||
know what your system will be (not Xen), we can manually evaluate and write
|
||||
out the ALTERNATIVEs.
|
||||
|
||||
--- arch/x86/entry/entry_32.S 2021-07-31 11:40:07.458032771 +1000
|
||||
+++ arch/x86/entry/entry_32.S 2021-07-31 11:40:42.835298841 +1000
|
||||
@@ -412,9 +412,8 @@
|
||||
|
||||
movl %esp, %eax
|
||||
call do_fast_syscall_32
|
||||
- /* XEN PV guests always use IRET path */
|
||||
- ALTERNATIVE "testl %eax, %eax; jz .Lsyscall_32_done", \
|
||||
- "jmp .Lsyscall_32_done", X86_FEATURE_XENPV
|
||||
+ testl %eax, %eax
|
||||
+ jz .Lsyscall_32_done
|
||||
|
||||
/* Opportunistic SYSEXIT */
|
||||
TRACE_IRQS_ON /* User mode traces as IRQs on. */
|
||||
--- arch/x86/entry/vdso/vdso32/system_call.S 2021-07-31 11:41:40.379731622 +1000
|
||||
+++ arch/x86/entry/vdso/vdso32/system_call.S 2021-07-31 11:43:40.294633506 +1000
|
||||
@@ -55,8 +55,6 @@
|
||||
/* If SYSENTER (Intel) or SYSCALL32 (AMD) is available, use it. */
|
||||
ALTERNATIVE_2 "", SYSENTER_SEQUENCE, X86_FEATURE_SYSENTER32, \
|
||||
SYSCALL_SEQUENCE, X86_FEATURE_SYSCALL32
|
||||
-#else
|
||||
- ALTERNATIVE "", SYSENTER_SEQUENCE, X86_FEATURE_SEP
|
||||
#endif
|
||||
|
||||
/* Enter using int $0x80 */
|
|
@ -0,0 +1,23 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
kconfig uses gperf, which we don't have at this stage. We manually generate
|
||||
everything (in the actual script) that is actually required within kconfig,
|
||||
and forgo everything that is not really required for the build.
|
||||
|
||||
--- Makefile 2021-07-30 21:25:43.577592065 +1000
|
||||
+++ Makefile 2021-07-30 21:26:40.349015612 +1000
|
||||
@@ -547,10 +547,10 @@
|
||||
export KBUILD_DEFCONFIG KBUILD_KCONFIG
|
||||
|
||||
config: scripts_basic outputmakefile FORCE
|
||||
- $(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||
+ $(Q)true
|
||||
|
||||
%config: scripts_basic outputmakefile FORCE
|
||||
- $(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||
+ true
|
||||
|
||||
else
|
||||
# ===========================================================================
|
|
@ -0,0 +1,22 @@
|
|||
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
For some reason (old version of sed/bash?), this falsepos sed thing uses a
|
||||
lot of RAM within bash and causes an overflow which is caught by bash
|
||||
but prompts it to crash. As we are not using falsepos detection anyway it
|
||||
is unused and hence can be set to an empty value.
|
||||
|
||||
--- deblob-check 2021-07-30 09:28:09.324276561 +1000
|
||||
+++ deblob-check 2021-07-30 09:28:31.742449255 +1000
|
||||
@@ -7232,9 +7232,7 @@
|
||||
# $4 is the action for every complete input pattern.
|
||||
|
||||
set_sed_main () {
|
||||
- falsepos=`${SED-sed} -n 's,^[+]\^*,,p' < "$regex_name" |
|
||||
- ${SED-sed} -n -e 's,[$]$,\\\\([\\\\n]\\\\|$\\\\),' \
|
||||
- -e '1h; 1!H; ${g;s,[\n],\\\\|,g;s,^\(..*\)$,\\\\(\1\\\\),;p;}'`
|
||||
+ falsepos=
|
||||
blobs=`${SED-sed} -n 's,^[-],,p' < "$regex_name" |
|
||||
${SED-sed} -n -e 's,[$]$,\\\\([\\\\n]\\\\|$\\\\),' \
|
||||
-e '1h; 1!H; ${g;s,[\n],\\\\|,g;s,^\(..*\)$,\\\\(\1\\\\),;p;}'`
|
|
@ -44,8 +44,9 @@ go_sysb() {
|
|||
mount -t proc proc /proc
|
||||
# kexec time
|
||||
echo "Loading kernel + sysb initramfs using kexec"
|
||||
kexec -l "${PREFIX}/boot/linux-2.6.16.62" --console-serial \
|
||||
--append="root=/dev/ram0 init=/init clocksource=acpi_pm clock=pmtmr"
|
||||
kexec -l "${PREFIX}/boot/linux-4.9.10" --console-serial \
|
||||
--initrd="${PREFIX}/boot/initramfs-sysb" \
|
||||
--append="init=/init console=ttyS0"
|
||||
echo "kexecing into sysb"
|
||||
kexec -e
|
||||
}
|
||||
|
@ -186,7 +187,7 @@ if [ "${CHROOT}" = False ]; then
|
|||
|
||||
create_sysb
|
||||
|
||||
build linux-2.6.16.62
|
||||
build linux-4.9.10
|
||||
|
||||
go_sysb
|
||||
fi
|
||||
|
|
|
@ -24,15 +24,15 @@ populate_device_nodes() {
|
|||
}
|
||||
|
||||
create_hdx() {
|
||||
# Create all of the hd{a,b,c..}
|
||||
# Create all of the sd{a,b,c..}
|
||||
minor=0
|
||||
alpha="a b c d e f g h i j k l m n o p" # 16 disks -- more than enough
|
||||
# For each disk...
|
||||
for a in ${alpha}; do
|
||||
mknod -m 600 "/dev/hd${a}" b 3 "$((minor++))"
|
||||
mknod -m 600 "/dev/sd${a}" b 8 "$((minor++))"
|
||||
# For each partition...
|
||||
for p in $(seq 15); do
|
||||
mknod -m 600 "/dev/hd${a}${p}" b 3 "$((minor++))"
|
||||
mknod -m 600 "/dev/sd${a}${p}" b 8 "$((minor++))"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ mkdir /sysc
|
|||
mkdir -p /etc /dev
|
||||
populate_device_nodes
|
||||
create_hdx
|
||||
mount -t ext2 "/dev/${DISK}" /sysc
|
||||
mount -t ext4 "/dev/${DISK}" /sysc
|
||||
|
||||
# Copy over appropriate data
|
||||
echo "Copying data into sysc"
|
||||
|
|
7
sysc.py
7
sysc.py
|
@ -47,10 +47,10 @@ class SysC(SysGeneral):
|
|||
if not self.chroot:
|
||||
# Create + mount a disk for QEMU to use
|
||||
disk_path = os.path.join(self.tmp_dir, 'disk.img')
|
||||
self.dev_name = create_disk(disk_path, "msdos", "ext2", '8G')
|
||||
self.dev_name = create_disk(disk_path, "msdos", "ext4", '8G')
|
||||
self.rootfs_dir = os.path.join(self.tmp_dir, 'mnt')
|
||||
os.mkdir(self.rootfs_dir)
|
||||
mount(self.dev_name + "p1", self.rootfs_dir, 'ext2')
|
||||
mount(self.dev_name + "p1", self.rootfs_dir, 'ext4')
|
||||
# Use chown to allow executing user to access it
|
||||
run('sudo', 'chown', getpass.getuser(), self.dev_name)
|
||||
run('sudo', 'chown', getpass.getuser(), self.rootfs_dir)
|
||||
|
@ -120,9 +120,6 @@ class SysC(SysGeneral):
|
|||
self.get_file(["https://git.savannah.gnu.org/cgit/coreutils.git/snapshot/coreutils-8.32.tar.gz",
|
||||
"https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-d279bc.tar.gz"])
|
||||
|
||||
# make 4.2.1
|
||||
self.get_file("https://ftp.gnu.org/gnu/make/make-4.2.1.tar.gz")
|
||||
|
||||
# gmp 6.2.1
|
||||
self.get_file("https://mirrors.kernel.org/gnu/gmp/gmp-6.2.1.tar.xz")
|
||||
|
||||
|
|
Loading…
Reference in New Issue