Commit graph

82 commits

Author SHA1 Message Date
Ben Gras
062d5d7811 Revert "virtio_blk: always start if found"
Wrong commit pushed, investigating.

This reverts commit a476662532.
2013-05-16 13:34:17 +00:00
Ben Gras
a476662532 virtio_blk: always start if found
Change-Id: Iec70c67e1b675297b5ffb800a9fb263feffa9271
2013-05-16 12:02:48 +00:00
Kees Jongenburger
dfbe2f16ee build:Updated proto.dev from mkproto -s /dev
proto.dev was missing some entries and is currently used as base version for
the ARM root file system.
2013-04-29 11:47:40 +02:00
Kees Jongenburger
aa3db0e0e2 mmc:Change startup message in rc script. 2013-04-12 20:52:57 +02: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
Lionel Sambuc
46fcb04d36 Simplification in drivers/ramdisk
Periods are allowed in Make variable names, which let us simplify
a bit the Makefile.

Based on a proposition by Antoine LECA

Change-Id: I759d7dc7721905a4775e8ab28e0371e48a443f25
2013-02-27 11:35:01 +01:00
Thomas Veerman
ba49a155b5 fb: introduce framebuffer support to Minix
This patch introduces a framebuffer to Minix. It's written for the ARM
port of Minix, but has an architectural split that separates the
hardware dependent part from the non-hardware dependent part. Futhermore,
this driver was developed using a screen that has a native resolution of
1024x600 pixels and having lack of support for obtaining EDID from the
screen. Consequently, it uses a hardcoded resolution of 1024x600.

The driver uses an interface based on the Linux ioctl API, but supports
only a very limited subset.
2013-02-21 10:29:08 +00:00
Ben Gras
46e7c7a920 ramdisk Makefile: CLEANFILES fix 2013-02-07 23:09:18 +01:00
Lionel Sambuc
af18db5668 Fix warning about double rule for rc in ramdisk
Change-Id: I870364455e5cbfe178b3dba44a1c944ca7ed9d19
2013-02-02 01:20:09 +01:00
Lionel Sambuc
5f59a986e2 Upgrading sync
Change-Id: Ied34ebd1d2dc963f5a2af8fc3bbf8e6c94df61cf
2013-02-02 01:20:09 +01:00
Lionel Sambuc
b7ef8cfb52 Upgrading ls
Change-Id: Ie0bacf04e727fac5c6df7b2bcf5039e9ce800616
2013-02-02 01:20:09 +01:00
Kees Jongenburger
e641d42a37 gpio:Initial GPIO driver.(ARM)
Small GPIO driver that exports a few pins using a virtual file
system. Currently the two user leds and the user button are exported.

Change-Id: I001d017ae27cd17b635587873f7da981054da459
2013-01-28 15:51:20 +01:00
Antoine Leca
da26ee9d09 Ramdisk: remove mtab, as now obsolete 2013-01-25 18:44:17 +01:00
Thomas Veerman
31c6dc292d Ramdisk: fix ramdisk creation for ARM 2013-01-25 17:07:02 +00:00
Thomas Veerman
28b81f9c3b ramdisk: traditional-cpp does not work with clang 2013-01-23 11:14:33 +00:00
Joachim Henke
eddc5dd581 ramdisk: add virtio-blk to proto and boot option 2013-01-23 09:03:03 +00:00
Ben Gras
4c6c911fdc Replace previous change by different test
. so contents always get overwritten in out-of-tree case
2013-01-17 16:05:50 +00:00
Lionel Sambuc
f0a513440d drivers/ramdisk/Makefile fixup
Change-Id: I481830f19b650ff0d93bf319ca4d8e901657b8f8
2013-01-17 15:54:48 +01:00
Lionel Sambuc
b1c4ba4ab6 ARM updates
Due to the ABI we are using we have to use the earm architecture
moniker for the build system to behave correctly. This involves
then some headers to move around.

There is also a few related Makefile updates as well as minor
source code corrections.
2013-01-17 10:03:58 +01:00
Kees Jongenburger
65c5a092c1 ramdisk:add support for cross building a dso ramdisk.
Change-Id: Ib2840bceab10cf98cb0abfbdb2393af4d59be102
2013-01-13 17:00:13 +01:00
Kees Jongenburger
aacce8f40c ramdisk:replace proto.sh by the c processor.
Replace proto.sh by the c processor to generate proto.gen in order
for us to have a more flexible way of selecting the files we want
in the ramdisk.

Change-Id: Id82b9f1b73b498c4d885bb3156fcefaeb9d157e0
2013-01-13 17:00:13 +01:00
Lionel Sambuc
b0814fec4e Fix release.sh to work with NetBSD Build system.
Also fix a potential issue where host tools would be compiled
dynamically under MINIX.

This also updates proto.common.dynamic to use the new placement
of the dynamic libraries (/usr/lib)
2012-11-26 10:46:19 +01:00
Lionel Sambuc
d19d7d58aa Toolchain upgrade and portability improvements.
upgrade to NetBSD CVS release from 2012/10/17 12:00:00 UTC

Makefiles updates to imporve portability

Made sure to be consistent in the usage of braces/parenthesis at
least on a per file basis. For variables, it is recommended to
continue to use braces.
2012-11-15 16:07:29 +01:00
Lionel Sambuc
9152e1c5a7 Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
 * tools
 * distribution
 * sets
 * release

The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.

For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.

Regarding new or modifications of Makefiles a few things:
 * Read share/mk/bsd.README
 * If you add a subdirectory, add a Makefile in it, and have it called
   by the parent through the SUBDIR variable.
 * Do not add arbitrary inclusion which crosses to another branch of
   the hierarchy; If you can't do without it, put a comment on why.
   If possible, do not use inclusion at all.
 * Use as much as possible the infrastructure, it is here to make
   life easier, do not fight it.

Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-11-15 16:07:29 +01:00
Ben Gras
62aac7f191 retire nonsymbolic rootdev, dev2name 2012-11-06 12:22:12 +01:00
Mohamed Katri
d21a633ffb mkfs.mfs: dynamically size image from proto 2012-10-12 15:13:43 +02:00
Thomas Veerman
aab6eb7615 Clean up generated files for ash,ramdisk,libutil,libc 2012-06-18 10:54:56 +00:00
Thomas Veerman
791aa4e16f Cross compile MFS ramdisk 2012-06-18 10:54:55 +00:00
Thomas Veerman
f93afa00e9 Remove MINIXSRCDIR and use NETBSDSRCDIR
NETBSDSRCDIR is used all over the place anyway, and this reduces
our diff with NetBSD a little.
2012-06-18 10:53:35 +00:00
Thomas Veerman
acac1f2fda Cross-compilation fixes
. Some Makefile fixes to automatically differentiate between a normal
  compilation and cross-compilation. Also, build compressed images.
. Harmonize ramdisk rc scripts for normal use case and ext2 ramdisk.
. ext2_ramdisk filesystem prototype fixes.
2012-06-18 10:53:32 +00:00
Dirk Vogt
56f6a77ead ramdisk: don't do anything at dependall 2012-06-18 10:53:27 +00:00
Dirk Vogt
a8f6f3ebc9 Make ramdisk location configurable
Also, the ramdisk is now built when the memory driver is compiled.
2012-06-18 10:53:25 +00:00
Ben Gras
73379f0be5 set major version of shlibs to 0
WARNING: this will break existing dynamically linked binaries if they
exist. If you have any:
	. re-build world statically first if necessary
	. remove libraries from /lib and /usr/lib
	. then build world

This change:
	. avoids possible future dismay when interfacing other
	  systems' binaries; done until they are abi-compatible

Thanks to Antoine Leca for pointing this out.
2012-05-10 16:38:24 +02:00
Ben Gras
b332803b6f release fixes
. make ramdisk buildable without ../etc having pwd.db
	. add cat to release bootstrap cmds
	. support running dynamically linked executables for
	  release bootstrap cmds
	. import netbsd chroot to help
2012-04-17 16:58:58 +02:00
Ben Gras
53f94f8ed4 dynamic executables on ramdisk support
See UPDATING about upgrading clang for dynamic linking.

	. allow executables on ramdisk to be dynamically linked; this means
	  putting a few required shared libraries and ld.elf_so on the ramdisk.
	. this makes the ramdisk (usage) smaller when they are dynamic, but
	  bigger when they're not.
	. also we can safely ditch newroot and call mount directly as that is
	  all newroot does.
	. create proto.common to share a bunch of entries between
	  small/nonsmall cases
2012-04-16 14:06:09 +02:00
Ben Gras
511c977f93 retire bios_wini 2012-04-12 03:02:21 +02:00
Antoine Leca
ab0a67f7af Use objcopy to build ramdisk object
. during build, uses much less memory,
	  disk space, and time
	. lets us throw out bintoc
2012-02-17 12:56:38 +00:00
Thomas Veerman
0491126758 Don't update mtab upon mounting procfs
It causes an ugly error message when booting from cd and it gets
overwritten by `printroot >/etc/mtab` in /etc/rc anyway.
2012-02-14 17:23:36 +00:00
Ben Gras
2fe8fb192f Full switch to clang/ELF. Drop ack. Simplify.
There is important information about booting non-ack images in
docs/UPDATING. ack/aout-format images can't be built any more, and
booting clang/ELF-format ones is a little different. Updating to the
new boot monitor is recommended.

Changes in this commit:

	. drop boot monitor -> allowing dropping ack support
	. facility to copy ELF boot files to /boot so that old boot monitor
	  can still boot fairly easily, see UPDATING
	. no more ack-format libraries -> single-case libraries
	. some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases
	. drop several ack toolchain commands, but not all support
	  commands (e.g. aal is gone but acksize is not yet).
	. a few libc files moved to netbsd libc dir
	. new /bin/date as minix date used code in libc/
	. test compile fix
	. harmonize includes
	. /usr/lib is no longer special: without ack, /usr/lib plays no
	  kind of special bootstrapping role any more and bootstrapping
	  is done exclusively through packages, so releases depend even
	  less on the state of the machine making them now.
	. rename nbsd_lib* to lib*
	. reduce mtree
2012-02-14 14:52:02 +01:00
Evgeniy Ivanov
3dd49be938 Allow human readable name for the root device.
Instead of using rootdev= or ramimagedev= in the boot monitor
which are changed to numbers and cannot be used with other
loaders, rootdevname= or ramimagename= are (MINIX-style)
device names always stored as strings.

Patch by Antoine Leca.
2012-02-09 18:54:45 +01:00
Evgeniy Ivanov
65f97ea344 Enlarge ramdisk size (blocks). 2012-02-06 16:07:55 +01:00
Erik van der Kouwe
4bee3cff2e Prevent the ramdisk makefile from failing if the last image is not ELF 2012-01-27 13:10:00 +01:00
Arun Thomas
fecaba7ff1 Increase ramdisk size for clang 2012-01-12 17:01:48 +01:00
Ben Gras
51de979ed9 fix for checking CLEAN-ness of ramdisk image
. pre-cleanflag ("old") mkfs generates without CLEAN flag,
	  causing boot not working because imgrd disappears after 1st
	  close
	. fixed sanity check for this situation
	. disable imgrd disappearing in memory driver so
	  readonly mount succeeds in case it happens anyway
2011-12-23 15:10:01 +01:00
Ben Gras
59ff5cbd87 mfs: clean flag
. also implement now-possible fsck -p option
    	. allows unconditional fsck -p invocation at startup,
    	  only checking each filesystem if not marked clean
    	. mounting unclean is allowed but is forced readonly
    	. updating the superblock while mounted is now not
    	  allowed by mfs - must be done (e.g. by fsck.mfs)
    	  on an unmounted fs
	. clean flag is unset by mfs on mounting, and set by
	  mfs on clean unmounting (if clean flag was set at
	  mount time)

Signed-off-by: Ben Gras <ben@minix3.org>
2011-12-22 16:53:32 +01:00
Arun Thomas
fa00de707c small ramdisk: install all password-related files 2011-11-23 10:28:00 +01:00
Arun Thomas
ebdac755af ramdisk: install all password-related files 2011-11-22 19:58:45 +01:00
Arun Thomas
32aabfab40 ramdisk: build pwd_mkdb 2011-11-22 16:45:17 +01:00
Ben Gras
b1eba81b9d simplify build logic a bit
. always compile acpi, with clang, so never have
	  build/clean inconsistencies; can be enabled (i.e. run
	  at boot time) by setting acpi variable in the boot monitor
	. always strip binaries with the right strip cmd, so never
	  have ack/elf strip inconsistencies
2011-11-18 17:11:17 +01:00
Ben Gras
5c00743626 Switch to NetBSD passwd format
Based on work by Vivek Prakash and Gianluca Guida.

See UPDATING about caveats on currently existing accounts.

	. restores netbsd libc pwcache functions
2011-11-14 14:47:42 +00:00