Compare commits

...

1016 Commits

Author SHA1 Message Date
Laurent Vivier
0ee6aca5ae Rules: add -U to ar
by default ar uses deterministic mode and all .o are
added even if they are not new. Disable this by adding -U
to ARFLAGS.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2017-03-16 20:12:52 +00:00
Laurent Vivier
314268632b tools: remove targets clean and dist
We don't need them here as they are imported from Rules.mk

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2017-03-16 20:05:04 +00:00
Laurent Vivier
bd8f87287c add configure script
Remove tools.sh, and let ./configure to generate tools.mk

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2017-03-16 20:47:29 +01:00
Laurent Vivier
08be6d9c46 Merge pull request #2 from glaubitz/master
Fix multiple build issues
2017-03-16 12:07:18 +01:00
John Paul Adrian Glaubitz
59e2e59943 scripts: don't bail out when no m68k cross-compiler can be found 2017-03-15 23:06:33 +01:00
John Paul Adrian Glaubitz
710d7ed2f6 remove trailing spaces from multiple Makefiles 2017-03-15 22:56:49 +01:00
John Paul Adrian Glaubitz
4722d3550b tools: fix source path for installation of tools binaries 2017-03-15 22:52:40 +01:00
John Paul Adrian Glaubitz
162572aaf9 debian: bump debhelper minimum version and compat to 9 2017-03-15 21:39:27 +01:00
John Paul Adrian Glaubitz
11bd9223ba tools: remove Makefile from SOURCES variable 2017-03-15 21:34:14 +01:00
Michael Karcher
6e23d9a665 libunix: add -ffreestanding to CFLAGS to fix nonnull-compare warning 2017-03-15 21:29:26 +01:00
John Paul Adrian Glaubitz
b6f49c0e6b second: make console_putchar() inline in console.c only 2017-03-15 21:23:48 +01:00
Laurent Vivier
6b81ba9f49 tools: include Rules.mk in Makefile
To import CONFIG_E2FSLIBS
2017-02-27 16:41:01 +01:00
Laurent Vivier
1f37e6e9b5 docs: move emile.conf to config/
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-11-11 20:13:36 +01:00
Laurent Vivier
53062ff0bf emile-mktable: force the size of the disk in the table
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-11-11 18:42:51 +01:00
Laurent Vivier
3be63e7001 tools: add tools to set conf path into emiledriver
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-11-10 22:23:53 +01:00
Laurent Vivier
02fdcb3eb4 libmap: add map_update_checksum.c
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-11-10 22:23:53 +01:00
Laurent Vivier
9b3737d9cc libmap: add map_write_driver.c
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-11-10 22:23:53 +01:00
Laurent Vivier
7b836064ad libmap: add map_read_driver.c
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-11-10 22:23:53 +01:00
Laurent Vivier
081c7f96ee libmap: move emile_checksum() to map_checksum()
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-11-08 22:47:21 +01:00
Laurent Vivier
91a43e63c2 Correctly use linux/ext2_fs.h or ext2fs/ext2_fs.h
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-11-08 22:42:27 +01:00
Laurent Vivier
e1d35789fb tools: create partitions table with EMILE driver
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-11-03 02:00:53 +01:00
Laurent Vivier
7a22506a89 emile-map-set: allow to write flags
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-09-20 23:41:58 +02:00
Laurent Vivier
4de7597e14 Allows to share EMILE directory between several archs
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-09-20 23:06:08 +02:00
Laurent Vivier
0b05a2eff7 docs: correctly use docbook2man
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2015-09-20 22:36:02 +02:00
Laurent Vivier
204bf1d146 emile: add more checks when reading emile.conf 2014-06-01 23:55:12 +02:00
Laurent Vivier
cbe8d0c417 emile-map-set: manage only one driver
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-06-01 02:47:21 +02:00
Laurent Vivier
098deb6716 emile-map-set: use O_RDWR to put driver
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-05-31 12:20:02 +02:00
Laurent Vivier
e6a2eb39cf correct return code of map_write
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-05-31 12:19:52 +02:00
Laurent Vivier
1ec58fc07f cast device_write_sector() to stream_write_sector_t
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-05-31 12:19:41 +02:00
Laurent Vivier
c8fedc7bea remove gestaltID from cdrom-etch.conf
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-05-11 02:51:05 +02:00
Laurent Vivier
d9935378a9 Add cdrom.conf for sarge and etch
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-05-10 18:41:17 +02:00
Laurent Vivier
10560b543f move floppy.conf to config/
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-05-10 18:31:27 +02:00
Laurent Vivier
b335df3487 Use move.w with short in SysError(), InitEvents(), InitFS()
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-05-09 02:38:54 +02:00
Laurent Vivier
6e9f924edb scsi_command() really return error code in case of error...
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-05-08 23:37:16 +02:00
Laurent Vivier
5d0c15c516
In SCSICmd() count is short, so use move.w 2014-05-08 20:51:58 +02:00
Laurent Vivier
bd1790c47f max_blocks is unused, but value must be read to change file offset
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-05-07 02:26:12 +02:00
Laurent Vivier
4f3aa35240 correctly use config_get_property() in emile-set-output
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2014-05-07 01:38:19 +02:00
Laurent Vivier
2b5a4fc3bf Release version 0.14
Signed-off-by: Laurent Vivier <Laurent@Vivier.EU>
2013-09-05 14:45:29 +02:00
Laurent Vivier
9bd9755dbb Update email address
Signed-off-by: Laurent Vivier <Laurent@Vivier.EU>
2013-09-05 14:45:27 +02:00
Laurent Vivier
0df27c2253 Update GPLv2
Signed-off-by: Laurent Vivier <Laurent@Vivier.EU>
2013-09-05 14:44:59 +02:00
Laurent Vivier
e1afe443ed Use ext2_fs.h from e2fslibs-dev package
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2013-09-04 18:10:53 +02:00
Laurent Vivier
a83f6671b6 macos: correct typo in GetCurrentMode()
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2013-09-02 21:14:19 +02:00
Laurent Vivier
fe1060c614 Update ChangeLog
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2013-09-02 21:13:41 +02:00
Laurent Vivier
56b997e0de update (c) date
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:40:02 +01:00
Laurent Vivier
8cde86073a gcc-4.6: correct strict aliasing errors.
Use "union" to remove error:

"error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]"

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:39:01 +01:00
Laurent Vivier
f2be9d761f Remove unused variables (detected with gcc-4.6) in m68k part
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:39:01 +01:00
Laurent Vivier
14f8dd5556 Remove unused variables (detected with gcc-4.6)
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:39:01 +01:00
Laurent Vivier
7b2824186b add emile.conf man page into .deb
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:39:01 +01:00
Laurent Vivier
72e809c89e Add more details on "root" option
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:39:01 +01:00
Laurent Vivier
c5342c3c4a debian: correct non-m68k build
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:39:01 +01:00
Laurent Vivier
320d556f34 Change VERSION from 0.13CVS to 0.13 2011-12-18 14:39:01 +01:00
Laurent Vivier
05b155ce52 debian: allows to compile emile with gcc-4.1
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:39:01 +01:00
Laurent Vivier
6bced901e2 include linux/fs.h before linux/ext2_fs.h
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:38:58 +01:00
Laurent Vivier
8a1be776ad remove close() of unitialized fd
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:38:53 +01:00
Laurent Vivier
3130ac4a9e Add -Wa,-mcpu=68030 and -Wa,-mcpu=68040
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2011-12-18 14:38:44 +01:00
Laurent Vivier
9bd17c1bd9 Add EnterSupervisorMode()
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-19 00:25:11 +02:00
Laurent Vivier
efcadd06c5 Define get_physical() and make_resident()
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-18 22:24:51 +02:00
Laurent Vivier
dd27d8c153 Add include of macos/errors.h
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-18 22:24:15 +02:00
Laurent Vivier
f71ae4b6d0 Add LockMemory() and LockMemoryContiguous()
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-18 22:11:03 +02:00
Laurent Vivier
a2de5774fe Replace space by tab
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-18 22:02:41 +02:00
Laurent Vivier
2b6bc8a596 Add GetPhysical() trap
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-18 22:00:27 +02:00
Laurent Vivier
80b3fbbec7 switch off interrupts before the PPC bootstrap
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-12 01:14:50 +02:00
Laurent Vivier
5f819dde88 Correctly create the PPC bootstrap section
To be copied to the flat binary file from the ELF file, the section
.bootstrap needs to have the "load" flag. Otherwise objcopy removes it
(even with -j .bootstrap).

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-12 00:59:26 +02:00
Laurent Vivier
c1b482e48a Preserve register %a2.
If we don't preserver the %a2 register through MacOS traps, the content
of "emile_l2_header_t* info" in second/main:start() is lost.

It seems gcc supposes this register is not modified whereas it is.

This has been detected on a powermac 7100. I don't know if this appears
because of the powermac ROM or of the gcc version (4.3.2).

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-11 22:02:04 +02:00
Laurent Vivier
2d8317cb92 Add 64bit build host support for the first level parameters (replace void* by u_int32_t)
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-10 02:19:09 +02:00
Laurent Vivier
003dc015eb uptdate .gitignore
add *.bin, *.gz, and *.swp and objects directories

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-08 22:39:40 +02:00
Laurent Vivier
c4f9714d63 second: because of mess between gcc and as: remove cpu directive and use the
default provided by gcc (68020). Add rules to manage 68040 and 68030 assembly
files in the Makefile. Classic will wait later...

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-08 22:37:03 +02:00
Laurent Vivier
aba7a139c5 libunix: because of mess between gcc and as: remove cpu directive and use the default provided by gcc (68020). Classic will wait later...
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-08 21:55:43 +02:00
Laurent Vivier
f20c8f1194 EMILE PPC is also compiled with m68k tools except clearly
identified files

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-08 18:33:19 +02:00
Laurent Vivier
2971c5775d Correct branch local label to go backward instead forward (assembler error)
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-08 18:32:34 +02:00
Laurent Vivier
e16d8501ed Correct signe of response according Gestalt signature
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-06-08 18:30:59 +02:00
Laurent Vivier
5d2fe2dbb2 Allow to compile with gcc-4 by adding a contraint on memory for MacOS traps
Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
2008-10-27 20:51:15 +01:00
Laurent Vivier
72fe121b08 Change VERSION from 0.13 to 0.13CVS
Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
2008-09-25 16:55:52 +02:00
Laurent Vivier
20e785f628 Define vga_set_palette() to define current display palette.
Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
2008-09-17 14:53:27 +02:00
Laurent Vivier
094feb6fe2 create .gitignore
Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
2008-09-17 14:51:45 +02:00
Laurent Vivier
db0457b9e5 Push parameters of _SetEntries into the stack instead of registers.
Add graphical display type (clut, fixed, direct).

Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
2008-09-17 14:45:35 +02:00
Laurent Vivier
34dc6d518c Add SetEntries() to set color palette
Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
2008-09-14 23:59:22 +02:00
Laurent Vivier
894efdd1db Add some definitions to video.h
Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
2008-09-14 23:55:35 +02:00
Finn Thain
c1ebc202d7 This patch corrects the generated tools.mk when no tool to create manual
from docbook is found

Original patch has been modified to send message to >&2 instead of /dev/stderr
and to stop make.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
2008-09-11 00:21:35 +02:00
Laurent Vivier
c5268fb299 Move all docs management from Rules.mk to docs/Makefile, to avoid conflists between variables (SOURCES, OBJS, ...)
Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
2008-09-05 14:20:41 +02:00
Laurent Vivier
e1d621532a Update README
Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
2008-09-05 14:02:55 +02:00
Laurent Vivier
5de80e9c48 Add command line interface 2008-09-02 19:40:35 +00:00
Laurent Vivier
bcd309d505 use temp file to set configuration 2008-08-13 20:17:46 +00:00
Laurent Vivier
99a937f634 change Standards-Version 2008-08-13 19:40:59 +00:00
Laurent Vivier
de93e31ec4 Change FSF address 2008-08-13 19:40:12 +00:00
Laurent Vivier
31fb7a324e move to version 0.13 2008-08-13 13:07:08 +00:00
Laurent Vivier
e67d69181a Update 2008-08-13 13:06:59 +00:00
Laurent Vivier
7eb57e21d0 add usage of --emiledriver and --config 2008-08-13 13:03:49 +00:00
Laurent Vivier
fe6896415e update copyright for EMILE, add copyright for mkisofs 2008-08-13 12:44:54 +00:00
Laurent Vivier
f89ab83ec9 Add apple_driver 2008-08-13 12:33:05 +00:00
Laurent Vivier
e01d129289 install apple_driver 2008-08-13 12:29:52 +00:00
Laurent Vivier
57dee88fbf by default use EMILE driver 2008-08-13 12:29:19 +00:00
Laurent Vivier
5f09d45ad9 remove error message when complete transaction fails 2008-08-12 23:51:40 +00:00
Laurent Vivier
d3d9a428a5 correctly manage default values 2008-08-12 23:40:28 +00:00
Laurent Vivier
1a1478bfe8 correctly get boot unit 2008-08-12 23:37:22 +00:00
Laurent Vivier
be678577f6 ext2_init() fails if device is not an ext2 filesystem 2008-08-12 23:36:12 +00:00
Laurent Vivier
4e79c0b645 if APPLE_DRIVER, set the default unit to the boot unit 2008-08-12 13:55:44 +00:00
Laurent Vivier
fa06e26c9f include ../first/macos.i, for APPLE_DRIVER, manage 32bitmode and boot unit 2008-08-12 13:54:55 +00:00
Laurent Vivier
b2b8839439 add --config to provide a configuration file 2008-08-12 13:51:49 +00:00
Laurent Vivier
689316713e Allow to define a default unit to use if none is provided 2008-08-12 13:45:41 +00:00
Laurent Vivier
7ff51a725e Add NewPtrClear 2008-08-12 11:44:46 +00:00
Laurent Vivier
fb68a737b7 Generate an EMILE Apple_Driver 2008-08-12 09:24:22 +00:00
Laurent Vivier
fe0eeaba24 Add --emiledriver to boot second stage of emile in an Apple_Driver partition 2008-08-12 09:22:49 +00:00
Laurent Vivier
6d24a5fb5c map_read_sector() uses offset from the beginning of the partition, not of the disk 2008-08-12 09:15:00 +00:00
Laurent Vivier
f0a396777c Add APPLE_DRIVER_EMILE 2008-08-12 09:13:43 +00:00
Laurent Vivier
75f78cecb6 length is 16bit value 2008-08-12 09:12:25 +00:00
Laurent Vivier
b5058db8ef return NULL if header version is wrong 2008-08-07 19:32:11 +00:00
Laurent Vivier
d7f20aeb29 update 2008-07-29 22:35:20 +00:00
Laurent Vivier
b72acfbc1c define mount 2008-07-29 22:33:38 +00:00
Laurent Vivier
ffdcb53fed correct typo between len and size 2008-07-29 00:28:35 +00:00
Laurent Vivier
2b81e1f813 Correctly set configuration path 2008-07-29 00:03:47 +00:00
Laurent Vivier
b0ae9341dd don't crash when configuration file is not found 2008-07-28 23:43:21 +00:00
Laurent Vivier
336b5e6e57 correct sprintf parameter signedness 2008-07-28 23:08:38 +00:00
Laurent Vivier
10951f1f27 correct management of filesystem support 2008-07-28 22:53:26 +00:00
Laurent Vivier
12269cce4d manage duplicate / 2008-07-28 22:51:35 +00:00
Laurent Vivier
56e7f86bc4 clear unused part of configuration buffer 2008-07-28 09:59:27 +00:00
Laurent Vivier
86bc96b7e6 update VERSION to 0.12 2008-07-27 17:19:01 +00:00
Laurent Vivier
f589feb9c2 Add release 0.12 2008-07-27 17:17:22 +00:00
Laurent Vivier
0d7c35c93e remove apple_driver 2008-07-27 17:12:19 +00:00
Laurent Vivier
b8770434eb update 2008-07-27 17:11:33 +00:00
Laurent Vivier
8c6638a28e Create directories man5 and man8 2008-07-27 16:16:51 +00:00
Laurent Vivier
ec0a68226e change ramdisk_size for etch 2008-07-27 16:10:40 +00:00
Laurent Vivier
9b4a898b0f replace vmlinuz-2.6.18-4-mac by vmlinuz-2.6.17-2-mac 2008-07-27 15:41:57 +00:00
Laurent Vivier
ff3e6e29a5 remove broken modification (last commit) 2008-07-27 15:13:55 +00:00
Laurent Vivier
016a3c28fd commit use root property and boot from HD 2008-07-27 15:10:46 +00:00
Laurent Vivier
15c6399d05 Allow to probe the filesystem 2008-07-27 15:01:15 +00:00
Laurent Vivier
489d0f260d Allow to use "root" in configuration file 2008-07-27 14:59:48 +00:00
Laurent Vivier
8edf4ba24d Wait the release of a key if needed 2008-07-27 14:59:06 +00:00
Laurent Vivier
3023f1af53 Manage one level software link 2008-07-24 01:44:45 +00:00
Laurent Vivier
27f4864fac Correct ext2: decoding 2008-07-24 01:06:05 +00:00
Laurent Vivier
cb5642517c correct big endian support 2008-07-23 20:19:08 +00:00
Laurent Vivier
c6acbdb73f define rule for man section 5 2008-07-23 18:44:08 +00:00
Laurent Vivier
e05ef43e51 remove apple_driver 2008-07-23 05:53:11 +00:00
Laurent Vivier
833dfa6cf1 add man emile.conf 2008-07-23 05:37:40 +00:00
Laurent Vivier
39497e48d8 behaves correctly when last character is '/' 2008-07-23 05:35:12 +00:00
Laurent Vivier
f2dd688a89 update help 2008-07-21 23:00:19 +00:00
Laurent Vivier
4e9e2cbeb9 update 2008-07-21 22:56:28 +00:00
Laurent Vivier
7d0557acf9 update 2008-07-21 22:46:31 +00:00
Laurent Vivier
f1d9f61893 help cosmetic change 2008-07-21 22:44:35 +00:00
Laurent Vivier
ea50cabbb7 help cosmetic change 2008-07-21 22:22:06 +00:00
Laurent Vivier
f14b56a171 help cosmetic change 2008-07-21 22:16:47 +00:00
Laurent Vivier
c528c83701 help cosmetic change 2008-07-21 22:01:39 +00:00
Laurent Vivier
70a7b8ccb4 help cosmetic change 2008-07-21 21:54:41 +00:00
Laurent Vivier
25228c9740 Update 2008-07-16 21:00:42 +00:00
Laurent Vivier
3266508559 Correct the Changelog target: ChangeLog 2008-07-16 20:54:32 +00:00
Laurent Vivier
a6d569b8ff correctly init fs when stream_uncompress() is used (gzread() calls saved fs.read() 2008-07-16 20:52:39 +00:00
Laurent Vivier
0d9ccbf7be correctly manage seek()/read() error cases, ignore return of stream_close() 2008-07-16 20:47:37 +00:00
Laurent Vivier
a090f5677e EMILE pseudo-loader does not seem to support static array initialization of kind "[x] = y,", replace it by a switch() 2008-07-16 18:04:54 +00:00
Laurent Vivier
c6cf5c371e parameters is now args 2008-07-11 22:15:32 +00:00
Laurent Vivier
842b855232 Correctly generate floppy_ramdisk.bin when GESTALTID is used 2008-07-11 20:59:57 +00:00
Laurent Vivier
38ffe34cfb Add GESTALTID in config.mk 2008-07-11 20:47:44 +00:00
Laurent Vivier
8c9f0f37c8 More ifdef 2008-07-08 22:01:18 +00:00
Laurent Vivier
6f7b9ceb38 Generate Changelog 2008-07-08 21:59:20 +00:00
Laurent Vivier
b1ed42201b correct printf format for st_size 2008-07-08 21:58:50 +00:00
Laurent Vivier
907bb917e6 correctly decode kernel path and center title 2008-07-08 21:58:03 +00:00
Laurent Vivier
636b075bb0 Update 2008-07-04 18:46:07 +00:00
Laurent Vivier
af26501420 add --no-fs, to restore management of container (old behavior) 2008-04-21 19:50:25 +00:00
Laurent Vivier
a333f52121 add args property, make some cleanup 2008-04-21 19:49:13 +00:00
Laurent Vivier
68b7b1f4dd use stream_* structures instead of specific ones 2008-04-20 16:35:55 +00:00
Laurent Vivier
98bd88c574 Add map_init.c, use stream_FILE with device->close() 2008-04-20 16:33:20 +00:00
Laurent Vivier
2c64fafc4f move all specific structure to iso9660.h and stream_* generic structures in interface 2008-04-20 16:29:49 +00:00
Laurent Vivier
0b40281c38 move all specific structure to ext2.h and stream_* generic structures in interface 2008-04-20 16:25:24 +00:00
Laurent Vivier
c017df52ba move all specific structure to container.h and stream_* generic structures in interface 2008-04-20 16:20:54 +00:00
Laurent Vivier
c346e2b01d move all specific structure to block.h and stream_* generic structures in interface 2008-04-20 16:16:53 +00:00
Laurent Vivier
5caae75dc2 move volume and file to stream, add fs.mount, fs.open 2008-04-20 16:07:24 +00:00
Laurent Vivier
d90125f60c correct kernel path 2008-04-20 16:01:23 +00:00
Laurent Vivier
578c62e97c introduce root property 2008-04-16 18:34:12 +00:00
Laurent Vivier
fff0ca295b use libconfig 2008-04-16 18:32:17 +00:00
Laurent Vivier
15ac0c394f correct typo 2008-04-16 18:22:05 +00:00
Laurent Vivier
35bfdc35f0 Add root property, rename parameters as args 2008-04-16 13:43:28 +00:00
Laurent Vivier
fd817737a8 Add comments and ext2 entry 2008-04-16 13:37:51 +00:00
Laurent Vivier
e10c68dab1 Manage comments (#.*\n) in configuration file 2008-04-16 13:36:26 +00:00
Laurent Vivier
73a10590a1 Manage byte order (ext2 is little-endian, libext2 can run on big-endian like m68k or powerpc) 2008-04-13 22:24:57 +00:00
Laurent Vivier
5f7643e48b Add ext2 in libstream 2008-04-12 22:27:13 +00:00
Laurent Vivier
fb689113dd Correctly manage / in pathname 2008-04-12 22:16:17 +00:00
Laurent Vivier
f5d95ed881 Avoid offset overflow on disk bigger than 2 GB 2008-04-12 22:15:20 +00:00
Laurent Vivier
b1594201cb Add tools for ext2 2008-04-12 21:19:32 +00:00
Laurent Vivier
18d598d5fa Add preliminary ext2 support 2008-04-12 21:17:49 +00:00
Laurent Vivier
1272867d0c correct computing of size of buffer subset 2008-03-17 23:25:30 +00:00
Laurent Vivier
64bc718251 scancode_Stop is '.' and '>', scancode_KeypadStop is '.' 2008-03-17 18:52:41 +00:00
Laurent Vivier
3969b083c7 Correctly manage chainloader 2008-02-25 21:49:18 +00:00
Laurent Vivier
42f4a71817 manage correctly CONFIG_GESTALTID, CONFIG_KERNEL_MAP, CONFIG_INITRD_MAP 2008-02-25 21:36:32 +00:00
Laurent Vivier
35b5df8a85 replace int by long on void* cast to be able to compile on 64bit architecture 2008-02-14 22:39:14 +00:00
Laurent Vivier
dd295326db Allows SCSI second level to use block: protocol 2008-02-14 20:15:26 +00:00
Laurent Vivier
6f37023fb1 Correct typo 2008-02-14 20:05:11 +00:00
Laurent Vivier
0ec74c655d for chainloader, size of "block:" is in bytes 2008-02-14 19:53:01 +00:00
Laurent Vivier
7e4c1ca39c block: takes an offset in blocks and not in bytes (to be able to manage SCSI disk) 2008-02-14 19:46:10 +00:00
Laurent Vivier
1ff43d1924 Better management of chainloader 2008-02-10 01:36:39 +00:00
Laurent Vivier
d4719723dc correct typo about --restore 2008-02-09 16:38:50 +00:00
Laurent Vivier
bef869a741 Check boot signature and flush caches 2007-11-05 21:21:02 +00:00
Laurent Vivier
6bd242d7ce Call chainloader, for the moment EMILE is only able to chaiload itself... 2007-11-03 21:04:09 +00:00
Laurent Vivier
3f4a3c5000 Add LMSetBootDriver() 2007-11-03 20:40:37 +00:00
Laurent Vivier
90b8e2db0b Add FlushInstructionCache(), FlushDataCache(), DisableExtCache(), FlushExtCache() and FlushCodeCacheRange() 2007-11-03 20:37:55 +00:00
Laurent Vivier
1ee27546a1 Add _HWPriv dispatcher 2007-11-03 20:36:53 +00:00
Laurent Vivier
b04a3d1638 Set more information in streamp_r, allows to retrieve unit id with stream_fstat() 2007-11-02 22:11:28 +00:00
Laurent Vivier
47a16fe0c8 use sector number instead of computing it from struct size and block size 2007-11-02 09:40:04 +00:00
Laurent Vivier
c4fb2d359e Add error message 2007-11-02 09:39:21 +00:00
Laurent Vivier
3eb3d6005e use directly block address instead of computing it with blocksize, correct parameter of get_blocksize() 2007-11-01 22:52:17 +00:00
Laurent Vivier
642feb9d59 Correct parameters of get_blocksize() 2007-11-01 22:43:06 +00:00
Laurent Vivier
d3e4392b75 correct call of get_blocksize() 2007-11-01 22:12:38 +00:00
Laurent Vivier
eb9c17f5ad Add map_get_blocksize() 2007-11-01 22:07:17 +00:00
Laurent Vivier
79f9107e45 Add some messages, add map_get_blocksize(), correct close() 2007-11-01 21:18:45 +00:00
Laurent Vivier
22b712687f Cleanup partition map management 2007-10-22 23:13:23 +00:00
Laurent Vivier
55aa4a8e04 correct memory corruption by hazardous free(), correct bad values (uninitalized) in error message 2007-10-22 22:06:52 +00:00
Laurent Vivier
ac524c2a45 store read_config() result in a structure 2007-10-21 01:48:34 +00:00
Laurent Vivier
a844b4c51a correct uninitialized value (offset) 2007-10-21 01:26:48 +00:00
Laurent Vivier
cf28f647c7 Clear configuration memory 2007-10-21 01:16:11 +00:00
Laurent Vivier
db07ccf564 Update 2007-10-21 01:01:20 +00:00
Laurent Vivier
90db2e2b91 Add libmap 2007-10-10 21:17:40 +00:00
Laurent Vivier
efe9ec379d Add libmap-m68k dependencies 2007-10-10 21:17:00 +00:00
Laurent Vivier
7473cf35d2 use libmap 2007-10-10 21:13:35 +00:00
Laurent Vivier
b0c25d723f rename map_partition_read and map_partition_write to map_read_sector and map_write_sector 2007-10-10 21:07:52 +00:00
Laurent Vivier
b189dfbbed rename map_partition_read and map_partition_write to map_read_sector and map_write_sector 2007-10-10 20:58:25 +00:00
Laurent Vivier
e134c95553 Duplicate device on open and free on close, close device on map close 2007-10-10 20:49:55 +00:00
Laurent Vivier
2e5094aff9 Add chainloader parameter 2007-10-10 17:16:15 +00:00
Laurent Vivier
41b81d76fb Add load_chainloader() 2007-10-10 17:14:42 +00:00
Laurent Vivier
ce315dd349 Add device_get_blocksize() 2007-10-10 16:47:03 +00:00
Laurent Vivier
912c63ad48 Add device_get_blocksize(), and adjust offset using blocksize instead of << 11 2007-10-10 16:46:03 +00:00
Laurent Vivier
22d6bc63a9 data is map->device->data and not map->device, read_sector() and write_sector() need an offset in block and not in bytes whereas size is in bytes 2007-10-10 16:41:31 +00:00
Laurent Vivier
ffe511becc correct signedness of 4th arguments of map_partition_{read|write} 2007-10-09 20:48:13 +00:00
Laurent Vivier
360b17f8cc use map_partition_read() and map_partition_write() 2007-10-09 20:43:05 +00:00
Laurent Vivier
00c1bbf35a use bytes instead of block 2007-10-09 20:40:37 +00:00
Laurent Vivier
6c9d87a9dc Add map_partition_read.c and map_partition_write.c 2007-10-09 20:16:52 +00:00
Laurent Vivier
499cf44318 call map_partition_read() 2007-10-09 20:15:49 +00:00
Laurent Vivier
e07088c23c call map_partition_write() 2007-10-09 20:15:32 +00:00
Laurent Vivier
c5f68b4a0e correct name 2007-10-09 20:14:23 +00:00
Laurent Vivier
f76443357e correct names 2007-10-09 20:13:57 +00:00
Laurent Vivier
79d62ad6ba corret typo 2007-10-09 20:06:12 +00:00
Laurent Vivier
ffa835644d Add map_partition_read() and map_partition_write() 2007-10-09 20:00:27 +00:00
Laurent Vivier
f2745a6bbb use device_io_t 2007-10-09 19:29:13 +00:00
Laurent Vivier
4555512e10 Add device.c to link emile and emile-map-set 2007-10-09 19:23:18 +00:00
Laurent Vivier
69aec7aac7 use device_sector_size to set sector size to 2048 2007-10-09 19:21:14 +00:00
Laurent Vivier
7ba120c6c5 Add device_write_sector() and device_sector_size, use int fd instead FILE* 2007-10-09 19:16:11 +00:00
Laurent Vivier
2fe3ca34e7 add -I. 2007-10-09 19:10:58 +00:00
Laurent Vivier
f85ef57bc2 Restore emile_scsi_get_dev(), emile_get_dev_name() and emile_scsi_get_rdev() 2007-10-09 19:10:15 +00:00
Laurent Vivier
0139be9609 move from stdio to device_io_t 2007-10-09 19:02:42 +00:00
Laurent Vivier
ce59576cf7 Add definition of stream_write_sector_t 2007-10-08 20:56:21 +00:00
Laurent Vivier
816a2002a7 define driver_ptr() which computes driver pointer according handle and dCtlFlags 2007-10-08 13:32:52 +00:00
Laurent Vivier
8b3e28e5b7 add drive_to_refnum() and refnum_to_drive() 2007-10-08 13:20:24 +00:00
Laurent Vivier
636b4d0868 Find scsi id accorind refnum and vice-versa 2007-10-08 12:38:22 +00:00
Laurent Vivier
52a797f3eb Manage chainloader attribute in configuration files 2007-10-08 12:05:52 +00:00
Laurent Vivier
a47ae538de Add libmap in dist 2007-10-04 21:01:09 +00:00
Laurent Vivier
d9feeb1a76 remove partition.h 2007-10-04 21:00:27 +00:00
Laurent Vivier
a60a6bfb71 Change emile_map_* to map_* 2007-10-04 20:55:52 +00:00
Laurent Vivier
5a0b1494b5 Add libmap 2007-10-04 20:54:14 +00:00
Laurent Vivier
05a073b147 (c) 2007 2007-10-04 20:53:35 +00:00
Laurent Vivier
03a6bdeb25 move emile_map_* to libmap 2007-10-04 20:52:37 +00:00
Laurent Vivier
37c6ac70c6 add map_block0_write.c 2007-10-04 20:25:57 +00:00
Laurent Vivier
6657d065cf move some definitions from libemile.h 2007-10-04 20:16:27 +00:00
Laurent Vivier
d39a68703e move emile_map_* from libemile to libmap, rename partition.h to libmap.h 2007-10-02 14:21:34 +00:00
Laurent Vivier
2ebda90890 remove traces 2007-09-29 21:27:48 +00:00
Laurent Vivier
15c4184ee7 correct typo 2007-09-29 21:27:31 +00:00
Laurent Vivier
8a2503868e Define LMGetBootDrive() 2007-09-29 21:26:08 +00:00
Laurent Vivier
de9ecab9bc Implement GetDCtlEntry() 2007-09-29 21:23:45 +00:00
Laurent Vivier
f88c5d72f1 Correct definition of DCtlEntry, using QHdr 2007-09-29 21:22:43 +00:00
Laurent Vivier
f343388bab Define QElem and modify QHdr accordingly 2007-09-29 21:19:52 +00:00
Laurent Vivier
43fbf7ca14 really seek if docbook2man exists, correction by Finn Thain 2007-09-21 15:04:02 +00:00
Laurent Vivier
b7ced84ebe clear edit line correctly 2007-09-19 20:40:40 +00:00
Laurent Vivier
600f012138 make vga_clear() only if vga is enabled 2007-09-18 22:35:14 +00:00
Laurent Vivier
c7d9742b8a move cli.c to libui/edit.c 2007-09-17 23:31:17 +00:00
Laurent Vivier
62904d7c71 use wait_char and manage ESC to cancel edition 2007-09-17 23:27:28 +00:00
Laurent Vivier
2739696923 add edit.c 2007-09-17 23:26:44 +00:00
Laurent Vivier
f6fea68b4a moved to libui/edit.c and libui/libui.h 2007-09-17 23:10:19 +00:00
Laurent Vivier
194894c58c Add missing console functions for edit.c 2007-09-17 22:58:45 +00:00
Laurent Vivier
3f2301a32f move second/cli.c to libui/edit.c 2007-09-17 22:56:40 +00:00
Laurent Vivier
2526dd9419 Return to menu if kernel or ramdisk fail to load 2007-09-17 22:23:06 +00:00
Laurent Vivier
04d9d79d74 Remove WARNING, add REPORTING BUGS 2007-09-17 13:35:09 +00:00
Laurent Vivier
d7e9eb55ec update 2007-09-17 12:37:56 +00:00
Laurent Vivier
91b698a833 "vga default" is not a valid parameter for command line of emile_second_set_param() 2007-09-17 12:09:30 +00:00
Laurent Vivier
f215102d83 clear property if not found 2007-09-17 12:07:42 +00:00
Laurent Vivier
dd9b4869c5 Correctly initialize stopbits 2007-09-16 16:22:07 +00:00
Laurent Vivier
dda7ab6a0e correct typo: console_set_position() is console_set_cursor_position() 2007-09-16 15:33:18 +00:00
Laurent Vivier
e193e79a69 use wait_char to wait escape sequence 2007-09-16 15:29:11 +00:00
Laurent Vivier
b82dc3e69f remove read_config_vga(), read_config_modem() and read_config_printer() and initialize vga and modem from read_config(), select one console when several available 2007-09-16 15:27:53 +00:00
Laurent Vivier
abb1e988bf Select only one console when several are available, add console_get_cursor_position(), console_get_size() and console_status_request() 2007-09-16 15:26:17 +00:00
Laurent Vivier
a3aaf95a3c manage correctly keypressed (don't eat the key), initialize independently modem and printer 2007-09-16 15:11:54 +00:00
Laurent Vivier
267264c0f4 select the mode according the configuration 2007-09-16 15:10:49 +00:00
Laurent Vivier
b78ead9cf9 move console_init() to main() 2007-09-16 15:09:15 +00:00
Laurent Vivier
ac5de6e43d reverse previous modification 2007-09-15 05:29:18 +00:00
Laurent Vivier
920aca763f add some braces 2007-09-15 05:26:14 +00:00
Laurent Vivier
cdd6ddb62a correctly manage configuration: use open_config() 2007-09-15 05:15:36 +00:00
Laurent Vivier
ac7818b7eb Add WHEN in tools.mk 2007-09-13 18:33:59 +00:00
Laurent Vivier
84bc5c1e6d include config.mk 2007-09-13 18:32:14 +00:00
Laurent Vivier
01a1a91188 correct usage 2007-09-13 18:31:42 +00:00
Laurent Vivier
02c1507c94 move WHEN to tools.mk, don't remove tools.mk on clean, but on distclean 2007-09-13 16:54:10 +00:00
Laurent Vivier
0eba1130ae on clean, remove *-full directories, bug found by Finn Thain 2007-09-13 07:44:35 +00:00
Laurent Vivier
d3076af249 Add include stddef.h to define offsetof, thank you to Finn Thain 2007-09-13 07:26:48 +00:00
Laurent Vivier
a370cdfd49 Adjust position and size of progress bar according size of the screen 2007-09-11 23:15:52 +00:00
Laurent Vivier
7ee8215201 include head.h to have emile_l2_header_t definition 2007-09-11 23:10:06 +00:00
Laurent Vivier
e8bbbe07bf config_read_vga() returns the value of the property, we select only one console if several are available (vga, modem, printer) 2007-09-11 23:05:11 +00:00
Laurent Vivier
bc78ec0127 Select only one console when several are available, implement console_get_cursor_position() and console_get_size() 2007-09-11 23:03:10 +00:00
Laurent Vivier
f5740cf4e3 remove useless buffering code, allow to select the port to which we want to send output 2007-09-11 23:01:30 +00:00
Laurent Vivier
78e15acf9d Add vga_is_available() to know if VGA has been activated, give level 2 info to vga_init 2007-09-11 23:00:07 +00:00
Laurent Vivier
e12e2bb481 The number of item in list is index not index+1 2007-09-11 22:57:52 +00:00
Laurent Vivier
f934710d86 Exit from the escape sequence when cursor get position is found 2007-09-11 22:54:58 +00:00
Laurent Vivier
757e8f9f34 Correctly manage PPC cross-compiler on M68K host 2007-09-08 23:34:10 +00:00
Laurent Vivier
880d7d25fd tools correctly get vga, modem and printer properties 2007-09-08 23:31:40 +00:00
Laurent Vivier
fb677da2fe configuration is int8_t 2007-09-08 23:09:14 +00:00
Laurent Vivier
14a1b857f2 Manage vga, modem and printer properties 2007-09-08 22:49:13 +00:00
Laurent Vivier
c4b4ee30ac Add default values for LINUXPATH and LINUXRAMDISK 2007-09-08 22:07:04 +00:00
Laurent Vivier
47e1a0bc43 remove typo 2007-09-07 09:04:40 +00:00
Laurent Vivier
98d6d9cbbe add some override for AS, CC, ... 2007-09-07 08:41:20 +00:00
Laurent Vivier
dfd1a1d590 Really doesn't fail on clean 2007-09-06 22:59:57 +00:00
Laurent Vivier
0898b76381 remove uneeded definitions 2007-09-06 22:50:10 +00:00
Laurent Vivier
4dd44e4d60 don't fail on clean when TARGET doesn't exist 2007-09-06 22:36:58 +00:00
Laurent Vivier
32aeab4427 add in DISTFILES scripts/tools.sh kernel.mk config.mk 2007-09-06 22:20:45 +00:00
Laurent Vivier
8a586c3e31 include tools.mk 2007-09-06 22:09:11 +00:00
Laurent Vivier
45cb6b22d6 move some stuff to config.mk, kernel.mk and tools.mk. Tools.mk is generated by scripts/tools.sh 2007-09-06 22:08:51 +00:00
Laurent Vivier
c3f9dc3024 move doc2man to tools.mk, clean remove manpages 2007-09-06 22:08:07 +00:00
Laurent Vivier
19d7d47d02 targets are m68k-linux, m68k-netbsd and ppc-linux 2007-09-06 22:07:00 +00:00
Laurent Vivier
33f08f27fc detect the architecture of the kernel 2007-09-06 21:36:39 +00:00
Laurent Vivier
e45bfda8bf New configuration file 2007-09-06 21:35:34 +00:00
Laurent Vivier
3861fa0c31 script to find tools needed to build EMILE 2007-09-06 21:34:48 +00:00
Laurent Vivier
4e1468ddff Add some error messages 2007-09-05 12:54:01 +00:00
Laurent Vivier
6f5ab12ba7 docbook2man doesn't write to the stdout 2007-09-04 22:29:26 +00:00
Laurent Vivier
6d5679817f Correct dhucpackage to be compatible with docbook2man 2007-09-04 22:27:21 +00:00
Laurent Vivier
088773a671 Multiboot: add second entry 2007-09-03 22:01:45 +00:00
Laurent Vivier
537b85855e don't remove tmp files in test mode 2007-09-03 19:55:52 +00:00
Laurent Vivier
b966757f98 Increase command timeout to 30 seconds 2007-09-03 19:44:42 +00:00
Laurent Vivier
d446f79fea improve --test 2007-09-03 19:39:01 +00:00
Laurent Vivier
256925db92 no need to flatten the kernel 2007-09-03 19:23:51 +00:00
Laurent Vivier
a7283acb85 Add include <sys/types>, patch by Finn Thain 2007-09-03 17:51:12 +00:00
Laurent Vivier
650440b6b2 Docs updates from Finn Thain 2007-09-03 17:45:38 +00:00
Laurent Vivier
82470e3801 Use docbook2man instead of docbook-to-man 2007-09-03 17:40:27 +00:00
Laurent Vivier
0fe8427c57 powerpc cross compiler is not needed for the moment 2007-09-03 17:29:24 +00:00
Laurent Vivier
2bbea3543d Allow bigger (> 1024) configuration 2007-09-02 21:00:05 +00:00
Laurent Vivier
c4871345d9 Display parameters only if set 2007-09-02 20:32:20 +00:00
Laurent Vivier
6f3cbe15a7 preliminary version to manage multiboot, untested \!\! 2007-09-02 20:31:24 +00:00
Laurent Vivier
869161fd15 add set_config() function 2007-09-02 12:57:37 +00:00
Laurent Vivier
aeddb9f7e4 add get_info() function 2007-09-02 12:46:37 +00:00
Laurent Vivier
6e434b9527 change vmlinux.gz by vmlinuz 2007-09-02 08:46:01 +00:00
Laurent Vivier
d08a37ab65 Add FLOPPY_CONF variable 2007-09-02 08:13:29 +00:00
Laurent Vivier
4b0ec53cb4 introduce multiboot.bin, need a second level with all drivers 2007-09-01 22:24:05 +00:00
Laurent Vivier
09c1a2deaa use m68k-linux-full instead of m68k-linux-all for second level 2007-09-01 22:22:27 +00:00
Laurent Vivier
e2bf762517 Introduce MEDIA=full, use libstream/scsi instead libstream/hard 2007-09-01 22:21:45 +00:00
Laurent Vivier
f6df478829 reduce size, on disk floppy configuration is 1kB 2007-09-01 22:01:01 +00:00
Laurent Vivier
bae6b7b888 Add some verbosity 2007-09-01 21:56:26 +00:00
Laurent Vivier
f5963dc437 read_description() should return 0 on the last item and not EOF 2007-09-01 21:55:49 +00:00
Laurent Vivier
6b07f02989 rename hard->scsi, add full with SCSI & floppy support 2007-09-01 21:49:54 +00:00
Laurent Vivier
59b17aba2c first release 2007-09-01 14:56:04 +00:00
Laurent Vivier
b913b47144 display vga property 2007-08-31 23:26:04 +00:00
Laurent Vivier
4847639ee2 correct management of return value of config_get_property 2007-08-31 23:25:41 +00:00
Laurent Vivier
4b4778b1c0 Add some text to explain which keys to press 2007-08-31 23:11:04 +00:00
Laurent Vivier
18f005c3a0 don't check if a file is gzipped (cannot manage correctly ramdisk), add "vga default" parameter 2007-08-31 22:34:39 +00:00
Laurent Vivier
d9885d3bf2 second level is able to manage multiple kernels list 2007-08-31 21:56:45 +00:00
Laurent Vivier
de3844b97d improve list scan 2007-08-31 21:09:06 +00:00
Laurent Vivier
979196f410 read correctly second level config 2007-08-31 20:55:06 +00:00
Laurent Vivier
d9d6867a57 functions return index if possible 2007-08-31 20:42:27 +00:00
Laurent Vivier
523f28afcf correctly find the first item in the index 2007-08-31 20:41:36 +00:00
Laurent Vivier
b02c57eea7 inc to add \n 2007-08-26 20:18:47 +00:00
Laurent Vivier
f5d73a387d Add config_add_property() 2007-08-26 20:11:23 +00:00
Laurent Vivier
027eced2d7 add property at end 2007-08-26 20:10:17 +00:00
Laurent Vivier
3e35773799 Manage only one kernel and ramdisk 2007-08-26 20:06:56 +00:00
Laurent Vivier
dddc763535 Add config_ad_property() 2007-08-26 19:48:12 +00:00
Laurent Vivier
20f15dbaa8 correct when entry doesn't exist but the index does 2007-08-26 19:47:45 +00:00
Laurent Vivier
ba6f52623b add config file 2007-08-26 19:46:39 +00:00
Laurent Vivier
b726b2b901 Make it working ... 2007-08-26 19:22:43 +00:00
Laurent Vivier
0319bb29f2 check case when index_name is NULL 2007-08-26 19:22:12 +00:00
Laurent Vivier
37d9728374 check if property is NULLi, name must be not NULL 2007-08-26 19:17:29 +00:00
Laurent Vivier
54fff16a0d use memmove() 2007-08-26 19:16:40 +00:00
Laurent Vivier
76401bbcba check if file is gzipped 2007-08-26 19:15:08 +00:00
Laurent Vivier
14c9373da5 change int to ssize_t for size 2007-08-26 18:50:48 +00:00
Laurent Vivier
6b1602d426 can set NULL to name and property to have nly the index 2007-08-26 09:18:36 +00:00
Laurent Vivier
f5989469e2 use find function 2007-08-26 09:17:42 +00:00
Laurent Vivier
f19444a5f1 add find functions 2007-08-26 09:16:23 +00:00
Laurent Vivier
d8941fa5c0 move functions to libconfig 2007-08-25 21:35:09 +00:00
Laurent Vivier
d7ef366023 use libconfig 2007-08-25 21:33:57 +00:00
Laurent Vivier
cfb0c28b54 Add libconfig 2007-08-25 21:32:48 +00:00
Laurent Vivier
efaf856a44 First release 2007-08-25 21:31:10 +00:00
Laurent Vivier
23de41a929 Skip first level if it exists 2007-08-24 09:27:29 +00:00
Laurent Vivier
b9431c6cf7 emile_config_get() return -1 if tag is not found 2007-08-24 09:20:55 +00:00
Laurent Vivier
51c3298ddd Add emile_floppy_create(), emile_floppy_add(), emile_floppy_close() 2007-08-24 08:42:02 +00:00
Laurent Vivier
b01815f349 emile_config_read_next() return -1 on end of file 2007-08-23 19:54:27 +00:00
Laurent Vivier
b38e307214 Add timeout to scrolllist 2007-08-22 18:59:03 +00:00
Laurent Vivier
8436dcdd4a Really add misc.h in HEADERS 2007-08-22 16:23:15 +00:00
Laurent Vivier
17ee95e6a8 back to version 1.110 (re-add apple_driver) 2007-08-22 16:17:47 +00:00
Laurent Vivier
5741e8a3ed Add misc.h in HEADERS 2007-08-22 16:15:23 +00:00
Laurent Vivier
fa8556a8bb don't build apple_driver 2007-08-22 15:41:34 +00:00
Laurent Vivier
1c1413507b Add libui.h in HEADERS 2007-08-22 14:47:39 +00:00
Laurent Vivier
b14103168d choice and i are needed outside USE_CLI 2007-08-21 22:12:27 +00:00
Laurent Vivier
9f0952aa47 remove message "no RAMDISK" 2007-08-21 22:08:37 +00:00
Laurent Vivier
f960038213 Use a scroll list to display list of available kernels 2007-08-21 22:07:05 +00:00
Laurent Vivier
2a8734aedc Add nice progess bar 2007-08-18 13:34:17 +00:00
Laurent Vivier
975a5090e5 allows to return ESC on unknown escaped sequence 2007-08-18 13:33:19 +00:00
Laurent Vivier
1fe38714a4 allow to have no timeout (by specifying 0) 2007-08-18 13:32:30 +00:00
Laurent Vivier
7279dcd375 Removem message "booting the kernel" 2007-08-18 13:31:22 +00:00
Laurent Vivier
c00938b25e replace getchar() by console_getchar() 2007-08-15 19:56:41 +00:00
Laurent Vivier
8d02f4dac4 Add scroll list 2007-08-15 10:53:11 +00:00
Laurent Vivier
70be974956 use libui to display a real progress bar 2007-08-12 20:46:00 +00:00
Laurent Vivier
2ac007f7c2 Add console_select_charset() 2007-08-12 20:43:28 +00:00
Laurent Vivier
60fa3d8d98 correct typo 2007-08-12 20:42:59 +00:00
Laurent Vivier
5bc97c0c34 Add libui 2007-08-12 20:41:36 +00:00
Laurent Vivier
ef694e0109 Add User Interface library 2007-08-12 20:40:55 +00:00
Laurent Vivier
03adde4f89 Add console_set_cursor_position() console_get_cursor_position() console_get_size() 2007-08-12 18:05:02 +00:00
Laurent Vivier
61799a90e3 swap parameters of console_set_cursor_position() 2007-06-06 13:21:52 +00:00
Laurent Vivier
245acc3c4c Manage VT100 get_cursor_position command 2007-06-06 12:34:52 +00:00
Laurent Vivier
981121e8fa correct CSI H: swap X and Y 2007-06-01 21:19:15 +00:00
Laurent Vivier
bc2f989dd6 add console_set_cursor_position() 2007-06-01 20:48:44 +00:00
Laurent Vivier
afa4db753e Manage VT100 character sets 2007-06-01 20:37:20 +00:00
Laurent Vivier
e97734ac1a cleanup vt100 part 2007-05-31 17:36:59 +00:00
Laurent Vivier
1d5adc3204 update header/copyright 2007-05-30 22:05:54 +00:00
Laurent Vivier
93d4e46279 use VT100 escape characters to control display 2007-05-30 22:05:10 +00:00
Laurent Vivier
d9edce894b move VT100 escape commands to console.c 2007-05-30 22:01:40 +00:00
Laurent Vivier
f0df08ad7e Control display using vt100 escape characters, define inverse/normal video mode 2007-05-30 21:59:00 +00:00
Laurent Vivier
8d44531bf9 allow to manage several kernels 2007-05-24 17:27:35 +00:00
Laurent Vivier
d13cb5bd7a move copyright and available memory to config.c 2007-05-24 17:23:25 +00:00
Laurent Vivier
f59ce4e653 Add missing include misc.h to define error() 2007-05-22 20:04:08 +00:00
Laurent Vivier
962e367b64 emile_second_set_param(): a NULL parameter doesn't remove the parameter, an empty string remove it 2007-05-22 20:03:26 +00:00
Laurent Vivier
5737c21d79 a NULL parameter doesn't remove the parameter, an empty string remove it 2007-05-22 20:02:28 +00:00
Laurent Vivier
a8f1b3e0b3 Don't crash if kernel is not specified 2007-05-22 18:32:48 +00:00
Laurent Vivier
f983467b0c Signature EMILE_06_SIGNATURE is in fact the good one 2007-05-22 05:39:59 +00:00
Laurent Vivier
b27c53bb00 Set header signature to EMILE_07_SIGNATURE 2007-05-21 20:31:36 +00:00
Laurent Vivier
01b51b602b read_config_vga(), read_config_modem(), read_config_printer() read also the config file 2007-05-16 20:54:50 +00:00
Laurent Vivier
f35017ae04 Manage configuration stored in a file 2007-05-16 20:43:41 +00:00
Laurent Vivier
7e334dcc2f change signature to EM07 to support config file 2007-05-12 19:33:25 +00:00
Laurent Vivier
3de771d453 move config variable from static to stack of main() 2007-05-12 19:31:52 +00:00
Laurent Vivier
d03d07ed11 add support for gestalid, vga, modem and printer 2007-05-12 19:28:08 +00:00
Laurent Vivier
641bba58ff first revision 2007-05-11 12:52:59 +00:00
Laurent Vivier
1d732318d1 read kernel, initrd, parameters and emile information from emile.conf using functions from emile_config.c 2007-05-11 12:21:58 +00:00
Laurent Vivier
f1e93f3a84 Add emile_config.c and emile_config.h 2007-05-11 12:20:14 +00:00
Laurent Vivier
bff6076aa9 remove uneeded variable, correct return value from get_tag() 2007-05-11 12:18:27 +00:00
Laurent Vivier
09e4ba8e43 on restoring backup, rename file to .old 2007-05-09 19:26:48 +00:00
Laurent Vivier
e0cbb39f65 Add missing } 2007-05-09 19:25:55 +00:00
Laurent Vivier
592f3e2068 add kernel_map and initrd_map 2007-05-09 19:08:23 +00:00
Laurent Vivier
45e29cda8a emile_config_get() can manage many types, given by tag id 2007-05-06 23:12:29 +00:00
Laurent Vivier
10026118a2 hide map files 2007-05-06 23:03:55 +00:00
Laurent Vivier
a2cfb4a4a7 First revision 2007-05-05 22:05:43 +00:00
Laurent Vivier
49480d82b3 correct ramdisk management, rename it to initrd 2007-05-04 20:45:21 +00:00
Laurent Vivier
deea90cf36 if property is not set, remove it 2007-05-04 18:13:20 +00:00
Laurent Vivier
a4b0ece6cd move to version 0.12CVS 2007-05-04 10:34:37 +00:00
Laurent Vivier
a1d8405965 correct flag ACTION_RAMDISK 2007-05-04 09:22:15 +00:00
Laurent Vivier
e8bdbd5e5f enable option "-r" 2007-05-04 09:19:57 +00:00
Laurent Vivier
d356dd3a53 Add GetCurrentMode() 2007-05-04 09:14:49 +00:00
Laurent Vivier
b1eeb789a0 add missing file from second/ 2007-03-31 07:28:17 +00:00
Laurent Vivier
272ac39b96 remove display_properties.S and define LMGetMainDevice(), detect display in vga_init() 2007-03-31 07:26:05 +00:00
Laurent Vivier
454089d8df update 2007-03-28 19:31:56 +00:00
Laurent Vivier
66fe6b688c Release 0.11 2007-03-28 19:29:48 +00:00
Laurent Vivier
3884c5b0ac Release 0.11 2007-03-28 18:59:22 +00:00
Laurent Vivier
fe11d5d9a2 Release 0.11 2007-03-28 18:53:17 +00:00
Laurent Vivier
4e3d7fc63c update 2007-03-28 11:23:21 +00:00
Laurent Vivier
919b7521db allow to create floppy cdboot-*.bin without providing kernel 2007-03-27 09:01:28 +00:00
Laurent Vivier
d3561472bf Add etch support for cd-rom 2007-03-26 18:33:14 +00:00
Laurent Vivier
4ed10e7af3 gcc-4.1 produces broken m68k codes, so on etch I use gcc-3.4 2007-03-26 12:11:38 +00:00
Laurent Vivier
deb2d4c4d3 vga.base and vga.video are not arrays 2007-03-25 00:34:44 +00:00
Laurent Vivier
249c10bd36 Add emile-mkisofs manpage 2007-03-23 15:25:46 +00:00
Laurent Vivier
b9d45a9e05 update 2007-03-23 15:22:37 +00:00
Laurent Vivier
38753484e4 force M68K_CROSS_COMPILE 2007-03-22 17:39:09 +00:00
Laurent Vivier
f9991b2944 What is the real name of gcc m68k cross-compiler package, I don't know... so I put dependencies on several names I know... needed since I move to emdebian toolchain 2007-03-22 17:26:44 +00:00
Laurent Vivier
64e1ab4983 a pointer to an array is the array itself 2007-03-22 17:02:00 +00:00
Laurent Vivier
a60529b2fd CDB is unsigned char and buffer is void* 2007-03-22 17:00:50 +00:00
Laurent Vivier
6f93ca663c emile_l2_header.configuration is int8_t, so functions arguments must use int8_t when dealing with configuration 2007-03-22 16:45:59 +00:00
Laurent Vivier
41e204ab1d a C string is signed char 2007-03-22 16:42:06 +00:00
Laurent Vivier
1cab2b046b second argument of Gestalt() is signed long, cast unsigned parameter 2007-03-22 16:27:34 +00:00
Laurent Vivier
21bec7bfa7 font_get is unsigned 2007-03-22 16:22:45 +00:00
Laurent Vivier
ddddfeffbb set variable kernel by casting with (char*) instead of (unsigned char*) 2007-03-22 16:21:54 +00:00
Laurent Vivier
99efa437be modify to work on etch, identify architecture host and build with dpkg-architecture 2007-03-22 15:59:06 +00:00
Laurent Vivier
cdc94e3962 change .chip to .cpu to use binutils 2.17 2007-03-22 15:36:39 +00:00
Laurent Vivier
a2d4a3624f Add support of cross toolchain from http://www.emdebian.org/ 2007-03-22 15:33:33 +00:00
Laurent Vivier
09423e7e90 to remove warning on signedness with gcc 4, cast some parameters 2007-02-24 14:02:40 +00:00
Laurent Vivier
7be7cf61df Add -Werror 2007-02-24 14:02:11 +00:00
Laurent Vivier
8f419ba4b1 to remove warning on signedness with gcc 4, cast some parameters 2007-02-24 13:35:32 +00:00
Laurent Vivier
eb3cf75e0c Add -Werror 2007-02-24 13:34:44 +00:00
Laurent Vivier
f0493defba remove debian revision 2007-02-24 12:47:09 +00:00
Laurent Vivier
e6610164e0 correct cast of 1st arg of isonum_733 2007-02-24 11:42:45 +00:00
Laurent Vivier
edd5bc94fb Correct GPR[7] init 2007-02-19 15:57:57 +00:00
Laurent Vivier
93926639bc Remove section .bootstrap from swith_to_PPC.o to be able to put the new one 2007-02-19 15:57:25 +00:00
Laurent Vivier
f48db9e15f Add bootstrap section in swith_to_PPC.o instead of main.o 2007-02-17 22:39:07 +00:00
Laurent Vivier
e2777d45e2 use swith_to_PPC and a bootstrap to boot kernel PPC 2007-02-17 22:38:18 +00:00
Laurent Vivier
26118c7f51 update copyright to 2007 2007-02-17 22:29:23 +00:00
Laurent Vivier
17796502ab Add some code to use bootstrap 2007-02-17 22:27:08 +00:00
Laurent Vivier
1ddf371672 Add ld.script in DISTFILES 2007-02-05 12:41:40 +00:00
Laurent Vivier
5dcd8bb683 Add HEADERS vga.h console.h 2007-02-05 12:14:28 +00:00
Laurent Vivier
29e78549bc remove bootstrapPPC.h 2007-02-05 11:52:06 +00:00
Laurent Vivier
ecd6e4a478 Define PPC registers for PPC bootstrap 2007-02-02 22:29:40 +00:00
Laurent Vivier
ada6f874ba correct bootstrap dependency 2007-02-02 22:27:58 +00:00
Laurent Vivier
46d18c90b4 Add bootstrap and switch to PPC 2007-02-02 22:21:38 +00:00
Laurent Vivier
09991740ef Add bootstrap section in main.o and copy it to second.o 2007-02-02 22:12:48 +00:00
Laurent Vivier
1c837e7b48 Add bootstrap section 2007-02-02 22:10:17 +00:00
Laurent Vivier
a9eabdd56d pass PPC_CC and PPC_OBJCOPY to second Makefile 2007-02-02 20:52:24 +00:00
Laurent Vivier
7ea5409a1c Substract min_addr instead of PAGE_SIZE, align kernel address on PAGE_SIZE 2007-02-02 20:13:11 +00:00
Laurent Vivier
5b64251564 add console.c vga.c font_8x16.c ld.script main.c vga.h console.h 2007-02-02 20:09:43 +00:00
Laurent Vivier
1d820285d1 add console.c vga.c font_8x16.c 2007-02-02 20:05:19 +00:00
Laurent Vivier
0b90ff25b3 Add relocation code 2007-02-02 20:03:40 +00:00
Laurent Vivier
68e219e402 remove unused file 2007-01-01 20:53:32 +00:00
Laurent Vivier
51aa5b458f correct typo 2007-01-01 18:51:03 +00:00
Laurent Vivier
fd27a28539 re-activate powerpc support 2006-12-30 17:30:52 +00:00
Laurent Vivier
2f0f9f997e Add support for e_machine EM_PPC 2006-12-30 17:19:58 +00:00
Laurent Vivier
c7c53e03bf remove bootstrap_size for ARCH_PPC 2006-12-29 22:14:13 +00:00
Laurent Vivier
da4ce9585c correct errors to re-activate ARCH_PPC 2006-12-29 22:13:22 +00:00
Laurent Vivier
53d1c73f96 include macos/types.h 2006-12-29 22:10:34 +00:00
Laurent Vivier
3867353dec Add apple_driver in all_bin 2006-12-29 21:41:52 +00:00
Laurent Vivier
246caebcd4 pass the M68K_CC to the aple driver 2006-12-29 20:32:29 +00:00
Laurent Vivier
e68b0482e8 clear command line buffer before filling it with the property 2006-12-29 20:29:19 +00:00
Laurent Vivier
58efcb5f44 remove unneeded packed attribute 2006-12-29 20:28:28 +00:00
Laurent Vivier
21ee355ca7 add #ifdef __mc68000__ for inlined asm functions 2006-12-29 20:27:15 +00:00
Laurent Vivier
c70264f609 remove unneeded ARCH_M68K for typedef 2006-12-29 20:26:08 +00:00
Laurent Vivier
479702a005 Add default pathes for first and second level, manage some error cases 2006-11-03 12:39:55 +00:00
Laurent Vivier
d163a2f291 Add apple_driver-clean 2006-11-01 19:50:58 +00:00
Laurent Vivier
ce0ab6332f Don't overwrite CFLAGS 2006-11-01 19:48:51 +00:00
Laurent Vivier
002e3026ae On TEST_UNIT, use REQUEST_SENSE to know the device state 2006-11-01 17:47:32 +00:00
Laurent Vivier
7ce6576ba8 TEST_UNIT_READY doesn't need buffer, add REQUEST_SENSE 2006-11-01 17:46:06 +00:00
Laurent Vivier
ed0b247d09 TEST_UNIT_READY doesn't need buffer 2006-11-01 17:44:33 +00:00
Laurent Vivier
5feb420909 Disable SCSIRead() if no buffer provided. Some commands, like TEST_UNIT, don't read data from device 2006-11-01 17:43:48 +00:00
Laurent Vivier
1153cd593a add REQUEST_SENSE 2006-11-01 17:42:23 +00:00
Laurent Vivier
5eb95f1419 Wait bus is not busy 2006-10-30 21:52:58 +00:00
Laurent Vivier
6df85e6083 Add SCSIStat() 2006-10-30 21:52:23 +00:00
Laurent Vivier
c44daf1cd4 correctly set second level information 2006-10-28 22:35:44 +00:00
Laurent Vivier
2f1d2b4667 remove unneeded putchar() 2006-10-28 22:22:46 +00:00
Laurent Vivier
a4abee7327 allow to read scsi info in first level 2006-10-28 22:21:39 +00:00
Laurent Vivier
cbcdd3224b remove unused definition of memdum() 2006-10-28 10:17:45 +00:00
Laurent Vivier
164f1b4abf Add unused function to list drivers if needed 2006-10-28 10:16:47 +00:00
Laurent Vivier
92449e6c43 Add error codes for SCSI 2006-10-27 17:16:55 +00:00
Laurent Vivier
0abca62f09 Add support for non-standard (i.e. non apple) CDROM drive that doesnot gives a capacity 2006-10-27 17:14:30 +00:00
Laurent Vivier
a072a95201 Add scsi_TEST_UNIT_READY.c and scsi_INQUIRY.c 2006-10-27 09:22:02 +00:00
Laurent Vivier
4e9d97b275 first revision 2006-10-27 09:21:28 +00:00
Laurent Vivier
f0129ad176 Ignore scPhaseErr on SCSIRead() 2006-10-27 09:19:53 +00:00
Laurent Vivier
2ebcc7dbb3 Add scsi_TEST_UNIT_READY() 2006-10-27 09:15:52 +00:00
Laurent Vivier
c257b6b678 update (c) date 2006-10-20 22:21:41 +00:00
Laurent Vivier
3eb8a4e2cc Call SetInterrupt() only for Display drivers, call DrvrRemove() (why not ?) 2006-10-20 22:14:26 +00:00
Laurent Vivier
4d96dcd5a7 Add DrvrRemove() 2006-10-20 22:12:35 +00:00
Laurent Vivier
39af084fed correct install 2006-10-20 18:54:49 +00:00
Laurent Vivier
fe964144eb Add apple_driver in target dist 2006-10-20 18:44:52 +00:00
Laurent Vivier
8619cbb68b Add apple_driver install and uninstall 2006-10-20 18:39:30 +00:00
Laurent Vivier
6e0322c6b6 Add apple_driver 2006-10-20 17:41:01 +00:00
Laurent Vivier
cbbb9e8601 Add emile-mkisofs 2006-10-20 17:39:45 +00:00
Laurent Vivier
73c91de7a6 emile_first_set_param_scsi_extents() takes block size in argument 2006-10-20 17:12:30 +00:00
Laurent Vivier
c6bce62661 use a default size (64KiB) for driver partition, in block0 counts blocks in blocksize blocks 2006-10-20 07:57:29 +00:00
Laurent Vivier
5fa77b2ff2 print size of device found in block0 using blocksise blocks instead of 512 bytes blocs, correct typo 2006-10-20 07:55:27 +00:00
Laurent Vivier
5bcc5daee6 Correct CPUFlags in CPUFlag (typo) 2006-10-20 07:48:42 +00:00
Laurent Vivier
6f7ace6f54 correct offset of secondary entry point 2006-10-19 18:58:22 +00:00
Laurent Vivier
854b0818e8 Add apple_driver 2006-10-19 17:34:52 +00:00
Laurent Vivier
e9c96014f4 apple_driver: initial revision 2006-10-19 17:34:18 +00:00
Laurent Vivier
e101bf5337 display driver type, correct driver signature 2006-10-18 21:57:41 +00:00
Laurent Vivier
da8b04e3b4 display driver signature 2006-10-18 18:38:47 +00:00
Laurent Vivier
87b904a4e8 Allow to read driver signature 2006-10-18 18:37:26 +00:00
Laurent Vivier
60ce7c18eb Allow to not provide kernel or ramdisk 2006-10-18 18:13:35 +00:00
Laurent Vivier
035322406a 17/10/2006 update 2006-10-17 09:05:21 +00:00
Laurent Vivier
656abb6c79 allow to read driver if block is given using 'blocksize' bytes unit instead of 512 bytes unit; extract only bootsize bytes from the driver partition 2006-10-16 20:03:22 +00:00
Laurent Vivier
151189f71f Create a more generic data structure for mkisofs, allows to write my own apple driver 2006-10-16 20:01:40 +00:00
Laurent Vivier
54521d6fe9 Allow to find driver if base is not in block_size but using 512 bytes block 2006-10-15 22:08:42 +00:00
Laurent Vivier
bb5ad6ce4d Add emile_is_apple_driver to test if a partition is an apple_driver 2006-10-15 21:51:27 +00:00
Laurent Vivier
b8d426d278 use 16bit algorithm by default, 32bit is for ATA driver 2006-10-15 16:49:31 +00:00
Laurent Vivier
5af2219caf correct disk number on IDE1 2006-10-15 16:48:35 +00:00
Laurent Vivier
4ec9db0ed0 if m68k-linux-gcc is not found, don't generate bootblocks 2006-10-09 21:28:59 +00:00
Laurent Vivier
016408427f better support of crosscompilation 2006-10-09 11:13:05 +00:00
Laurent Vivier
6a18507e4c manage cross-compilation 2006-10-09 09:20:51 +00:00
Laurent Vivier
f672166f4e Modified to allow to create boot package when we cross compile 2006-10-08 17:55:06 +00:00
Laurent Vivier
6a8a0ea92c Add debian in target dist 2006-10-08 17:07:05 +00:00
Laurent Vivier
14c7cedfa2 introducing version 0.11CVS 2006-10-08 17:06:25 +00:00
Laurent Vivier
8f9d60c51b on my system m68k cross-compiler is gcc-3.4-m68k-linux 2006-10-08 17:05:49 +00:00
Laurent Vivier
8fb36fd5f1 Add Makefile for target dist 2006-10-08 17:04:57 +00:00
Laurent Vivier
c2fa547aea correct source file for emile-mkisofs 2006-10-08 17:04:07 +00:00
Laurent Vivier
a60049eb27 Files for debian packaging, by Wouter Verhelst and Stephen R.Marenka 2006-10-08 16:30:17 +00:00
Laurent Vivier
6b42385349 correct operator priority between + and >> for IDE1 2006-10-06 12:37:16 +00:00
Laurent Vivier
c470022639 remove definition of second driver in block0, compute some values for map of driver in 2048 block size 2006-09-24 22:59:08 +00:00
Laurent Vivier
6abf87cc0b Read driver in memory before writing it 2006-09-24 22:46:26 +00:00
Laurent Vivier
51c32ac892 Get the partition size and write all the content of the driver partition to the file 2006-09-24 22:24:02 +00:00
Laurent Vivier
c3e57818e4 Fixe temporarily size of Apple_Driver partition 2006-09-23 22:28:12 +00:00
Laurent Vivier
13c80d5e27 Set some default value found on install CD of MacOS 7.6 2006-09-23 22:13:26 +00:00
Laurent Vivier
c54484befc Display patch info 2006-09-23 22:09:08 +00:00
Laurent Vivier
417c927114 Add info about patch driver 2006-09-21 21:56:43 +00:00
Laurent Vivier
7a0405a53f add iso9660:(sd3) before kernel and ramdisk path 2006-09-20 23:29:44 +00:00
Laurent Vivier
723a50c993 modify emile_second_set_param() to not check if bootblock is present, checking is moving before call 2006-09-20 23:28:53 +00:00
Laurent Vivier
2438e1a8c0 Display where second level is 2006-09-20 23:08:48 +00:00
Laurent Vivier
20bf00341d emile-mkisofs.c 2006-09-20 22:42:48 +00:00
Laurent Vivier
87a4092549 Correct lseek before writing 2006-09-20 22:41:42 +00:00
Laurent Vivier
53f4028182 use emile_first_set_param_scsi_extents 2006-09-20 21:52:16 +00:00
Laurent Vivier
0e2fed5a0f Display driver type using hex, not dec 2006-09-20 21:51:00 +00:00
Laurent Vivier
b772a2238a Allows to analyze information inside file, not at beginning 2006-09-20 21:49:51 +00:00
Laurent Vivier
8a3f83c256 access bootblock from main device, not from partition 2006-09-20 21:48:44 +00:00
Laurent Vivier
628d40d957 add emile_first_set_param_scsi_extents 2006-09-20 21:47:43 +00:00
Laurent Vivier
a28a9d0cc0 Adding some constants for driver type and driver signature 2006-09-20 21:45:17 +00:00
Laurent Vivier
f7868fb753 Don't define u_int8_t, u_int16_t, etc if sys/types.h has already been included (avoid warning with gcc 3.3) 2006-09-20 14:34:51 +00:00
Laurent Vivier
1bb375da59 Change my email address to Laurent@lvivier.info 2006-09-15 14:55:39 +00:00
Laurent Vivier
8113b3e654 allow to provide disk and partition on command line (like "/dev/cdrom 1" instead of "/dev/hdc1" 2006-09-13 21:33:49 +00:00
Laurent Vivier
a57f6a8617 Allow to identify disk on 2nd ide bus (generally cdrom (hdc) on PC) 2006-09-13 21:32:45 +00:00
Laurent Vivier
9d5ff84740 Check map can be opened 2006-09-13 20:39:55 +00:00
Laurent Vivier
b0838c149a base is given using block size of 2048 (ISO9660), but SCSI uses block size of 512, so base is multiplicated by 4 2006-09-12 00:59:59 +00:00
Laurent Vivier
916b8de203 allow to set manually blocks to load for second 2006-09-12 00:58:31 +00:00
Laurent Vivier
5596502a8d option '-i' allows to dump start base and size of given file 2006-09-09 21:25:35 +00:00
Laurent Vivier
a7b18f9ade Display error message if not ISO960 or no Joliet format 2006-09-09 21:24:25 +00:00
Laurent Vivier
9aa7430439 allow to read image file instead of /dev/cdrom 2006-09-08 22:57:36 +00:00
Laurent Vivier
a472cae367 Add -g for native library 2006-09-08 22:56:25 +00:00
Laurent Vivier
91b49f5e6b Allow to define the path of the second level 2006-09-08 21:17:13 +00:00
Laurent Vivier
f5bbe70865 Change emile-set-cmd-line interface 2006-06-05 22:35:17 +00:00
Laurent Vivier
4fc3d7c0d4 is_url() becomes emile_is_url(), check if ramdisk is url too 2006-06-05 22:34:50 +00:00
Laurent Vivier
e43e6e49fe Add missing lseek() 2006-06-05 22:30:03 +00:00
Laurent Vivier
bcbeb89ac4 Remove unneeded check on parameters 2006-06-05 22:29:17 +00:00
Laurent Vivier
d449f26966 allow to kernel path, ramdisk path 2006-06-02 11:45:10 +00:00
Laurent Vivier
8406b30f6d Add emile_secont_set_param(), emile_get_dev_name(), and preliminary ramdisk management 2006-06-01 23:36:57 +00:00
Laurent Vivier
5d238a87d0 use emile_second_set_param() and emile_second_get_param() 2006-06-01 23:23:42 +00:00
Laurent Vivier
aa95b99d93 clear property field if property name is not found 2006-06-01 23:09:17 +00:00
Laurent Vivier
d5fe5032e9 Add emile_second_get_param() 2006-06-01 23:08:37 +00:00
Laurent Vivier
415d83c9fb add emile_second_set_param 2006-06-01 23:01:08 +00:00
Laurent Vivier
b07e009f79 create file 2006-06-01 23:00:32 +00:00
Laurent Vivier
cf1f03dd19 change emile_scsi_get_dev() API 2006-06-01 22:19:52 +00:00
Laurent Vivier
0804f9981e change API of get_dev and get_rdev: return driver major number instead of device pathname, add emile_get_dev_name() and emile_is_url() 2006-06-01 22:18:38 +00:00
Laurent Vivier
be323732d0 change API of get_dev and get_rdev: return driver major number instead of device pathname 2006-06-01 22:17:33 +00:00
Laurent Vivier
56d2a72250 export is_url() (renamed emile_is_url()) 2006-06-01 22:16:03 +00:00
Laurent Vivier
a3f46bd6c8 modified to be able to read info from an image like from a block device 2006-05-30 21:21:31 +00:00
Laurent Vivier
7e67a5fe43 correctly call emile_map_partition_set_flags() 2006-05-30 16:21:40 +00:00
Laurent Vivier
b593442a31 Do note limite device name to 16 characters 2006-05-30 16:20:58 +00:00
Laurent Vivier
e23b98e394 Allow to examine a given device 2006-05-29 22:17:46 +00:00
Laurent Vivier
dc17cc55f7 More checking on function return 2006-05-29 20:23:18 +00:00
Laurent Vivier
7cf0906477 Manage big endian/little endian 2006-05-29 20:18:19 +00:00
Laurent Vivier
de2860a35c Manage big endian/little endian 2006-05-29 19:56:13 +00:00
Laurent Vivier
b2e366a3c5 Manage big endian/little endian 2006-05-29 19:50:37 +00:00
Laurent Vivier
0b6dcf91f1 Allow to scan ATA bus, ignoring non allocated device (to jump from hda to hdc even if there is no hdb) 2006-05-29 19:10:48 +00:00
Laurent Vivier
83a63cd81f disable 68000 flags 2006-01-24 12:25:27 +00:00
Laurent Vivier
851e1e0777 check result of graphic init 2005-12-12 22:31:05 +00:00
Laurent Vivier
e910ef344e correct floppy case 2005-12-12 22:14:52 +00:00
Laurent Vivier
0d7d894646 Add libfloppy for second_scsi 2005-12-12 07:59:36 +00:00
Laurent Vivier
a90a4c3e23 correct --set-hfs 2005-12-12 07:59:06 +00:00
Laurent Vivier
88c144ac11 Correct flags to make a partition bootable according to MacOS tools 2005-12-12 07:58:34 +00:00
Laurent Vivier
ad0f9c2b6b use get_next_property() and get_property() from libemile 2005-12-08 06:34:58 +00:00
Laurent Vivier
7a9f9c00e7 add strdup() 2005-12-08 06:33:17 +00:00
Laurent Vivier
d8bc6db8f5 Version 0.11CVS 2005-12-07 15:06:40 +00:00
Laurent Vivier
dc872d8725 remove unused parameter --buffer 2005-12-06 23:21:59 +00:00
Laurent Vivier
ea80a54496 real RELEASE 0.10 2005-12-05 20:11:15 +00:00
Laurent Vivier
6f6b140704 remove unneeded DISTFILES 2005-12-05 20:08:28 +00:00
Laurent Vivier
9137bb1863 make algorith simplier 2005-12-05 19:59:43 +00:00
Laurent Vivier
f112a09c5d clear mallocated memory 2005-12-05 19:58:04 +00:00
Laurent Vivier
f143ea45a2 add 0%, check return of seek() 2005-12-05 19:57:27 +00:00
Laurent Vivier
9c140330c5 remove banner and some traces 2005-12-05 19:56:37 +00:00
Laurent Vivier
5194edb54d Remove traces (MMU type) 2005-12-05 19:53:39 +00:00
Laurent Vivier
65e7d52cd2 Can change output on second_scsi too 2005-12-05 19:52:48 +00:00
Laurent Vivier
0024ca3de5 RELEASE 0.10 2005-12-02 19:52:59 +00:00
Laurent Vivier
11df103535 RELEASE 0.10 2005-12-02 19:08:06 +00:00
Laurent Vivier
7e6ec8e67b Add a progress bar 2005-12-02 19:05:36 +00:00
Laurent Vivier
3be455d92b check return value of stream_read() 2005-12-02 01:19:51 +00:00
Laurent Vivier
8cf341f58a remove traces 2005-12-02 01:18:06 +00:00
Laurent Vivier
07d6ceb8ba mapfile size is the size of the filesystem blocksize 2005-12-02 01:17:30 +00:00
Laurent Vivier
bdb97aca27 initialize the field device 2005-12-02 00:49:11 +00:00
Laurent Vivier
4762fef3f5 device is a pointer 2005-12-02 00:48:11 +00:00
Laurent Vivier
4ab2d93ced write mapfile even if it already exists 2005-12-02 00:37:36 +00:00
Laurent Vivier
3f843ab7cd Add vga parameter by default in configuration 2005-12-02 00:14:48 +00:00
Laurent Vivier
9eca99d9ad Correctly set unit id 2005-12-01 23:53:49 +00:00
Laurent Vivier
7dae74d734 remove unused buffer_size 2005-12-01 22:57:33 +00:00
Laurent Vivier
fceb358601 change interface of emile_scsi_create_container() 2005-12-01 22:19:39 +00:00
Laurent Vivier
700ece4d7f Correct use of libcontainer 2005-12-01 22:17:09 +00:00
Laurent Vivier
30f53ccdbb Add libcontainer 2005-12-01 22:16:34 +00:00
Laurent Vivier
364c09f440 change interface of emile_second_create_mapfile() 2005-12-01 22:16:06 +00:00
Laurent Vivier
ee35f84292 first revision 2005-12-01 22:14:27 +00:00
Laurent Vivier
155c1089b1 Add fstat, remove cross-compiling (other than m68k) 2005-12-01 22:13:24 +00:00
Laurent Vivier
c864f078d7 Add open, read, close, lseek, fstat 2005-12-01 22:12:53 +00:00
Laurent Vivier
fed542e8ad first revision 2005-12-01 14:05:52 +00:00
Laurent Vivier
6808d944de Remove DISTFILES, set in Rules.mk 2005-12-01 13:52:53 +00:00
Laurent Vivier
116c7694fb some cleanups for dist 2005-12-01 13:52:01 +00:00
Laurent Vivier
caf064dc24 Add device.c gzio.c in SOURCES, device.h in HEADERS, silent dist 2005-12-01 13:51:36 +00:00
Laurent Vivier
ff1fec5667 Add --no-print-directory, silent dist, and add several subdirs in dist 2005-12-01 13:49:25 +00:00
Laurent Vivier
83aedab363 Silent dist 2005-12-01 13:48:47 +00:00
Laurent Vivier
1a8c9d41bb create last.bin for cdboot-*.bin 2005-12-01 06:16:51 +00:00
Laurent Vivier
30010cfd14 clean cdboot-*.bin 2005-11-30 16:18:57 +00:00
Laurent Vivier
b2e07a4ca6 Create floppy reading files on CDROM 2005-11-30 15:34:34 +00:00
Laurent Vivier
a7d71a26c9 Manage file-by-name (url) and not -by-content 2005-11-30 15:33:14 +00:00
Laurent Vivier
2c614bb92d update copyright 2005-11-30 15:31:09 +00:00
Laurent Vivier
d92b9626bf Add CROSS_COMPILE 2005-11-30 00:54:04 +00:00
Laurent Vivier
975bc3f86b Correct clean MANPAGES 2005-11-30 00:41:59 +00:00
Laurent Vivier
4ad3c2d03f all_bin should generate second/m68k-linux-scsi/second 2005-11-30 00:33:19 +00:00
Laurent Vivier
95445f9e41 put SGML in SOURCES 2005-11-30 00:27:37 +00:00
Laurent Vivier
bf4ca6f909 remove trace 2005-11-30 00:20:21 +00:00
Laurent Vivier
5008e1e67b correctly extract name of module from pwd, correct problem with make dist 2005-11-30 00:15:14 +00:00
Laurent Vivier
333aeb50a2 really set the scsi unit id for SCSISelect() 2005-11-30 00:04:50 +00:00
Laurent Vivier
a793ab5d75 move to UM06 2005-11-30 00:04:02 +00:00
Laurent Vivier
7c3f166a1f Add docs in all 2005-11-29 23:49:05 +00:00
Laurent Vivier
70bf3c832e remove block_size and max_blocks, add size 2005-11-29 23:46:36 +00:00
Laurent Vivier
eed7ca3f57 Add support for /dev/hd 2005-11-29 23:46:07 +00:00
Laurent Vivier
cc3e4d9cd7 correct typo for --map 2005-11-29 23:44:48 +00:00
Laurent Vivier
68c6b83ec3 move to EM06 2005-11-29 23:30:50 +00:00
Laurent Vivier
81ad477370 add emile_second_create_mapfile.c 2005-11-29 23:29:53 +00:00
Laurent Vivier
a13572a4e8 remove max_blocks form container, add it in parameters, add real file size in container 2005-11-29 23:29:17 +00:00
Laurent Vivier
942fdc2188 Add emile_second_create_mapfile(), remove emile_second_set_kernel_scsi() 2005-11-29 23:28:23 +00:00
Laurent Vivier
a27d6f2718 Remove typo (macos/header) 2005-11-29 00:21:13 +00:00
Laurent Vivier
c743dcf449 add docs in .PHONY 2005-11-29 00:20:39 +00:00
Laurent Vivier
afb28049a1 remove lowmem.h and memory.h, moved to libmacos 2005-11-29 00:18:58 +00:00
Laurent Vivier
e09e3164ae temporarily disable scsi creation, obsoleted by EM06 2005-11-29 00:15:30 +00:00
Laurent Vivier
906d4f2568 moved from libemile 2005-11-29 00:14:06 +00:00
Laurent Vivier
896ac19f91 Obsoleted by EM06 2005-11-28 23:57:42 +00:00
Laurent Vivier
d0411ded91 read_line() : do not cross the the end of the configuration (0-mark), remove traces about kernel and initrd 2005-11-28 23:56:47 +00:00
Laurent Vivier
8d2c64e23f Use EM06 header 2005-11-28 23:39:28 +00:00
Laurent Vivier
e44fa532f2 add read_config_vga() 2005-11-28 23:21:00 +00:00
Laurent Vivier
c0a9e8b158 Manage stopbits for serial, put parameters on a line alone, not inside kernel property 2005-11-28 23:20:25 +00:00
Laurent Vivier
2fa2fff513 correct management of end of line at end of configuration 2005-11-28 23:18:10 +00:00
Laurent Vivier
2fba2c0ea9 Add copyright 2005-11-28 21:35:28 +00:00
Laurent Vivier
f577bc1cfb Add emile_second_remove_property() 2005-11-28 21:35:02 +00:00
Laurent Vivier
cec570dde5 Add vga parameter 2005-11-28 21:19:31 +00:00
Laurent Vivier
ca5cef15fd Manage new header (EM06) 2005-11-28 20:56:06 +00:00
Laurent Vivier
ed8593760b Add new functions for EM06 2005-11-28 20:55:20 +00:00
Laurent Vivier
a10615bd87 Check header signature 2005-11-28 20:54:29 +00:00
Laurent Vivier
f9dcbc903f remove functions obsoleted by EM06, add new functions for EM06 2005-11-28 20:53:57 +00:00
Laurent Vivier
4b80bcd7ff CVS test 2005-11-28 12:00:35 +00:00
Laurent Vivier
d1a3157e15 remove function obsoleted by EM06 2005-11-28 11:51:03 +00:00
Laurent Vivier
e556a2446c remove function obsoleted by EM06 2005-11-28 11:45:25 +00:00
Laurent Vivier
fdd862ea80 remove function obsoleted by EM06 2005-11-28 00:20:44 +00:00
Laurent Vivier
448618ccc0 modified for EM06 2005-11-28 00:19:54 +00:00
Laurent Vivier
af41df355b obsoleted by EM06 2005-11-28 00:16:42 +00:00
Laurent Vivier
c344eec4c8 Correct case where there is no parameter for the kernel 2005-11-28 00:15:36 +00:00
Laurent Vivier
a94615b448 manage if kernel/ramdisk are missing 2005-11-27 23:50:36 +00:00
Laurent Vivier
a216e4a7c5 EM06 header 2005-11-27 23:45:18 +00:00
Laurent Vivier
63c0921975 remove -m68000 2005-11-27 22:37:01 +00:00
Laurent Vivier
9589271a29 EM06 header type: all is stored as text 2005-11-27 22:31:07 +00:00
Laurent Vivier
b08a5c17e6 more gcc compliant ucs_level init 2005-11-26 18:30:31 +00:00
Laurent Vivier
d626de9474 define strtol with __strol_internal 2005-11-26 18:29:55 +00:00
Laurent Vivier
29fca40450 Add -m68000 2005-11-26 18:28:05 +00:00
Laurent Vivier
bdce469744 Don't print ramdisk if NULL 2005-11-26 09:24:43 +00:00
Laurent Vivier
53ef8d07f5 Change librarie rules 2005-11-26 09:21:56 +00:00
Laurent Vivier
9c77dd35a2 remove explicit passing of make variable 2005-11-26 09:21:26 +00:00
Laurent Vivier
cd1a4a225a Read configuration 2005-11-26 09:02:21 +00:00
Laurent Vivier
10099df5fe Add config.c, remove ata, add LIBS_MEDIA 2005-11-26 09:01:36 +00:00
Laurent Vivier
b7204c461d correct print format 2005-11-26 09:00:23 +00:00
Laurent Vivier
13d2ca4db7 use new interface to read config and to load kernel and ramdisk 2005-11-26 08:59:58 +00:00
Laurent Vivier
bb1664be29 move container to libcontainer 2005-11-26 08:59:14 +00:00
Laurent Vivier
53b025cd20 create libstream in hard/ and floppy/ 2005-11-26 08:53:39 +00:00
Laurent Vivier
85d5e7f6dd Add *_SUPPORT #ifdef 2005-11-26 08:53:02 +00:00
Laurent Vivier
4f1548f32c umount only if umount exists 2005-11-26 08:51:55 +00:00
Laurent Vivier
687cf36497 use make -C instead of cd && make 2005-11-26 08:47:17 +00:00
Laurent Vivier
9ea0efa446 add libcontainer and libstream include path 2005-11-26 08:45:07 +00:00
Laurent Vivier
d6bf048eaa Correct read_sector call (provide device->data instead of device) 2005-11-26 08:44:04 +00:00
Laurent Vivier
e8d58acfbf Correct size part decoding in filename 2005-11-26 08:43:04 +00:00
Laurent Vivier
6e81f25305 add -I../libcontainer for libstream 2005-11-26 08:41:34 +00:00
Laurent Vivier
1aa1aed83a Add gzopen() prototype 2005-11-26 08:40:53 +00:00
Laurent Vivier
d3ae348d71 Add gzopen() prototype and correct some printf format 2005-11-26 08:40:31 +00:00
Laurent Vivier
114c080273 Add 32mode.i, change flags management 2005-11-25 19:54:40 +00:00
Laurent Vivier
ebcb14eaa7 Move 32bit switch to 32bitmode.i 2005-11-25 19:53:47 +00:00
Laurent Vivier
f51aab30c9 use ELF kernel, add some libs... 2005-11-23 22:46:35 +00:00
Laurent Vivier
93e7f68c4d correct libs ordering, add libblock 2005-11-23 22:44:12 +00:00
Laurent Vivier
696e2b9161 correct load_ramdisk() 2005-11-23 22:43:32 +00:00
Laurent Vivier
871934a0f6 add strtol 2005-11-23 22:41:47 +00:00
Laurent Vivier
d76f74e1eb first revision 2005-11-23 22:39:03 +00:00
Laurent Vivier
2b7965a1d9 Add get_size() of devices 2005-11-23 22:37:27 +00:00
Laurent Vivier
e0e7197acb add floppy_get_blocksize() 2005-11-23 22:36:15 +00:00
Laurent Vivier
ec64b11647 add scsi_get_blocksize() 2005-11-23 22:35:19 +00:00
Laurent Vivier
38e161e94c Add load_ramdisk(), remove load_image() and load_gzip() 2005-11-23 00:12:10 +00:00
Laurent Vivier
91aca2037d Add load_ramdisk() 2005-11-23 00:11:33 +00:00
Laurent Vivier
69cbebe1f7 Add iso9660_fstat() 2005-11-23 00:10:15 +00:00
Laurent Vivier
a55aa395c7 Add stream_fstat() 2005-11-23 00:09:00 +00:00
Laurent Vivier
341672825a Add libisio9660, libstream, libgzip, libfloppy, libscsi... 2005-11-22 23:20:51 +00:00
Laurent Vivier
6ab4fcd8bc add load_kernel() 2005-11-22 23:18:06 +00:00
Laurent Vivier
6e979109ed Use libstream and decode ELF format 2005-11-22 23:17:31 +00:00
Laurent Vivier
d36bd9d0e9 moved to libstream 2005-11-22 23:16:51 +00:00
Laurent Vivier
d2ba0f38ad Add gzio.c and stream_uncompress.c 2005-11-22 23:14:55 +00:00
Laurent Vivier
37604400ff Uncompress a stream on-the-fly 2005-11-22 23:14:27 +00:00
Laurent Vivier
cd28c1fb09 moved from second/gzio.c 2005-11-22 23:14:01 +00:00
Laurent Vivier
a368ddb175 add stream_read(), stream_lseek() and stream_uncompress 2005-11-22 23:13:02 +00:00
Laurent Vivier
8d736d79fe Check function is defined before using it 2005-11-22 23:12:16 +00:00
Laurent Vivier
e046538add Add some error strings 2005-11-22 23:11:42 +00:00
Laurent Vivier
3d8cfe6db6 Read the capacity of the disk and the sector size 2005-11-22 00:53:48 +00:00
Laurent Vivier
0db7640ed5 First revision 2005-11-21 23:55:56 +00:00
Laurent Vivier
748de834c7 prevent multiple includes 2005-11-21 23:53:14 +00:00
Laurent Vivier
ab0912262c add volume information in fs 2005-11-21 23:52:44 +00:00
Laurent Vivier
ee6d28c91f Add libstream 2005-11-21 22:09:43 +00:00
Laurent Vivier
bce8a698c5 Add libstream-like interface 2005-11-21 22:09:16 +00:00
Laurent Vivier
8a104ca7ca Add iso9660_VOLUME 2005-11-21 22:07:17 +00:00
Laurent Vivier
48c114c2f2 first revision 2005-11-21 22:05:14 +00:00
Laurent Vivier
d5fd341704 Add include macos/types.h 2005-11-21 21:58:54 +00:00
Laurent Vivier
79268ba7a5 Add copyright 2005-11-21 21:57:27 +00:00
Laurent Vivier
73b3180e0e Add scsi_device_t 2005-11-21 21:56:13 +00:00
Laurent Vivier
64e1e16e13 Add scsi_close() and scsi_open() 2005-11-21 21:55:36 +00:00
Laurent Vivier
0326a56eaf Add floppy_close() and floppy_open() 2005-11-21 21:50:49 +00:00
Laurent Vivier
8a787307e9 move upperlevel function to libblock, add floppy_device_t 2005-11-21 21:26:37 +00:00
Laurent Vivier
23e3126aa6 Split first.S to macos.i, floppy.u, scsi.i: add -I$(TOP) 2005-11-21 21:18:48 +00:00
Laurent Vivier
ac1205b240 Split first.S to macos.i, floppy.u, scsi.i 2005-11-21 21:17:58 +00:00
Laurent Vivier
823a432af9 Add copyright 2005-11-18 00:06:31 +00:00
Laurent Vivier
01737ea3ce moved to libscsi 2005-11-17 13:33:14 +00:00
Laurent Vivier
672a59c142 add read_vmlinuz.c 2005-11-17 13:23:34 +00:00
Laurent Vivier
29e60b8681 uncompress and read ELF 2005-11-17 13:23:07 +00:00
Laurent Vivier
cc45382557 moved to libscsi 2005-11-17 06:54:13 +00:00
Laurent Vivier
7206af2a75 SCSI interface 2005-11-17 06:44:44 +00:00
Laurent Vivier
1d46991bab device.c header 2005-11-16 14:03:30 +00:00
Laurent Vivier
f6cdf4d2c9 Move some generic parts to Rules.mk 2005-11-16 14:00:27 +00:00
Laurent Vivier
1bf043e22d Move some generic Makefile parts 2005-11-16 13:57:01 +00:00
Laurent Vivier
718f4054c5 add libgzip and libfloppy 2005-11-16 01:29:57 +00:00
Laurent Vivier
e84481140d Move floppy management to libfloppy 2005-11-16 01:29:10 +00:00
Laurent Vivier
5ae61f058f disable gzopen() prototype 2005-11-16 00:49:14 +00:00
Laurent Vivier
43c7d65e4f move to zlib-1.2.3 2005-11-16 00:48:20 +00:00
Laurent Vivier
2d3fab4f22 correct offset management 2005-11-15 10:24:17 +00:00
Laurent Vivier
b4ea46f60e change fseek to lseek 2005-11-15 09:35:24 +00:00
Laurent Vivier
0af4e5c690 change fseek to lseek 2005-11-15 09:34:37 +00:00
Laurent Vivier
1b2b96804c Import from zlib-1.2.3 2005-11-14 23:24:08 +00:00
Laurent Vivier
476dee5088 Import from zlib-1.2.3 2005-11-14 23:15:54 +00:00
Laurent Vivier
3e469d90e0 introduce best fseek() and offset management 2005-11-14 19:30:39 +00:00
Laurent Vivier
383b010988 add fseek() 2005-11-14 19:29:07 +00:00
Laurent Vivier
1d9d4b7255 improve file access (direct i/o) 2005-11-14 07:35:45 +00:00
Laurent Vivier
aed2d777a0 change device interface 2005-11-13 19:43:28 +00:00
Laurent Vivier
fc3659730a Add #include 2005-11-12 22:35:44 +00:00
Laurent Vivier
be7b1acafb Add libiso9660 I/O interface 2005-11-12 22:33:12 +00:00
Laurent Vivier
ee59e51919 Add libiso9660 2005-11-12 22:31:15 +00:00
Laurent Vivier
e421b248fc Add iso9660 tools 2005-11-12 22:28:50 +00:00
Laurent Vivier
f8dc89b20b Add target 2005-11-12 22:22:22 +00:00
Laurent Vivier
6b88b53d85 Add copyright 2005-11-12 21:30:19 +00:00
Laurent Vivier
4505b72ea2 Add strcmp() and strncmp() 2005-11-12 19:13:52 +00:00
Laurent Vivier
7d9746cf92 Read directory and files from CDROM 2005-11-12 19:12:13 +00:00
Laurent Vivier
0cad8c46bb Add libmacos and libunix. move install, uninstall and dist targets to subdirs 2005-11-08 02:19:46 +00:00
Laurent Vivier
eb1264bbcc Add target dist 2005-11-08 02:18:06 +00:00
Laurent Vivier
652d8bee27 Add targets install, uninstall and dist 2005-11-08 02:17:41 +00:00
Laurent Vivier
f706ea68ad add targets install, uninstall and dist, use libmacos 2005-11-08 02:16:50 +00:00
Laurent Vivier
0dbebc5e04 Add targets dist, install and uninstall. use libs libmacos and libunix 2005-11-08 02:15:06 +00:00
Laurent Vivier
9c370d7600 Move MacOS functions to libmacos, disable inline of putchar() enabled by -O2 2005-11-08 02:13:30 +00:00
Laurent Vivier
46132c2af2 Move MacOS functions to libmacos 2005-11-08 02:06:40 +00:00
Laurent Vivier
584610a01a add targets install, uninstall and dist 2005-11-08 02:05:45 +00:00
Laurent Vivier
b0323e54df Move UNIX/POSIX/C functions to libunix 2005-11-08 02:04:54 +00:00
Laurent Vivier
9773bd7e68 Move MacOS functions to libmacos 2005-11-08 02:02:16 +00:00
Laurent Vivier
02e687a878 some change in paramBlock 2005-11-04 10:20:39 +00:00
Laurent Vivier
bf1bdb6f92 Add VolumeParam and some 'unneeded' volume functions... 2005-11-04 10:18:41 +00:00
Laurent Vivier
8a7c567e1d Add enter_kernel functions and headers 2005-10-20 22:04:31 +00:00
Laurent Vivier
088d52afef Add enter_kernel.o 2005-10-20 22:02:39 +00:00
Laurent Vivier
3276cd118c functions to enter kernel with/without MMU 2005-10-20 22:02:25 +00:00
Laurent Vivier
f962537ede define check_full_in_bank(a,b) (1) when no MMU 2005-10-20 22:01:29 +00:00
Laurent Vivier
4aa27aeab3 move some functions to enter_kernel.c 2005-10-20 22:00:44 +00:00
Laurent Vivier
46c2cae538 declare enter_kernel, end_kernel 2005-10-20 21:13:53 +00:00
Laurent Vivier
5b5f6118dd Declare MMU*_disable_cache 2005-10-20 21:12:59 +00:00
Laurent Vivier
7e7ae6ca7b add USE_MMU, USE_MMU030, USE_MMU040 2005-10-20 21:12:13 +00:00
Laurent Vivier
e864052a45 Add nop in cache disable 2005-10-20 12:32:48 +00:00
Laurent Vivier
02a73abc66 Disable Slot resources functions 2005-10-10 21:56:14 +00:00
Laurent Vivier
74135a8cda call turn_off_interrupts() 2005-10-10 21:51:02 +00:00
Laurent Vivier
91eb3f460c Add SGetTypeSRsrc() 2005-10-10 21:50:25 +00:00
Laurent Vivier
29d30cd033 Add turn_off_interrupts 2005-10-10 21:42:58 +00:00
Laurent Vivier
4d5dc66d99 correctly read console_mask 2005-10-09 13:03:20 +00:00
Laurent Vivier
9704f9621c cleaning 2005-10-06 22:13:50 +00:00
Laurent Vivier
6b03bcd7be Add SGetCString() and SRsrcInfo() 2005-10-06 22:07:28 +00:00
Laurent Vivier
87c23547c0 Add function to list drivers 2005-10-06 21:06:20 +00:00
Laurent Vivier
950d8d3f99 move OpenDriver(), CloseDriver(), read(), write(), SerGetBuf() from serial.c to driver.c 2005-10-06 21:03:19 +00:00
Laurent Vivier
faac96d4a9 Add LMGetUnitTableEntryCount() and LMGetUTableBase() 2005-09-22 23:05:30 +00:00
Laurent Vivier
606df3c2a6 Add p2cstring() 2005-09-22 23:04:43 +00:00
Laurent Vivier
58875373bb Add read_long()/write_long() for little/big-endian and 32-64bit 2005-09-22 20:17:30 +00:00
Laurent Vivier
8bcae44b04 set netBSD flags 2005-09-21 23:23:18 +00:00
Laurent Vivier
ae3c4cf81a use second default targets instead of explicit targets 2005-09-19 23:08:16 +00:00
Laurent Vivier
e6e52556ff Add support for NetBSD (env) 2005-09-19 22:15:34 +00:00
Laurent Vivier
145ed7479e More NetBSD support 2005-09-19 22:10:41 +00:00
Laurent Vivier
dbfff6ba88 Define COMMAND_LINE_LENGTH 2005-09-19 22:08:08 +00:00
Laurent Vivier
69d73de025 Set some env variables 2005-09-19 22:07:21 +00:00
Laurent Vivier
be8b8ee163 move gmt_bias from bootinfo.c to arch.c 2005-09-19 22:01:53 +00:00
Laurent Vivier
1e3f09576a Force primary target 2005-09-19 19:20:33 +00:00
Laurent Vivier
f696ece068 Add support for multiple kernel type: add netBSD 2005-09-19 19:08:55 +00:00
Laurent Vivier
acf4794515 Add netBSD boot parameters support 2005-09-19 19:05:02 +00:00
Laurent Vivier
7df4fa9949 Add an entry point in enter_kernel for netBSD support 2005-09-19 19:03:39 +00:00
Laurent Vivier
8efc25ca70 smarter --gestaltid 2005-09-10 00:06:08 +00:00
Laurent Vivier
b5c3418abf Allow to set/unset gestaltid alone 2005-09-09 23:50:30 +00:00
Laurent Vivier
707177a891 set version to 0.10CVS 2005-09-09 23:44:20 +00:00
Laurent Vivier
e09d93360d RELEASE 0.9 2005-09-07 00:49:22 +00:00
Laurent Vivier
f77dcd8300 Correct KERNEL PANIC on IIci: move bootinfo() and set_kernel_bootinfo() after disable_cache() 2005-09-07 00:29:22 +00:00
Laurent Vivier
2665d70906 Update with cvs2cl 2005-09-05 21:16:09 +00:00
Laurent Vivier
1bd317067f RAMDISK memory MUST be allocated at top of memory 2005-09-05 21:11:12 +00:00
Laurent Vivier
4757dff52c Add malloc_top() that try to allocate memory at top of memory 2005-09-05 21:10:31 +00:00
Laurent Vivier
1c814a938b Correctly manage VT100 control characters on serial port (ignore NULL characters) 2005-09-05 19:36:12 +00:00
Laurent Vivier
c4598cd99c remove debug=ser from CONSOLE, add dependencie on vmlinuz for floppy_ramdisk.bin 2005-09-02 23:54:37 +00:00
Laurent Vivier
dc4745097f Manage righ arrow, left arrow and delete keys 2005-09-02 23:53:02 +00:00
Laurent Vivier
00ebe00960 Manage correctly escape strings, GOT table is not able to manage strings pointer in an array, use a switch()/case instead 2005-09-02 23:52:15 +00:00
Laurent Vivier
38e3d2758f Add PBSyncStatus() and its serial status commands 2005-08-31 23:35:08 +00:00
Laurent Vivier
2c6363842c buffer_get() return 0 instead of -1 if no available character 2005-08-31 23:33:57 +00:00
Laurent Vivier
4e4ab9a082 Add SerGetBuf() to know if there is available character in serial line buffer, correct serial_keypressed according serial_getchar which is returning 0 if no available character 2005-08-31 23:32:43 +00:00
Laurent Vivier
b1f8a617ce Update 2005-08-30 15:53:39 +00:00
Laurent Vivier
c2981e4607 Add serial_cursor_restore() and serial_cursor_save() 2005-08-30 08:04:26 +00:00
Laurent Vivier
3d6e6953b1 Add serial_cursor_save(and serial_cursor_restore(), and open serial ports for input, read character from serial ports, detect keypressed 2005-08-30 08:03:50 +00:00
Laurent Vivier
1146dd762d Correct rescue.bin: use compressed kernel image 2005-08-29 12:23:45 +00:00
Laurent Vivier
4222e48572 Use console_cursor_on(), console_cursor_off(), console_cursor_save(), console_cursor_restore() 2005-08-28 21:42:18 +00:00
Laurent Vivier
95e99c5c24 Add console_cursor_on(), console_cursor_off(), console_cursor_save(), console_cursor_restore() 2005-08-28 21:41:31 +00:00
Laurent Vivier
83f79b299b Add vga_cursor_save(), vga_cursor_save() and correct backspace 2005-08-28 21:39:54 +00:00
Laurent Vivier
5e7b54d562 Add path for keyboard.[ch] and cli.[ch] 2005-08-27 22:06:41 +00:00
Laurent Vivier
a1d0dcba79 Correct typo in usage 2005-08-27 21:54:24 +00:00
Laurent Vivier
217d119c4f disable CONSOLE 2005-08-27 21:53:35 +00:00
Laurent Vivier
12aefec328 Add cli.o 2005-08-27 21:26:06 +00:00
Laurent Vivier
279250d2c7 Call cli_edit() to edit parameters 2005-08-27 21:25:33 +00:00
Laurent Vivier
b7797df22f Add cli.h cli.c 2005-08-27 21:25:06 +00:00
Laurent Vivier
a6eb91ec1c Command Line Interpreter 2005-08-27 21:24:26 +00:00
Laurent Vivier
c80730558f Add management of \b 2005-08-27 18:52:51 +00:00
Laurent Vivier
b04eff1baa Add strcpy() 2005-08-27 18:52:24 +00:00
Laurent Vivier
424482eb34 Manage keyboard 2005-08-27 15:48:13 +00:00
Laurent Vivier
488ccb3a9b remove wait and timeout from keyboard_keypressed() 2005-08-27 15:46:47 +00:00
Laurent Vivier
3298458062 rename serial_get(), add serial_keypressed() skeleton 2005-08-27 15:27:03 +00:00
Laurent Vivier
2de889f588 Manage ctrl, remove option 2005-08-26 11:30:35 +00:00
Laurent Vivier
4e055cf799 Call vga_cursor_refresh() 2005-08-26 09:26:19 +00:00
Laurent Vivier
1a6444a800 Add vga_cursor_refresh(), vga_cursor_on(), vga_cursor_off(): management of cursor on the display 2005-08-26 09:25:47 +00:00
Laurent Vivier
a83e92a120 get KeyTime before reading keycode 2005-08-26 07:36:05 +00:00
Laurent Vivier
6b75470fec Add serial_get() skeleton 2005-08-25 21:46:47 +00:00
Laurent Vivier
9c2f76491c Add escape strings and buffer management 2005-08-25 21:45:11 +00:00
Laurent Vivier
5a18009707 Temporarily switch to 68020 2005-08-25 11:12:02 +00:00
Laurent Vivier
5b3c16037f Add scancode conversion procedure 2005-08-25 11:11:28 +00:00
Laurent Vivier
ef945d42ab Add scancodes definition 2005-08-25 08:53:11 +00:00
Laurent Vivier
fba26da4c5 Add KeyLast, KeyTime, KeyRepTime and Ticks 2005-08-25 08:18:00 +00:00
Laurent Vivier
cdbd259853 Really set correctly modifiers bits 2005-08-22 20:48:47 +00:00
Laurent Vivier
243b177780 Set correctly modifiers bits 2005-08-22 20:26:01 +00:00
Laurent Vivier
8382d6405d Add keyboard.h keyboard.c and misc 2005-08-22 20:19:51 +00:00
Laurent Vivier
1e3e41a706 Add keyboard management 2005-08-22 20:18:21 +00:00
Laurent Vivier
5797b03ea2 Manage keyboard 2005-08-22 20:17:34 +00:00
Laurent Vivier
5963764d98 Add GetKeys() 2005-08-21 21:22:15 +00:00
Laurent Vivier
221fbfb12a 68000: Set memory bank from KERNEL_LOADADDR to ScrnBase - 0x8000 2005-06-30 08:55:28 +00:00
Laurent Vivier
a9c5d929c8 Add low memory offset (0x3000) 2005-06-30 01:05:46 +00:00
Laurent Vivier
399f4f4fbc correct typo 2005-06-27 22:22:37 +00:00
Laurent Vivier
59d292fc40 Add scc write base in bootinfo for Mac Classic 2005-06-27 20:25:35 +00:00
Laurent Vivier
8c72026d0d EMILE documentation: man pages written by Stephen R. Marenka 2005-06-16 05:41:02 +00:00
Laurent Vivier
3e762bcf34 EMILE documentation: man pages written by Stephen R. Marenka 2005-06-16 05:27:49 +00:00
Laurent Vivier
ff81b04c7f 68000: put vga_get_videobase() instead of vga_get_video() in boot_info.bi_mac.videoaddr 2005-06-15 08:07:07 +00:00
Laurent Vivier
6e899e57ca 68000: really set physImage to kernel address 2005-06-14 20:15:46 +00:00
Laurent Vivier
4ddcf438d9 Add 68000-based macintosh support: load kernel at address 0x4000 2005-06-14 19:39:43 +00:00
Laurent Vivier
6b501d489e set .chip 68000 2005-06-14 19:32:09 +00:00
Laurent Vivier
6302c6745a remove ori.w #0x0700, %sr, already deone in main() 2005-06-13 20:18:51 +00:00
Laurent Vivier
0122b4f342 Align tags on 4-byte frontier 2005-06-13 20:03:22 +00:00
Laurent Vivier
7f07eaca6b move Gestalt('ram '...) from bootinfo.c to arch.c 2005-06-13 18:49:38 +00:00
Laurent Vivier
75dff171a3 Define some macros about floppy structure 2005-06-10 21:09:42 +00:00
Laurent Vivier
5cbe0f0e3d Generates 68000 compatible floppy 2005-06-10 21:08:52 +00:00
Laurent Vivier
ba2c5fc6e7 68000 compatibility: load _GLOBAL_OFFSET_TABLE_ 2005-06-10 20:53:14 +00:00
Laurent Vivier
c2746c0b56 preliminary support of uncompress on-the-fly 2005-06-09 22:13:21 +00:00
Laurent Vivier
406f252a78 change prototype of uncompress(): caller provide function to feed the inflate procedure 2005-06-09 22:11:07 +00:00
Laurent Vivier
da403aff9f move uncompressing kernel from main.c to load.c 2005-06-09 19:58:49 +00:00
Laurent Vivier
713ca6ad89 move to version 5 of header: kernel_size == kernel_image_size means uncompressed 2005-06-09 19:55:12 +00:00
Laurent Vivier
db7be2407b Update 2005-06-06 19:57:25 +00:00
Laurent Vivier
8da276934d Manage RESIDENT page entry 2005-06-06 19:38:07 +00:00
Laurent Vivier
dac89b097e Set STATIC to static 2005-06-06 19:36:13 +00:00
Laurent Vivier
13ced3364c GCC 3 requires BSS be cleared: it places variables initialized to 0 from DATA to BSS 2005-06-06 19:33:40 +00:00
Laurent Vivier
a7486773fc backport fix from gzip 1.3.5 2005-06-06 18:15:51 +00:00
Laurent Vivier
4e40550c9f save and restore registers at entry/exit of functions (detected with GCC 3) 2005-06-01 23:26:24 +00:00
Laurent Vivier
c874bd5250 save and restore %d2 in MMU040_read_phys (detected with GCC 3.4) 2005-06-01 22:48:38 +00:00
Laurent Vivier
0c63c2cb52 more gcc-3 compatibility: add putchar() 2005-05-26 22:43:10 +00:00
Laurent Vivier
4c98823894 new ChangeLog with cvs2cl 2005-05-26 22:41:48 +00:00
Laurent Vivier
5fb2f14d7c update VERSION with 0.9CVS 2005-05-26 17:53:15 +00:00
Laurent Vivier
ceebb8c1f5 Release 0.8 2005-05-25 22:11:55 +00:00
Laurent Vivier
545cbd81d0 Add 'ori.w #0x0700,%sr' 2005-05-25 22:05:35 +00:00
Laurent Vivier
445c9a7b3d Remove -Os, kernel doesn't boot on my LC475 2005-05-25 19:05:22 +00:00
Laurent Vivier
d8928f4462 remove 'ori.w #0x0700, %sr', must be made by the caller 2005-05-25 06:41:03 +00:00
Laurent Vivier
c19a88328c Really change putstring() to console_putstring() 2005-05-25 06:32:58 +00:00
Laurent Vivier
ec1075431d Remove previous modification in MMU040_logical2physicalAttr() 2005-05-25 06:32:19 +00:00
Laurent Vivier
a7a2a2eabc use console_putchar() and console_putstring() instead of putchar() and putstring() (create some problems...) 2005-05-25 06:26:00 +00:00
Laurent Vivier
8eede26e22 Disable serial console 2005-05-25 05:12:31 +00:00
Laurent Vivier
85e5b3f137 Correct isTTSegment() (zone size) and MMU040_logical2physicalAttr() (invalid statement) 2005-05-25 05:11:52 +00:00
Laurent Vivier
646105a81a produce 68020 as cc is bugged 2005-05-24 00:00:13 +00:00
Laurent Vivier
a3cafeb04e Produce pure 68000 binaries 2005-05-23 23:03:04 +00:00
Laurent Vivier
207da244ea Remove NULL 2005-05-23 22:27:03 +00:00
Laurent Vivier
a4db5808a7 Add support for Mac Classic 2005-05-23 22:23:34 +00:00
Laurent Vivier
991245f956 Add commnets for InitGraf() 2005-05-23 22:22:36 +00:00
Laurent Vivier
a359a656a5 Add InitGraf(), detect if LMGetMainDevic() is corrupter (0xAAAAAAAA ? detected on B&W display Mac Classic) 2005-05-23 20:14:40 +00:00
Laurent Vivier
0af901660c Add InitGraf() and detect if glue_display_properties() cannot get properties (B&W display ? seen on Mac Classic) 2005-05-23 20:13:13 +00:00
Laurent Vivier
3d954e3de4 Add some Quickdraw structures 2005-05-23 20:11:26 +00:00
Laurent Vivier
011304404a correct puts() usage, use putchar() and putstring() 2005-05-23 17:10:19 +00:00
Laurent Vivier
6a00dde82b replace console_put() by putchar() and console_print() by putstring() 2005-05-23 17:09:48 +00:00
Laurent Vivier
a74c487fba in error(), use puts() instead of printf() 2005-05-23 17:08:51 +00:00
Laurent Vivier
9b8aab8020 use putchar() instead of console_put() 2005-05-23 17:08:17 +00:00
Laurent Vivier
09f058298b concatenate string of EMILE and CPU type 2005-05-22 23:16:54 +00:00
Laurent Vivier
678d7288f3 Introduce gcc-3.3 and 68020 target instead of 68030 2005-05-22 23:15:56 +00:00
Laurent Vivier
8cfdb1db76 cast for entry, to support gcc 3.3 2005-05-22 21:16:57 +00:00
Laurent Vivier
ad1a7d95eb Add const to console_print() to conform to puts() 2005-05-22 21:15:23 +00:00
Laurent Vivier
f7999b496d Add <string.h> 2005-05-22 21:14:41 +00:00
Laurent Vivier
216cc6e0e3 Remove SUPPORT_68000 and add __mulsi3, __udivsi3, __divsi3, umodsi3 and modsi3 to glue.S, add puts() and putchar() to support standard include 2005-05-22 21:12:21 +00:00
Laurent Vivier
47e38c77c7 Remove SUPPORT_68000 and add __mulsi3, __udivsi3, __divsi3, umodsi3 and modsi3 to glue.S 2005-05-22 21:11:05 +00:00
Laurent Vivier
779e3bc3c3 Add Heap initialization, and 68000/68010 support 2005-05-20 00:24:13 +00:00
Laurent Vivier
774dc5a59f Add 68000 support 2005-05-19 09:02:45 +00:00
Laurent Vivier
d80422e14e change 68000_SUPPORT by SUPPORT_68000, correct vga_clear() 2005-05-19 05:58:27 +00:00
Laurent Vivier
2242de12cd change 68000_SUPPORT by SUPPORT_68000 2005-05-19 05:51:13 +00:00
Laurent Vivier
a9f3d5b2e5 Add 68000 support 2005-05-17 23:40:19 +00:00
Laurent Vivier
6cebabe53b Add 68000 support 2005-05-17 23:36:26 +00:00
Laurent Vivier
f6bbf7d936 Add 68000 support 2005-05-17 23:28:33 +00:00
Laurent Vivier
d6f85543c3 Add support of CPU without MMU 2005-05-16 21:38:33 +00:00
Laurent Vivier
7b843d879b Add enter_kernelnoMMU.S 2005-05-16 21:32:43 +00:00
Laurent Vivier
8373181181 Add enter_kernelnoMMU.S and mixed mixed mode image 2005-05-16 21:31:42 +00:00
Laurent Vivier
7029c477da First revision 2005-05-16 21:29:58 +00:00
Laurent Vivier
d7cc164486 Restore RBV macintosh compatibility 2005-05-14 01:12:46 +00:00
Laurent Vivier
506df41cdc move interrupt disabling from main 2005-05-13 22:36:48 +00:00
Laurent Vivier
470a2a6315 Add BAT mapping for nubus, move interrupts deisabling to enter_kernel 2005-05-13 22:35:58 +00:00
Laurent Vivier
a3d2b674e2 disable interrupts here 2005-05-13 22:02:12 +00:00
Laurent Vivier
97b1de3ca3 change unsigned long to u_int32_t 2005-05-13 22:01:41 +00:00
Laurent Vivier
d20d849e1f Add bootx_infos variable 2005-05-13 17:26:12 +00:00
Laurent Vivier
0caaed7a3e more PPC stuff, init PPC regs here 2005-05-13 17:25:13 +00:00
Laurent Vivier
878e238e66 remove kernel relocation, add PPC registers copy 2005-05-13 17:24:34 +00:00
Laurent Vivier
85f489de67 Add enter_kernelPPC.h 2005-05-13 17:23:42 +00:00
Laurent Vivier
fb9c4ca54c Add malloc.h for size_t in malloc() 2005-05-12 21:57:42 +00:00
Laurent Vivier
b2e798de9e init bootx_infos structure 2005-05-12 21:56:43 +00:00
Laurent Vivier
20247db875 use bus types from bootx.h 2005-05-12 21:07:11 +00:00
Laurent Vivier
ba3f6680b9 Add bootx_init() prototype 2005-05-12 21:06:04 +00:00
Laurent Vivier
969f6c2afa Add bootx info 2005-05-12 21:05:36 +00:00
Laurent Vivier
2ac76100fa add casts and #ifdef 2005-05-12 21:04:29 +00:00
Laurent Vivier
87798930f1 more error cases for wrong architecture 2005-05-12 06:00:38 +00:00
Laurent Vivier
bb0f544037 Add bootx.o in ppc objects 2005-05-12 05:53:14 +00:00
Laurent Vivier
ff3394e552 Add bootx files 2005-05-12 05:53:03 +00:00
Laurent Vivier
5efe9903c3 First revision 2005-05-12 05:51:56 +00:00
Laurent Vivier
b990716081 Test all MMU types, more processor type specific code 2005-05-12 05:48:27 +00:00
Laurent Vivier
1e2b50db64 Add processor switch to PPC 2005-05-12 05:47:26 +00:00
Laurent Vivier
7ae18b52cf remove PPC_disable_cache 2005-05-12 05:47:00 +00:00
Laurent Vivier
b497459f33 Move bootinfo.o to m68k objects 2005-05-12 05:46:34 +00:00
Laurent Vivier
a440a330bd BootX infos, borrowed from linux sources include/asm-ppc/bootx.h 2005-05-11 12:24:59 +00:00
Laurent Vivier
2d5e941737 Correct m68k_init_memory_bank in case where there is no MMU 2005-05-10 22:52:21 +00:00
Laurent Vivier
1fa3d63ffd Add second stage PPC files 2005-05-10 22:37:19 +00:00
Laurent Vivier
ae5f6b8ef2 add missing quote 2005-05-10 22:23:07 +00:00
Laurent Vivier
590cff7025 Add multi-architecture support 2005-05-10 22:05:25 +00:00
Laurent Vivier
cb84c69fe5 Add missing return at end of function 2005-05-10 22:05:06 +00:00
Laurent Vivier
8dcd2e3be9 preliminary PPC support 2005-05-10 22:03:52 +00:00
Laurent Vivier
3721ba9227 Add multi-architecture support 2005-05-10 21:49:28 +00:00
Laurent Vivier
1d1e1e5bd7 Add CROSS_COMPILE to cross-compile tools 2005-05-10 20:20:15 +00:00
Laurent Vivier
14db762f7e Remove last.bin on all_bin 2005-05-10 14:30:01 +00:00
Laurent Vivier
926236d81d set RAMDISK variable 2005-05-10 14:23:36 +00:00
Laurent Vivier
c0ae22c56f allow to build EMILE without vmlinux 2005-05-10 11:25:17 +00:00
Laurent Vivier
a59b49fa18 Preliminary support of multitarget architecture (m68k, ppc) 2005-05-10 10:51:04 +00:00
Laurent Vivier
ca784197e6 Correct ppc_init_memory_map() 2005-05-09 23:37:28 +00:00
Laurent Vivier
f0357f29e2 Add target netboot.bin, rescue.bin, debian-installer.bin and boot.bin 2005-05-09 22:47:39 +00:00
Laurent Vivier
88b858679e Add put_driver() 2005-05-09 22:18:21 +00:00
Laurent Vivier
fd4ae22786 Add emile_map_get_bootinfo emile_map_dev emile_checksum emile_map_set_driver_number emile_map_set_driver_info emile_map_set_bootinfo emile_block0_write 2005-02-04 01:00:33 +00:00
Laurent Vivier
90096cc4f4 add emile_map_set_bootinfo, emile_map_set_driver_info, emile_map_set_driver_number, emile_block0_write 2005-02-04 00:51:50 +00:00
Laurent Vivier
a056ab5960 Add DD_MAX_DRIVER, the maximum driver number in block0 2005-02-04 00:42:29 +00:00
Laurent Vivier
af1851a9d4 first revision 2005-02-04 00:41:37 +00:00
Laurent Vivier
277cc9ffde Add partition boot info 2005-02-03 16:04:41 +00:00
Laurent Vivier
43eee2c466 add emile_scanbus to emile-map-set 2005-02-02 16:46:08 +00:00
Laurent Vivier
46da9c1017 Add --get-driver 2005-02-02 14:47:49 +00:00
Laurent Vivier
348594349c add emile_checksum, emile_map_get_bootinfo, emile_map_dev 2005-02-02 14:33:24 +00:00
Laurent Vivier
9e7fb28715 Manage IDE device 2005-02-02 14:25:55 +00:00
Laurent Vivier
3255f348a4 First revision 2005-02-02 14:25:30 +00:00
Laurent Vivier
efcd323152 block_size is used in drivers section (block0) otherwise use 512-byte block 2005-02-01 23:21:06 +00:00
Laurent Vivier
afab5c5f43 Add --scanbus 2005-02-01 20:34:00 +00:00
Laurent Vivier
3441475b77 get block_size even if we aren't in verbose mode 2005-02-01 20:29:11 +00:00
Laurent Vivier
1ce4925be6 Correct drivers info when block size is not 512 (i.e. CDROM) 2005-02-01 19:48:33 +00:00
Laurent Vivier
1edfe9e730 disable floppy eject for my USB floppy device, add a parameter, CONSOLE, to enable or not serial console 2005-01-25 23:25:38 +00:00
Laurent Vivier
ccf2c2c77c update with PowerBook 150 bugs correction 2005-01-03 01:15:27 +00:00
Laurent Vivier
4ed3cc0c2e Remove duplicate shift of logical address for DT_VALID_4_BYTE in decode_4_PD() and decode_8_PD() 2005-01-03 01:07:49 +00:00
Laurent Vivier
13a816d53f correct port 1 (printer) initialisation 2004-12-30 23:42:40 +00:00
Laurent Vivier
d993fdfc02 correct 2 bit depth display 2004-12-30 23:06:44 +00:00
Laurent Vivier
6cfef7d2ca set version to 0.8CVS 2004-12-29 23:46:07 +00:00
Laurent Vivier
6c1367eed9 try to find a contiguous block until it finds or there is no more memory 2004-12-29 23:45:19 +00:00
Laurent Vivier
e2bbff5a94 don't allocate contiguous if not needed 2004-12-29 23:43:53 +00:00
380 changed files with 34708 additions and 5898 deletions

67
.gitignore vendored Normal file
View File

@ -0,0 +1,67 @@
cscope.out
first/first_floppy
first/first_floppy.o
first/first_scsi
first/first_scsi.o
floppy_ramdisk.bin
last.bin
libblock/libblock.a
libconfig/m68k-linux
libconfig/native
libcontainer/libcontainer.a
libemile/libemile.a
libext2/m68k-linux
libext2/native
libfloppy/libfloppy.a
libgzip/m68k-linux
libgzip/native
libiso9660/m68k-linux
libiso9660/native
libmacos/libmacos.a
libmap/m68k-linux
libmap/native
libscsi/libscsi.a
libstream/floppy
libstream/full
libstream/scsi
libui/libui.a
libunix/libunix.a
ramdisk.gz
rescue.bin
second/m68k-linux-floppy
tools.mk
tools/device.o
tools/emile
tools/emile-first-tune
tools/emile-install
tools/emile-install.o
tools/emile-map-set
tools/emile-map-set.o
tools/emile-mkisofs
tools/emile-mkisofs.o
tools/emile-set-cmdline
tools/emile-set-output
tools/emile.o
tools/emile_scanbus.o
tools/ext2_cat
tools/ext2_cat.o
tools/ext2_ls
tools/ext2_ls.o
tools/gzio.o
tools/iso9660_cat
tools/iso9660_cat.o
tools/iso9660_ls
tools/iso9660_ls.o
tools/minigzip
tools/read_vmlinuz
tools/read_vmlinuz.o
vmlinux
vmlinuz
*.bin
*.gz
*.swp
second/m68k-linux-scsi-driver/
second/m68k-netbsd-floppy/
second/ppc-linux-floppy/
second/ppc-linux-full/
second/ppc-linux-scsi/

View File

@ -1 +1 @@
Laurent Vivier <LaurentVivier@wanadoo.fr>
Laurent Vivier <Laurent@Vivier.EU>

39
COPYING
View File

@ -1,12 +1,12 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@ -303,10 +303,9 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

7757
ChangeLog

File diff suppressed because it is too large Load Diff

534
Makefile
View File

@ -1,222 +1,410 @@
#
# (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
# (c) 2004-2013 Laurent Vivier <Laurent@Vivier.EU>
#
#
PACKAGE = emile
VERSION = 0.7
MAKEFLAGS += --no-print-directory
PREFIX=/
include config.mk
include tools.mk
include kernel.mk
# kernel boot arguments
RAMDISK=$(shell ls ramdisk.gz 2> /dev/null)
ifeq ($(RAMDISK),ramdisk.gz)
#KERNEL_ARGS="root=/dev/ramdisk ramdisk_size=2048"
KERNEL_ARGS="root=/dev/ramdisk ramdisk_size=2048 console=ttyS0,9600n8 console=tty0"
SYSTEM:=$(shell uname -s)
MACHINE:=$(shell uname -m)
ifeq ($(SYSTEM), Linux)
NATIVE:=$(MACHINE)-linux
else
# NFS boot
#KERNEL_ARGS="root=/dev/nfs ip=dhcp nfsroot=192.168.100.1:/nfsroot rw"
# SCSI boot
KERNEL_ARGS="root=/dev/sda3"
#KERNEL_ARGS="prompt_ramdisk=1 load_ramdisk=1 ramdisk_start=0 root=/dev/fd0 ramdisk_size=4096"
NATIVE:=$(MACHINE)-$(SYSTEM)
endif
# build info
# Target
WHO = $(shell whoami)
WHERE = $(shell hostname)
WHEN = $(shell LANG=C date)
ARCH = $(shell uname -m -o)
.PHONY: first libemile libblock libiso9660 libiso9660-m68k libgzip-m68k tools \
libcontainer clean all_bin all install tools-install first-install \
docs-install uninstall tools-uninstall first-uninstall docs-uninstall \
clean libemile-clean libmacos-clean libunix-clean tools-clean \
first-clean second-clean docs-clean libiso9660-clean libgzip-clean \
libfloppy-clean libscsi-clean libstream-clean libblock-clean dist docs \
libconfig libconfig-m68k libmap \
libmap-m68k libext2 libext2-m68k
SIGNATURE = $(PACKAGE)-$(VERSION) $(WHO)@$(WHERE)($(ARCH)) $(WHEN)
all: tools.mk docs libemile libblock libiso9660 libiso9660-m68k libgzip-m68k \
tools first libstream libcontainer libmap libext2 libext2-m68k \
second/$(KARCH)-linux-floppy/second \
second/$(KARCH)-linux-scsi/second second/m68k-netbsd-floppy/second \
libconfig libconfig-m68k \
second/$(KARCH)-linux-all/second second/m68k-linux-scsi-driver/apple_driver
# tools to use
tools.mk:
@echo "Please run ./configure"
@false
ifneq ($(shell uname -m),m68k)
CROSS_COMPILE = m68k-linux-
ALL_BIN = cdboot-sarge.bin cdboot-woody.bin cdboot-etch.bin
cdboot-woody.bin: tools first second/$(KARCH)-linux-scsi/second
tools/emile-install -f first/first_floppy \
-s second/$(KARCH)-linux-scsi/second \
-k "iso9660:(sd3)/install/mac/linux.bin" \
-r "iso9660:(sd3)/install/mac/root.bin" \
cdboot-woody.bin.X
tools/emile-set-cmdline -a $(CDBOOT_ARGS) cdboot-woody.bin.X
mv cdboot-woody.bin.X cdboot-woody.bin
rm -f last.bin
ln -s cdboot-woody.bin last.bin
cdboot-sarge.bin: tools first second/$(KARCH)-linux-scsi/second
tools/emile-install -f first/first_floppy \
-s second/$(KARCH)-linux-scsi/second \
-k "iso9660:(sd3)/install/kernels/vmlinuz-2.2.25-mac" \
-r "iso9660:(sd3)/install/cdrom/initrd22.gz" \
cdboot-sarge.bin.X
tools/emile-set-cmdline -a $(CDBOOT_ARGS) cdboot-sarge.bin.X
mv cdboot-sarge.bin.X cdboot-sarge.bin
rm -f last.bin
ln -s cdboot-sarge.bin last.bin
cdboot-etch.bin: tools first second/$(KARCH)-linux-scsi/second
tools/emile-install -f first/first_floppy \
-s second/$(KARCH)-linux-scsi/second \
-k "iso9660:(sd3)/install/kernels/vmlinuz-2.6.18-4-mac"\
-r "iso9660:(sd3)/install/cdrom/initrd.gz" \
cdboot-etch.bin.X
tools/emile-set-cmdline -a $(CDBOOT_ARGS26) cdboot-etch.bin.X
mv cdboot-etch.bin.X cdboot-etch.bin
rm -f last.bin
ln -s cdboot-etch.bin last.bin
# We can build floppy image only if a kernel is provided
ifeq ($(LINUX),$(LINUXPATH))
ALL_BIN += netboot.bin rescue.bin debian-installer.bin boot.bin multiboot.bin second/$(KARCH)-linux-scsi/second second/$(KARCH)-linux-all/second
floppy.bin: tools first vmlinuz \
second/$(KARCH)-linux-floppy/second
tools/emile-install -f first/first_floppy \
-s second/$(KARCH)-linux-floppy/second \
-k vmlinuz floppy.bin.X
ifdef CONSOLE
tools/emile-set-output floppy.bin.X --printer --modem
endif
ifdef GESTALTID
tools/emile-set-output floppy.bin.X --gestaltid $(GESTALTID)
endif
mv floppy.bin.X floppy.bin
floppy_ramdisk.bin: tools first vmlinuz \
second/$(KARCH)-linux-floppy/second $(LINUXRAMDISK)
tools/emile-install -f first/first_floppy \
-s second/$(KARCH)-linux-floppy/second \
-k vmlinuz -r $(LINUXRAMDISK) floppy_ramdisk.bin.X
ifdef CONSOLE
tools/emile-set-output floppy_ramdisk.bin.X --printer --modem
endif
ifdef GESTALTID
tools/emile-set-output floppy_ramdisk.bin.X --gestaltid $(GESTALTID)
endif
mv floppy_ramdisk.bin.X floppy_ramdisk.bin
debian-installer.bin: floppy.bin
rm -f last.bin
cp floppy.bin debian-installer.bin.X
tools/emile-set-cmdline -a $(INSTALLER_ARGS) debian-installer.bin.X
mv debian-installer.bin.X debian-installer.bin
ln -s debian-installer.bin last.bin
netboot.bin: floppy.bin
rm -f last.bin
cp floppy.bin netboot.bin.X
tools/emile-set-cmdline -a $(NETBOOT_ARGS) netboot.bin.X
mv netboot.bin.X netboot.bin
ln -s netboot.bin last.bin
rescue.bin: floppy_ramdisk.bin
rm -f last.bin
cp floppy_ramdisk.bin rescue.bin.X
tools/emile-set-cmdline -a $(RESCUE_ARGS) rescue.bin.X
mv rescue.bin.X rescue.bin
ln -s rescue.bin last.bin
multiboot.bin: tools first vmlinuz second/$(KARCH)-linux-all/second
rm -f last.bin
tools/emile-install -c $(FLOPPY_CONF) multiboot.bin.X
mv multiboot.bin.X multiboot.bin
ln -s multiboot.bin last.bin
boot.bin: floppy.bin
rm -f last.bin
cp floppy.bin boot.bin.X
tools/emile-set-cmdline -a $(BOOT_ARGS) boot.bin.X
mv boot.bin.X boot.bin
ln -s boot.bin last.bin
vmlinuz: $(LINUX)
$(KSTRIP) -s $(LINUX) -o $(LINUX).stripped
gzip -9 $(LINUX).stripped
mv $(LINUX).stripped.gz vmlinuz
endif
AS=$(CROSS_COMPILE)as
CC=$(CROSS_COMPILE)gcc
LD=$(CROSS_COMPILE)ld
OBJCOPY=$(CROSS_COMPILE)objcopy
NETBSDPATH=netbsd
# identify architecture of kernel (Motorola 680x0 or PowerPC)
NETBSD=$(shell ls $(NETBSDPATH) 2> /dev/null)
KERNEL=vmlinux
FILE=file -bknL
all: libemile tools first/first_floppy second/second_floppy
floppy.img: libemile tools first/first_floppy vmlinuz second/second_floppy \
$(RAMDISK)
ifeq ($(RAMDISK),ramdisk.gz)
tools/emile-install -f first/first_floppy -s second/second_floppy \
-k vmlinuz -r $(RAMDISK) floppy.img.X
else
tools/emile-install -f first/first_floppy -s second/second_floppy \
-k vmlinuz floppy.img.X
ifeq ($(NETBSD),$(NETBSDPATH))
netbsd-floppy.bin: tools first netbsd.gz \
second/m68k-netbsd-floppy/second
tools/emile-install -f first/first_floppy \
-s second/$(KARCH)-netbsd-floppy/second \
-k netbsd.gz netbsd-floppy.bin.X
ifdef CONSOLE
tools/emile-set-output netbsd-floppy.bin.X --printer --modem
endif
tools/emile-set-cmdline floppy.img.X $(KERNEL_ARGS)
mv floppy.img.X floppy.img
mv netbsd-floppy.bin.X netbsd-floppy.bin
vmlinux.bin: $(KERNEL)
$(OBJCOPY) -I elf32-big -O binary -R .note -R .comment -S $(KERNEL) vmlinux.bin
netbsd-boot.bin: netbsd-floppy.bin
rm -f last.bin
cp netbsd-floppy.bin netbsd-boot.bin.X
tools/emile-set-cmdline -a $(BOOT_ARGS) netbsd-boot.bin.X
mv netbsd-boot.bin.X netbsd-boot.bin
ln -s netbsd-boot.bin last.bin
vmlinuz: vmlinux.bin
cp vmlinux.bin vmlinuz.out
gzip -9 vmlinuz.out
mv vmlinuz.out.gz vmlinuz
netbsd.gz: $(NETBSD)
$(KSTRIP) -s $(NETBSD) -o $(NETBSD).stripped
gzip -9 $(NETBSD).stripped
mv $(NETBSD).stripped.gz netbsd.gz
endif
first/first_floppy::
$(MAKE) -C first OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) AS=$(AS) SIGNATURE="$(SIGNATURE)"
all_bin: $(ALL_BIN)
rm -f last.bin
second/second_floppy::
$(MAKE) -C second OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) AS=$(AS) \
VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)"
export SIGNATURE VERSION DESTDIR PREFIX KARCH CROSS_COMPILE
first::
$(MAKE) -C first TARGET=m68k-linux
second/$(KARCH)-linux-floppy/second:: libmacos libunix libiso9660-m68k libext2-m68k libgzip-m68k libfloppy libscsi libstream libblock libcontainer libui libconfig-m68k libmap-m68k
$(MAKE) -C second MEDIA=floppy TARGET=$(KARCH)-linux
second/$(KARCH)-linux-scsi/second:: libmacos libunix libiso9660-m68k libext2-m68k libgzip-m68k libfloppy libscsi libstream libblock libcontainer libui libconfig-m68k libmap-m68k
$(MAKE) -C second MEDIA=scsi TARGET=$(KARCH)-linux
second/$(KARCH)-linux-all/second:: libmacos libunix libiso9660-m68k libext2-m68k libgzip-m68k libfloppy libscsi libstream libblock libcontainer libui libconfig-m68k libmap-m68k
$(MAKE) -C second MEDIA=full TARGET=$(KARCH)-linux
second/m68k-netbsd-floppy/second:: libmacos libunix libiso9660-m68k libext2-m68k libgzip-m68k libfloppy libstream libblock libcontainer libui libconfig-m68k libmap-m68k
$(MAKE) -C second TARGET=m68k-netbsd MEDIA=floppy
second/m68k-linux-scsi-driver/apple_driver:: libmacos libunix libiso9660-m68k libgzip-m68k libstream libui libconfig-m68k libmap-m68k
$(MAKE) -C second MEDIA=scsi TARGET=m68k-linux \
m68k-linux-scsi-driver/apple_driver
first-install::
$(MAKE) -C first install
first-uninstall::
$(MAKE) -C first uninstall
second-install::
$(MAKE) -C second install
second-uninstall::
$(MAKE) -C second uninstall
libmacos::
$(MAKE) -C libmacos all TARGET=m68k-linux
libunix::
$(MAKE) -C libunix all TARGET=m68k-linux
libui::
$(MAKE) -C libui all TARGET=m68k-linux
libiso9660-m68k::
$(MAKE) -C libiso9660 all TARGET=m68k-linux
libext2-m68k::
$(MAKE) -C libext2 all TARGET=m68k-linux
libconfig-m68k::
$(MAKE) -C libconfig all TARGET=m68k-linux
libconfig::
$(MAKE) -C libconfig all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
libiso9660::
$(MAKE) -C libiso9660 all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
libext2::
$(MAKE) -C libext2 all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
libcontainer::
$(MAKE) -C libcontainer all TARGET=m68k-linux
libblock::
$(MAKE) -C libblock all TARGET=m68k-linux
libgzip-m68k::
$(MAKE) -C libgzip all TARGET=m68k-linux
libgzip::
$(MAKE) -C libgzip all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
libemile::
$(MAKE) -C libemile all VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)"
$(MAKE) -C libemile all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
tools::
$(MAKE) -C tools all VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)" \
PREFIX=$(PREFIX)
libfloppy::
$(MAKE) -C libfloppy all CC=$(M68K_CC) AS=$(M68K_AS)
libscsi::
$(MAKE) -C libscsi all CC=$(M68K_CC) AS=$(M68K_AS)
dump: floppy.img
dd if=floppy.img of=/dev/fd0 bs=512
eject /dev/fd0
libstream::
$(MAKE) -C libstream all CC=$(M68K_CC) AS=$(M68K_AS)
install: all
install -d $(DESTDIR)/$(PREFIX)/usr/include/
install libemile/libemile.h $(DESTDIR)/$(PREFIX)/usr/include/libemile.h
install -d $(DESTDIR)/$(PREFIX)/usr/lib/
install libemile/libemile.a $(DESTDIR)/$(PREFIX)/usr/lib/libemile.a
install -d $(DESTDIR)/$(PREFIX)/sbin/
install tools/emile-set-cmdline $(DESTDIR)/$(PREFIX)/sbin/emile-set-cmdline
install tools/emile-first-tune $(DESTDIR)/$(PREFIX)/sbin/emile-first-tune
install tools/emile-install $(DESTDIR)/$(PREFIX)/sbin/emile-install
install tools/emile-set-output $(DESTDIR)/$(PREFIX)/sbin/emile-set-output
install tools/emile $(DESTDIR)/$(PREFIX)/sbin/emile
install tools/emile-map-set $(DESTDIR)/$(PREFIX)/sbin/emile-map-set
install -d $(DESTDIR)/$(PREFIX)/boot/emile/
install first/first_scsi $(DESTDIR)/$(PREFIX)/boot/emile/first_scsi
install -d $(DESTDIR)/$(PREFIX)/lib/emile/
install first/first_floppy $(DESTDIR)/$(PREFIX)/lib/emile/first_floppy
install -d $(DESTDIR)/$(PREFIX)/boot/emile/
install second/second_scsi $(DESTDIR)/$(PREFIX)/boot/emile/second_scsi
install -d $(DESTDIR)/$(PREFIX)/lib/emile/
install second/second_floppy $(DESTDIR)/$(PREFIX)/lib/emile/second_floppy
libmap::
$(MAKE) -C libmap all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
uninstall:
rm -f $(DESTDIR)/$(PREFIX)/usr/include/libemile.h
rm -f $(DESTDIR)/$(PREFIX)/usr/lib/libemile.a
rm -fr $(DESTDIR)/$(PREFIX)/sbin/emile-set-cmdline
rm -fr $(DESTDIR)/$(PREFIX)/sbin/emile-first-tune
rm -fr $(DESTDIR)/$(PREFIX)/sbin/emile-install
rm -fr $(DESTDIR)/$(PREFIX)/sbin/emile-set-output
rm -fr $(DESTDIR)/$(PREFIX)/sbin/emile
rm -fr $(DESTDIR)/$(PREFIX)/sbin/emile-map-set
rm -f $(DESTDIR)/$(PREFIX)/boot/emile/first_scsi
rm -f $(DESTDIR)/$(PREFIX)/lib/emile/first_floppy
rm -f $(DESTDIR)/$(PREFIX)/boot/emile/second_scsi
rm -f $(DESTDIR)/$(PREFIX)/lib/emile/second_floppy
libmap-m68k::
$(MAKE) -C libmap all TARGET=m68k-linux
clean:
tools:: libemile libiso9660 libext2 libgzip libconfig libmap
$(MAKE) -C tools all CROSS_COMPILE=$(CROSS_COMPILE) TARGET=$(NATIVE)
tools-install:: tools
$(MAKE) -C tools install TARGET=$(NATIVE)
tools-uninstall::
$(MAKE) -C tools uninstall
docs-install:: docs
$(MAKE) -C docs install
docs-uninstall::
$(MAKE) -C docs uninstall
docs::
$(MAKE) -C docs all
dump: last.bin
dd if=last.bin of=$(FLOPPY) bs=512
install: tools-install first-install second-install docs-install
uninstall: tools-uninstall first-uninstall second-uninstall docs-uninstall
libemile-clean:
$(MAKE) -C libemile clean
libmacos-clean:
$(MAKE) -C libmacos clean
libunix-clean:
$(MAKE) -C libunix clean
libui-clean:
$(MAKE) -C libui clean
libscsi-clean:
$(MAKE) -C libscsi clean
libstream-clean:
$(MAKE) -C libstream clean
libiso9660-clean::
$(MAKE) -C libiso9660 clean TARGET=$(NATIVE)
$(MAKE) -C libiso9660 clean TARGET=$(KARCH)-linux
libext2-clean::
$(MAKE) -C libext2 clean TARGET=$(NATIVE)
$(MAKE) -C libext2 clean TARGET=$(KARCH)-linux
libconfig-clean::
$(MAKE) -C libconfig clean TARGET=$(NATIVE)
$(MAKE) -C libconfig clean TARGET=$(KARCH)-linux
libcontainer-clean::
$(MAKE) -C libcontainer clean
libblock-clean::
$(MAKE) -C libblock clean
libgzip-clean::
$(MAKE) -C libgzip clean TARGET=$(NATIVE)
$(MAKE) -C libgzip clean TARGET=$(KARCH)-linux
libmap-clean::
$(MAKE) -C libmap clean TARGET=$(NATIVE)
$(MAKE) -C libmap clean TARGET=$(KARCH)-linux
tools-clean:
$(MAKE) -C tools clean
first-clean:
$(MAKE) -C first clean
second-clean:
$(MAKE) -C second clean
rm -f floppy.img floppy.img.X vmlinuz vmlinux.bin
MAIN_FILES = AUTHORS ChangeLog COPYING Makefile README README.floppy \
README.scsi
docs-clean:
$(MAKE) -C docs clean
FIRST_FILES = first/Makefile first/first.S
libfloppy-clean:
$(MAKE) -C libfloppy clean
SECOND_FILES = second/MMU030.c second/MMU030.h second/MMU030_asm.S \
second/MMU040.c second/MMU040.h second/MMU040_asm.S \
second/Makefile second/arch.c second/scsi.h second/arch.h \
second/bank.c second/bank.h second/bootinfo.c \
second/bootinfo.h second/console.c second/console.h \
second/copymem.i second/container.S second/font_8x16.c \
second/glue.S second/glue.h second/head.S second/inflate.c \
second/ld.script second/lowmem.h second/memory.c \
second/memory.h second/main.c second/load.c second/load.h \
second/scsi.c second/enter_kernel030.S second/serial.c \
second/serial.h second/vga.c second/vga.h second/head.h \
second/misc.c second/misc.h second/printf.c \
second/uncompress.c second/uncompress.h \
second/enter_kernel040.S
distclean:: clean
rm -f tools.mk
TOOLS_FILES = tools/emile-set-cmdline.c tools/Makefile \
tools/emile-first-tune.c \
tools/emile-install.c \
tools/emile-set-output.c tools/emile.c tools/emile_scanbus.c \
tools/emile-map-set.c
clean:: libemile-clean libmacos-clean libunix-clean tools-clean first-clean \
second-clean docs-clean libiso9660-clean libext2-clean libgzip-clean \
libfloppy-clean \
libscsi-clean libstream-clean libblock-clean libcontainer-clean \
libui-clean libconfig-clean libmap-clean
rm -f floppy.bin floppy.bin.X floppy_ramdisk.bin \
floppy_ramdisk.bin.X rescue.bin rescue.bin.X \
debian-installer.bin debian-installer.bin.X \
netboot.bin netboot.bin.X boot.bin boot.bin.X \
vmlinuz last.bin cdboot-sarge.bin cdboot-woody.bin \
multiboot.bin
LIB_FILES = libemile/bootblock.h libemile/emile_first_get_param.c \
libemile/Makefile libemile/emile_first_set_param.c \
libemile/emile_first_set_param_scsi.c \
libemile/emile_floppy_create_image.c \
libemile/emile.h libemile/emile_map_bootblock_get_type.c \
libemile/emile_map_bootblock_is_valid.c \
libemile/emile_map_bootblock_read.c \
libemile/emile_map_bootblock_write.c \
libemile/emile_map_close.c \
libemile/emile_map_geometry.c \
libemile/emile_map_get_driver_info.c \
libemile/emile_map_get_driver_number.c \
libemile/emile_map_get_number.c \
libemile/emile_map_get_partition_geometry.c \
libemile/emile_map_get_partition_name.c \
libemile/emile_map_get_partition_type.c \
libemile/emile_map_is_valid.c \
libemile/emile_map_open.c \
libemile/emile_map_partition_get_flags.c \
libemile/emile_map_partition_set_flags.c \
libemile/emile_map_partition_is_bootable.c \
libemile/emile_map_partition_is_startup.c \
libemile/emile_map_partition_is_valid.c \
libemile/emile_map_partition_set_bootable.c \
libemile/emile_map_partition_set_startup.c \
libemile/emile_map_read.c \
libemile/emile_map_set_partition_name.c \
libemile/emile_map_set_partition_type.c \
libemile/emile_map_set_startup.c \
libemile/emile_map_write.c \
libemile/emile_scsi_create_container.c \
libemile/emile_scsi_get_dev.c \
libemile/emile_scsi_get_rdev.c \
libemile/emile_second_get_buffer_size.c \
libemile/emile_second_get_cmdline.c \
libemile/emile_second_get_kernel.c \
libemile/emile_second_get_output.c \
libemile/emile_second_set_buffer_size.c \
libemile/emile_second_set_cmdline.c \
libemile/emile_second_set_kernel.c \
libemile/emile_second_set_kernel_scsi.c \
libemile/emile_second_set_output.c libemile/libemile.h \
libemile/partition.h libemile/emile_map_has_apple_driver.c \
libemile/emile_map_seek_driver_partition.c \
libemile/emile_get_uncompressed_size.c
DISTFILES = $(MAIN_FILES) $(FIRST_FILES) $(SECOND_FILES) $(LIB_FILES) \
$(TOOLS_FILES)
DISTFILES = AUTHORS ChangeLog COPYING Makefile README README.floppy \
README.scsi Rules.mk config/floppy.conf kernel.mk config.mk \
scripts/tools.sh
dist:
rm -fr $(PACKAGE)-$(VERSION)
mkdir $(PACKAGE)-$(VERSION)
for file in $(DISTFILES); do \
@$(MAKE) -C tools dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libemile dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C second dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C first dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C docs dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libmacos dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libunix dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libui dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libstream dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libscsi dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libfloppy dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libblock dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libiso9660 dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libext2 dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libcontainer dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libgzip dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C tools dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C debian dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libconfig dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@$(MAKE) -C libmap dist DISTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)
@echo TAR emile
@for file in $(DISTFILES); do \
dir=$$(dirname $$file); \
if [ "$$dir" != "" ] ; then \
mkdir -p $(PACKAGE)-$(VERSION)/$$dir; \
fi; \
cp -p $$file $(PACKAGE)-$(VERSION)/$$file; \
done
rm -f $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION).tar.bz2
tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
bzip2 -9 $(PACKAGE)-$(VERSION).tar
rm -fr $(PACKAGE)-$(VERSION)
@rm -f $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION).tar.bz2
@tar cf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
@bzip2 -9 $(PACKAGE)-$(VERSION).tar
@rm -fr $(PACKAGE)-$(VERSION)
ChangeLog::
cvs2cl -U CVS/users --no-common-dir --accum

11
README
View File

@ -1,5 +1,5 @@
EMILE 0.1
(C) 2004 Laurent Vivier
EMILE
(C) 2004-2013 Laurent Vivier
All files are distributed under the terms of GPL license. See COPYING.
@ -11,10 +11,6 @@ In the booter, is embedded the kernel found in top directory under the name of
"make vmlinux". If a ramdisk (ramdisk.gz) is found, it is also added in
the floppy image.
Type "make" to generate the floppy image (floppy.img).
To write the image to floppy you can type "make dump".
This work is based on the penguin booter for mac68k, on linux kernel, and
perhaps on the ppc booter BootX.
@ -27,5 +23,4 @@ This work has only be tested on a MacIIci with 8 x 4 MB RAM, a Two-Page Display,
and ethernet card sonic.
Have fun
Laurent Vivier <LaurentVivier@wanadoo.fr>
11 Fevrier 2004 ;-)
Laurent Vivier <Laurent@Vivier.EU>

View File

@ -50,32 +50,21 @@ To set root filesystem on NFS
You can also read current boot arguments from floppy:
# emile-set-cmdline -r /dev/fd0
# emile-set-cmdline -g /dev/fd0
Current command line: "root=/dev/ramdisk ramdisk_size=2048"
--------------------------------------------------------------------------------
How to Create your floppy image with your kernel
--------------------------------------------------------------------------------
First of all, you must "flatten" the kernel object:
# objcopy -I elf32-big -O binary -R .note -R .comment -S vmlinux vmlinux.bin
To allocate correct buffer size during uncompress, EMILE needs to know the size of flattened kernel:
# ls -l vmlinux.bin
-rwxr-xr-x 1 m68k users 1290240 2004-06-09 22:41 vmlinux.bin
You can now compress kernel with gzip (bzip2 is not supported by EMILE):
# gzip -9 vmlinux.bin
# gzip -9 vmlinux
You can copy first and second level bootloader and kernel to floppy:
# emile-install -f first -s second -i vmlinux.bin.gz -b 1290240 /dev/fd0
# emile-install -f first -s second -k vmlinux.gz /dev/fd0
And finally, you can set kernel boot arguments:
@ -85,8 +74,8 @@ And finally, you can set kernel boot arguments:
If you have a ramdisk, the two last steps become:
# emile-install -f first -s second -i vmlinux.bin.gz -b 1290240 -r ramdisk.gz /dev/fd0
# emile-install -f first -s second -k vmlinux.gz -r ramdisk.gz /dev/fd0
# emile-set-cmdline /dev/fd0 "root=/dev/ramdisk ramdisk_size=2048"
--------------------------------------------------------------------------------
Laurent Vivier <LaurentVivier@wanadoo.fr>
Laurent Vivier <Laurent@Vivier.EU>

View File

@ -126,4 +126,4 @@ partition to HFS... and all works fine ;-)
And now, you can start linux in less than 2 seconds...
Laurent Vivier <LaurentVivier@wanadoo.fr>
Laurent Vivier <Laurent@Vivier.EU>

37
Rules.mk Normal file
View File

@ -0,0 +1,37 @@
#
# (c) 2005-2013 Laurent Vivier <Laurent@Vivier.EU>
#
OBJS = $(patsubst %.S,%.o,$(SOURCES:.c=.o))
MODULE ?= $(shell basename $(TOP))
DISTFILES ?= $(SOURCES) $(HEADERS) Makefile
ARFLAGS+=-U
$(LIBRARY): $(LIBRARY)($(patsubst %.S,%.o,$(SOURCES:.c=.o)))
%.gz: %
gzip -9f $<
dist:
@echo TAR $(MODULE)
@for file in $(DISTFILES); do \
dir=$$(dirname $$file); \
if [ "$$dir" != "" ] ; then \
mkdir -p $(DISTDIR)/$(MODULE)/$$dir; \
fi; \
cp -p $$file $(DISTDIR)/$(MODULE)/$$file; \
done
ifdef TARGET
clean:
(cd $(TARGET) && rm -f $(OBJS) $(PROGRAMS) $(LIBRARY)) || true
else
clean:
rm -f $(OBJS) $(PROGRAMS) $(LIBRARY) $(CLEAN) $(LIBRARIES)
endif
ifeq ($(shell readlink -e /usr/include/linux/ext2_fs.h),)
CPPFLAGS += -DCONFIG_E2FSLIBS
endif

24
config.mk Normal file
View File

@ -0,0 +1,24 @@
# EMILE configuration file
#
PACKAGE = emile
VERSION = 0.14
PREFIX=/
# kernel boot arguments
#FLOPPY=/dev/floppy/0
#CONSOLE=console=ttyS0,9600n8 console=tty0
#GESTALTID=43
NETBOOT_ARGS="root=/dev/nfs ip=dhcp rw $(CONSOLE)"
RESCUE_ARGS="root=/dev/ramdisk ramdisk_size=2048 $(CONSOLE)"
CDBOOT_ARGS="root=/dev/ramdisk ramdisk_size=13000 $(CONSOLE)"
CDBOOT_ARGS26="root=/dev/ram ramdisk_size=13000 $(CONSOLE)"
INSTALLER_ARGS="prompt_ramdisk=1 load_ramdisk=1 ramdisk_start=0 root=/dev/fd0 ramdisk_size=4096 $(CONSOLE)"
FLOPPY_CONF="config/floppy.conf"
BOOT_ARGS="root=/dev/sda4 $(CONSOLE)"
LINUXPATH=vmlinux
LINUXRAMDISK=ramdisk.gz

18
config/cdrom-etch.conf Normal file
View File

@ -0,0 +1,18 @@
timeout 5
default 0
vga default
title Etch Install
kernel /install/kernels/vmlinuz-2.6.26-1-mac
args root=/dev/ram debian-installer/framebuffer=false suite=etch-m68k modules=etch-support
initrd /install/cdrom/initrd.gz
title Etch Install (Expert Mode)
kernel /install/kernels/vmlinuz-2.6.26-1-mac
args root=/dev/ram debian-installer/framebuffer=false suite=etch-m68k modules=etch-support priority=low
initrd /install/cdrom/initrd.gz
title Rescue Mode
kernel /install/kernels/vmlinuz-2.6.26-1-mac
args root=/dev/ram debian-installer/framebuffer=false suite=etch-m68k modules=etch-support rescue/enable=true
initrd /install/cdrom/initrd.gz

18
config/cdrom-sarge.conf Normal file
View File

@ -0,0 +1,18 @@
timeout 5
default 0
vga default
title Sarge Install
kernel /install/kernels/vmlinuz-2.2.25-mac
args root=/dev/ramdisk ramdisk_size=13000
initrd /install/cdrom/initrd22.gz
title Sarge Install (Expert Mode)
kernel /install/kernels/vmlinuz-2.2.25-mac
args priority=low root=/dev/ramdisk ramdisk_size=13000
initrd /install/cdrom/initrd22.gz
title Rescue Mode
kernel /install/kernels/vmlinuz-2.2.25-mac
args root=/dev/ramdisk ramdisk_size=13000 rescue/enable=true
initrd /install/cdrom/initrd22.gz

19
config/emile.conf Normal file
View File

@ -0,0 +1,19 @@
# example file for emile.conf
partition /dev/sda4
first_level /boot/emile/first_scsi
second_level /boot/emile/second_scsi
timeout 5
default 0
title Debian GNU/Linux, kernel 2.6.18-4-mac
root (sd0,3)
kernel /boot/vmlinuz-2.6.18-4-mac
args root=/dev/sda4 ro
initrd /boot/initrd.img-2.6.18-4-mac
title Debian GNU/Linux, kernel 2.2.25-mac
root (sd0,3)
kernel /boot/vmlinuz-2.2.25-mac
args root=/dev/sda4 ro

51
config/floppy.conf Normal file
View File

@ -0,0 +1,51 @@
# floppy.conf
#
# (c) 2007-2013 Laurent Vivier <Laurent@Vivier.EU>
# configuration to create a floppy with several kernel entries
#
first_level first/first_floppy
second_level second/m68k-linux-full/second
vga default
default 0
timeout 5
title Debian Rescue
kernel vmlinuz
args root=/dev/ramdisk ramdisk_size=2048
initrd ramdisk.gz
title Netboot Linux
kernel vmlinuz
args root=/dev/nfs ip=dhcp rw
title Debian Installer
kernel vmlinuz
args prompt_ramdisk=1 load_ramdisk=1 ramdisk_start=0 root=/dev/fd0 ramdisk_size=4096
title Debian CD Woody
root iso9660:(sd3)
kernel /install/mac/linux.bin
args root=/dev/ramdisk ramdisk_size=13000
initrd /install/mac/root.bin
title Debian CD Sarge
root iso9660:(sd3)
kernel /install/kernels/vmlinuz-2.2.25-mac
args root=/dev/ramdisk ramdisk_size=13000
initrd /install/cdrom/initrd22.gz
title Debian CD Etch
root iso9660:(sd3)
kernel /install/kernels/vmlinuz-2.6.26-1-mac
args root=/dev/ramdisk ramdisk_size=16384
initrd /install/cdrom/initrd.gz
title root=/dev/sda4
kernel vmlinuz
args root=/dev/sda4
title Disk /dev/sda5
root (sd0,4)
kernel /boot/vmlinuz
args root=/dev/sda5

167
configure vendored Executable file
View File

@ -0,0 +1,167 @@
#!/bin/sh
CC=gcc
AS=as
LD=ld
OBJCOPY=objcopy
STRIP=strip
# build info
WHO=$(whoami)
WHERE=$(hostname)
ARCH=$(uname -m)
OS=$(uname -o)
if test "${ARCH}" != "m68k" ; then
M68K_CROSS_COMPILE=${M68K_CROSS_COMPILE:-m68k-linux-}
if ! type "${M68K_CROSS_COMPILE}${CC}" > /dev/null 2>&1
then
M68K_CROSS_COMPILE=m68k-linux-gnu-
if ! type "${M68K_CROSS_COMPILE}${CC}" > /dev/null 2>&1
then
echo "Cannot find m68k cross-compiler" 1>&2
unset M68K_CROSS_COMPILE
fi
fi
fi
if test "${ARCH}" != "ppc" ; then
PPC_CROSS_COMPILE=${PPC_CROSS_COMPILE:-powerpc-linux-}
if ! type "${PPC_CROSS_COMPILE}${CC}" > /dev/null 2>&1
then
PPC_CROSS_COMPILE=powerpc-linux-gnu-
if ! type "${PPC_CROSS_COMPILE}${CC}" > /dev/null 2>&1
then
echo "Cannot find powerpc cross-compiler" 1>&2
unset PPC_CROSS_COMPILE
fi
fi
fi
exec 5> tools.mk.tmp
cat 1>&5 <<!EOF
# file generated by $0
WHEN = \$(shell LANG=C date)
WHO = ${WHO}
WHERE = ${WHERE}
ARCH = ${ARCH}
OS = ${OS}
SIGNATURE = \$(PACKAGE)-\$(VERSION) \$(WHO)@\$(WHERE)(\$(ARCH) \$(OS)) \$(WHEN)
M68K_CROSS_COMPILE = ${M68K_CROSS_COMPILE}
M68K_AS = \$(M68K_CROSS_COMPILE)${AS}
M68K_CC = \$(M68K_CROSS_COMPILE)${CC}
M68K_LD = \$(M68K_CROSS_COMPILE)${LD}
M68K_OBJCOPY = \$(M68K_CROSS_COMPILE)${OBJCOPY}
M68K_STRIP = \$(M68K_CROSS_COMPILE)${STRIP}
!EOF
if [ "${M68K_CROSS_COMPILE}" != "" ] ; then
M68K_GCC_VERSION=$(${M68K_CROSS_COMPILE}${CC} -dumpversion 2> /dev/null)
echo "cross-compiler is ${M68K_CROSS_COMPILE}${CC} ${M68K_GCC_VERSION}" 1>&2
fi
if [ "${PPC_CROSS_COMPILE}" != "" ] ; then
PPC_GCC_VERSION=$(${PPC_CROSS_COMPILE}${CC} -dumpversion 2> /dev/null)
echo "cross-compiler is ${PPC_CROSS_COMPILE}${CC} ${PPC_GCC_VERSION}" 1>&2
cat 1>&5 <<!EOF
PPC_CROSS_COMPILE = ${PPC_CROSS_COMPILE}
PPC_AS = \$(PPC_CROSS_COMPILE)${AS}
PPC_CC = \$(PPC_CROSS_COMPILE)${CC}
PPC_LD = \$(PPC_CROSS_COMPILE)${LD}
PPC_OBJCOPY = \$(PPC_CROSS_COMPILE)${OBJCOPY}
PPC_STRIP = \$(PPC_CROSS_COMPILE)${STRIP}
!EOF
fi
# target compiler
cat 1>&5 <<!EOF
ifeq (\$(TARGET),m68k-linux)
override AS = \$(M68K_AS)
override CC = \$(M68K_CC)
override LD = \$(M68K_LD)
override OBJCOPY = \$(M68K_OBJCOPY)
override STRIP = \$(M68K_STRIP)
else ifeq (\$(TARGET),m68k-netbsd)
override AS = \$(M68K_AS)
override CC = \$(M68K_CC)
override LD = \$(M68K_LD)
override OBJCOPY = \$(M68K_OBJCOPY)
override STRIP = \$(M68K_STRIP)
!EOF
if [ "${PPC_GCC_VERSION}" != "" ] ; then
cat 1>&5 <<!EOF
else ifeq (\$(TARGET),ppc-linux)
override AS = \$(M68K_AS)
override CC = \$(M68K_CC)
override LD = \$(M68K_LD)
override OBJCOPY = \$(M68K_OBJCOPY)
override STRIP = \$(M68K_STRIP)
!EOF
fi
cat 1>&5 <<!EOF
else
AS = \$(CROSS_COMPILE)${AS}
CC = \$(CROSS_COMPILE)${CC}
LD = \$(CROSS_COMPILE)${LD}
OBJCOPY = \$(CROSS_COMPILE)${OBJCOPY}
STRIP = \$(CROSS_COMPILE)${STRIP}
endif
!EOF
# docbook to man
if type docbook-to-man > /dev/null 2>&1
then
cat 1>&5 <<!EOF
%.5: %.sgml
docbook-to-man \$< > \$@
%.8: %.sgml
docbook-to-man \$< > \$@
!EOF
else
if type docbook2man > /dev/null 2>&1
then
cat 1>&5 <<!EOF
%.5: %.sgml
docbook2man \$< > \$@
%.8: %.sgml
docbook2man \$< > \$@
!EOF
else
cat 1>&5 <<!EOF
%.5: %.sgml
@echo "Missing tools to generate \$@ from \$<" >&2 && false
%.8: %.sgml
@echo "Missing tools to generate \$@ from \$<" >&2 && false
!EOF
fi
fi
mv tools.mk.tmp tools.mk

14
debian/Makefile vendored Normal file
View File

@ -0,0 +1,14 @@
#
#
# (c) 2004-2007 Laurent Vivier <Laurent@Vivier.EU>
#
#
TOP = $(shell pwd)
SOURCES = changelog compat control copyright emile-bootblocks.dirs \
emile-bootblocks.install emile-bootblocks.postinst emile.install \
Makefile rules
include $(TOP)/../tools.mk
include $(TOP)/../Rules.mk

30
debian/changelog vendored Normal file
View File

@ -0,0 +1,30 @@
emile (0.14) unstable; urgency=low
* update to gcc-4.8 support and kernel 3.10
-- Laurent Vivier <Laurent@vivier.eu> Thu, 05 Sep 2013 14:06:35 +0200
emile (0.13) unstable; urgency=low
* add apple_driver to boot from CDROM
-- Laurent Vivier <Laurent@vivier.eu> Tue, 01 Feb 2011 00:37:54 +0100
emile (0.12) unstable; urgency=low
* add multiboot
* add ext2 support
-- Laurent Vivier <Laurent@lvivier.info> Sun, 27 Jul 2008 19:16:28 +0200
emile (0.11) unstable; urgency=low
* debian packaging integration in EMILE CVS
-- Laurent Vivier <Laurent@lvivier.info> Sun, 08 Oct 2006 18:50:34 +0200
emile (0.10-1) unstable; urgency=low
* Initial upload. Closes: #312269
-- Wouter Verhelst <wouter@debian.org> Wed, 05 Jul 2005 23:35:17 +0300

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

35
debian/control vendored Normal file
View File

@ -0,0 +1,35 @@
Source: emile
Section: admin
Priority: optional
Maintainer: Wouter Verhelst <wouter@debian.org>
Uploaders: Wouter Verhelst <wouter@debian.org>, Stephen R. Marenka <smarenka@debian.org>
Build-Depends: debhelper (>= 9), docbook-to-man, gcc, e2fslibs-dev
Build-Depends-Indep: gcc-4.6-m68k-linux-gnu [!m68k]
Standards-Version: 3.7.2
Package: emile-bootblocks
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Boot blocks for EMILE, the Early Mac Image LoadEr
EMILE provides a way to natively boot Macintosh computers who normally
require Penguin to boot.
.
It is however still in an unfinished state; users unfamiliar with Linux
should note that Penguin currently is a more safe option.
.
This package contains the boot blocks which are written to disk by
EMILE; to install and manage the boot blocks, please install the emile
package.
Package: emile
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, emile-bootblocks
Description: the Early Mac Image LoadEr
EMILE provides a way to natively boot Macintosh computers who normally
require Penguin to boot.
.
It is however still in an unfinished state; users unfamiliar with Linux
should note that Penguin currently is a more safe option.
.
A list of machines that are supported by EMILE is maintained at
http://wiki.debian.org/EmileSupportedHardware

126
debian/copyright vendored Normal file
View File

@ -0,0 +1,126 @@
This is the Debian GNU/Linux packaged version of EMILE, the Early Mac Image
LoadEr. It was written by and is Copyright(C) 2004-2008 Laurent Vivier
<Laurent@Vivier.EU>. The home page is at http://emile.sf.net/
It was debianized by Wouter Verhelst <wouter@debian.org> and Stephen Marenka
<stephen@marenka.net>.
License:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
On Debian GNU/Linux systems, the full text of the GPL can be found in
/usr/share/common-licenses/GPL-2.
The package also contains some code from various other sources.
The files in the directory libgzip, and the files libstream/gzio.c and
tools/minigzip.c have the following license and copyright:
Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
The data format used by the zlib library is described by RFCs (Request for
Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
The file libunix/vsprintf.c is available under the following license:
Copyright (c) 1986, 1988, 1991, 1993
The Regents of the University of California. All rights reserved.
(c) UNIX System Laboratories, Inc.
All or some portions of this file are derived from material licensed
to the University of California by American Telephone and Telegraph
Co. or Unix System Laboratories, Inc. and are reproduced herein with
the permission of UNIX System Laboratories, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
@(#)subr_prf.c 8.3 (Berkeley) 1/21/94
Extracted vsprinf & adapted by BenH for MountX, Wed, June 3 1998.
Added support for pascal strings.
The file libunix/divsi3.S contains some parts from the libgcc routines
for 68000, which is Copyright(C) 1994, 1996, 1997, 1998 Free Software
Foundation, Inc.
The file libiso9660/iso9660_mount.c contains some parts from apple support
mkisofs which is Written by Eric Youngdale (1993).
Copyright 1993 Yggdrasil Computing, Incorporated
Copyright (c) 1999,2000-2004 J. Schilling
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
The file tools/emile-mkisofs.c contains some parts from mkisofs/apple_driver.c,
which is (c) James Pearson 17/5/98.

2
debian/emile-bootblocks.dirs vendored Normal file
View File

@ -0,0 +1,2 @@
lib/emile
boot/emile

5
debian/emile-bootblocks.install vendored Normal file
View File

@ -0,0 +1,5 @@
boot/emile/first_scsi
boot/emile/m68k-second_scsi
lib/emile/first_floppy
lib/emile/m68k-second_floppy
lib/emile/apple_driver

5
debian/emile-bootblocks.postinst vendored Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
ln -sf /boot/emile/m68k-second_scsi /boot/emile/second_scsi
ln -sf /lib/emile/m68k-second_floppy /lib/emile/second_floppy
#DEBHELPER#

15
debian/emile.install vendored Normal file
View File

@ -0,0 +1,15 @@
sbin/emile-set-cmdline
sbin/emile-first-tune
sbin/emile-install
sbin/emile-set-output
sbin/emile
sbin/emile-map-set
sbin/emile-mkisofs
usr/share/man/man5/emile.conf.5.gz
usr/share/man/man8/emile-first-tune.8.gz
usr/share/man/man8/emile-install.8.gz
usr/share/man/man8/emile-map-set.8.gz
usr/share/man/man8/emile-set-cmdline.8.gz
usr/share/man/man8/emile-set-output.8.gz
usr/share/man/man8/emile.8.gz
usr/share/man/man8/emile-mkisofs.8.gz

102
debian/rules vendored Executable file
View File

@ -0,0 +1,102 @@
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.
# Uncomment this to turn on verbose mode.
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
CROSS_COMPILE=
else
CROSS_COMPILE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)-
endif
ifeq ($(DEB_BUILD_ARCH),m68k)
M68K_CROSS_COMPILE=
target=all
target_install=install
else
M68K_CROSS_COMPILE=m68k-linux-gnu-
M68K_GCC_PATH=$(shell $(M68K_CROSS_COMPILE)gcc -dumpversion)
ifeq ($(M68K_GCC_PATH),)
target=docs tools
target_install=tools-install docs-install
CHMOD_BOOT=0
else
target=all
target_install=install
CHMOD_BOOT=1
endif
endif
build: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
M68K_CROSS_COMPILE="$(M68K_CROSS_COMPILE)" ./configure
$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" $(target)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/<packagename>
$(MAKE) DESTDIR=`pwd`/debian/tmp $(target_install)
if test -d `pwd`/debian/tmp/boot/emile/; then chmod -x `pwd`/debian/tmp/boot/emile/*; fi
if test -d `pwd`/debian/tmp/lib/emile/; then chmod -x `pwd`/debian/tmp/lib/emile/*; fi
# Build architecture-independent files here.
binary-indep: build install
dh_testroot -i
dh_installchangelogs -i
dh_installdocs -i
dh_installexamples -i
dh_install --sourcedir=debian/tmp -i
dh_installman -i
dh_link -i
dh_strip -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_shlibdeps -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installchangelogs -a
dh_installdocs -a
dh_installexamples -a
dh_install --sourcedir=debian/tmp -a
dh_installman -a
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

58
docs/Makefile Normal file
View File

@ -0,0 +1,58 @@
#
# (c) 2005-2008 Laurent Vivier <Laurent@Vivier.EU>
#
#
TOP=$(shell pwd)
MODULE ?= $(shell basename $(TOP))
SECTION5 = emile.conf.sgml
SECTION8 = emile-first-tune.sgml emile-install.sgml emile-map-set.sgml \
emile-set-cmdline.sgml emile-set-output.sgml emile.sgml \
emile-mkisofs.sgml
MANPATH ?= /usr/share/man/
MANPAGES = $(SECTION5:.sgml=.5.gz) $(SECTION8:.sgml=.8.gz)
DISTFILES ?= $(SECTION5) $(SECTION8) Makefile
all: man
%.gz: %
gzip -9f $<
man: $(MANPAGES)
install: all
install -m 755 -d $(DESTDIR)/$(PREFIX)/$(MANPATH)/man5
install -m 644 $(SECTION5:.sgml=.5.gz) \
$(DESTDIR)/$(PREFIX)/$(MANPATH)/man5
install -m 755 -d $(DESTDIR)/$(PREFIX)/$(MANPATH)/man8
install -m 644 $(SECTION8:.sgml=.8.gz) \
$(DESTDIR)/$(PREFIX)/$(MANPATH)/man8
uninstall:
for file in $(SECTION5:.sgml=.5.gz) ; do \
rm -f $(DESTDIR)/$(PREFIX)/$(MANPATH)/man5/$${file}; \
done
for file in $(SECTION8:.sgml=.8.gz) ; do \
rm -f $(DESTDIR)/$(PREFIX)/$(MANPATH)/man8/$${file}; \
done
clean:
rm -f $(MANPAGES) $(MANPAGES:.8.gz=.8) $(MANPAGES:.5.gz=.5)
dist:
@echo TAR $(MODULE)
@for file in $(DISTFILES); do \
dir=$$(dirname $$file); \
if [ "$$dir" != "" ] ; then \
mkdir -p $(DISTDIR)/$(MODULE)/$$dir; \
fi; \
cp -p $$file $(DISTDIR)/$(MODULE)/$$file; \
done
include $(TOP)/../tools.mk

192
docs/emile-first-tune.sgml Normal file
View File

@ -0,0 +1,192 @@
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>Stephen</firstname>">
<!ENTITY dhsurname "<surname>Marenka</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>May 26, 2005</date>">
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<!ENTITY dhemail "<email>stephen@marenka.net</email>">
<!ENTITY dhusername "Stephen R. Marenka">
<!ENTITY dhucpackage "<refentrytitle>emile-first-tune</refentrytitle>">
<!ENTITY dhpackage "emile">
<!ENTITY dhprogram "emile-first-tune">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2005</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhprogram;</refname>
<refpurpose>Set the <command>&dhpackage;</command>
bootloader first level boot block info.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhprogram;</command>
<arg><replaceable>options</replaceable></arg>
<arg>image</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term><option>-h</option>, <option>--help</option></term>
<listitem>
<para>Show summary of options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d</option>, <option>--drive=DRIVE</option></term>
<listitem>
<para>Set the drive number (default 1).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-o</option>, <option>--offset=OFFSET</option></term>
<listitem>
<para>Set offset of second level in bytes.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option>, <option>--size=SIZE</option></term>
<listitem>
<para>Set size of second level in bytes.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-i</option>, <option>--scsi</option></term>
<listitem>
<para>specify scsi first level format (offset is a block number)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-p</option>, <option>--path=PATH</option></term>
<listitem>
<para>set path of second level</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>&dhprogram;</command> is used to set EMILE first level boot block info.
</para>
<para>EMILE first level is written into the boot block by EMILE.
When computer starts it loads in memory this boot block and executes it.
The aim of the first level is to load the second level. To be able to load
the second level, first level must be configured with information allowing
it to know where is located the second level. <command>&dhprogram;</command>
is the command allowing to set this information.</para>
<para>Display current values if no flags provided.</para>
</refsect1>
<refsect1>
<title>EXAMPLES</title>
<programlisting><command>&dhprogram;</command> -o 1024 -s 55864 /dev/fd0</programlisting>
<para>Set the first level in the boot block of the floppy /dev/fd0
to load the second level found at the offset 1024 bytes for a size of
55864 bytes</para>
<programlisting><command>&dhprogram;</command> /dev/fd0</programlisting>
<para>Display first level information of the device /dev/fd0
<programlisting>
EMILE boot block identified
Drive number: 1
Second level offset: 1024
Second level size: 56320
</programlisting></para>
<programlisting><command>&dhprogram; /dev/sda4 --path /boot/emile/m68k-second_scsi</command></programlisting>
<para>First level will load the second level found in the file
/boot/emile/m68k-second_scsi</para>
</refsect1>
<refsect1>
<title>REPORTING BUGS</title>
<para>Report bugs to Laurent Vivier &lt;Laurent@Vivier.EU&gt;</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>emile(8), emile-install(8), emile-set-cmdline(8),
emile-map-set(8), emile-set-output(8), emile-mkisofs(8).</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; <&dhemail;> for
the &debian; system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the <acronym>GNU</acronym> GPL License, Version 2
or any later version published by the Free Software Foundation.
</para>
<para>This manual page has been updated by Laurent Vivier
&lt;Laurent@Vivier.EU&gt;.</para>
<para>
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

181
docs/emile-install.sgml Normal file
View File

@ -0,0 +1,181 @@
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>Stephen</firstname>">
<!ENTITY dhsurname "<surname>Marenka</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>May 26, 2005</date>">
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<!ENTITY dhemail "<email>stephen@marenka.net</email>">
<!ENTITY dhusername "Stephen R. Marenka">
<!ENTITY dhucpackage "<refentrytitle>emile-install</refentrytitle>">
<!ENTITY dhpackage "emile">
<!ENTITY dhprogram "emile-install">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2005</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhprogram;</refname>
<refpurpose>install the <command>&dhpackage;</command>
bootloader on a floppy disk
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhprogram;</command>
<arg><replaceable>options</replaceable></arg>
<arg>image</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para><command>&dhprogram;</command> creates an
<command>&dhpackage;</command> bootable floppy disk or
disk image.
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term><option>-h</option>, <option>--help</option></term>
<listitem>
<para>Show summary of options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option>, <option>--verbose</option></term>
<listitem>
<para>Activate verbose mode.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-f</option>, <option>--first=PATH</option></term>
<listitem>
<para>Set path of EMILE first level.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option>, <option>--second=PATH</option></term>
<listitem>
<para>Set path of EMILE second level.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-k</option>, <option>--kernel=PATH</option></term>
<listitem>
<para>Set path of kernel.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-r</option>, <option>--ramdisk=PATH</option></term>
<listitem>
<para>Set path to ramdisk.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-g</option>, <option>--get-info</option></term>
<listitem>
<para>Get information from image.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-c</option>, <option>--config=FILE</option></term>
<listitem>
<para>set configuration according to a config file.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>REPORTING BUGS</title>
<para>Report bugs to Laurent Vivier &lt;Laurent@Vivier.EU&gt;</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>emile(8), emile-first-tune(8), emile-map-set(8),
emile-set-cmdline(8), emile-set-output(8), emile-mkisofs(8).</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; <&dhemail;> for
the &debian; system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the <acronym>GNU</acronym> GPL License, Version 2
or any later version published by the Free Software Foundation.
</para>
<para>This manual page has been updated by Laurent Vivier
&lt;Laurent@Vivier.EU&gt;.</para>
<para>
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

183
docs/emile-map-set.sgml Normal file
View File

@ -0,0 +1,183 @@
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>Stephen</firstname>">
<!ENTITY dhsurname "<surname>Marenka</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>May 26, 2005</date>">
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<!ENTITY dhemail "<email>stephen@marenka.net</email>">
<!ENTITY dhusername "Stephen R. Marenka">
<!ENTITY dhucpackage "<refentrytitle>emile-map-set</refentrytitle>">
<!ENTITY dhpackage "emile">
<!ENTITY dhprogram "emile-map-set">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2005</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhprogram;</refname>
<refpurpose>Set the <command>&dhpackage;</command>
bootloader partition map information.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhprogram;</command>
<arg><replaceable>options</replaceable></arg>
<arg>disk | partition | disk partition-number</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para><command>&dhprogram;</command> sets the
<command>&dhpackage;</command> bootloader partition
map information.
Do not use <option>--startup</option> with any other
options.
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term><option>-h</option>, <option>--help</option></term>
<listitem>
<para>Show summary of options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option>, <option>--verbose</option></term>
<listitem>
<para>verbose mode.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--scanbus</option></term>
<listitem>
<para>Scan all available SCSI devices.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option>, <option>--startup</option></term>
<listitem>
<para>Set the startup partition.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-t</option>, <option>--type=TYPE</option></term>
<listitem>
<para>Set the type of the partition.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-f</option>, <option>--flags=FLAGS</option></term>
<listitem>
<para>Set the flags for the partition.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-g</option>, <option>--get-driver=FILE</option></term>
<listitem>
<para>Get the driver from the partition.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-p</option>, <option>--put-driver=FILE</option></term>
<listitem>
<para>Put the driver to the partition.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>REPORTING BUGS</title>
<para>Report bugs to Laurent Vivier &lt;Laurent@Vivier.EU&gt;</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>emile(8), emile-install(8), emile-first-tune(8),
emile-set-cmdline(8), emile-set-output(8), emile-mkisofs(8).</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; <&dhemail;> for
the &debian; system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the <acronym>GNU</acronym> GPL License, Version 2
or any later version published by the Free Software Foundation.
</para>
<para>This manual page has been updated by Laurent Vivier
&lt;Laurent@Vivier.EU&gt;.</para>
<para>
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

260
docs/emile-mkisofs.sgml Normal file
View File

@ -0,0 +1,260 @@
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>Laurent</firstname>">
<!ENTITY dhsurname "<surname>Vivier</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>March 23, 2007</date>">
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<!ENTITY dhemail "<email>Laurent@Vivier.EU</email>">
<!ENTITY dhusername "Laurent Vivier">
<!ENTITY dhucpackage "<refentrytitle>emile-mkisofs</refentrytitle>">
<!ENTITY dhpackage "emile">
<!ENTITY dhprogram "emile-mkisofs">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2007</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhprogram;</refname>
<refpurpose>install the <command>&dhpackage;</command>
bootloader on a CD-ROM
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhprogram;</command>
<arg><replaceable>options</replaceable></arg> <arg>filename</arg> <arg>pathspec</arg> <arg>...</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para><command>&dhprogram;</command> creates an
<command>&dhpackage;</command> bootable CD-ROM image into file <option>filename</option>.
ISO9660 filesystem will be poppulated with files given
by <option>pathspec</option> (see mkisofs(1)).
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term><option>-h</option>
<option>--help</option></term>
<listitem>
<para>Show summary of options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option>
<option>--verbose</option></term>
<listitem>
<para>Activate verbose mode.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-f</option>
<option>--first PATH</option></term>
<listitem>
<para>EMILE first level to copy to CD-ROM.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option>
<option>--second PATH</option></term>
<listitem>
<para>EMILE second level to copy to CD-ROM.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-k</option>
<option>--kernel PATH</option></term>
<listitem>
<para>Set path of kernel on the CD-ROM.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-r</option>
<option>--ramdisk PATH</option></term>
<listitem>
<para>Set path of ramdisk on the CD-ROM.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-a</option>
<option>--append ARG</option></term>
<listitem>
<para>Set kernel command line.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d</option>
<option>--appledriver FILE</option></term>
<listitem>
<para>Apple Driver to copy to CD-ROM.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-e</option>
<option>--emiledriver FILE</option></term>
<listitem>
<para>Use the Apple Driver provided by EMILE to copy to CD-ROM.
EMILE Apple Driver doesn't contain any copyrighted
Apple Material.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-c</option>
<option>--config PATH</option></term>
<listitem>
<para>Specify the path to the configuration file.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>EXAMPLES</title>
<para>A bootable CD-ROM with an Apple Driver</para>
<para>
<command>&dhprogram;</command> -k "/install/kernels/vmlinuz-2.2.25-mac"
-r "/install/cdrom/initrd22.gz" -d Apple_Driver43
-a "root =/dev/ramdisk ramdisk_size=13000" boot.img /mnt/cdrom
</para>
<para>This command generates a bootable CD-ROM image in boot.img.
The pathes of the kernel, ramdisk in the CD-ROM filesystem are repectively "/install/kernels/vmlinuz-2.2.25-mac" and "/install/cdrom/initrd22.gz".
The Apple Driver is provided by the file Apple_Driver43.
The kernel command line is "root =/dev/ramdisk ramdisk_size=13000".
The ISO9660 filesystem of the CD-ROM poppulated with the files
found in /mnt/cdrom. This filesystem must provide "/install/kernels/vmlinuz-2.2.25-mac" and "/install/cdrom/initrd22.gz". See emile-map-set(8) to
know how to extract Apple_Driver43.
</para>
<para>A bootable CD-ROM with an EMILE Apple Driver and a configuration
file</para>
<para>before all write the configuration file, cdrom.conf:</para>
<programlisting>
timeout 5
default 0
vga default
title Sarge Install
kernel /install/kernels/vmlinuz-2.2.25-mac
args root=/dev/ramdisk ramdisk_size=13000
initrd /install/cdrom/initrd22.gz
title Sarge Install (Expert Mode)
kernel /install/kernels/vmlinuz-2.2.25-mac
args priority=low root=/dev/ramdisk ramdisk_size=13000
initrd /install/cdrom/initrd22.gz
title Rescue Mode
kernel /install/kernels/vmlinuz-2.2.25-mac
args root=/dev/ramdisk ramdisk_size=13000 rescue/enable=true
initrd /install/cdrom/initrd22.gz
</programlisting>
<para> and copy it into the CD-ROM filesystem, for instance
Debian_3.1_r0a_m68k_Bin-1/install/cdrom.conf</para>
<para>then, you can generate your CD-ROM image:</para>
<para>
<command>&dhprogram;</command> -c /install/cdrom.conf \
Debian_3.1_r0a_m68k_Bin-1.iso Debian_3.1_r0a_m68k_Bin-1
</para>
</refsect1>
<refsect1>
<title>FILES</title>
<para>/boot/emile/first_scsi</para>
<para>/boot/emile/m68k-second_scsi</para>
</refsect1>
<refsect1>
<title>REPORTING BUGS</title>
<para>Report bugs to Laurent Vivier &lt;Laurent@Vivier.EU&gt;</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>emile-install(8), emile-set-cmdline(8), emile-first-tune(8),
emile-map-set(8), emile-set-output(8), emile-mkisofs(8).</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; <&dhemail;> for
the &debian; system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the <acronym>GNU</acronym> GPL License, Version 2
or any later version published by the Free Software Foundation.
</para>
<para>
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

169
docs/emile-set-cmdline.sgml Normal file
View File

@ -0,0 +1,169 @@
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>Stephen</firstname>">
<!ENTITY dhsurname "<surname>Marenka</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>May 26, 2005</date>">
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<!ENTITY dhemail "<email>stephen@marenka.net</email>">
<!ENTITY dhusername "Stephen R. Marenka">
<!ENTITY dhucpackage "<refentrytitle>emile-set-cmdline</refentrytitle>">
<!ENTITY dhpackage "emile">
<!ENTITY dhprogram "emile-set-cmdline">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2005</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhprogram;</refname>
<refpurpose>sets the kernel command line for the
<command>&dhpackage;</command> bootloader
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhprogram;</command>
<arg>image</arg>
<arg>cmdline</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>&dhprogram;</command>
<arg>-g</arg>
<arg>image</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para><command>&dhprogram;</command> sets the kernel command line
to cmdline for a <command>&dhpackage;</command>
bootloader disk image, floppy disk device (/dev/fd0),
or the second level file. Executing with "-g" flag,
displays the current command line.
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term><option>-h</option>
<option>--help</option></term>
<listitem>
<para>Show summary of options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-g</option></term>
<listitem>
<para>Display current kernel command line.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>EXAMPLES</title>
<para>
To set root filesystem on disk 1 partition 4:
</para>
<programlisting>
<command>&dhprogram;</command> floppy.img "root=/dev/sda4"
</programlisting>
<para>
To set root filesystem on ramdisk:
</para>
<programlisting>
<command>&dhprogram;</command> floppy.img "root=/dev/ramdisk ramdisk_size=2048"
</programlisting>
<para>
To set root filesystem on NFS:
</para>
<programlisting>
<command>&dhprogram;</command> floppy.img "root=/dev/nfs ip=dhcp nfsroot=192.168.100.1:/tftboot/192.168.100.51"
</programlisting>
</refsect1>
<refsect1>
<title>REPORTING BUGS</title>
<para>Report bugs to Laurent Vivier &lt;Laurent@Vivier.EU&gt;</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>emile(8), emile-install(8), emile-first-tune(8),
emile-map-set(8), emile-set-output(8), , emile-mkisofs(8).</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; <&dhemail;> for
the &debian; system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the <acronym>GNU</acronym> GPL License, Version 2
or any later version published by the Free Software Foundation.
</para>
<para>This manual page has been updated by Laurent Vivier
&lt;Laurent@Vivier.EU&gt;.</para>
<para>
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

206
docs/emile-set-output.sgml Normal file
View File

@ -0,0 +1,206 @@
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>Stephen</firstname>">
<!ENTITY dhsurname "<surname>Marenka</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>May 26, 2005</date>">
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<!ENTITY dhemail "<email>stephen@marenka.net</email>">
<!ENTITY dhusername "Stephen R. Marenka">
<!ENTITY dhucpackage "<refentrytitle>emile-set-output</refentrytitle>">
<!ENTITY dhpackage "emile">
<!ENTITY dhprogram "emile-set-output">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2005</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhprogram;</refname>
<refpurpose>Set the <command>&dhpackage;</command>
bootloader display output.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhprogram;</command>
<arg>image</arg>
<arg>--display</arg>
<arg><replaceable>--width WIDTH</replaceable></arg>
<arg><replaceable>--height HEIGHT</replaceable></arg>
<arg><replaceable>--depth DEPTH</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>&dhprogram;</command>
<arg>image</arg>
<arg>--modem</arg>
<arg><replaceable>--bitrate BITRATE</replaceable></arg>
<arg><replaceable>--datasize DATASIZE</replaceable></arg>
<arg><replaceable>--parity PARITY</replaceable></arg>
<arg><replaceable>--stopbits STOPBITS</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>&dhprogram;</command>
<arg>image</arg>
<arg>--printer</arg>
<arg><replaceable>--bitrate BITRATE</replaceable></arg>
<arg><replaceable>--datasize DATASIZE</replaceable></arg>
<arg><replaceable>--parity PARITY</replaceable></arg>
<arg><replaceable>--stopbits STOPBITS</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para><command>&dhprogram;</command> sets the
<command>&dhpackage;</command> output options.
No options displays the current configuration.
PARITY is 0 for none, 1 for odd, 2 for even.
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term><option>-h</option>
<option>--help</option></term>
<listitem>
<para>Show summary of options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--display</option></term>
<listitem>
<para>Enable output to display and set configuration.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--nodisplay</option></term>
<listitem>
<para>Disable output to display.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--modem</option></term>
<listitem>
<para>Enable output to serial port 0 (modem) and set configuration.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--nomodem</option></term>
<listitem>
<para>Disable output to modem port.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--printer</option></term>
<listitem>
<para>Enable output to serial port 1 (printer) and set configuration.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--noprinter</option></term>
<listitem>
<para>Disable output to printer port.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--gestaltid ID</option></term>
<listitem>
<para>Force the gestaltid to ID. Set to 0 to unset.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>REPORTING BUGS</title>
<para>Report bugs to Laurent Vivier &lt;Laurent@Vivier.EU&gt;</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>emile(8), emile-install(8), emile-first-tune(8),
emile-map-set(8), emile-set-cmdline(8), emile-mkisofs(8).</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; <&dhemail;> for
the &debian; system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the <acronym>GNU</acronym> GPL License, Version 2
or any later version published by the Free Software Foundation.
</para>
<para>This manual page has been updated by Laurent Vivier
&lt;Laurent@Vivier.EU&gt;.</para>
<para>
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

247
docs/emile.conf.sgml Normal file
View File

@ -0,0 +1,247 @@
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>Laurent</firstname>">
<!ENTITY dhsurname "<surname>Vivier</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>July 22, 2008</date>">
<!ENTITY dhsection "<manvolnum>5</manvolnum>">
<!ENTITY dhemail "<email>Laurent@Vivier.EU</email>">
<!ENTITY dhusername "Laurent Vivier">
<!ENTITY dhucpackage "<refentrytitle>emile</refentrytitle>">
<!ENTITY dhpackage "emile">
<!ENTITY dhprogram "emile.conf">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2008</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhprogram;</refname>
<refpurpose><command>&dhpackage;</command>
configuration file
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhprogram;</command>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para><command>&dhprogram;</command> is the configuration file for
<command>&dhpackage;</command> bootloader.
</para>
<para>The global configuration options are:</para>
<variablelist>
<varlistentry>
<term><option>partition</option></term>
<listitem>
<para>Define the boot partition.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>first_level</option></term>
<listitem>
<para>Define the file to copy to the boot sector (first level).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>second_level</option></term>
<listitem>
<para>Define the file loaded by the first level (second level).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>default</option></term>
<listitem>
<para>Define the entry number to use by default (first is 0).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>timeout</option></term>
<listitem>
<para>Define the time in second before automatically boot.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>gestaltID</option></term>
<listitem>
<para>Define the gestalt id to use.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>vga</option></term>
<listitem>
<para>Define video mode to use (default or none).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>modem</option></term>
<listitem>
<para>Define the modem serial port (0) configuration.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>printer</option></term>
<listitem>
<para>Define the printer serial port (1) configuration.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The entry configuration options are:</para>
<variablelist>
<varlistentry>
<term><option>title</option></term>
<listitem>
<para>Define the title of the entry.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>root</option></term>
<listitem>
<para>Define the partition where are stored the entry files.</para>
<para>The syntax is (sd SCSI ID,PARTITION ID)</para>
<para>SCSI ID can be given by "scsiadd -s"</para>
<para>PARTITION NUMBER is given by "emile --scanbus" minus 1</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>kernel</option></term>
<listitem>
<para>Define the kernel path.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>args</option></term>
<listitem>
<para>Define kernel arguments.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>initrd</option></term>
<listitem>
<para>Define initrd path.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>EXAMPLES</title>
<programlisting>
# example file for emile.conf
partition /dev/sda4
first_level /boot/emile/first_scsi
second_level /boot/emile/second_scsi
timeout 5
default 0
title Debian GNU/Linux, kernel 2.6.18-4-mac
root (sd0,3)
kernel /boot/vmlinuz-2.6.18-4-mac
args root=/dev/sda4 ro
initrd /boot/initrd.img-2.6.18-4-mac
title Debian GNU/Linux, kernel 2.2.25-mac
root (sd0,3)
kernel /boot/vmlinuz-2.2.25-mac
args root=/dev/sda4 ro
</programlisting>
</refsect1>
<refsect1>
<title>REPORTING BUGS</title>
<para>Report bugs to Laurent Vivier &lt;Laurent@Vivier.EU&gt;</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>emile-install(8), emile-set-cmdline(8), emile-first-tune(8),
emile-map-set(8), emile-set-output(8), emile-mkisofs(8).</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; <&dhemail;> for
the &debian; system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the <acronym>GNU</acronym> GPL License, Version 2
or any later version published by the Free Software Foundation.
</para>
<para>
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

188
docs/emile.sgml Normal file
View File

@ -0,0 +1,188 @@
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>Stephen</firstname>">
<!ENTITY dhsurname "<surname>Marenka</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>May 26, 2005</date>">
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<!ENTITY dhemail "<email>stephen@marenka.net</email>">
<!ENTITY dhusername "Stephen R. Marenka">
<!ENTITY dhucpackage "<refentrytitle>emile</refentrytitle>">
<!ENTITY dhpackage "emile">
<!ENTITY dhprogram "emile">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2005</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhprogram;</refname>
<refpurpose>install the <command>&dhpackage;</command>
bootloader
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhprogram;</command>
<arg><replaceable>options</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para><command>&dhprogram;</command> installs the
<command>&dhpackage;</command> bootloader. Run it with
<option>--test</option> to see the default values.
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term><option>-h</option>, <option>--help</option></term>
<listitem>
<para>Show summary of options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option>, <option>--verbose</option></term>
<listitem>
<para>Activate verbose mode.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-t</option>, <option>--test</option></term>
<listitem>
<para>Activate test mode (don't write to disk).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--scanbus</option></term>
<listitem>
<para>Display information about all disks and partitions.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--restore[=FILE]</option></term>
<listitem>
<para>Restore current boot block from FILE.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--backup[=FILE]</option></term>
<listitem>
<para>Backup current boot block to FILE.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--set-hfs</option></term>
<listitem>
<para>Set type of partition DEV to Apple_HFS
(needed to be bootable with a MacOS partition).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-c</option>, <option>--config=FILE</option></term>
<listitem>
<para>use config file FILE</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-n</option>, <option>--no-fs</option></term>
<listitem>
<para>don't use EMILE embededed filesystems</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>REPORTING BUGS</title>
<para>Report bugs to Laurent Vivier &lt;Laurent@Vivier.EU&gt;</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>emile-install(8), emile-set-cmdline(8), emile-first-tune(8),
emile-map-set(8), emile-set-output(8), emile-mkisofs(8).</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; <&dhemail;> for
the &debian; system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the <acronym>GNU</acronym> GPL License, Version 2
or any later version published by the Free Software Foundation.
</para>
<para>This manual page has been updated by Laurent Vivier
&lt;Laurent@Vivier.EU&gt;.</para>
<para>
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

45
first/32bitmode.i Normal file
View File

@ -0,0 +1,45 @@
.macro switch32bitmode
/* is a 32bit aware ROM ? */
movea.l ROMBase,%a0
move.w 8(%a0), %d1 /* read ROM id */
cmp.w #0x0178, %d1 /* only 24bit ROM */
bls.S bit32_ok
/* is a 32bit aware processor ? */
cmp.w #1, CPUFlag /* Is 68000 or 68010 */
bls.S bit32_ok
/* test if we are in 32bit mode */
move.l #-1, %d0
StripAddress
cmp.l #-1, %d0
beq.S bit32_ok
/* Switch to 32bit mode */
lea PRAM_buffer(%pc), %a0 /* where to store data */
move.w #1, %d0 /* size of data */
swap %d0
move.w #0x08A, %d0 /* offset in PRAM */
ReadXPRam
lea PRAM_buffer(%pc), %a0
or.b #0x05, (%a0)
move.w #1, %d0 /* size of data */
swap %d0
move.w #0x08A, %d0 /* offset in PRAM */
WriteXPRam
/* jump to reset function in ROM */
movea.l ROMBase,%a0
jmp 0x90(%a0)
bit32_ok:
.endm

View File

@ -1,31 +1,43 @@
#
#
# (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
# (c) 2004-2007 Laurent Vivier <Laurent@Vivier.EU>
#
#
first_scsi: ASFLAGS += --defsym SCSI_SUPPORT=1
first_floppy: ASFLAGS += --defsym FLOPPY_SUPPORT=1
TOP = $(shell pwd)
VPATH = $(TOP)
all: first_floppy first_scsi
ASFLAGS = -I$(TOP)
first: first.o
SOURCES = first.S
CLEAN = first_floppy.o first_scsi.o
HEADERS = floppy.i macos.i scsi.i 32bitmode.i
PROGRAMS = first_scsi first_floppy
.PHONY: all
all: $(PROGRAMS)
%: %.o
$(OBJCOPY) -O binary $^ $@
first.o: first.S
$(AS) $(ASFLAGS) $(SCSIFLAGS) -o $@ $^
first_scsi.o first_floppy.o first_ata.o: first.S
$(AS) $(ASFLAGS) -o $@ $^
first_floppy::
test -d floppy || mkdir floppy
cd floppy && make -f $(TOP)/Makefile TOP=$(TOP) AS=$(AS) \
OBJCOPY=$(OBJCOPY) first
mv floppy/first first_floppy
install::
install -d $(DESTDIR)/$(PREFIX)/boot/emile/
install first_scsi $(DESTDIR)/$(PREFIX)/boot/emile/first_scsi
install -d $(DESTDIR)/$(PREFIX)/lib/emile/
install first_floppy $(DESTDIR)/$(PREFIX)/lib/emile/first_floppy
first_scsi::
test -d scsi || mkdir scsi
cd scsi && make -f $(TOP)/Makefile TOP=$(TOP) AS=$(AS) \
OBJCOPY=$(OBJCOPY) SCSIFLAGS="--defsym SCSI_SUPPORT=1" first
mv scsi/first first_scsi
uninstall::
rm -f $(DESTDIR)/$(PREFIX)/boot/emile/first_scsi
rm -f $(DESTDIR)/$(PREFIX)/lib/emile/first_floppy
clean:
rm -f first_floppy first_scsi floppy/*.o scsi/*.o
include $(TOP)/../tools.mk
include $(TOP)/../Rules.mk

View File

@ -1,84 +1,16 @@
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
* (c) 2004,2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
.cpu 68000
.equ sector_size, 512
.equ first_level_size, 2 * sector_size
.ifdef SCSI_SUPPORT
/* SCSI constants */
.equ _SCSIGet, 0x0001
.equ _SCSISelect, 0x0002
.equ _SCSICmd, 0x0003
.equ _SCSIComplete, 0x0004
.equ _SCSIRead, 0x0005
.equ COMPLETION_TIMEOUT, 300
/* SCSI macros */
.macro SCSIDispatch selector
move.w #\selector, -(%sp)
dc.w 0xA815 /* _SCSIDispatch */
move.w (%sp)+, %d0
.endm
.else /* SCSI_SUPPORT */
/* floppy constants */
.equ drive_num, 1
.equ fsFromStart, 1
.equ sectors_per_track, 18
.equ sides, 2
.equ track_size, sector_size * sectors_per_track
.equ track_number, 80
.equ floppy_size, sides * track_size * track_number
.equ second_level_size, floppy_size - first_level_size
/* floppy macros */
.macro PBReadSync
.short 0xA002
.endm
.endif /* SCSI_SUPPORT */
.equ ROMBase, 0x2ae
.macro StripAddress
.short 0xA055
.endm
.macro ReadXPRam
.short 0xA051
.endm
.macro WriteXPRam
.short 0xA052
.endm
.macro NewPtr
.short 0xA11E
.endm
.macro SysError
.short 0xA9C9
.endm
/* Pascal string : length, string */
.macro pString string
pstring_begin_\@:
.byte pstring_end_\@ - pstring_string_\@ - 1
pstring_string_\@:
.string "\string"
pstring_end_\@:
.fill 16 - (pstring_end_\@ - pstring_begin_\@) , 1, 0
.endm
.include "macos.i"
.include "32bitmode.i"
/******************************************************************************
*
@ -106,67 +38,13 @@ SysHeapSize: .long 0x00020000 /* system heap size on all machines */
.ifdef SCSI_SUPPORT
.equ READ_10, 0x28
.equ CDB_offset, 2
.equ CDB_nb_blocks, 7
.include "scsi.i"
.align 4
CDB:
.byte READ_10
.byte 0
.long 0 /* offset to read, big-endian, like m68k */
.byte 0
.short 0 /* number of blocks to read, big-endian */
.byte 0
.else
.equ op_inc, 1
.equ op_no_inc, 2
.equ op_stop, 7
.include "floppy.i"
.equ TIB_buffer, 2
.equ TIB_size, 6
.align 4
TIB:
.short op_inc
.long 0
.long 0
.short op_stop
.long 0
.long 0
/* SCSI complete result */
stat: .short 0
message: .short 0
.else /* SCSI_SUPPORT */
/******************************************************************************
*
* param block used to load second stage from floppy
*
*****************************************************************************/
param_block:
.long 0 /* qLink : next queue entry */
.short 0 /* qType : queue type */
.short 0 /* ioTrap : routine trap */
.long 0 /* ioCmdAddr: routine address */
.long 0 /* ioCompletion : pointer to completion routine */
.short 0 /* ioResult : result code */
.long 0 /* ioNamePtr : pointer to pathname */
.short drive_num /* ioVRefNum : volume specification */
.short -5 /* ioRefNum: file reference number */
.byte 0 /* ioVersNum : version number */
.byte 0 /* ioPermssn : read/write permission */
.long 0 /* ioMisc : miscellaneaous */
ioBuffer: /* ioBuffer : data buffer */
.long 0
ioReqCount: /* ioReqCount : requested number of bytes */
.long second_level_size
.long 0 /* ioActCount : actual number of bytes */
.short fsFromStart /* ioPosMode : positioning mode and newline char */
ioPosOffset: /* ioPosOffset : positionning offset */
.long first_level_size
.endif /* SCSI_SUPPORT */
.endif
/******************************************************************************
*
@ -181,52 +59,21 @@ ioPosOffset: /* ioPosOffset : positionning offset */
.align 4
start:
movea.l ROMBase,%a0
move.w 8(%a0), %d1 /* read ROM id */
moveal SysZone,%a0
addal %pc@(SysHeapSize),%a0
SetApplBase
movel SysZone,TheZone
cmp.w #0x0178, %d1 /* only 24bit ROM */
bls.S bit32_ok
/* test if we are in 32bit mode, otherwise reboot in 32bit mode */
/* test if we are in 32bit mode */
switch32bitmode
move.l #-1, %d0
StripAddress
cmp.l #-1, %d0
beq.S bit32_ok
/* buffer size to store second stage booter */
/* Switch to 32bit mode */
lea PRAM_buffer(%pc), %a0 /* where to store data */
move.w #1, %d0 /* size of data */
swap %d0
move.w #0x08A, %d0 /* offset in PRAM */
ReadXPRam
lea PRAM_buffer(%pc), %a0
or.b #0x05, (%a0)
move.w #1, %d0 /* size of data */
swap %d0
move.w #0x08A, %d0 /* offset in PRAM */
WriteXPRam
/* jump to reset function in ROM */
movea.l ROMBase,%a0
jmp 0x90(%a0)
bit32_ok:
get_second_size %d0
/* Allocate Memory for second stage loader */
.ifdef SCSI_SUPPORT
/* buffer size to store second level booter */
move.l second_size(%pc), %d0
.else
lea ioReqCount(%pc),%a0
move.l (%a0), %d0
.endif
add.l #4, %d0
NewPtr
move.l %a0, %d0
@ -237,91 +84,9 @@ malloc_ok:
add.l #3, %d0
and.l #0xFFFFFFFC.l, %d0
.ifdef SCSI_SUPPORT
/* load second stage */
lea container_end(%pc), %a6
lea TIB(%pc), %a0 /* TIB */
move.l %d0, TIB_buffer(%a0)
lea PRAM_buffer(%pc), %a0
move.l %d0, (%a0)
scsi_loop:
/* prepare CDB */
lea CDB(%pc), %a0
move.w -(%a6), %d2
beq exit_scsi
move.w %d2, CDB_nb_blocks(%a0)
move.l -(%a6), CDB_offset(%a0)
/* compute # of bytes to transfer = block size * # of blocks */
move.w block_size(%pc), %d1
mulu %d2, %d1
/* prepare TIB */
lea TIB(%pc), %a0 /* TIB */
move.l %d1, TIB_size(%a0)
/* SCSI sequence */
/* SCSIGet */
clr.w -(%sp)
SCSIDispatch(_SCSIGet)
/* SCSISelect */
clr.w -(%sp)
move.w #0, -(%sp)
SCSIDispatch(_SCSISelect)
/* SCSICmd */
clr.w -(%sp)
pea CDB(%pc)
move.w #10, -(%sp)
SCSIDispatch(_SCSICmd)
/* SCSIRead */
clr.w -(%sp)
pea TIB(%pc)
SCSIDispatch(_SCSIRead)
/* SCSIComplete */
clr.w -(%sp)
pea stat(%pc)
pea message(%pc)
move.l #COMPLETION_TIMEOUT, -(%sp)
SCSIDispatch(_SCSIComplete)
bra scsi_loop
exit_scsi:
lea PRAM_buffer(%pc), %a0
move.l (%a0), %a0
.else
/* save result in the ParamBlockRec.ioBuffer */
lea ioBuffer(%pc),%a0
move.l %d0,(%a0)
/* Now, we load the second stage loader */
lea param_block(%pc),%a0
PBReadSync
tst.l %d0
beq read_ok
move.l #2, %d0
SysError
read_ok:
move.l ioBuffer(%pc),%a0
.endif /* SCSI_SUPPORT */
load_second
/* call second stage bootloader */

75
first/floppy.i Normal file
View File

@ -0,0 +1,75 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
/* floppy constants */
.equ drive_num, 1
.equ fsFromStart, 1
.equ sectors_per_track, 18
.equ sides, 2
.equ track_size, sector_size * sectors_per_track
.equ track_number, 80
.equ floppy_size, sides * track_size * track_number
.equ second_level_size, floppy_size - first_level_size
/* floppy macros */
.macro PBReadSync
.short 0xA002
.endm
/******************************************************************************
*
* param block used to load second stage from floppy
*
*****************************************************************************/
param_block:
.long 0 /* qLink : next queue entry */
.short 0 /* qType : queue type */
.short 0 /* ioTrap : routine trap */
.long 0 /* ioCmdAddr: routine address */
.long 0 /* ioCompletion : pointer to completion routine */
.short 0 /* ioResult : result code */
.long 0 /* ioNamePtr : pointer to pathname */
.short drive_num /* ioVRefNum : volume specification */
.short -5 /* ioRefNum: file reference number */
.byte 0 /* ioVersNum : version number */
.byte 0 /* ioPermssn : read/write permission */
.long 0 /* ioMisc : miscellaneaous */
ioBuffer: /* ioBuffer : data buffer */
.long 0
ioReqCount: /* ioReqCount : requested number of bytes */
.long second_level_size
.long 0 /* ioActCount : actual number of bytes */
.short fsFromStart /* ioPosMode : positioning mode and newline char */
ioPosOffset: /* ioPosOffset : positionning offset */
.long first_level_size
.macro get_second_size register
lea ioReqCount(%pc),%a0
move.l (%a0), \register
.endm
.macro load_second
/* save result in the ParamBlockRec.ioBuffer */
lea ioBuffer(%pc),%a0
move.l %d0,(%a0)
/* Now, we load the second stage loader */
lea param_block(%pc),%a0
PBReadSync
tst.l %d0
beq read_ok
move.l #2, %d0
SysError
read_ok:
move.l ioBuffer(%pc),%a0
.endm

50
first/macos.i Normal file
View File

@ -0,0 +1,50 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
.equ ROMBase, 0x2ae
.equ SysZone, 0x2a6
.equ TheZone, 0x2a6
.macro SetApplBase
.short 0xa057
.endm
.equ CPUFlag, 0x012F
.macro StripAddress
.short 0xA055
.endm
.macro ReadXPRam
.short 0xA051
.endm
.macro WriteXPRam
.short 0xA052
.endm
.macro NewPtr
.short 0xA11E
.endm
.macro NewPtrClear
.short 0xA31E
.endm
.macro SysError
.short 0xA9C9
.endm
/* Pascal string : length, string */
.macro pString string
pstring_begin_\@:
.byte pstring_end_\@ - pstring_string_\@ - 1
pstring_string_\@:
.string "\string"
pstring_end_\@:
.fill 16 - (pstring_end_\@ - pstring_begin_\@) , 1, 0
.endm

129
first/scsi.i Normal file
View File

@ -0,0 +1,129 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
/* SCSI constants */
.equ _SCSIGet, 0x0001
.equ _SCSISelect, 0x0002
.equ _SCSICmd, 0x0003
.equ _SCSIComplete, 0x0004
.equ _SCSIRead, 0x0005
.equ COMPLETION_TIMEOUT, 300
/* SCSI macros */
.macro SCSIDispatch selector
move.w #\selector, -(%sp)
dc.w 0xA815 /* _SCSIDispatch */
move.w (%sp)+, %d0
.endm
.macro get_second_size register
/* buffer size to store second level booter */
move.l second_size(%pc), \register
.endm
.macro load_second
lea container_end(%pc), %a6
lea TIB(%pc), %a0 /* TIB */
move.l %d0, TIB_buffer(%a0)
lea PRAM_buffer(%pc), %a0
move.l %d0, (%a0)
scsi_loop:
/* prepare CDB */
lea CDB(%pc), %a0
move.w -(%a6), %d2
beq exit_scsi
move.w %d2, CDB_nb_blocks(%a0)
move.l -(%a6), CDB_offset(%a0)
/* compute # of bytes to transfer = block size * # of blocks */
move.w block_size(%pc), %d1
mulu %d2, %d1
/* prepare TIB */
lea TIB(%pc), %a0 /* TIB */
move.l %d1, TIB_size(%a0)
/* SCSI sequence */
/* SCSIGet */
clr.w -(%sp)
SCSIDispatch(_SCSIGet)
/* SCSISelect */
clr.w -(%sp)
move.w unit_id(%pc), -(%sp)
SCSIDispatch(_SCSISelect)
/* SCSICmd */
clr.w -(%sp)
pea CDB(%pc)
move.w #10, -(%sp)
SCSIDispatch(_SCSICmd)
/* SCSIRead */
clr.w -(%sp)
pea TIB(%pc)
SCSIDispatch(_SCSIRead)
/* SCSIComplete */
clr.w -(%sp)
pea stat(%pc)
pea message(%pc)
move.l #COMPLETION_TIMEOUT, -(%sp)
SCSIDispatch(_SCSIComplete)
bra scsi_loop
exit_scsi:
lea PRAM_buffer(%pc), %a0
move.l (%a0), %a0
.endm
.equ READ_10, 0x28
.equ CDB_offset, 2
.equ CDB_nb_blocks, 7
.align 4
CDB:
.byte READ_10
.byte 0
.long 0 /* offset to read, big-endian, like m68k */
.byte 0
.short 0 /* number of blocks to read, big-endian */
.byte 0
.equ op_inc, 1
.equ op_no_inc, 2
.equ op_stop, 7
.equ TIB_buffer, 2
.equ TIB_size, 6
.align 4
TIB:
.short op_inc
.long 0
.long 0
.short op_stop
.long 0
.long 0
/* SCSI complete result */
stat: .short 0
message: .short 0

36
kernel.mk Normal file
View File

@ -0,0 +1,36 @@
#
# (c) 2004-2013 Laurent Vivier <Laurent@Vivier.EU>
#
# Kernel architecture
LINUX=$(shell ls $(LINUXPATH) 2> /dev/null)
ifeq ($(LINUX),$(LINUXPATH))
FILEARCH=$(shell file -bknL $(LINUX) | cut -d, -f 2)
ifeq ($(findstring PowerPC, $(FILEARCH)), PowerPC)
KARCH=ppc
KSTRIP=$(PPC_STRIP)
else
ifeq ($(findstring Motorola 68000, $(FILEARCH)), Motorola 68000)
KARCH=classic
KSTRIP=$(M68K_STRIP)
else
ifeq ($(findstring Motorola 68, $(FILEARCH)), Motorola 68)
KARCH=m68k
KSTRIP=$(M68K_STRIP)
else
KARCH=unknown
KSTRIP=$(M68K_STRIP)
endif
endif
endif
else
KARCH=m68k
KSTRIP=$(M68K_STRIP)
endif

21
libblock/Makefile Normal file
View File

@ -0,0 +1,21 @@
#
# (c) 2005-2007 Laurent Vivier <Laurent@Vivier.EU>
#
TOP=$(shell pwd)
68000FLAGS = -m68000 -Wa,-m68000
CFLAGS += -nostdlib -nodefaultlibs -Wall -Werror -Wno-multichar -fpic -O2 -Os
CPPFLAGS = -I$(TOP)/../libmacos -DARCH_M68K -I$(TOP)/../libstream
LIBRARY = libblock.a
SOURCES = block_close.c block_fstat.c block_lseek.c block_open.c block_read.c \
block_init.c block_mount.c
HEADERS = libblock.h block.h
all: $(LIBRARY)
include $(TOP)/../tools.mk
include $(TOP)/../Rules.mk

22
libblock/block.h Normal file
View File

@ -0,0 +1,22 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <sys/types.h>
#include <unistd.h>
#include <libstream.h>
typedef struct {
int base;
int offset;
int size;
device_io_t *device;
int current;
int buffer_size;
unsigned char buffer[0];
} block_FILE;
typedef device_io_t block_VOLUME;

17
libblock/block_close.c Normal file
View File

@ -0,0 +1,17 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdlib.h>
#include "libblock.h"
void block_close(stream_FILE *file)
{
if (file == NULL)
return;
free(file);
}

21
libblock/block_fstat.c Normal file
View File

@ -0,0 +1,21 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include "libblock.h"
#include "block.h"
int block_fstat(stream_FILE *_file, struct stream_stat *buf)
{
block_FILE *file = (block_FILE*)_file;
if (buf == NULL)
return -1;
if (file->size == -1)
return -1;
buf->st_size = file->size;
return 0;
}

20
libblock/block_init.c Normal file
View File

@ -0,0 +1,20 @@
/*
*
* (c) 2008 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include "libblock.h"
int block_init(device_io_t *device, filesystem_io_t *fs)
{
fs->mount = block_mount;
fs->umount = block_umount;
fs->open = block_open;
fs->read = block_read;
fs->lseek = block_lseek;
fs->close = block_close;
fs->fstat = block_fstat;
return 0;
}

33
libblock/block_lseek.c Normal file
View File

@ -0,0 +1,33 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include "libblock.h"
#include "block.h"
int block_lseek(stream_FILE *_file, off_t offset, int whence)
{
block_FILE *file = (block_FILE*)_file;
long new_offset;
switch(whence)
{
case SEEK_SET:
new_offset = offset;
break;
case SEEK_CUR:
new_offset = file->offset + offset;
break;
default:
return -1;
}
if (new_offset < 0)
return -1;
file->offset = new_offset;
return new_offset;
}

17
libblock/block_mount.c Normal file
View File

@ -0,0 +1,17 @@
/*
*
* (c) 2008 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include "libblock.h"
stream_VOLUME *block_mount(device_io_t *device)
{
return (stream_VOLUME*)device;
}
int block_umount(stream_VOLUME *volume)
{
return 0;
}

53
libblock/block_open.c Normal file
View File

@ -0,0 +1,53 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdlib.h>
#include "libblock.h"
#include "block.h"
#define NB_SECTORS (18*2)
/*
* path is "<first>,<size>"
* where <first> is the offset of the first byte to read on the device
* and <size> is the number of bytes to read then.
*/
stream_FILE *block_open(stream_VOLUME *volume, char *path)
{
block_FILE *block;
int blocksize = ((device_io_t*)volume)->get_blocksize(((device_io_t*)volume)->data);
int first, size;
first = strtol(path, &path, 0);
if ( (*path != ',') && (*path != 0) )
return NULL;
if (*path == ',')
{
path++;
size = strtol(path, &path, 0);
if (*path != 0)
return NULL;
}
else
size = -1;
block = (block_FILE *)malloc(sizeof(block_FILE) +
NB_SECTORS * blocksize);
if (block == NULL)
return NULL;
block->base = first;
block->offset = 0;
block->size = size;
block->device = (device_io_t*)volume;
block->current = -1;
block->buffer_size = NB_SECTORS;
return (stream_FILE*)block;
}

51
libblock/block_read.c Normal file
View File

@ -0,0 +1,51 @@
/*
*
* (c) 2005-2008 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <string.h>
#include "libblock.h"
#include "block.h"
size_t block_read(stream_FILE *_file, void *ptr, size_t size)
{
block_FILE *file = (block_FILE*)_file;
int part;
int block_nb;
int block_offset;
int read = 0;
int ret;
int blocksize = file->device->get_blocksize(file->device->data);
while (size != 0)
{
block_nb = (file->base +
file->offset / blocksize) / file->buffer_size;
block_offset = (file->base - block_nb * file->buffer_size) *
blocksize + file->offset;
if (block_nb != file->current)
{
ret = file->device->read_sector(file->device->data,
block_nb * file->buffer_size,
file->buffer,
file->buffer_size * blocksize);
if (ret == -1)
return read;
file->current = block_nb;
}
part = file->buffer_size * blocksize - block_offset;
if (part > size)
part = size;
memcpy(ptr, file->buffer + block_offset, part);
size -= part;
ptr = (char*)ptr + part;
file->offset += part;
read += part;
}
return read;
}

19
libblock/libblock.h Normal file
View File

@ -0,0 +1,19 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <sys/types.h>
#include <unistd.h>
#include <libstream.h>
extern int block_init(device_io_t *device, filesystem_io_t *fs);
extern stream_VOLUME *block_mount(device_io_t *device);
extern int block_umount(stream_VOLUME *volume);
extern stream_FILE *block_open(stream_VOLUME *volume, char *path);
extern void block_close(stream_FILE *file);
extern size_t block_read(stream_FILE *file, void *ptr, size_t size);
extern int block_lseek(stream_FILE *file, off_t offset, int whence);
extern int block_fstat(stream_FILE *file, struct stream_stat *buf);

33
libconfig/Makefile Normal file
View File

@ -0,0 +1,33 @@
#
# (c) 2005-2007 Laurent Vivier <Laurent@Vivier.EU>
#
TOP = $(shell pwd)
VPATH=$(TOP)
TARGET = native
CFLAGS += -nostdlib -nodefaultlibs -Wall -Werror -Wno-multichar
ifeq ($(TARGET), m68k-linux)
68000FLAGS = -m68000 -Wa,-m68000
CFLAGS += -fpic -O2 -Os
else
CFLAGS += -g
endif
CPPFLAGS = -I$(TOP)/../libstream
LIBRARY = libconfig.a
SOURCES = config_get_indexed_property.c config_get_next_property.c \
config_get_property.c config_remove_property.c \
config_set_property.c config_set_indexed_property.c \
config_remove_indexed_property.c config_find_indexed_property.c \
config_find_entry.c config_add_property.c
HEADERS = libconfig.h
all:
test -d $(TARGET) || mkdir $(TARGET)
$(MAKE) -C $(TARGET) -f $(TOP)/Makefile $(LIBRARY) TOP=$(TOP)
include $(TOP)/../tools.mk
include $(TOP)/../Rules.mk

View File

@ -0,0 +1,25 @@
/*
*
* (c) 2007 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include <string.h>
#include "libconfig.h"
int config_add_property(int8_t* configuration, char* name, char* property)
{
int index = strlen((char*)configuration);
if (index > 0)
{
configuration[index] = '\n';
index++;
}
sprintf((char*)configuration + index,
"%s %s", name, property);
return index;
}

View File

@ -0,0 +1,36 @@
/*
*
* (c) 2004-2007 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include <string.h>
#include "libconfig.h"
int config_find_entry(int8_t *configuration, char *name, char *property)
{
int index = 0;
int last_index;
char current_name[256];
char current_property[256];
if (name == NULL)
return -1;
while (configuration[index])
{
last_index = index;
index = config_get_next_property(configuration, index,
current_name, current_property);
if (index == -1)
return -1;
if ( (strcmp(name, current_name) == 0) &&
((property == NULL) ||
(strcmp(property, current_property) == 0)))
return last_index;
}
return -1;
}

View File

@ -0,0 +1,45 @@
/*
*
* (c) 2004-2007 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include <string.h>
#include "libconfig.h"
int config_find_indexed_property(int8_t *configuration, char *index_name, char *index_property, char *name, char *property)
{
int index;
int last_index;
char current_name[256];
if (index_name == NULL)
index = 0;
else {
index = config_find_entry(configuration, index_name, index_property);
index = config_get_next_property(configuration, index,
current_name, property);
}
while ((index != -1) && configuration[index])
{
last_index = index;
index = config_get_next_property(configuration, index,
current_name, property);
if ((name != NULL) && (strcmp(name, current_name) == 0))
return last_index;
if ((index_name != NULL) &&
(strcmp(index_name, current_name) == 0))
{
if (name == NULL)
return last_index;
break;
}
}
if (property)
property[0] = 0; /* clear property */
return -1;
}

View File

@ -0,0 +1,20 @@
/*
*
* (c) 2004-2007 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include <string.h>
#include "libconfig.h"
int config_get_indexed_property(int8_t *configuration, char *index_name, char *index_property, char *name, char *property)
{
int index ;
index = config_find_indexed_property(configuration,
index_name, index_property,
name, property);
return index;
}

View File

@ -0,0 +1,90 @@
/*
*
* (c) 2004-2007 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <string.h>
#include "libconfig.h"
static inline char* eat_blank(char *s)
{
again:
while ( (*s == ' ') || (*s == '\t') || (*s == '\n') )
s++;
if (*s == '#')
{
while (*s != '\n')
s++;
goto again;
}
return s;
}
static inline char *read_line(char *s)
{
s = eat_blank(s);
while (*s && (*s != '\n'))
s++;
if (*s == 0)
return s;
return s + 1;
}
char *config_read_word(char *line, char **next)
{
char *word;
line = eat_blank(line);
word = line;
while ( *line && (*line != ' ') && (*line != '\t') && (*line != '\n') )
line++;
*next = line;
return word;
}
int config_get_next_property(int8_t *configuration, int index, char *name, char *property)
{
char *next_word, *next_line;
char *current_name, *current_property;
next_line = (char*)configuration + index;
if (*next_line == 0)
return -1;
next_word = next_line;
next_line = read_line(next_line);
current_name = config_read_word(next_word, &next_word);
if (name)
{
strncpy(name, current_name, next_word - current_name);
name[next_word - current_name] = 0;
}
current_property = config_read_word(next_word, &next_word);
if (property)
{
if (next_line - current_property != 0)
{
strncpy(property, current_property,
next_line - current_property);
/* remove '\n' if needed */
if (*(next_line - 1) == '\n')
property[next_line - current_property - 1] = 0;
else
property[next_line - current_property] = 0;
}
else
*property = 0;
}
return next_line - (char*)configuration;
}

View File

@ -0,0 +1,14 @@
/*
*
* (c) 2004-2007 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include "libconfig.h"
int config_get_property(int8_t *configuration, char *name, char *property)
{
return config_get_indexed_property(configuration, NULL, NULL, name, property);
}

View File

@ -0,0 +1,36 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include <string.h>
#include "libconfig.h"
int config_remove_indexed_property(int8_t *configuration, char *index_name,
char *index_property, char *name)
{
int last_index;
int index;
int len = 0;
last_index = config_find_indexed_property(configuration, index_name,
index_property, name, NULL);
if (last_index == -1)
return -1;
index = config_get_next_property(configuration,
last_index, NULL, NULL);
if (index != -1)
{
len = strlen((char*)configuration + index);
memmove(configuration + last_index, configuration + index, len);
}
if (configuration[index + len - 1] == '\n')
len--;
configuration[index + len] = 0;
return last_index;
}

View File

@ -0,0 +1,15 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include <string.h>
#include "libconfig.h"
int config_remove_property(int8_t *configuration, char *name)
{
return config_remove_indexed_property(configuration, name, NULL, NULL);
}

View File

@ -0,0 +1,85 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include <string.h>
#include "libconfig.h"
int config_set_indexed_property(int8_t *configuration,
char *index_name, char *index_property,
char *name, char *property)
{
int last_index;
int index;
int len, len_new;
len_new = strlen(name) + 1 + strlen(property) + 1;
/* does this property exists in this indexed field ? */
last_index = config_find_indexed_property(configuration,
index_name, index_property,
name, NULL);
if (last_index == -1)
{
/* if not, does this indexed field exist ? */
last_index = config_find_indexed_property(configuration,
index_name, index_property,
NULL, NULL);
if (last_index == -1)
{
/* no, we add this property at the end */
last_index = strlen((char*)configuration);
if (last_index > 0)
last_index++; /* to insert a '\n' */
index = last_index;
}
else
{
/* yes, we add this property at the end of this indexed field */
last_index = config_get_next_property(configuration, last_index, NULL, NULL);
if (last_index != -1)
last_index = config_find_entry(configuration + last_index, index_name, NULL);
if (last_index == -1)
{
last_index = strlen((char*)configuration);
if (last_index > 0)
last_index++; /* to insert a '\n' */
}
index = last_index;
}
}
else
{
index = config_get_next_property(configuration, last_index, NULL, NULL);
if (index == -1)
index = strlen((char*)configuration);
}
len = strlen((char*)configuration + index);
memmove(configuration + last_index + len_new,
configuration + index, len);
if (last_index > 0)
configuration[last_index - 1] = '\n';
sprintf((char*)configuration + last_index,
"%s %s", name, property);
configuration[last_index + len_new - 1] = '\n';
/* remove ending '\n' */
len = strlen((char*)configuration + last_index);
if (configuration[last_index + len - 1] == '\n')
len--;
configuration[last_index + len] = 0;
return last_index;
}

View File

@ -0,0 +1,16 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include <string.h>
#include "libconfig.h"
int config_set_property(int8_t *configuration, char *name, char *property)
{
return config_set_indexed_property(configuration, NULL, NULL,
name, property);
}

19
libconfig/libconfig.h Normal file
View File

@ -0,0 +1,19 @@
/*
*
* (c) 2007 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <sys/types.h>
extern char *config_read_word(char *line, char **next);
extern int config_get_next_property(int8_t *configuration, int index, char *name, char *property);
extern int config_get_indexed_property(int8_t *configuration, char *index_name, char *index_property, char *name, char *property);
extern int config_get_property(int8_t *configuration, char *name, char *property);
extern int config_remove_property(int8_t *configuration, char *name);
extern int config_set_property(int8_t *configuration, char *name, char *property);
extern int config_set_indexed_property(int8_t *configuration, char *index_name, char *index_property, char *name, char *property);
extern int config_remove_indexed_property(int8_t *configuration, char *index_name, char *index_property, char *name);
extern int config_find_indexed_property(int8_t *configuration, char *index_name, char *index_property, char *name, char *property);
extern int config_find_entry(int8_t *configuration, char *name, char *property);
extern int config_add_property(int8_t* configuration, char* name, char* property);

23
libcontainer/Makefile Normal file
View File

@ -0,0 +1,23 @@
#
# (c) 2005-2007 Laurent Vivier <Laurent@Vivier.EU>
#
TOP=$(shell pwd)
VPATH=$(TOP)
68000FLAGS = -m68000 -Wa,-m68000
CFLAGS = -nostdlib -nodefaultlibs -Wall -Werror -Wno-multichar -fpic -O2 -Os
CPPFLAGS = -I$(TOP)/../libstream
LIBRARY = libcontainer.a
SOURCES = container_close.c container_lseek.c container_open.c \
container_read.c container_fstat.c container_init.c \
container_mount.c
HEADERS = libcontainer.h container.h
all: $(LIBRARY)
include $(TOP)/../tools.mk
include $(TOP)/../Rules.mk

24
libcontainer/container.h Normal file
View File

@ -0,0 +1,24 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#ifndef _CONTAINER_H_
#define _CONTAINER_H_
#include <sys/types.h>
#include <libstream.h>
typedef struct {
unsigned long offset;
device_io_t *device;
struct emile_container* container;
unsigned long current_block;
char *buffer[0];
} container_FILE;
typedef device_io_t container_VOLUME;
#endif /* _CONTAINER_H_ */

View File

@ -0,0 +1,23 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdlib.h>
#include "libcontainer.h"
#include "container.h"
void container_close(stream_FILE *file)
{
if (file == NULL)
return;
if (((container_FILE*)file)->container)
free(((container_FILE*)file)->container);
free(file);
return;
}

View File

@ -0,0 +1,21 @@
/*
*
* (c) 2005-2008 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include "libcontainer.h"
#include "container.h"
int container_fstat(stream_FILE *_file, struct stream_stat *buf)
{
container_FILE *file = (container_FILE*)_file;
if (buf == NULL)
return -1;
if (file->container->size == -1)
return -1;
buf->st_size = file->container->size;
return 0;
}

View File

@ -0,0 +1,20 @@
/*
*
* (c) 2008 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include "libcontainer.h"
int container_init(device_io_t *device, filesystem_io_t *fs)
{
fs->mount = container_mount;
fs->umount = container_umount;
fs->open = container_open;
fs->read = container_read;
fs->lseek = container_lseek;
fs->close = container_close;
fs->fstat = container_fstat;
return 0;
}

View File

@ -0,0 +1,36 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <sys/types.h>
#include <unistd.h>
#include "libcontainer.h"
#include "container.h"
int container_lseek(stream_FILE *_file, off_t offset, int whence)
{
container_FILE *file = (container_FILE*)_file;
long new_offset;
switch(whence)
{
case SEEK_SET:
new_offset = offset;
break;
case SEEK_CUR:
new_offset = file->offset + offset;
break;
default:
return -1;
}
if (new_offset < 0)
return -1;
file->offset = new_offset;
return new_offset;
}

View File

@ -0,0 +1,19 @@
/*
*
* (c) 2008 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <libstream.h>
#include "libcontainer.h"
#include "container.h"
stream_VOLUME *container_mount(device_io_t *device)
{
return (stream_VOLUME*)device;
}
int container_umount(stream_VOLUME *volume)
{
return 0;
}

View File

@ -0,0 +1,51 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include <stdlib.h>
#include "libcontainer.h"
#include "container.h"
stream_FILE *container_open(stream_VOLUME *volume, char *path)
{
container_FILE *file;
device_io_t *device = (device_io_t*)volume;
int block_size = device->get_blocksize(device->data);
unsigned long first, nbblocs;
int ret;
first = strtol(path, &path, 0);
if (*path != ',')
return NULL;
path++;
nbblocs = strtol(path, &path, 0);
if (*path != 0)
return NULL;
file = (container_FILE *)malloc(sizeof(container_FILE) + block_size);
if (file == NULL)
return NULL;
file->container = (struct emile_container*)malloc(block_size * nbblocs);
if (file->container == NULL)
{
free(file);
return NULL;
}
ret = device->read_sector(device->data, first, file->container, block_size * nbblocs);
if (ret == -1)
{
free(file->container);
free(file);
}
file->offset = 0;
file->device = device;
file->current_block = 0;
return (stream_FILE*)file;
}

View File

@ -0,0 +1,89 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <sys/types.h>
#include <string.h>
#include <stdio.h>
#include "libcontainer.h"
#include "container.h"
extern void error(char *x) __attribute__ ((noreturn));
static unsigned long seek_block(stream_FILE *_file)
{
container_FILE *file = (container_FILE*)_file;
struct emile_container *container = file->container;
ssize_t current;
int i;
unsigned long offset = file->offset;
int block_size = file->device->get_blocksize(file->device->data);
for (i = 0, current = 0;
container->blocks[i].offset != 0; i++)
{
int extent_size = block_size *
container->blocks[i].count;
if ( (current <= offset) && (offset < current + extent_size) )
{
return container->blocks[i].offset +
(offset - current) / block_size;
}
current += extent_size;
}
return 0;
}
size_t container_read(stream_FILE *_file, void *ptr, size_t size)
{
container_FILE *file = (container_FILE*)_file;
int err;
ssize_t read = 0;
int part;
int block_size = file->device->get_blocksize(file->device->data);
while (size != 0)
{
unsigned long block_nb;
int block_offset;
if (file->offset >= file->container->size)
return read;
block_nb = seek_block(_file);
block_offset = file->offset % block_size;
if (block_nb == 0)
error("BUG in libcontainer !!!");
if (block_nb != file->current_block)
{
err = file->device->read_sector(
file->device->data,
block_nb,
file->buffer,
block_size);
if (err == -1)
return -1;
file->current_block = block_nb;
}
part = block_size - block_offset;
if (part > size)
part = size;
memcpy(ptr, file->buffer + block_offset, part);
size -= part;
ptr = (char*)ptr + part;
file->offset += part;
read += part;
}
return read;
}

View File

@ -0,0 +1,33 @@
/*
*
* (c) 2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#ifndef _LIBCONTAINER_H_
#define _LIBCONTAINER_H_
#include <sys/types.h>
#include <libstream.h>
struct emile_block {
u_int32_t offset; /* offset of first block */
u_int16_t count; /* number of blocks */
} __attribute__((packed));
struct emile_container {
u_int32_t size;
struct emile_block blocks[0];
} __attribute__((packed));
extern stream_VOLUME *container_mount(device_io_t *device);
extern int container_umount(stream_VOLUME *volume);
extern int container_init(device_io_t *device, filesystem_io_t *fs);
extern stream_FILE *container_open(stream_VOLUME *volume, char *current);
extern void container_close(stream_FILE *file);
extern int container_lseek(stream_FILE *file, off_t offset, int whence);
extern size_t container_read(stream_FILE *file, void *ptr, size_t size);
extern int container_fstat(stream_FILE *file, struct stream_stat *buf);
#endif /* _LIBCONTAINER_H_ */

View File

@ -1,36 +1,33 @@
#
# (c) 2004-2007 Laurent Vivier <Laurent@Vivier.EU>
#
#
TOP=$(shell pwd)
VPATH=$(TOP)
CPPFLAGS = $(CROSS_COMPILE_CPPFLAGS)
LDFLAGS = $(CROSS_COMPILE_LDFLAGS)
LIBRARY = libemile.a
OBJS = emile_first_get_param.o emile_first_set_param.o \
emile_first_set_param_scsi.o emile_floppy_create_image.o \
emile_scsi_create_container.o emile_second_get_cmdline.o \
emile_second_get_kernel.o emile_second_get_output.o \
emile_second_set_cmdline.o emile_second_set_kernel.o \
emile_second_set_kernel_scsi.o emile_second_set_output.o \
emile_second_get_buffer_size.o emile_second_set_buffer_size.o \
emile_map_open.o emile_map_close.o emile_map_read.o \
emile_map_write.o emile_map_is_valid.o emile_map_geometry.o \
emile_map_get_driver_number.o emile_map_get_driver_info.o \
emile_map_bootblock_read.o emile_map_bootblock_write.o \
emile_map_partition_is_valid.o emile_map_get_partition_geometry.o \
emile_map_get_partition_type.o emile_map_get_partition_name.o \
emile_map_partition_is_bootable.o emile_map_partition_is_startup.o \
emile_map_set_partition_type.o emile_map_set_partition_name.o \
emile_map_partition_set_bootable.o emile_map_partition_set_startup.o \
emile_map_bootblock_is_valid.o emile_map_get_number.o \
emile_map_bootblock_get_type.o emile_scsi_get_dev.o \
emile_map_partition_get_flags.o emile_map_set_startup.o \
emile_scsi_get_rdev.o emile_map_has_apple_driver.o \
emile_map_seek_driver_partition.o emile_get_uncompressed_size.o \
emile_map_partition_set_flags.o
SOURCES = emile_first_get_param.c \
emile_first_set_param.c emile_first_set_param_scsi.c \
emile_floppy_create_image.c emile_second_create_mapfile.c \
emile_scsi_create_container.c emile_scsi_get_dev.c \
emile_scsi_get_rdev.c emile_second_get_configuration.c \
emile_second_set_configuration.c \
emile_second_set_param.c emile_second_get_param.c \
emile_first_set_param_scsi_extents.c
HEADERS = emile.h libemile.h emile-first.h
HEADERS = emile.h libemile.h bootblock.h
CFLAGS = -Wall -g
CFLAGS = -Wall -Werror -g
CPPFLAGS = -I$(TOP)/../libmacos -I$(TOP)/../libcontainer -I$(TOP)/../libstream -I$(TOP)/../libconfig -I$(TOP)/../libmap -I$(TOP)
all: $(LIBRARY)
all:
test -d $(TARGET) || mkdir $(TARGET)
$(MAKE) -C $(TARGET) -f $(TOP)/Makefile $(LIBRARY) TOP=$(TOP)
$(LIBRARY): $(OBJS)
$(AR) rc $@ $^
clean:
rm -f $(OBJS) $(LIBRARY)
include $(TOP)/../tools.mk
include $(TOP)/../Rules.mk

View File

@ -1,6 +1,6 @@
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
* (c) 2004 Laurent Vivier <Laurent@Vivier.EU>
*
*/
@ -12,7 +12,6 @@
#ifndef _BOOTBLOCK_H
#define _BOOTBLOCK_H
static __attribute__((used)) char* bootblock_header = "$CVSHeader$";
#include "../second/glue.h"
/* first level structure */
@ -41,6 +40,30 @@ struct BootBlkHdr {
#define ASSERT_BBH(a) if ( sizeof(BootBlkHdr_t) != 138 ) { a }
#define COMMON_PARAMS \
u_int32_t qLink; /* next queue entry */ \
u_int16_t qType; /* queue type */ \
u_int16_t ioTrap; /* routine trap */ \
u_int32_t ioCmdAddr; /* routine address */ \
u_int32_t ioCompletion; /* ptr to completion routine */ \
u_int16_t ioResult; /* result code */ \
u_int32_t ioNamePtr; /* pointer to pathname */ \
int16_t ioVRefNum; /* volume specification */
typedef struct ParamBlockRec ParamBlockRec_t;
struct ParamBlockRec {
COMMON_PARAMS
int16_t ioRefNum; /* file reference number */
int8_t ioVersNum; /* version number */
int8_t ioPermssn; /* read/write permission */
u_int32_t ioMisc; /* miscellaneaous */
u_int32_t ioBuffer; /* data buffer */
u_int32_t ioReqCount; /* requested number of bytes */
u_int32_t ioActCount; /* actual number of bytes */
u_int16_t ioPosMode; /* positioning mode and newline char */
int32_t ioPosOffset; /* positionning offset */
} __attribute__((packed));
/* EMILE Boot block structure */
typedef struct eBootBlock eBootBlock_t;

View File

@ -1,12 +1,12 @@
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
* (c) 2004,2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#ifndef _EMILE_H
#define _EMILE_H
static __attribute__((used)) char* emile_header = "$CVSHeader$";
static __attribute__((used)) char* emile_header = "$CVSHeader: $";
#include <endian.h>
#if __BYTE_ORDER == __BIG_ENDIAN

View File

@ -1,7 +1,7 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
* (c) 2004 Laurent Vivier <Laurent@Vivier.EU>
*
*/
@ -24,11 +24,11 @@ int emile_first_get_param(int fd, int *drive_num, int *second_offset,
if (ret != sizeof(firstBlock))
return EEMILE_CANNOT_READ_FIRST;
if ( strncmp( firstBlock.boot_block_header.SysName+1,
if ( strncmp( (char*)firstBlock.boot_block_header.SysName+1,
"Mac Bootloader", 14) == 0 )
{
*drive_num = read_short(&firstBlock.second_param_block.ioVRefNum);
*second_offset = read_long(&firstBlock.second_param_block.ioPosOffset);
*drive_num = read_short((u_int16_t*)&firstBlock.second_param_block.ioVRefNum);
*second_offset = read_long((u_int32_t*)&firstBlock.second_param_block.ioPosOffset);
*second_size = read_long(&firstBlock.second_param_block.ioReqCount);
}
else

View File

@ -1,7 +1,7 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
* (c) 2004 Laurent Vivier <Laurent@Vivier.EU>
*
*/
@ -29,15 +29,15 @@ int emile_first_set_param(int fd, unsigned short tune_mask, int drive_num,
if (ret != sizeof(firstBlock))
return EEMILE_CANNOT_READ_FIRST;
if ( strncmp( firstBlock.boot_block_header.SysName+1,
if ( strncmp( (char*)firstBlock.boot_block_header.SysName+1,
"Mac Bootloader", 14) == 0 )
{
if (tune_mask & EMILE_FIRST_TUNE_DRIVE)
write_short(&firstBlock.second_param_block.ioVRefNum,
write_short((u_int16_t*)&firstBlock.second_param_block.ioVRefNum,
drive_num);
if (tune_mask & EMILE_FIRST_TUNE_OFFSET)
write_long(&firstBlock.second_param_block.ioPosOffset,
write_long((u_int32_t*)&firstBlock.second_param_block.ioPosOffset,
second_offset);
if (tune_mask & EMILE_FIRST_TUNE_SIZE)

View File

@ -1,7 +1,7 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
* (c) 2004 Laurent Vivier <Laurent@Vivier.EU>
*
*/
@ -14,6 +14,8 @@ static __attribute__((used)) char* rcsid = "$CVSHeader$";
#include "libemile.h"
#define BLOCK_SIZE 512 /* FIXME: should ask the disk driver */
int emile_first_set_param_scsi(int fd, char *second_name)
{
int ret;
@ -29,6 +31,11 @@ int emile_first_set_param_scsi(int fd, char *second_name)
unsigned short *block_size = (unsigned short*)&first[1014];
unsigned short *count;
unsigned long *offset;
off_t location;
location = lseek(fd, 0, SEEK_CUR);
if (location == -1)
return EEMILE_CANNOT_READ_FIRST;
ret = read(fd, first, 1024);
if (ret == -1)
@ -42,44 +49,39 @@ int emile_first_set_param_scsi(int fd, char *second_name)
if (container == NULL)
return EEMILE_MALLOC_ERROR;
container->max_blocks = max_blocks;
fd_second = open(second_name, O_RDONLY);
if (fd_second == -1)
return EEMILE_CANNOT_OPEN_FILE;
ret = emile_scsi_create_container(fd_second, container);
ret = emile_scsi_create_container(fd_second, unit_id, container, max_blocks);
if (ret != 0)
return ret;
close(fd_second);
*unit_id = container->unit_id;
*block_size = container->block_size;
*block_size = BLOCK_SIZE;
*second_size = 0;
current = 1014;
for(i = 0; i < max_blocks - 1; i++)
{
current -= 2;
count = (short*)(&first[current]);
count = (unsigned short*)(&first[current]);
*count = container->blocks[i].count;
if (container->blocks[i].count == 0)
break;
printf("(%d, %d) ", container->blocks[i].offset,
container->blocks[i].count);
current -= 4;
offset = (long*)(&first[current]);
offset = (unsigned long*)(&first[current]);
*offset = container->blocks[i].offset;
(*second_size) += container->blocks[i].count;
}
putchar('\n');
/* mark end of blocks list */
current -= 2;
count = (short*)(&first[current]);
count = (unsigned short*)(&first[current]);
*count = 0;
/* set second level size */
(*second_size) *= container->block_size;
(*second_size) *= BLOCK_SIZE;
ret = lseek(fd, 0, SEEK_SET);
ret = lseek(fd, location, SEEK_SET);
if (ret != 0)
return EEMILE_CANNOT_WRITE_FIRST;

View File

@ -0,0 +1,63 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004-2006 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "libemile.h"
#include "emile.h"
int emile_first_set_param_scsi_extents( int fd, int drive_num, int second_offset, int size, int blocksize)
{
int ret;
char first[1024];
int current;
/* unsigned short max_blocks; */
int location;
location = lseek(fd, 0, SEEK_CUR);
if (location == -1)
return EEMILE_CANNOT_READ_FIRST;
ret = read(fd, first, 1024);
if (ret == -1)
return EEMILE_CANNOT_READ_FIRST;
/* max_blocks = read_short((u_int16_t*)&first[1022]) / 6; */
(void)read_short((u_int16_t*)&first[1022]);
write_short((u_int16_t*)&first[1014], blocksize);
write_short((u_int16_t*)&first[1016], drive_num);
write_long((u_int32_t*)&first[1018], 0);
current = 1014;
current -= 2;
write_short((u_int16_t*)&first[current], (size + blocksize - 1) / blocksize);
current -= 4;
write_long((u_int32_t*)&first[current], second_offset);
/* mark end of blocks list */
current -= 2;
write_short((u_int16_t*)(&first[current]), 0);
/* set second level size */
write_long((u_int32_t*)&first[1018], (size + blocksize - 1) / blocksize * blocksize);
ret = lseek(fd, location, SEEK_SET);
if (ret != location)
return EEMILE_CANNOT_WRITE_FIRST;
ret = write(fd, first, 1024);
if (ret == -1)
return EEMILE_CANNOT_WRITE_FIRST;
return 0;
}

View File

@ -1,7 +1,7 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
* (c) 2004 Laurent Vivier <Laurent@Vivier.EU>
*
*/
@ -11,17 +11,18 @@ static __attribute__((used)) char* rcsid = "$CVSHeader$";
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "libemile.h"
#include "emile.h"
#include "bootblock.h"
static int copy_file(int fd, char* file)
static ssize_t copy_file(int fd, char* file)
{
int source;
int size_read;
int size_written;
int total;
ssize_t size_read;
ssize_t size_written;
ssize_t total;
static char buffer[FLOPPY_SECTOR_SIZE];
source = open(file, O_RDONLY);
@ -66,11 +67,11 @@ static int copy_file(int fd, char* file)
return total;
}
static int pad_image(int fd, int size)
static ssize_t pad_image(int fd, ssize_t size)
{
static char buffer[FLOPPY_SECTOR_SIZE];
int size_written;
int total;
ssize_t size_written;
ssize_t total;
if (size % FLOPPY_SECTOR_SIZE) {
fprintf(stderr,
@ -90,86 +91,47 @@ static int pad_image(int fd, int size)
return total;
}
static int aggregate(int fd, char* first_level, char* second_level, char* kernel_image, char* ramdisk)
int emile_is_url(char *path)
{
int ret;
int total;
ret = copy_file(fd, first_level);
if (ret < 0)
return EEMILE_CANNOT_WRITE_FIRST;
total = ret;
ret = copy_file(fd, second_level);
if (ret < 0)
return EEMILE_CANNOT_WRITE_SECOND;
total += ret;
if (kernel_image != NULL)
{
ret = copy_file(fd, kernel_image);
if (ret < 0)
return EEMILE_CANNOT_WRITE_KERNEL;
total += ret;
}
if (ramdisk != NULL)
{
ret = copy_file(fd, ramdisk);
if (ret < 0)
return EEMILE_CANNOT_WRITE_RAMDISK;
total += ret;
}
ret = pad_image(fd, 1474560 - total);
if (ret < 0)
return EEMILE_CANNOT_WRITE_PAD;
return 0;
return path && ((strncmp(path, "iso9660:", strlen("iso9660:")) == 0) ||
(strncmp(path, "container:", strlen("container:")) == 0) ||
(strncmp(path, "block:", strlen("block:")) == 0) ||
(strncmp(path, "ext2:", strlen("ext2")) == 0));
}
int emile_floppy_create_image(char* first_level, char* second_level,
char* kernel_image, char* ramdisk,
unsigned long buffer_size, char* image)
int emile_floppy_create(char *image, char* first_level, char* second_level)
{
int ret;
int fd;
off_t offset;
ssize_t size;
int ret;
if (image == NULL)
return -1;
if (first_level == NULL)
{
return EEMILE_MISSING_FIRST;
}
if (second_level == NULL)
{
return EEMILE_MISSING_SECOND;
}
fd = open(image, O_RDWR|O_CREAT|O_TRUNC,
S_IRUSR| S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
if (fd == -1)
return EEMILE_CANNOT_CREATE_IMAGE;
/* aggregating files: first, second, kernel, ramdisk */
size = copy_file(fd, first_level);
if (size < 0)
return EEMILE_CANNOT_WRITE_FIRST;
if (first_level == NULL)
{
close(fd);
return EEMILE_MISSING_FIRST;
}
size = copy_file(fd, second_level);
if (size < 0)
return EEMILE_CANNOT_WRITE_SECOND;
if (second_level == NULL)
{
close(fd);
return EEMILE_MISSING_SECOND;
}
if (kernel_image == NULL)
fprintf(stderr, "WARNING: kernel image file not defined\n");
ret = aggregate(fd, first_level, second_level, kernel_image, ramdisk);
if (ret != 0)
{
close(fd);
return ret;
}
/* set first level info */
lseek(fd, 0, SEEK_SET);
offset = lseek(fd, 0, SEEK_SET);
ret = emile_first_set_param(fd, EMILE_FIRST_TUNE_DRIVE |
EMILE_FIRST_TUNE_OFFSET|
EMILE_FIRST_TUNE_SIZE,
@ -181,16 +143,89 @@ int emile_floppy_create_image(char* first_level, char* second_level,
return ret;
}
lseek(fd, offset, SEEK_SET);
return fd;
}
char* emile_floppy_add(int fd, char *image)
{
off_t offset;
ssize_t size;
char buf[64];
lseek(fd, 0, SEEK_END);
offset = lseek(fd, 0, SEEK_CUR);
if (offset == (off_t)-1)
return NULL;
size = copy_file(fd, image);
if (size == -1)
return NULL;
sprintf(buf, "block:(fd0)0x%lx,0x%zx", offset / 512, size);
return strdup(buf);
}
int emile_floppy_close(int fd)
{
int ret;
off_t offset;
lseek(fd, 0, SEEK_END);
offset = lseek(fd, 0, SEEK_CUR);
ret = pad_image(fd, 1474560 - offset);
if (ret < 0)
return EEMILE_CANNOT_WRITE_PAD;
close(fd);
return 0;
}
int emile_floppy_create_image(char* first_level, char* second_level,
char* kernel_image, char* ramdisk,
char* image)
{
int ret;
int fd;
char *kernel_url = NULL;
char *ramdisk_url = NULL;
if (image == NULL)
return -1;
if (kernel_image == NULL) {
fprintf(stderr, "ERROR: kernel image file not defined\n");
return -1;
}
fd = emile_floppy_create(image, first_level, second_level);
if (fd == -1)
return -1;
if ( emile_is_url(kernel_image) )
kernel_url = strdup(kernel_image);
else
kernel_url = emile_floppy_add(fd, kernel_image);
if ( ramdisk && emile_is_url(ramdisk) )
ramdisk_url = strdup(ramdisk);
else if (ramdisk)
ramdisk_url = emile_floppy_add(fd, ramdisk);
/* set second level info */
ret = emile_second_set_kernel(fd, kernel_image,
FIRST_LEVEL_SIZE +
emile_file_get_size(second_level),
ramdisk);
lseek(fd, FIRST_LEVEL_SIZE, SEEK_SET);
ret = emile_second_set_buffer_size(fd, buffer_size);
ret = emile_second_set_param(fd, kernel_url, NULL, ramdisk_url);
close(fd);
emile_floppy_close(fd);
free(kernel_url);
free(ramdisk_url);
return ret;
}

View File

@ -1,96 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include "libemile.h"
int emile_get_uncompressed_size(char *file)
{
int ret;
int i;
int tube[2];
char buffer[1024];
char *uncompressed;
struct stat st;
ret = stat(file, &st);
if (ret == -1)
return -1;
if (st.st_size == 0)
return -1;
ret = pipe(tube);
if (ret == -1)
return -1;
if (fork() == 0)
{
/* child */
close(tube[0]);
close(STDOUT_FILENO);
dup(tube[1]);
close(STDERR_FILENO);
execlp("gzip", "gzip", "-l", file, NULL);
/* never comes here ... */
exit(1);
}
/* parent */
close(tube[1]);
ret = read(tube[0], buffer, 1024);
if (ret == -1)
return -1;
if (ret == 0)
return 0;
/* skip first line */
i = 0;
while ( (buffer[i] != '\n') && (i < 1024))
i++;
i++; /* skip '\n' */
/* skip space */
while ( (buffer[i] == ' ') && (i < 1024))
i++;
/* skip compressed size */
while ( (buffer[i] >= '0') && buffer[i] <= '9' && (i < 1024))
i++;
buffer[i++] = 0;
/* skip space */
while ( (buffer[i] == ' ') && (i < 1024))
i++;
/* get uncompressed size */
uncompressed = &buffer[i];
while ( (buffer[i] >= '0') && buffer[i] <= '9' && (i < 1024))
i++;
buffer[i++] = 0;
close(tube[0]);
return atoi(uncompressed);
}

View File

@ -1,14 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include "partition.h"
#include "libemile.h"
int emile_map_bootblock_is_valid(char *bootblock)
{
return (bootblock[0] == 0x4C) && (bootblock[1] == 0x4B);
}

View File

@ -1,37 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include "partition.h"
#include "libemile.h"
int emile_map_bootblock_read(emile_map_t* map, char* bootblock)
{
char name[16];
int ret;
int fd;
if (!emile_map_partition_is_valid(map))
return -1;
sprintf(name, "%s%d", map->name, map->current + 1);
fd = open(name, O_RDONLY);
if (fd == -1)
return -1;
ret = read(fd, bootblock, BOOTBLOCK_SIZE);
close(fd);
return ret;
}

View File

@ -1,37 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include "partition.h"
#include "libemile.h"
int emile_map_bootblock_write(emile_map_t* map, char* bootblock)
{
char name[16];
int ret;
int fd;
if (!emile_map_partition_is_valid(map))
return -1;
sprintf(name, "%s%d", map->name, map->current + 1);
fd = open(name, O_WRONLY);
if (fd == -1)
return -1;
ret = write(fd, bootblock, BOOTBLOCK_SIZE);
close(fd);
return ret;
}

View File

@ -1,18 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include <stdlib.h>
#include <unistd.h>
#include "partition.h"
#include "libemile.h"
void emile_map_close(emile_map_t *map)
{
close(map->fd);
free(map);
}

View File

@ -1,20 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include "partition.h"
#include "libemile.h"
int emile_map_geometry(emile_map_t *map, int *block_size, int *block_count)
{
if (!emile_map_is_valid(map))
return -1;
*block_size = map->drivers.BlkSize;
*block_count = map->drivers.BlkCount;
return 0;
}

View File

@ -1,25 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include "partition.h"
#include "libemile.h"
int emile_map_get_driver_info(emile_map_t *map, int number,
int *block, int *size, int* type)
{
if (!emile_map_is_valid(map))
return -1;
if (number > emile_map_get_driver_number(map))
return -1;
*block = map->drivers.DrvInfo[number].Block;
*size = map->drivers.DrvInfo[number].Size;
*type = map->drivers.DrvInfo[number].Type;
return 0;
}

View File

@ -1,17 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include "partition.h"
#include "libemile.h"
int emile_map_get_driver_number(emile_map_t *map)
{
if (!emile_map_is_valid(map))
return -1;
return map->drivers.DrvrCount;
}

View File

@ -1,17 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include <stdlib.h>
#include <unistd.h>
#include "partition.h"
#include "libemile.h"
int emile_map_get_number(emile_map_t *map)
{
return map->partition.MapBlkCnt;
}

View File

@ -1,20 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include "partition.h"
#include "libemile.h"
int emile_map_get_partition_geometry(emile_map_t *map, int *start, int *count)
{
if (!emile_map_partition_is_valid(map))
return -1;
*start = map->partition.PyPartStart;
*count = map->partition.PartBlkCnt;
return 0;
}

View File

@ -1,19 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include <stdio.h>
#include "partition.h"
#include "libemile.h"
char* emile_map_get_partition_name(emile_map_t *map)
{
if (!emile_map_partition_is_valid(map))
return NULL;
return map->partition.PartName;
}

View File

@ -1,19 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include <stdio.h>
#include "partition.h"
#include "libemile.h"
char* emile_map_get_partition_type(emile_map_t *map)
{
if (!emile_map_partition_is_valid(map))
return NULL;
return map->partition.PartType;
}

View File

@ -1,40 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
/*
* See http://developer.apple.com/technotes/tn/tn1189.html
*
*/
#include <string.h>
#include "partition.h"
#include "libemile.h"
int emile_map_has_apple_driver(emile_map_t *map)
{
int block, size, type, part;
int i;
int ret;
for (i = 0; i < emile_map_get_driver_number(map); i++)
{
emile_map_get_driver_info(map, i, &block, &size, &type);
part = emile_map_seek_driver_partition(map, block);
ret = emile_map_read(map, part);
if (ret == -1)
return -1;
if (strncmp(map->partition.PartType,
APPLE_DRIVER, strlen(APPLE_DRIVER)) == 0)
return 1;
}
return 0;
}

View File

@ -1,14 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include "partition.h"
#include "libemile.h"
int emile_map_is_valid(emile_map_t *map)
{
return map->drivers.Sig == DD_SIGNATURE;
}

View File

@ -1,56 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include "partition.h"
#include "libemile.h"
emile_map_t* emile_map_open(char *dev, int flags)
{
emile_map_t *map;
int ret;
ASSERT_DD(printf("INTERNAL ERROR: Bad Block 0 size structure\n");
return NULL;)
ASSERT_P(printf("INTERNAL ERROR: Bad Partition size structure\n");
return NULL;)
map = (emile_map_t*)malloc(sizeof(emile_map_t));
if (map == NULL)
return NULL;
map->fd = open(dev, flags);
if (map->fd == -1)
{
free(map);
return NULL;
}
strncpy(map->name, dev, 16);
ret = read(map->fd, &map->drivers, sizeof(map->drivers));
if (ret == -1)
{
free(map);
return NULL;
}
ret = read(map->fd, &map->partition, sizeof(map->partition));
if (ret == -1)
{
free(map);
return NULL;
}
map->current = 0;
return map;
}

View File

@ -1,14 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include "partition.h"
#include "libemile.h"
int emile_map_partition_get_flags(emile_map_t *map)
{
return map->partition.PartStatus;
}

View File

@ -1,14 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include "partition.h"
#include "libemile.h"
int emile_map_partition_is_bootable(emile_map_t *map)
{
return (map->partition.PartStatus & kPartitionAUXIsBootValid) == kPartitionAUXIsBootValid;
}

View File

@ -1,14 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include "partition.h"
#include "libemile.h"
int emile_map_partition_is_startup(emile_map_t *map)
{
return (map->partition.PartStatus & kPartitionIsStartup) == kPartitionIsStartup;
}

View File

@ -1,14 +0,0 @@
static __attribute__((used)) char* rcsid = "$CVSHeader$";
/*
*
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
*
*/
#include "partition.h"
#include "libemile.h"
int emile_map_partition_is_valid(emile_map_t *map)
{
return map->partition.Sig == MAP_SIGNATURE;
}

Some files were not shown because too many files have changed in this diff Show More