Commit graph

29 commits

Author SHA1 Message Date
Kees Jongenburger
c4a8cb3d4b build:Only keep one ref to .settings and allow to override it.
Rreleasetools/arm_sdimage.sh uses a ".settings" file to allow to override
the defaults settings found in arm_sdimage. This change allows to use an
alternate file for this purpose. We figured out more programs (like eclipse)
use a ".settings" file.

One can tweak the settings files to use by settings the SETTINGS_MINIX
variable

 SETTING_MINIX=.settings_minix

Change-Id: I57f5ca64d2ac27c9e015ab24b864b9a5f14c42fb

http://gerrit.minix3.org/#/c/2687/
2014-07-28 17:05:38 +02:00
Kees Jongenburger
372247712a build:check if .settings file is a file.
Check if the .settings entry is a file and not a directory. Eclipse
as we found out also likes creating .settings directories.

Change-Id: I3cbcaa7aa9e5dfb3d51c6c71df7fd72079fe213e
2014-07-28 17:05:21 +02:00
Kees Jongenburger
b12bb57943 build:Remove the usage of sloppy file list.
Remove the usage of sloppy files list in the build scripts to
get early errors when files are added.

Change-Id: Id89c1391da675c76d7511a973f7f2dcda8befbb2
2014-07-28 17:05:08 +02:00
Lionel Sambuc
cd36dd7703 Fix devman boot crash when using image scripts
This was caused by a missing line in the generated fstab.

Change-Id: If0590a27706bbb62e53d72f224ccb332e31421f6
2014-03-02 12:28:32 +01:00
Ben Gras
a06e2ab395 big <utmp.h>-inspired netbsd switch
import/switch of:
init, getty, reboot, halt, shutdown, wall, last

changes:
	. change reboot() call to netbsd prototype and args
	. allows pristine <utmp.h>
	. use clean <sys/reboot.h> instead of <minix/reboot.h>
	. implement TIOCSCTTY for use by getty so getty can get
	  controlling terminal from init's child(ren)
	. allow NULL envp for exec

Change-Id: I5ca02cb4230857140c08794bbfeba7df982c58a3
2014-03-01 09:05:02 +01:00
Lionel Sambuc
859a265cba Removing MK{GCCCMDS,BINUTILS}=yes in image scripts
MKGCCCMDS=yes and MKBINUTILS=yes where added on the build command line
while they should have been left to the developer's discretion.

To build and install binutils and gcc do the following:

 $ BUILDVARS='-V MKBINUTILS=yes -V MKGCC=yes -V MKGCCCMDS=yes' \
    ./releasetools/arm_sdimage.sh
or

 $ BUILDVARS='-V MKBINUTILS=yes -V MKGCC=yes -V MKGCCCMDS=yes' \
    ./releasetools/x86_hdimage.sh

Change-Id: Icb46a3422f527747768fa107d14fc19ff3ac0a63
2014-03-01 09:05:01 +01:00
Lionel Sambuc
bbb8908c16 Adapting build system to call MAKEDEV for /dev
* Remove static proto.dev
 * Update releasetools/*image.sh not to use proto.dev, as well as
   minor comments cleanup
 * Add TOOL_TOPROTO

Change-Id: If7dc16d4ebb3b0c4e859786fad25d4af000c999f
2014-03-01 09:04:56 +01:00
David van Moolenbroek
36ac0dbcf8 Take LOG out of the boot image
Change-Id: Id2629776b53aae46629b04a42c15cbbacac9b949
2014-03-01 09:04:55 +01:00
Kees Jongenburger
65ceab5261 arm:make the kernel server and driver binaries identical.
Make the kernel server and driver binaries indentical for the different
ARM platforms. We no longer need to define the AM335X or DM37XX flags
during compilation. The remaining differences are all located in u-boot.

Change-Id: I14ac60837dd2d7f116bc5fa56d3989b48d7c4fea
2013-12-17 11:32:38 +01:00
Kees Jongenburger
8c02dd7b2a arm:refactor replace cmdline.txt by bootargs passed to the kernel.
Put the boot arguments in uEnv.txt and not in cmdline.txt to allow
a more dynamic configuration of the system. We now also pass the
u-boot board_name parameter to the kernel.
2013-12-17 11:32:37 +01:00
Kees Jongenburger
91a2fe4aba arm:manage versioning of u-boot and upgrade u-boot
Replaced the wget download of u-boot by a versioned git checkout
this allows us to better manage the u-boot and MLO version we ship
while still allowing us to build ofline.

This changes replaces the BASE_URL setting by U_BOOT_BIN_DIR and
also updates to a newer build of u-boot.
2013-12-17 11:32:36 +01:00
Ben Gras
41027cd2fe arm_sdimage.sh: use insert-fs feature
Change-Id: Ie8bcbca26d5f530e03dbcb7e55771c5cd29d29f3
2013-11-12 21:45:24 +00:00
Ben Gras
b6d951df17 arm_sdimage.sh: use native minix partition util
. make filesystems on primary partitions to make it
	  easier on the minix partition util
	. so sfdisk isn't required as an external tool
	. also make partition and hitherto x86-only utilities
	  arch-independent

Change-Id: Ib4e07e45d038d084dde1858917d3deb7f0616532
2013-09-27 14:13:43 +02:00
Kees Jongenburger
60f1a5f280 arm-build:force sfdisk to format like we want it.
Change-Id: Iaa3c994a30bb3df6129e85e0a5591b88b5b93973
2013-08-21 09:13:29 +02:00
Lionel Sambuc
714dd83efe releasetools/arm_sdimage.sh
- adapt usr partition size
 - reformulate partition sizes for easier adaptations
 - ensure 4k-block alignement of the partitions

Change-Id: I88787614163a7be177acb5dbf454b26387376a47
2013-07-12 14:22:04 +02:00
Kees Jongenburger
eb1e5bf042 build:arm allow to store build settings in a .settings file.
If present a file called .settings will be sourced when
calling the arm_sdimage.sh script. This allows to configure
the build setting for arm build without the need to specify
the flags each time arm_sdimage.sh is called.

For example to configure arm_sdimage.sh to target the
beaglebone put the following content in your .settings file.

BASE_URL=http://www.minix3.org/arm/beaglebone
FLAG=-DAM335X
CONSOLE=tty00

Change-Id: Ide0341a255bc7f41dc5c30d0a43e71b01a8ea55c
2013-05-30 13:01:05 +02:00
Kees Jongenburger
5e5ea947e8 arm:build add flags for AM335X
Change-Id: I1fd25d5ada52972fd2f6ec5057ff273544c65390
2013-05-24 15:47:04 +02:00
Kees Jongenburger
167c4d972f arm:build also generate cmdline.txt
Also generate cmdline.txt as we need to use a different serial
for the AM335X boards.

Change-Id: I18c1b5911b5d7238d4a765e0aa01613908d9f2e6
2013-05-24 14:03:14 +02:00
Kees Jongenburger
6364989e36 arm:add DDM37XX cflag
We are planning on using the NetBSD config system to perform build
system configuration when targeting different hardware variants.
This functionality however is not integrated yet and we currently
rely on using ifdef's in the code. This commit add the DDM37XX flag.

Change-Id: Ia25dfa520c7df4b648f4d1a583808de774acff63
2013-05-24 11:17:52 +02:00
Kees Jongenburger
ad68d15e39 arm:build generate uEnv.txt
Generate uEnv.txt to allow to generate an uEnv containing commands
to boot over the network.

Change-Id: I8bcd831ee474d837411568bf1c1e2c2d96ec931b
2013-05-24 11:16:59 +02:00
Lionel Sambuc
881ff3f6e5 releasetools/arm_sdimage.sh: Improvements
- Added the possibility to define the number of parallel jobs from the
   command line with (example, default is 1):
   $ JOBS=8 ./releasetools/arm_sdimage.sh

 - Generate filesystem filling the reserved partition area, instead of
   being smaller.

 - Added a possibility to specify additional parameter to the build.sh
   script from the command line with (example):
   $ BUILDVARS='-N0 -V MYVAR=yes' ./releasetools/arm_sdimage.sh

Change-Id: I5c34268ebf7d45a8d3408b45b1dc5051d775826c
2013-05-24 11:08:15 +02:00
Kees Jongenburger
0aeb7d85d1 build:copy uEnv and cmdline.txt onto OBJ 2013-05-16 20:39:19 +02:00
Kees Jongenburger
7e2c8b516d build:make sdimage more silent.
Change-Id: I9bba37c93c27c599ec914d1f069ca21e6cbfe111
2013-05-16 20:39:18 +02:00
Kees Jongenburger
4ab5b32edf build:add sbin and bin to path.
normal users don't have sbin in their path where sfdisk is
installed.

Change-Id: I7ee3412ca0f6fb208310aa7a0ee8cd88c0f3f80c
2013-05-16 20:39:18 +02:00
Kees Jongenburger
8a3677def0 build:refactor arm_sdimage.sh as to no longer require root.
There where two reasons for needing root access while making ARM builds. The
first reason was that we needed root permissions to create device nodes and
assign permissions to files. The second reason we needed root was that we used
loop mounted files to copy the build output to the file backed storage.

The first problem is solved by building in unprivileged mode (adding -U) during
compilation. The second problem is solved by using mcopy to put files on the
fat partition and use the mkfs.mfs proto files to create MFS file system.

Future work might be to replace this script by the netbsd makefs tool.

Change-Id: Ibba61d4cad053f7c1ede26169d5214065a4939d8
2013-04-23 11:24:12 +02:00
Kees Jongenburger
99c5247453 arm_sdimage:hide non fatal errors.
Redirect the output of the command that are supposed to fail to
/dev/null.
2013-04-12 20:52:58 +02:00
Lionel Sambuc
5180c3cfb9 Installing posix tests in /usr/tests/minix-posix
The goal is to enable anyone to simply run our current test suite.

Change-Id: I27d8856cb82a4be2baa5dc5273526383b7f4fc2c
2013-03-13 10:43:16 +01:00
Kees Jongenburger
149ed6cff5 build:small fixes to arm_sdimage.
* Use the same output directory as was previously the standard.
* Add copying of uEnv and cmdline to the obj directory to allow booting from tftp.
* No longer start qemu at the end of the process.
* Use sudo if the script was called as non root user.

Change-Id: I53143b1ce6633e764d173c3eb883c2efa3e6a5b7
2013-03-08 10:50:57 +01:00
Ben Gras
5acaa0814f kernel, ramdisk: some boot unification
To use the new SD building script, Linux has to be configured with
loop.max_part=15 on the command line (or set at module load time)
to make the loopback device see the partitions.

This commit removes a lot of differences between the ARM and x86
boot ramdisk and rc scripts. It changes the ARM build from running
from ramdisk to requiring a full filesystem on the SD image and
booting into it.

	. ramdisk: remove some arm-only utilities only used for running
	  from the shell
	. remove ARM-only rc.arm, proto.arm.small, ttys and mylogin.sh
	  boot-time ramdisk files
	. change kernel to add "arch" variable so userland knows what
	  we're running on from sysenv
	. make ARM use the regular ramdisk rc file, changed to distinguish
	  i386-only and ARM-only drivers; requires rootdevname to be set
	. change /etc/rc and /usr/etc/rc to start i386-only drivers only on
	  i386 systems
	. change the kernel/arm to have a special case for the memory
	  driver to load it higher so it can be bigger
	. add uEnv.txt, cmdline.txt and a for now highly linux-dependent
	  SD preparation script arm_sdimage.sh to the git repository in
	  releasetools/

Change-Id: I68910ba4e96ee80f7a12b65e48b5d39b43ca6397
2013-03-07 14:29:27 +00:00