Commit Graph

55 Commits

Author SHA1 Message Date
fosslinux 34e4bf9bcc
Merge pull request #381 from eduardosm/disk-images-without-root
Create disk images without root
2024-01-24 01:40:13 +00:00
Gábor Stefanik 177b58cc09 Fix the default build script used by "build <package name>"
Before the simplify refactor, the convention was to name the first
or default build script "<package name>.sh". The refactor changed
this default to "pass1.sh", with "pass2.sh" and so on used for
subsequent passes. This wasn't an issue when building usig scripts
generated by script-generator (which explicitly declares the build
script to use), but broke running "build <package name>" without
an explicit script name from the post-bootstrap bash prompt.

By deriving the script name from the current revision/pass number,
this commit restores that functionality.

An unfortunate blemish is that we number build scripts from 1, but
repo tarballs from 0 - it would be nice to standardize on a single
indexing convention.
2024-01-22 22:59:25 +01:00
Andrius Štikonas 51dd19aadf
Merge pull request #382 from fosslinux/coreutils-9.4
Coreutils 9.4
2024-01-22 19:21:19 +00:00
Andrius Štikonas 9ff2d1f0f1 Add abort.{s,o} to libc+tcc. 2024-01-20 22:07:31 +00:00
fosslinux c750c6f002 Update coreutils to 9.4 2024-01-21 08:47:34 +11:00
Andrius Štikonas 241f5431b0 Update amd64 checksums. 2024-01-20 18:07:38 +00:00
fosslinux 490bc621a5
Merge pull request #400 from Googulator/autogen-trap-fix
Upgrade autogen bootstrap tarball to fix trap issue
2024-01-13 01:07:00 +00:00
fosslinux f71445362e
Merge pull request #408 from Googulator/checksum-fix
Fix Python 3 checksum regression from 8341c4e
2024-01-13 01:06:31 +00:00
Eduardo Sánchez Muñoz 5243d3b3ce Fix detection of device type (partition/full disk) in move_disk.sh
The version of stat available at that point does not support %Lr, so use instead its hexadecimal counterpar (%T)
2024-01-12 22:39:44 +01:00
fosslinux e6185414db
Merge pull request #410 from rick-masters/populate-devices-for-kexec
Populate devices so kexec can read /proc/iomem.
2024-01-12 20:41:34 +00:00
Gábor Stefanik 7e73fd25cb Fix Python 3 checksum regression from 8341c4e
The Linux kernel won't autocreate /dev/shm inside devtmpfs.
Without it, semaphores won't work properly in Python.

Previously, /dev/shm was set up in populate_device_nodes, but we
no longer run that after booting into Linux.
2024-01-12 19:58:40 +01:00
Gábor Stefanik 36c1925742 Fix panic due to after.sh prematurely quitting on shutdown
The sysrq shutdown trigger takes some time to fully shut down the system,
during which init is expected to continue running. Since after.sh is the
last step in our init, if it quits before shutdown is complete, Linux will
panic with "Attempted to kill init".

Add an infinite loop after shutdown is issued via sysrq to prevent this.
2024-01-12 19:55:10 +01:00
Gábor Stefanik 9ed4416940 Upgrade autogen bootstrap tarball to v1.0.1 to fix return code issue 2024-01-12 16:11:14 +01:00
rick-masters b2f4e3d129 Populate devices so kexec can read /proc/iomem. 2024-01-12 14:59:27 +00:00
fosslinux 5b7175de3e
Merge pull request #401 from stikonas/weak_symbols
Fix weak symbols to work in tcc.
2024-01-10 07:20:54 +00:00
fosslinux b2747cb6cf
Merge pull request #392 from Googulator/bare-metal-move-disk
Make move_disk work on bare metal
2024-01-10 07:16:32 +00:00
fosslinux f51fb080b1
Merge pull request #391 from Googulator/bare-metal-linux
Make the Linux kernel & Fiwix->Linux kexec more bare-metal-friendly
2024-01-10 07:16:20 +00:00
fosslinux 01a4f90378
Merge pull request #388 from Googulator/kernel-bootstrap-jobs
Restore multicore build support with kernel-bootstrap
2024-01-10 07:16:10 +00:00
Andrius Štikonas be15f9caca Fix weak symbols to work in tcc.
Fixes #322.
2024-01-09 22:52:43 +00:00
Andrius Štikonas 959ea69742
Merge pull request #398 from Googulator/after-fix
Fix spelling of sysrq-trigger in after.sh
2024-01-09 22:45:54 +00:00
Gábor Stefanik 50d1d68f99 Restore multicore build support with kernel-bootstrap
This was removed as part of the simplify refactor, severely slowing
down qemu and bare-metal builds. Restoring it brings us back to the
same build times that we saw before the refactor.
2024-01-08 12:56:15 +01:00
Gábor Stefanik a76fac4fa7 Allow update_env to incorporate runtime changes to bootstrap.cfg
Perform variable substitution at runtime, rather than at generation
time. This way, if bootstrap.cfg changes after update_env, the new
values there take effect immediately.
2024-01-08 12:55:19 +01:00
Gábor Stefanik 82062143a4 Fix spelling of sysrq-trigger in after.sh 2024-01-08 12:43:31 +01:00
fosslinux 9ec45654cf
Merge pull request #390 from Googulator/devtmpfs
Use devtmpfs, and improve finalize_fhs.sh
2024-01-08 10:55:57 +00:00
fosslinux 4a822e231c
Merge pull request #389 from Googulator/after
After bootstrap, drop to a shell if needed, then shut down cleanly
2024-01-08 10:55:21 +00:00
fosslinux e44748cce1
Merge pull request #387 from Googulator/swap-support
Support swap files in qemu or bare-metal mode
2024-01-08 10:52:05 +00:00
Gábor Stefanik 2a095a3301 After bootstrap, drop to a shell if needed, then shut down cleanly 2024-01-08 05:19:19 +01:00
rick-masters 1bffe44154
Upgrade Fiwix to 1.5.0-lb1, pulling from upstream Mikaku repo. (#397) 2024-01-08 01:37:15 +00:00
Gábor Stefanik d5008f93a5 Support swap files in qemu or bare-metal mode
This can help alleviate memory pressure when bootstrapping
with high core counts.
2024-01-02 04:32:08 +01:00
Gábor Stefanik 82c570694a Make the Linux kernel & Fiwix->Linux kexec more bare-metal-friendly
* Enable additional hardware drivers in Linux for better bare metal
  display, network & input device compatibility
* Disable ATA-over-Ethernet support, because it spams the network
  with unnecessary packets, is basically useless for bootstrapping,
  and may even be a security risk
* Increase Fiwix initrd size to 1280MB to fit a larger Linux build
* Make the Fiwix kexec size configurable the same way as initrd
  (and reduce from 280MB to 256MB which is sufficient in my testing)
* Use a more conservative memory map for Fiwix & Linux
* Boot Linux with consoleblank=0 on bare metal, so the build won't
  go blind after 5 minutes
* Support kexec-fiwix with interrupts disabled (will be useful later
  when builder-hex0 is updated)
2024-01-02 01:33:09 +01:00
Gábor Stefanik 6c2144e50a Make move_disk work on bare metal
* Use -S32 -H64 --force to trick sfdisk into allowing MiB-aligned
  partitions on a drive that reports a CHS geometry
* Explicitly create partition at sector 2097152 (=1GiB)
* Force mkfs.ext4 to overwrite any existing filesystem it might find
* Wait up to 2 minutes for the disk to become readable (especially
  USB drives often show up with a delay)
2024-01-02 00:57:29 +01:00
Gábor Stefanik 8341c4e089 Use devtmpfs, and improve finalize_fhs.sh
With this, finalize_fhs.sh can be rerun as needed, e.g. when rebooting.
Also, the preferred nameserver will persist after DHCP.

Thanks to devtmpfs, we no longer need to manage /dev once Linux is up.
2024-01-02 00:15:32 +01:00
Eduardo Sánchez Muñoz 5610998a4d Update curl to 8.5.0 2024-01-01 22:39:24 +01:00
fosslinux fbb3e97149 Update ca-certificates to 3.95 2023-12-29 12:14:27 +11:00
fosslinux f4c1b488d6
Merge pull request #372 from Googulator/automake-fix
Fix intermittent failure to build automake-1.15.1 in bwrap (#365)
2023-12-27 22:59:48 +00:00
Eduardo Sánchez Muñoz 45b635ef97 Do update checksums when building with `--update-checksums` 2023-12-27 12:36:46 +01:00
Eduardo Sánchez Muñoz 9042539165 Avoid deleting sources that will be needed in future builds 2023-12-27 12:36:46 +01:00
Gábor Stefanik c8837203c8 Fix intermittent failure to build automake-1.15.1 in bwrap (#365) 2023-12-27 08:06:51 +01:00
fosslinux 9179f4bd01 Binutils 2.41 fix gprofng in pass2
A fix i forgot to include in the original PR
2023-12-26 22:50:18 +11:00
Gábor Stefanik 97f31072ce Add license information to break.sh
Not that it's exactly copyrightable, being just "exit 0", but linter complains about it.
2023-12-26 13:01:24 +11:00
Gábor Stefanik e9787b55c8 Add breakpoints between passes for INTERNAL_CI
These are implemented as dummy jumps with a script that just exits
with success. Since this script will be sourced, rather than called,
this causes the bootstrap process to exit at that point.
The breakpoints are conditional on INTERNAL_CI (we check for "pass1"
because that's the only pass when script-generator runs, but the
resulting effect is that each pass only bootstraps its own part of
the manifest).
2023-12-26 13:01:24 +11:00
Gábor Stefanik 1481ad0d20 Do not try to create /dev nodes under chroot/bwrap 2023-12-26 13:01:24 +11:00
fosslinux 3fd101e70a
Merge pull request #359 from fosslinux/binutils-2.41
Update binutils to 2.41
2023-12-26 01:53:39 +00:00
fosslinux 6905852107
Merge pull request #354 from Googulator/script-fixes
Python script fixes and improvements
2023-12-26 00:59:34 +00:00
Gábor Stefanik 47711cfea9 Fix non-reproducible Linux kernel build due to timestamps
Linux's KBUILD doesn't follow SOURCE_DATE_EPOCH, but rather it
uses its own variable, KBUILD_BUILD_TIMESTAMP.

While we are at it, also update kexec-linux's checksum, which
didn't match either. (This one was reproducible, it was just
out of date.)
2023-12-25 10:16:17 +01:00
Gábor Stefanik 529ea4cae1 Explain significance of build-bash and improve-network directives 2023-12-22 13:12:40 +01:00
Gábor Stefanik 3305f2a41b Use manifest to deduce pre-network sources list
No need to maintain a separate pre-network-sources file anymore,
the list is instead derived from the bootstrap manifest via the
source manifest.
2023-12-22 13:07:04 +01:00
fosslinux 191c013e23 Update binutils to 2.41 2023-12-21 11:03:15 +11:00
Gábor Stefanik abca1a4b15 Fix ARCH vs ARCH_DIR confusion causing amd64 breakage 2023-12-19 18:32:59 +01:00
fosslinux ac4a8c7e79 Install heirloom-devtools utility files to /usr/lib
Before they were just in / for no real reason
2023-12-15 22:51:00 +11:00