Commit graph

5784 commits

Author SHA1 Message Date
Kees Jongenburger
3b447ae154 arm:replace ifdef's by runtime checks in the i2c driver.
Change-Id: I5cdff48d8be9bbe5a4734192b451dc45983fbef2
2013-12-17 11:32:38 +01:00
Kees Jongenburger
aa94c9ed55 arm:switch to dynamic configuration for the kernel.
During startup machine.board_id is now determined. The kernel can now
at runtime determine how to configure itself and does so.

Change-Id: I4f615af9bfa5add219e618b911a51af127591d6a
2013-12-17 11:32:38 +01:00
Kees Jongenburger
3a2fb1ae8c arm:determine board_id using bootargs.board_name
On startup determine the board_id based on the board name
passed from u-boot. This code also export "board" for use
by  userland using sysenv.

Change-Id: I1064a49497c82b06f50d98650132bc0a7f543568
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
Kees Jongenburger
7194772eae kernel:export board to userland.
Export the board variable to userland using sysenv. This
allows rc-scrips to perform device specific initialisation.

The board variable follows the following pattern

[ARCH]-[ARCHVARIANT]-[VENDOR]-[BOARD]-[BOARDVARIANT]

We currently we support the following boards:
X86-I586-GENERIC-GENERIC-GENERIC
ARM-ARMV7-TI-BBXM-GENERIC
ARM-ARMV7-TI-BB-WHITE
ARM-ARMV7-TI-BB-BLACK

Change-Id: I9e5f5f24f9a71cc9797cacb1aafb19499613f0be
2013-12-03 09:19:50 +01:00
Kees Jongenburger
43581a14ee arm:replace ifdef's by runtime checks.
Change-Id: Iff966f2214e2d8bb6b72dd0a119085709f2d4a9c
2013-12-03 09:19:25 +01:00
Kees Jongenburger
4127817d7b arm:add board_id to machine to enable runtime configuration.
Modified the machine struct in include/minix/type.h to have an
additional field called board_id. This fields can be read out
by userland and drivers at runtime to enable automatic
configuration. The board_id field contains information about
the hardware architecture / board and such.

Change-Id: Ib12bc0d43fc9dbdb80ee0751c721ee516de1d2d6
2013-12-03 09:19:25 +01:00
Beletti
d1c3755dd4 commands/crc: changed K&R to ANSI style
Change-Id: Ia63ccbb76e00f18adea414296caef39a3fdf3a39
2013-12-01 15:57:08 -05:00
Beletti
2a453f1a37 commands/decomp16: changed K&R to ANSI style
Change-Id: Ibefd50187bcc87a24d7c4c895524be9fa55f493a
2013-12-01 15:57:07 -05:00
Beletti
5fbf26dbcc commands/devsize: changed K&R to ANSI style
Change-Id: Idc9eda4a9134c4d85870d502075398eb66c298f7
2013-12-01 15:57:04 -05:00
Beletti
1f0299ca1f commands/chown: changed to K&R to ANSI style
Change-Id: I6a956e6479b6ebedca74fdd96e44756f00633cc4
2013-11-29 18:54:18 +01:00
Beletti
730b47fa27 commands/chmod: changed K&R to ANSI style
Change-Id: If22f201dec8b34c8773910448d75b6d8256ee6a4
2013-11-29 18:54:11 +01:00
Beletti
4b669956d1 commands/at: changed K&R to ANSI style
Change-Id: Ifb12349bcf456ff303c15fdedda4ab853a148aff
2013-11-29 18:54:07 +01:00
Beletti
bf5fef9dfc commands/synctree: changed K&R to ANSI style
Change-Id: I8667de0157ac3caa14e06f788daf62d6ed92b59c
2013-11-29 18:53:49 +01:00
Ben Gras
cce150a9ab add two missing files to flist
Change-Id: Ib5b62d603fbd57c4604f4613db1a2a5d485a8133
2013-11-28 16:44:20 +01:00
Ben Gras
1f317d315c run: allow scripts to be run as root
Forward-port of the run script change in the testvnd
commit on the 3.3.0 branch by David.

Needed to cleanly run the testisofs test as root in
the Jenkins environment.

'While here,' also fix messy which output in testsh2.

Change-Id: I6ec472e1386a54ae74b6e55394f01fa7c5ce53a9
2013-11-28 13:31:37 +00:00
Ben Gras
d3e3c78051 testmfs, testisofs: MFS format, ISO functionality
testmfs: catch MFS format changes

This test tests mkfs.mfs will generate the same FS image given the same
input files. mkproto creates a proto file (normalizing directory entry
order). The assumption is that a change in the output flags a tacit
change in FS format, and that a FS format change will cause the image
to change.

        . Changes to mkfs.mfs that innocently change the format can
          change the sha1 output in the script along with it.
        . The assumption is that corresponding versions of mkfs.mfs and
          MFS will always work together; otherwise a lot breaks (ramdisk etc.)
        . Therefore, as long as a generated FS image stays the same with the
          same input now, incompatible MFS changes will still be flagged,
          even if they work together with the current mkfs.mfs.

testisofs: test ISO filesystem

        . to test isofs: prepare an ISO FS image using writeisofs, copy it
          to a RAM device, mount it using the iso9660fs server, compare the
          SHA1 contents of the files on the ISO with the inputs.
        . use su to run certain commands in the script as root

run script: run shell script tests

	. they are installed without .sh so should be
	  searched for as such
	. add diagnostic when tests are skipped

Change-Id: I30daff58e1e43903dacf3c99996a4a0e7d819b6b
2013-11-21 10:17:43 +00:00
Ben Gras
740c1a7425 libminixfs: allow non-pagesize-multiple FSes
The memory-mapped files implementation (mmap() etc.) is implemented with
the help of the filesystems using the in-VM FS cache. Filesystems tell it
about all cached blocks and their metadata. Metadata is: device offset and,
if any (and known), inode number and in-inode offset. VM can then map in
requested memory-mapped file blocks, and request them if necessary.

A limitation of this system is that filesystem block sizes that are not
a multiple of the VM system (and VM hardware) page size are not possible;
we can't map blocks in partially. (We can copy, but then the benefits of
mapping and sharing the physical pages is gone.) So until before this
commit various pieces of caching code assumed page size multiple
blocksizes. This isn't strictly necessary as long as mmap() needn't be
supported on that FS.

This change allows the in-FS cache code (libminixfs) to allocate any-sized
blocks, and will not interact with the VM cache for non-pagesize-multiple
blocks. In that case it will also signal requestors, by failing 'peek'
requests, that mmap() should not be supported on this FS. VM and VFS
will then gracefully fail all file-mapping mmap() calls, and exec() will
fall back to copying executable blocks instead of mmap()ping executables.

As a result, 3 diagnostics that signal file-mapped mmap()s failing
(hitherto an unusual occurence) are disabled, as ld.so does file-mapped
mmap()s to map in objects it needs. On FSes not supporting it this situation
is legitimate and shouldn't cause so much noise. ld.so will revert to its own
minix-specific allocate+copy style of starting executables if mmap()s fail.

Change-Id: Iecb1c8090f5e0be28da8f5181bb35084eb18f67b
2013-11-21 10:03:06 +00:00
Ben Gras
dff4ddaa7c iso9660fs fix
Change-Id: Iea91c2932ff5b0141d5eeffc5bac17632ac6b94d
2013-11-19 15:59:33 +00:00
Ben Gras
a4a97fe8c9 mkfs.mfs, mkproto: minor features
. mkfs.mfs: -T option to set timestamp of files on FS
	. mkproto: normalize (sort) order of directory entries
	. mkproto bugfix: always print mode in 3 digits (%03o)

Change-Id: Ice06d5f05500cd2ac9b063156c340b8f78fe6441
2013-11-19 15:58:05 +00:00
Thomas Cort
2f7c930a6b Importing usr.bin/colcrt
Replaces colcrt from commands/cawf.
No Minix-specific changes needed.

Change-Id: I0ec6452c879b9a844ad97e89759087d6c3e740a2
2013-11-19 07:26:37 -05:00
Thomas Cort
ef03affb84 Importing usr.bin/mkfifo
Replaces commands/mkfifo. No Minix-specific changes needed.

Change-Id: Idb20430d4297c7011fb7e2ef6b0876ebb2776c1c
2013-11-19 12:22:18 +01:00
Thomas Cort
3ab548a3d9 usr.bin/calendar: re-sync with upstream.
Jenkins was failing on usr.bin/calendar/calendar.c:386:6: with
"error: 'fd' may be used uninitialized in this function"
when the level of error checking was turned up.

The error was recently fixed upstream. This commit updates
calendar.c to upstream rev 1.50, updates calendar files too.

Change-Id: Ibe0695bf5d0315972f2a4fb1175219dd12cbfa5a
2013-11-18 18:00:57 -05:00
Thomas Cort
2b4e2a565b Importing usr.bin/soelim
No Minix-specific changes needed.

Change-Id: Ie313f3a4ade21c9f5edabd55726fa6af5f468e5d
2013-11-18 08:49:16 -05:00
Beletti
15fd0f1d06 commands/backup: changed K&R to ANSI style
Change-Id: I6ec2eebc0ad575125f2fa9df5bee232151eaf0eb
2013-11-18 07:44:45 -05:00
Ben Gras
f24634cf13 setup: correction for file/kb counting
Change-Id: I74cadcf681fdda105a85535a208251b09981e383
2013-11-18 10:25:30 +00:00
Beletti
4a70ffda08 commands/fix: change K&R to ANSI style.
Change-Id: I0a6d7e39e95a157a80567aeea90f8fa4a188ee7d
2013-11-16 14:53:34 -05:00
Thomas Cort
0c745990d9 Importing usr.bin/checknr
No Minix-specific changes needed.

Change-Id: I22fc8fdee158b00bf93c5455b2b2409d7cff4e05
2013-11-14 12:35:23 -05:00
Thomas Cort
a501098bf5 Importing usr.bin/ul
No Minix-specific changes needed.

Change-Id: I7b8f970b8b2bbdeb5cf88ab5163d1a80c4279c4b
2013-11-13 19:58:24 -05:00
Gerard
f1b0deacf3 Replaced add64, add64u and add64ul with operators.
Change-Id: Ia537f83e15cb686f1b81b34d73596f4298b0a924
2013-11-13 13:11:33 +00:00
Thomas Cort
288e6864c8 Importing usr.bin/deroff
No Minix-specific changes needed.

Change-Id: I87c3629238b7bfdbff3b64682fcdb245a7ce740c
2013-11-12 19:04:27 -05:00
Ben Gras
41027cd2fe arm_sdimage.sh: use insert-fs feature
Change-Id: Ie8bcbca26d5f530e03dbcb7e55771c5cd29d29f3
2013-11-12 21:45:24 +00:00
Thomas Cort
9742ba2568 Importing usr.bin/fpr
No Minix-specific changes needed.

Change-Id: I2169284c68309de78d89d9f3c678f340ff066c7e
2013-11-12 14:11:32 -05:00
Thomas Cort
4b9cc932b7 Importing usr.bin/id
Replaces commands/id. No Minix-specific changes needed.

Change-Id: I307ae0fa3f41ade398ee9be12c1b4d78e8b59e95
2013-11-12 10:15:47 -05:00
Thomas Cort
a0e6850f82 Importing lib/libform
No Minix-specific changes needed.

Change-Id: Ia8ddbdb57ac04dfb42d79c374b9e25b189f9dc3b
2013-11-12 07:56:07 -05:00
Thomas Cort
b618a1ee0b Importing lib/libmenu
No Minix-specific changes needed.

Change-Id: Ifab9a44bd401aebf99ab019697937620d88d47de
2013-11-12 07:39:59 -05:00
Thomas Cort
37fc2fa18f Importing usr.bin/calendar
No Minix-specific changes needed.

Change-Id: I9e68983104efb20ab8e946df3bce189d99ab2deb
2013-11-12 06:18:01 -05:00
Thomas Cort
13054fd168 eepromread: support for reading from /dev/eeprom
eepromread could only read EEPROMs through the /dev/i2c interface.
Once the cat24c256 driver is started and claims/reserves the
device, it can no longer be read through the /dev/i2c interface.

This patch adds support for reading from EEPROMs through the
/dev/eeprom interface. For example, to read the on-board eeprom
on the BBB, one would do `eepromread -f /dev/eepromb1s50 -i`.

Change-Id: If08ce37231e593982eeb109bdd6d5458ad271108
2013-11-11 10:14:03 -05:00
Thomas Cort
9a00643262 Importing usr.sbin/unlink
No Minix-specific changes needed

Change-Id: Iab2345f6a661e1c1f21f8ae1a414b88762de26fc
2013-11-09 20:37:49 -05:00
Thomas Cort
a852ef4bac Importing usr.sbin/link
No Minix-specific changes needed

Change-Id: If202c617d5fa72b1c4ad5515637cdc0ee6f2d6ca
2013-11-09 20:37:43 -05:00
Ben Gras
8dbe32610b mkfs.mfs -I: insert fs at offset feature
. use it in x86_hdimage.sh:
	  avoid copying big FS images into iso & hd images each time

Change-Id: I0775f43cd1821ea7be2fec5b96d107a68afb96d6
2013-11-08 11:59:47 +00:00
Ben Gras
09143af258 x86_hdimage.sh -i: crossbuild x86 release CD
. build writeisofs as a native tool too for it
        . also mkfs.mfs: make missing file in proto nonlethal
        . make setup script a little more self-sufficient
        . hdboot: use INSTALL_FILE instead of INSTALL so that the
          results get added to the METALOG

Change-Id: Id233e4c861f81046bf6c4be0510b8a3bf39ff9be
2013-11-07 13:44:22 +00:00
Ben Gras
7d6089f32d libminixfs: fix buf leak
. mfs: add asserts to catch similar problems in the future

Change-Id: I939230b8d63f100ac071696425b35496b2169bc4
2013-11-07 13:44:20 +00:00
Thomas Cort
075dbe55f3 Importing usr.bin/jot
No Minix-specific changes needed.

Change-Id: I0f45ea7f45d6a254de9383fc4f9ff5e35a013d6b
2013-11-06 17:23:38 -05:00
Thomas Cort
d44a5ed1c1 Importing usr.bin/msgc
Minix-specific changes were needed in msg_sys.def:

 * use minix_mmap()/minix_munmap() since mmap()/munmap() aren't
   defined on Minix.

 * use MAP_PRIVATE flag since MAP_SHARED isn't defined on Minix.

Tested with usr.bin/menuc/testm.

Change-Id: I1c463e7b0623036050adb6a9079c6747e1c1e084
2013-11-06 11:46:22 -05:00
Thomas Cort
525a267e81 Importing usr.bin/menuc
No Minix-specific changes needed.

Change-Id: Ie663e08a515a393efaaeecacea15ef807aa8ecfb
2013-11-06 10:44:51 -05:00
Kees Jongenburger
7d85156ac0 arm:mmc driver refactor (use structs)
Defined register offsets and device configurations in structs to
allow more flexibility. This change will allow to support multiple
instances of a driver using a different bus. This is needed for the
BeagleBone Black.

Change-Id: I24e16faeea338c9a847941a846e6d4e49432525e
2013-11-01 16:46:39 +01:00
Thomas Cort
4483d188f9 Importing usr.bin/colrm
No Minix-specific changes needed.

Change-Id: I3e1b8fd433ab976e1041575e9e654a5205277a29
2013-10-31 08:30:30 -04:00
Thomas Cort
5959d954ea Importing usr.bin/what
No Minix-specific changes needed.

Change-Id: I08ee48e2ebcdf5c87b557b44a5046b7382b120e5
2013-10-30 13:32:55 -04:00