Opened 9 years ago

Last modified 4 years ago

#11878 closed enhancement

bootstrap is complex and error prone — at Version 3

Reported by: kallisti5 Owned by: bonefish
Priority: normal Milestone: R1/beta2
Component: Build System Version: R1/Development
Keywords: bootstrap Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by kallisti5)

Our current bootstrap process is extremely complex and error prone. We really need to reduce some of the complexity of the initial bootstrap. Port progress is at a standstill as you have to have an entire bootstrap completed before doing any port work on bootloader, kernel, etc.

Ideas:

  • Create a new single repo with the most basic tools forked. We tune the build scripts to be easily executable within the initial bootstrap environment. We generate one haiku_bootstrap_env hpkg that provides a basic environment. (coreutils,awk,bison,curl,mawk,flex,m4,make,sed)
  • Fork busybox to provide all of the core utils + sed,awk,wget,etc. I have a busybox binary generated on Haiku after some tweaking... their build system is really rough however and can be flaky when automated.
  • Introduce a new @basic-raw target which doesn't require a bootstrap. Just include bootloader, filesystem drivers, kernel.

Change History (5)

by kallisti5, 9 years ago

Attachment: arm-bootstrap.txt added

arm bootstrap after two days of work.

comment:1 by kallisti5, 9 years ago

busybox example.

make haiku_defconfig make

/Builds/busybox-1.23.1> uname -a
Haiku kallbuild01 1 hrev48786 Feb  8 2015 19:48:00 x86_64 x86_64 Haiku
/Builds/busybox-1.23.1> ./busybox
BusyBox v1.23.1 (2015-02-27 14:46:56 CST) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list
   or: function [arguments]...

	BusyBox is a multi-call binary that combines many common Unix
	utilities into a single executable.  Most people will create a
	link to busybox for each function they wish to use and BusyBox
	will act like whatever it was invoked as.

Currently defined functions:
	[, [[, awk, base64, basename, cat, chgrp, chmod, chown, chroot, cksum,
	cp, cut, date, dd, diff, dirname, echo, env, expand, expr, false, fold,
	grep, groups, head, id, install, ln, logname, md5sum, mkdir, mv, nohup,
	patch, printenv, printf, pwd, readlink, realpath, rm, rmdir, sed, seq,
	sha1sum, sha256sum, sha3sum, sha512sum, sleep, sort, split, stty, sum,
	sync, tac, tail, tee, test, touch, tr, true, tty, uname, uniq, unlink,
	usleep, uudecode, uuencode, wc, which, whoami, xargs, yes

/Builds/busybox-1.23.1> uname -a | ./busybox awk '{ print $1 }'
Haiku

by kallisti5, 9 years ago

Attachment: busybox-1.23.1.patchset added

busybox patches for Haiku

comment:2 by kallisti5, 9 years ago

patch: 01

comment:3 by kallisti5, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.