mirror of
https://github.com/vivier/EMILE.git
synced 2025-08-05 16:25:18 +00:00
Compare commits
845 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5044fbd700 | ||
|
37c3d55720 | ||
|
224ab6eabc | ||
|
a84961eb1d | ||
|
5b5ffd7947 | ||
|
f1690f87ce | ||
|
0ee6aca5ae | ||
|
314268632b | ||
|
bd8f87287c | ||
|
08be6d9c46 | ||
|
59e2e59943 | ||
|
710d7ed2f6 | ||
|
4722d3550b | ||
|
162572aaf9 | ||
|
11bd9223ba | ||
|
6e23d9a665 | ||
|
b6f49c0e6b | ||
|
6b81ba9f49 | ||
|
1f37e6e9b5 | ||
|
53062ff0bf | ||
|
3be63e7001 | ||
|
02fdcb3eb4 | ||
|
9b3737d9cc | ||
|
7b836064ad | ||
|
081c7f96ee | ||
|
91a43e63c2 | ||
|
e1d35789fb | ||
|
7a22506a89 | ||
|
4de7597e14 | ||
|
0b05a2eff7 | ||
|
204bf1d146 | ||
|
cbe8d0c417 | ||
|
098deb6716 | ||
|
e6a2eb39cf | ||
|
1ec58fc07f | ||
|
c8fedc7bea | ||
|
d9935378a9 | ||
|
10560b543f | ||
|
b335df3487 | ||
|
6e9f924edb | ||
|
5d0c15c516 | ||
|
bd1790c47f | ||
|
4f3aa35240 | ||
|
2b5a4fc3bf | ||
|
9bd9755dbb | ||
|
0df27c2253 | ||
|
e1afe443ed | ||
|
a83f6671b6 | ||
|
fe1060c614 | ||
|
56b997e0de | ||
|
8cde86073a | ||
|
f2be9d761f | ||
|
14f8dd5556 | ||
|
7b2824186b | ||
|
72e809c89e | ||
|
c5342c3c4a | ||
|
320d556f34 | ||
|
05b155ce52 | ||
|
6bced901e2 | ||
|
8a1be776ad | ||
|
3130ac4a9e | ||
|
9bd17c1bd9 | ||
|
efcadd06c5 | ||
|
dd27d8c153 | ||
|
f71ae4b6d0 | ||
|
a2de5774fe | ||
|
2b6bc8a596 | ||
|
80b3fbbec7 | ||
|
5f819dde88 | ||
|
c1b482e48a | ||
|
2d8317cb92 | ||
|
003dc015eb | ||
|
c4f9714d63 | ||
|
aba7a139c5 | ||
|
f20c8f1194 | ||
|
2971c5775d | ||
|
e16d8501ed | ||
|
5d2fe2dbb2 | ||
|
72fe121b08 | ||
|
20e785f628 | ||
|
094feb6fe2 | ||
|
db0457b9e5 | ||
|
34dc6d518c | ||
|
894efdd1db | ||
|
c1ebc202d7 | ||
|
c5268fb299 | ||
|
e1d621532a | ||
|
5de80e9c48 | ||
|
bcd309d505 | ||
|
99a937f634 | ||
|
de93e31ec4 | ||
|
31fb7a324e | ||
|
e67d69181a | ||
|
7eb57e21d0 | ||
|
fe6896415e | ||
|
f89ab83ec9 | ||
|
e01d129289 | ||
|
57dee88fbf | ||
|
5f09d45ad9 | ||
|
d3d9a428a5 | ||
|
1a1478bfe8 | ||
|
be678577f6 | ||
|
4e79c0b645 | ||
|
fa06e26c9f | ||
|
b2b8839439 | ||
|
689316713e | ||
|
7ff51a725e | ||
|
fb68a737b7 | ||
|
fe0eeaba24 | ||
|
6d24a5fb5c | ||
|
f0a396777c | ||
|
75f78cecb6 | ||
|
b5058db8ef | ||
|
d7f20aeb29 | ||
|
b72acfbc1c | ||
|
ffdcb53fed | ||
|
2b81e1f813 | ||
|
b0ae9341dd | ||
|
336b5e6e57 | ||
|
10951f1f27 | ||
|
12269cce4d | ||
|
56e7f86bc4 | ||
|
86bc96b7e6 | ||
|
f589feb9c2 | ||
|
0d7c35c93e | ||
|
b8770434eb | ||
|
8c6638a28e | ||
|
ec0a68226e | ||
|
9b4a898b0f | ||
|
ff3e6e29a5 | ||
|
016a3c28fd | ||
|
15c6399d05 | ||
|
489d0f260d | ||
|
8edf4ba24d | ||
|
3023f1af53 | ||
|
27f4864fac | ||
|
cb5642517c | ||
|
c6acbdb73f | ||
|
e05ef43e51 | ||
|
833dfa6cf1 | ||
|
39497e48d8 | ||
|
f2dd688a89 | ||
|
4e9e2cbeb9 | ||
|
7d0557acf9 | ||
|
f1d9f61893 | ||
|
ea50cabbb7 | ||
|
f14b56a171 | ||
|
c528c83701 | ||
|
70a7b8ccb4 | ||
|
25228c9740 | ||
|
3266508559 | ||
|
a6d569b8ff | ||
|
0d9ccbf7be | ||
|
a090f5677e | ||
|
c6cf5c371e | ||
|
842b855232 | ||
|
38ffe34cfb | ||
|
8c9f0f37c8 | ||
|
6f7b9ceb38 | ||
|
b1ed42201b | ||
|
907bb917e6 | ||
|
636b075bb0 | ||
|
af26501420 | ||
|
a333f52121 | ||
|
68b7b1f4dd | ||
|
98bd88c574 | ||
|
2c64fafc4f | ||
|
0b40281c38 | ||
|
c017df52ba | ||
|
c346e2b01d | ||
|
5caae75dc2 | ||
|
d90125f60c | ||
|
578c62e97c | ||
|
fff0ca295b | ||
|
15ac0c394f | ||
|
35bfdc35f0 | ||
|
fd817737a8 | ||
|
e10c68dab1 | ||
|
73a10590a1 | ||
|
5f7643e48b | ||
|
fb689113dd | ||
|
f5d95ed881 | ||
|
b1594201cb | ||
|
18d598d5fa | ||
|
1272867d0c | ||
|
64bc718251 | ||
|
3969b083c7 | ||
|
42f4a71817 | ||
|
35b5df8a85 | ||
|
dd295326db | ||
|
6f37023fb1 | ||
|
0ec74c655d | ||
|
7e4c1ca39c | ||
|
1ff43d1924 | ||
|
d4719723dc | ||
|
bef869a741 | ||
|
6bd242d7ce | ||
|
3f4a3c5000 | ||
|
90b8e2db0b | ||
|
1ee27546a1 | ||
|
b04a3d1638 | ||
|
47a16fe0c8 | ||
|
c4fb2d359e | ||
|
3eb3d6005e | ||
|
642feb9d59 | ||
|
d3e4392b75 | ||
|
eb9c17f5ad | ||
|
79f9107e45 | ||
|
22b712687f | ||
|
55aa4a8e04 | ||
|
ac524c2a45 | ||
|
a844b4c51a | ||
|
cf28f647c7 | ||
|
db07ccf564 | ||
|
90db2e2b91 | ||
|
efe9ec379d | ||
|
7473cf35d2 | ||
|
b0c25d723f | ||
|
b189dfbbed | ||
|
e134c95553 | ||
|
2e5094aff9 | ||
|
41b81d76fb | ||
|
ce315dd349 | ||
|
912c63ad48 | ||
|
22d6bc63a9 | ||
|
ffe511becc | ||
|
360b17f8cc | ||
|
00c1bbf35a | ||
|
6c9d87a9dc | ||
|
499cf44318 | ||
|
e07088c23c | ||
|
c5f68b4a0e | ||
|
f76443357e | ||
|
79d62ad6ba | ||
|
ffa835644d | ||
|
f2745a6bbb | ||
|
4555512e10 | ||
|
69aec7aac7 | ||
|
7ba120c6c5 | ||
|
2fe3ca34e7 | ||
|
f85ef57bc2 | ||
|
0139be9609 | ||
|
ce59576cf7 | ||
|
816a2002a7 | ||
|
8b3e28e5b7 | ||
|
636b4d0868 | ||
|
52a797f3eb | ||
|
a47ae538de | ||
|
d9feeb1a76 | ||
|
a60a6bfb71 | ||
|
5a0b1494b5 | ||
|
05a073b147 | ||
|
03a6bdeb25 | ||
|
37c6ac70c6 | ||
|
6657d065cf | ||
|
d39a68703e | ||
|
2ebda90890 | ||
|
15c4184ee7 | ||
|
8a2503868e | ||
|
de9ecab9bc | ||
|
f88c5d72f1 | ||
|
f343388bab | ||
|
43fbf7ca14 | ||
|
b7ced84ebe | ||
|
600f012138 | ||
|
c7d9742b8a | ||
|
62904d7c71 | ||
|
2739696923 | ||
|
f6fea68b4a | ||
|
194894c58c | ||
|
3f2301a32f | ||
|
2526dd9419 | ||
|
04d9d79d74 | ||
|
d7e9eb55ec | ||
|
91b698a833 | ||
|
f215102d83 | ||
|
dd9b4869c5 | ||
|
dda7ab6a0e | ||
|
e193e79a69 | ||
|
b82dc3e69f | ||
|
abb1e988bf | ||
|
a3aaf95a3c | ||
|
267264c0f4 | ||
|
b78ead9cf9 | ||
|
ac5de6e43d | ||
|
920aca763f | ||
|
cdd6ddb62a | ||
|
ac7818b7eb | ||
|
84bc5c1e6d | ||
|
01a1a91188 | ||
|
02c1507c94 | ||
|
0eba1130ae | ||
|
d3076af249 | ||
|
a370cdfd49 | ||
|
7ee8215201 | ||
|
e8bbbe07bf | ||
|
bc78ec0127 | ||
|
f5740cf4e3 | ||
|
78e15acf9d | ||
|
e12e2bb481 | ||
|
f934710d86 | ||
|
757e8f9f34 | ||
|
880d7d25fd | ||
|
fb677da2fe | ||
|
14a1b857f2 | ||
|
c4b4ee30ac | ||
|
47e1a0bc43 | ||
|
98d6d9cbbe | ||
|
dfd1a1d590 | ||
|
0898b76381 | ||
|
4dd44e4d60 | ||
|
32aeab4427 | ||
|
8a586c3e31 | ||
|
45cb6b22d6 | ||
|
c3f9dc3024 | ||
|
19d7d47d02 | ||
|
33f08f27fc | ||
|
e45bfda8bf | ||
|
3861fa0c31 | ||
|
4e1468ddff | ||
|
6f5ab12ba7 | ||
|
6d5679817f | ||
|
088773a671 | ||
|
537b85855e | ||
|
b966757f98 | ||
|
d446f79fea | ||
|
256925db92 | ||
|
a7283acb85 | ||
|
650440b6b2 | ||
|
82470e3801 | ||
|
0fe8427c57 | ||
|
2bbea3543d | ||
|
c4871345d9 | ||
|
6f3cbe15a7 | ||
|
869161fd15 | ||
|
aeddb9f7e4 | ||
|
6e434b9527 | ||
|
d08a37ab65 | ||
|
4b0ec53cb4 | ||
|
09c1a2deaa | ||
|
e2bf762517 | ||
|
f6df478829 | ||
|
bae6b7b888 | ||
|
f5963dc437 | ||
|
6b07f02989 | ||
|
59b17aba2c | ||
|
b913b47144 | ||
|
4847639ee2 | ||
|
4b4778b1c0 | ||
|
18f005c3a0 | ||
|
d9885d3bf2 | ||
|
de3844b97d | ||
|
979196f410 | ||
|
d9d6867a57 | ||
|
523f28afcf | ||
|
b02c57eea7 | ||
|
f5d73a387d | ||
|
027eced2d7 | ||
|
3e35773799 | ||
|
dddc763535 | ||
|
20f15dbaa8 | ||
|
ba6f52623b | ||
|
b726b2b901 | ||
|
0319bb29f2 | ||
|
37d9728374 | ||
|
54fff16a0d | ||
|
76401bbcba | ||
|
14c9373da5 | ||
|
6b1602d426 | ||
|
f5989469e2 | ||
|
f19444a5f1 | ||
|
d8941fa5c0 | ||
|
d7ef366023 | ||
|
cfb0c28b54 | ||
|
efaf856a44 | ||
|
23de41a929 | ||
|
b9431c6cf7 | ||
|
51c3298ddd | ||
|
b01815f349 | ||
|
b38e307214 | ||
|
8436dcdd4a | ||
|
17ee95e6a8 | ||
|
5741e8a3ed | ||
|
fa8556a8bb | ||
|
1c1413507b | ||
|
b14103168d | ||
|
9f0952aa47 | ||
|
f960038213 | ||
|
2a8734aedc | ||
|
975a5090e5 | ||
|
1fe38714a4 | ||
|
7279dcd375 | ||
|
c00938b25e | ||
|
8d02f4dac4 | ||
|
70be974956 | ||
|
2ac007f7c2 | ||
|
60fa3d8d98 | ||
|
5bc97c0c34 | ||
|
ef694e0109 | ||
|
03adde4f89 | ||
|
61799a90e3 | ||
|
245acc3c4c | ||
|
981121e8fa | ||
|
bc2f989dd6 | ||
|
afa4db753e | ||
|
e97734ac1a | ||
|
1d5adc3204 | ||
|
93d4e46279 | ||
|
d9edce894b | ||
|
f0df08ad7e | ||
|
8d44531bf9 | ||
|
d13cb5bd7a | ||
|
f59ce4e653 | ||
|
962e367b64 | ||
|
5737c21d79 | ||
|
a8f1b3e0b3 | ||
|
f983467b0c | ||
|
b27c53bb00 | ||
|
01b51b602b | ||
|
f35017ae04 | ||
|
7e334dcc2f | ||
|
3de771d453 | ||
|
d03d07ed11 | ||
|
641bba58ff | ||
|
1d732318d1 | ||
|
f1e93f3a84 | ||
|
bff6076aa9 | ||
|
09e4ba8e43 | ||
|
e0cbb39f65 | ||
|
592f3e2068 | ||
|
45e29cda8a | ||
|
10026118a2 | ||
|
a2cfb4a4a7 | ||
|
49480d82b3 | ||
|
deea90cf36 | ||
|
a4b0ece6cd | ||
|
a1d8405965 | ||
|
e8bdbd5e5f | ||
|
d356dd3a53 | ||
|
b1eeb789a0 | ||
|
272ac39b96 | ||
|
454089d8df | ||
|
66fe6b688c | ||
|
3884c5b0ac | ||
|
fe11d5d9a2 | ||
|
4e3d7fc63c | ||
|
919b7521db | ||
|
d3561472bf | ||
|
4ed10e7af3 | ||
|
deb2d4c4d3 | ||
|
249c10bd36 | ||
|
b9d45a9e05 | ||
|
38753484e4 | ||
|
f9991b2944 | ||
|
64e1ab4983 | ||
|
a60529b2fd | ||
|
6f93ca663c | ||
|
41e204ab1d | ||
|
1cab2b046b | ||
|
21bec7bfa7 | ||
|
ddddfeffbb | ||
|
99efa437be | ||
|
cdc94e3962 | ||
|
a2d4a3624f | ||
|
09423e7e90 | ||
|
7be7cf61df | ||
|
8f419ba4b1 | ||
|
eb3cf75e0c | ||
|
f0493defba | ||
|
e6610164e0 | ||
|
edd5bc94fb | ||
|
93926639bc | ||
|
f48db9e15f | ||
|
e2777d45e2 | ||
|
26118c7f51 | ||
|
17796502ab | ||
|
1ddf371672 | ||
|
5dcd8bb683 | ||
|
29e78549bc | ||
|
ecd6e4a478 | ||
|
ada6f874ba | ||
|
46d18c90b4 | ||
|
09991740ef | ||
|
1c837e7b48 | ||
|
a9eabdd56d | ||
|
7ea5409a1c | ||
|
5b64251564 | ||
|
1d820285d1 | ||
|
0b90ff25b3 | ||
|
68e219e402 | ||
|
51aa5b458f | ||
|
fd27a28539 | ||
|
2f0f9f997e | ||
|
c7c53e03bf | ||
|
da4ce9585c | ||
|
53d1c73f96 | ||
|
3867353dec | ||
|
246caebcd4 | ||
|
e68b0482e8 | ||
|
58efcb5f44 | ||
|
21ee355ca7 | ||
|
c70264f609 | ||
|
479702a005 | ||
|
d163a2f291 | ||
|
ce0ab6332f | ||
|
002e3026ae | ||
|
7ce6576ba8 | ||
|
ed0b247d09 | ||
|
5feb420909 | ||
|
1153cd593a | ||
|
5eb95f1419 | ||
|
6df85e6083 | ||
|
c44daf1cd4 | ||
|
2f1d2b4667 | ||
|
a4abee7327 | ||
|
cbcdd3224b | ||
|
164f1b4abf | ||
|
92449e6c43 | ||
|
0abca62f09 | ||
|
a072a95201 | ||
|
4e9d97b275 | ||
|
f0129ad176 | ||
|
2ebcc7dbb3 | ||
|
c257b6b678 | ||
|
3eb8a4e2cc | ||
|
4d96dcd5a7 | ||
|
39af084fed | ||
|
fe964144eb | ||
|
8619cbb68b | ||
|
6e0322c6b6 | ||
|
cbbb9e8601 | ||
|
73c91de7a6 | ||
|
c6bce62661 | ||
|
5fa77b2ff2 | ||
|
5bcc5daee6 | ||
|
6f7ace6f54 | ||
|
854b0818e8 | ||
|
e9c96014f4 | ||
|
e101bf5337 | ||
|
da8b04e3b4 | ||
|
87b904a4e8 | ||
|
60ce7c18eb | ||
|
035322406a | ||
|
656abb6c79 | ||
|
151189f71f | ||
|
54521d6fe9 | ||
|
bb5ad6ce4d | ||
|
b8d426d278 | ||
|
5af2219caf | ||
|
4ec9db0ed0 | ||
|
016408427f | ||
|
6a18507e4c | ||
|
f672166f4e | ||
|
6a8a0ea92c | ||
|
14c7cedfa2 | ||
|
8f9d60c51b | ||
|
8fb36fd5f1 | ||
|
c2fa547aea | ||
|
a60049eb27 | ||
|
6b42385349 | ||
|
c470022639 | ||
|
6abf87cc0b | ||
|
51c32ac892 | ||
|
c3e57818e4 | ||
|
13c80d5e27 | ||
|
c54484befc | ||
|
417c927114 | ||
|
7a0405a53f | ||
|
723a50c993 | ||
|
2438e1a8c0 | ||
|
20bf00341d | ||
|
87a4092549 | ||
|
53f4028182 | ||
|
0e2fed5a0f | ||
|
b772a2238a | ||
|
8a3f83c256 | ||
|
628d40d957 | ||
|
a28a9d0cc0 | ||
|
f7868fb753 | ||
|
1bb375da59 | ||
|
8113b3e654 | ||
|
a57f6a8617 | ||
|
9d5ff84740 | ||
|
b0838c149a | ||
|
916b8de203 | ||
|
5596502a8d | ||
|
a7b18f9ade | ||
|
9aa7430439 | ||
|
a472cae367 | ||
|
91b49f5e6b | ||
|
f5bbe70865 | ||
|
4fc3d7c0d4 | ||
|
e43e6e49fe | ||
|
bcbeb89ac4 | ||
|
d449f26966 | ||
|
8406b30f6d | ||
|
5d238a87d0 | ||
|
aa95b99d93 | ||
|
d5fe5032e9 | ||
|
415d83c9fb | ||
|
b07e009f79 | ||
|
cf1f03dd19 | ||
|
0804f9981e | ||
|
be323732d0 | ||
|
56d2a72250 | ||
|
a3f46bd6c8 | ||
|
7e67a5fe43 | ||
|
b593442a31 | ||
|
e23b98e394 | ||
|
dc17cc55f7 | ||
|
7cf0906477 | ||
|
de2860a35c | ||
|
b2e366a3c5 | ||
|
0b6dcf91f1 | ||
|
83a63cd81f | ||
|
851e1e0777 | ||
|
e910ef344e | ||
|
0d7d894646 | ||
|
a90a4c3e23 | ||
|
88c144ac11 | ||
|
ad0f9c2b6b | ||
|
7a9f9c00e7 | ||
|
d8bc6db8f5 | ||
|
dc872d8725 | ||
|
ea80a54496 | ||
|
6f6b140704 | ||
|
9137bb1863 | ||
|
f112a09c5d | ||
|
f143ea45a2 | ||
|
9c140330c5 | ||
|
5194edb54d | ||
|
65e7d52cd2 | ||
|
0024ca3de5 | ||
|
11df103535 | ||
|
7e6ec8e67b | ||
|
3be455d92b | ||
|
8cf341f58a | ||
|
07d6ceb8ba | ||
|
bdb97aca27 | ||
|
4762fef3f5 | ||
|
4ab2d93ced | ||
|
3f843ab7cd | ||
|
9eca99d9ad | ||
|
7dae74d734 | ||
|
fceb358601 | ||
|
700ece4d7f | ||
|
30f53ccdbb | ||
|
364c09f440 | ||
|
ee35f84292 | ||
|
155c1089b1 | ||
|
c864f078d7 | ||
|
fed542e8ad | ||
|
6808d944de | ||
|
116c7694fb | ||
|
caf064dc24 | ||
|
ff1fec5667 | ||
|
83aedab363 | ||
|
1a8c9d41bb | ||
|
30010cfd14 | ||
|
b2e07a4ca6 | ||
|
a7d71a26c9 | ||
|
2c614bb92d | ||
|
d92b9626bf | ||
|
975bc3f86b | ||
|
4ad3c2d03f | ||
|
95445f9e41 | ||
|
bf4ca6f909 | ||
|
5008e1e67b | ||
|
333aeb50a2 | ||
|
a793ab5d75 | ||
|
7c3f166a1f | ||
|
70bf3c832e | ||
|
eed7ca3f57 | ||
|
cc3e4d9cd7 | ||
|
68c6b83ec3 | ||
|
81ad477370 | ||
|
a13572a4e8 | ||
|
942fdc2188 | ||
|
a27d6f2718 | ||
|
c743dcf449 | ||
|
afb28049a1 | ||
|
e09e3164ae | ||
|
906d4f2568 | ||
|
896ac19f91 | ||
|
d0411ded91 | ||
|
8d2c64e23f | ||
|
e44fa532f2 | ||
|
c0a9e8b158 | ||
|
2fa2fff513 | ||
|
2fba2c0ea9 | ||
|
f577bc1cfb | ||
|
cec570dde5 | ||
|
ca5cef15fd | ||
|
ed8593760b | ||
|
a10615bd87 | ||
|
f9dcbc903f | ||
|
4b80bcd7ff | ||
|
d1a3157e15 | ||
|
e556a2446c | ||
|
fdd862ea80 | ||
|
448618ccc0 | ||
|
af41df355b | ||
|
c344eec4c8 | ||
|
a94615b448 | ||
|
a216e4a7c5 | ||
|
63c0921975 | ||
|
9589271a29 | ||
|
b08a5c17e6 | ||
|
d626de9474 | ||
|
29fca40450 | ||
|
bdce469744 | ||
|
53ef8d07f5 | ||
|
9c77dd35a2 | ||
|
cd1a4a225a | ||
|
10099df5fe | ||
|
b7204c461d | ||
|
13d2ca4db7 | ||
|
bb1664be29 | ||
|
53b025cd20 | ||
|
85d5e7f6dd | ||
|
4f1548f32c | ||
|
687cf36497 | ||
|
9ea0efa446 | ||
|
d6bf048eaa | ||
|
e8d58acfbf | ||
|
6e81f25305 | ||
|
1aa1aed83a | ||
|
d3ae348d71 | ||
|
114c080273 | ||
|
ebcb14eaa7 | ||
|
f51aab30c9 | ||
|
93e7f68c4d | ||
|
696e2b9161 | ||
|
871934a0f6 | ||
|
d76f74e1eb | ||
|
2b7965a1d9 | ||
|
e0e7197acb | ||
|
ec64b11647 | ||
|
38e161e94c | ||
|
91aca2037d | ||
|
69cbebe1f7 | ||
|
a55aa395c7 | ||
|
341672825a | ||
|
6ab4fcd8bc | ||
|
6e979109ed | ||
|
d36bd9d0e9 | ||
|
d2ba0f38ad | ||
|
37604400ff | ||
|
cd28c1fb09 | ||
|
a368ddb175 | ||
|
8d736d79fe | ||
|
e046538add | ||
|
3d8cfe6db6 | ||
|
0db7640ed5 | ||
|
748de834c7 | ||
|
ab0912262c | ||
|
ee6d28c91f | ||
|
bce8a698c5 | ||
|
8a104ca7ca | ||
|
48c114c2f2 | ||
|
d5fd341704 | ||
|
79268ba7a5 | ||
|
73b3180e0e | ||
|
64e1e16e13 | ||
|
0326a56eaf | ||
|
8a787307e9 | ||
|
23e3126aa6 | ||
|
ac1205b240 | ||
|
823a432af9 | ||
|
01737ea3ce | ||
|
672a59c142 | ||
|
29e60b8681 | ||
|
cc45382557 | ||
|
7206af2a75 | ||
|
1d46991bab | ||
|
f6cdf4d2c9 | ||
|
1bf043e22d | ||
|
718f4054c5 | ||
|
e84481140d | ||
|
5ae61f058f | ||
|
43c7d65e4f | ||
|
2d3fab4f22 | ||
|
b4ea46f60e | ||
|
0af4e5c690 | ||
|
1b2b96804c | ||
|
476dee5088 | ||
|
3e469d90e0 | ||
|
383b010988 | ||
|
1d9d4b7255 | ||
|
aed2d777a0 | ||
|
fc3659730a | ||
|
be7b1acafb | ||
|
ee59e51919 | ||
|
e421b248fc | ||
|
f8dc89b20b | ||
|
6b88b53d85 | ||
|
4505b72ea2 | ||
|
7d9746cf92 | ||
|
0cad8c46bb | ||
|
eb1264bbcc | ||
|
652d8bee27 | ||
|
f706ea68ad | ||
|
0dbebc5e04 | ||
|
9c370d7600 | ||
|
46132c2af2 | ||
|
584610a01a | ||
|
b0323e54df | ||
|
9773bd7e68 | ||
|
02e687a878 | ||
|
bf1bdb6f92 | ||
|
8a7c567e1d | ||
|
088d52afef | ||
|
3276cd118c | ||
|
f962537ede | ||
|
4aa27aeab3 | ||
|
46c2cae538 | ||
|
5b5f6118dd | ||
|
7e7ae6ca7b | ||
|
e864052a45 | ||
|
02a73abc66 | ||
|
74135a8cda | ||
|
91eb3f460c | ||
|
29d30cd033 | ||
|
4d5dc66d99 | ||
|
9704f9621c | ||
|
6b03bcd7be | ||
|
87c23547c0 | ||
|
950d8d3f99 | ||
|
faac96d4a9 | ||
|
606df3c2a6 | ||
|
58875373bb | ||
|
8bcae44b04 | ||
|
ae3c4cf81a | ||
|
e6e52556ff | ||
|
145ed7479e | ||
|
dbfff6ba88 | ||
|
69d73de025 | ||
|
be8b8ee163 | ||
|
1e3f09576a | ||
|
f696ece068 | ||
|
acf4794515 | ||
|
7df4fa9949 | ||
|
8efc25ca70 | ||
|
b5c3418abf | ||
|
707177a891 |
67
.gitignore
vendored
Normal file
67
.gitignore
vendored
Normal 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/
|
2
AUTHORS
2
AUTHORS
@@ -1 +1 @@
|
|||||||
Laurent Vivier <LaurentVivier@wanadoo.fr>
|
Laurent Vivier <Laurent@Vivier.EU>
|
||||||
|
39
COPYING
39
COPYING
@@ -1,12 +1,12 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The licenses for most software are designed to take away your
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
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
|
General Public License applies to most of the Free Software
|
||||||
Foundation's software and to any other program whose authors commit to
|
Foundation's software and to any other program whose authors commit to
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
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.
|
your programs, too.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
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
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
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
|
License. (Exception: if the Program itself is interactive but
|
||||||
does not normally print such an announcement, your work based on
|
does not normally print such an announcement, your work based on
|
||||||
the Program is not required to print an announcement.)
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
These requirements apply to the modified work as a whole. If
|
||||||
identifiable sections of that work are not derived from the Program,
|
identifiable sections of that work are not derived from the Program,
|
||||||
and can be reasonably considered independent and separate works in
|
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
|
access to copy the source code from the same place counts as
|
||||||
distribution of the source code, even though third parties are not
|
distribution of the source code, even though third parties are not
|
||||||
compelled to copy the source along with the object code.
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
except as expressly provided under this License. Any attempt
|
except as expressly provided under this License. Any attempt
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
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
|
This section is intended to make thoroughly clear what is believed to
|
||||||
be a consequence of the rest of this License.
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
original copyright holder who places the Program under this License
|
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 preserving the free status of all derivatives of our free software and
|
||||||
of promoting the sharing and reuse of software generally.
|
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
|
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
|
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
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
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
|
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
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along
|
||||||
along with this program; if not, write to the Free Software
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
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
|
This General Public License does not permit incorporating your program into
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
consider it more useful to permit linking proprietary applications with the
|
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.
|
Public License instead of this License.
|
||||||
|
556
Makefile
556
Makefile
@@ -1,323 +1,409 @@
|
|||||||
#
|
#
|
||||||
# (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
# (c) 2004-2013 Laurent Vivier <Laurent@Vivier.EU>
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
PACKAGE = emile
|
MAKEFLAGS += --no-print-directory
|
||||||
VERSION = 0.9
|
|
||||||
|
|
||||||
PREFIX=/
|
include config.mk
|
||||||
|
include tools.mk
|
||||||
|
include kernel.mk
|
||||||
|
|
||||||
# kernel boot arguments
|
SYSTEM:=$(shell uname -s)
|
||||||
|
MACHINE:=$(shell uname -m)
|
||||||
FLOPPY=/dev/floppy/0
|
ifeq ($(SYSTEM), Linux)
|
||||||
#CONSOLE=console=ttyS0,9600n8 console=tty0
|
NATIVE:=$(MACHINE)-linux
|
||||||
|
|
||||||
NETBOOT_ARGS="root=/dev/nfs ip=dhcp rw $(CONSOLE)"
|
|
||||||
#RESCUE_ARGS="root=/dev/ramdisk ramdisk_size=2048 $(CONSOLE)"
|
|
||||||
RESCUE_ARGS="root=/dev/ramdisk $(CONSOLE)"
|
|
||||||
INSTALLER_ARGS="prompt_ramdisk=1 load_ramdisk=1 ramdisk_start=0 root=/dev/fd0 ramdisk_size=4096 $(CONSOLE)"
|
|
||||||
BOOT_ARGS="root=/dev/sda3 $(CONSOLE)"
|
|
||||||
|
|
||||||
# build info
|
|
||||||
|
|
||||||
WHO = $(shell whoami)
|
|
||||||
WHERE = $(shell hostname)
|
|
||||||
WHEN = $(shell LANG=C date)
|
|
||||||
ARCH = $(shell uname -m)
|
|
||||||
OS = $(shell uname -o)
|
|
||||||
|
|
||||||
SIGNATURE = $(PACKAGE)-$(VERSION) $(WHO)@$(WHERE)($(ARCH) $(OS)) $(WHEN)
|
|
||||||
|
|
||||||
# tools to use
|
|
||||||
|
|
||||||
AS=$(CROSS_COMPILE)as
|
|
||||||
CC=$(CROSS_COMPILE)gcc
|
|
||||||
LD=$(CROSS_COMPILE)ld
|
|
||||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
|
||||||
|
|
||||||
ifneq ($(ARCH),m68k)
|
|
||||||
M68K_CROSS_COMPILE = m68k-linux-
|
|
||||||
endif
|
|
||||||
|
|
||||||
M68K_AS=$(M68K_CROSS_COMPILE)as
|
|
||||||
M68K_CC=$(M68K_CROSS_COMPILE)gcc
|
|
||||||
M68K_LD=$(M68K_CROSS_COMPILE)ld
|
|
||||||
M68K_OBJCOPY=$(M68K_CROSS_COMPILE)objcopy
|
|
||||||
|
|
||||||
ifneq ($(ARCH),ppc)
|
|
||||||
PPC_CROSS_COMPILE = ppc-linux-
|
|
||||||
endif
|
|
||||||
|
|
||||||
PPC_AS=$(PPC_CROSS_COMPILE)as
|
|
||||||
PPC_CC=$(PPC_CROSS_COMPILE)gcc
|
|
||||||
PPC_LD=$(PPC_CROSS_COMPILE)ld
|
|
||||||
PPC_OBJCOPY=$(PPC_CROSS_COMPILE)objcopy
|
|
||||||
|
|
||||||
# Kernel architecture
|
|
||||||
|
|
||||||
RAMDISK=ramdisk.gz
|
|
||||||
KERNELPATH=vmlinux
|
|
||||||
|
|
||||||
KERNEL=$(shell ls $(KERNELPATH) 2> /dev/null)
|
|
||||||
|
|
||||||
ifeq ($(KERNEL),$(KERNELPATH))
|
|
||||||
FILEARCH=$(shell file -bknL $(KERNEL) | cut -d, -f 2)
|
|
||||||
ifeq ($(findstring PowerPC, $(FILEARCH)), PowerPC)
|
|
||||||
KARCH=ppc
|
|
||||||
else
|
else
|
||||||
ifeq ($(findstring Motorola 68, $(FILEARCH)), Motorola 68)
|
NATIVE:=$(MACHINE)-$(SYSTEM)
|
||||||
KARCH=m68k
|
|
||||||
else
|
|
||||||
KARCH=unknown
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
KARCH=m68k
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Target
|
# Target
|
||||||
|
|
||||||
all: libemile tools first/first_floppy second/$(KARCH)-second_floppy \
|
.PHONY: first libemile libblock libiso9660 libiso9660-m68k libgzip-m68k tools \
|
||||||
second/$(KARCH)-second_scsi
|
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
|
||||||
|
|
||||||
|
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.mk:
|
||||||
|
@echo "Please run ./configure"
|
||||||
|
@false
|
||||||
|
|
||||||
|
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
|
# We can build floppy image only if a kernel is provided
|
||||||
|
|
||||||
ifeq ($(KERNEL),$(KERNELPATH))
|
ifeq ($(LINUX),$(LINUXPATH))
|
||||||
all_bin: netboot.bin rescue.bin debian-installer.bin boot.bin
|
|
||||||
rm -f last.bin
|
|
||||||
|
|
||||||
floppy.bin: libemile tools first/first_floppy vmlinuz \
|
ALL_BIN += netboot.bin rescue.bin debian-installer.bin boot.bin multiboot.bin second/$(KARCH)-linux-scsi/second second/$(KARCH)-linux-all/second
|
||||||
second/$(KARCH)-second_floppy
|
|
||||||
|
floppy.bin: tools first vmlinuz \
|
||||||
|
second/$(KARCH)-linux-floppy/second
|
||||||
tools/emile-install -f first/first_floppy \
|
tools/emile-install -f first/first_floppy \
|
||||||
-s second/$(KARCH)-second_floppy \
|
-s second/$(KARCH)-linux-floppy/second \
|
||||||
-k vmlinuz floppy.bin.X
|
-k vmlinuz floppy.bin.X
|
||||||
ifdef CONSOLE
|
ifdef CONSOLE
|
||||||
tools/emile-set-output floppy.bin.X --printer --modem
|
tools/emile-set-output floppy.bin.X --printer --modem
|
||||||
|
endif
|
||||||
|
ifdef GESTALTID
|
||||||
|
tools/emile-set-output floppy.bin.X --gestaltid $(GESTALTID)
|
||||||
endif
|
endif
|
||||||
mv floppy.bin.X floppy.bin
|
mv floppy.bin.X floppy.bin
|
||||||
|
|
||||||
floppy_ramdisk.bin: libemile tools first/first_floppy vmlinuz \
|
floppy_ramdisk.bin: tools first vmlinuz \
|
||||||
second/$(KARCH)-second_floppy $(RAMDISK)
|
second/$(KARCH)-linux-floppy/second $(LINUXRAMDISK)
|
||||||
tools/emile-install -f first/first_floppy \
|
tools/emile-install -f first/first_floppy \
|
||||||
-s second/$(KARCH)-second_floppy \
|
-s second/$(KARCH)-linux-floppy/second \
|
||||||
-k vmlinuz -r $(RAMDISK) floppy_ramdisk.bin.X
|
-k vmlinuz -r $(LINUXRAMDISK) floppy_ramdisk.bin.X
|
||||||
ifdef CONSOLE
|
ifdef CONSOLE
|
||||||
tools/emile-set-output floppy_ramdisk.bin.X --printer --modem
|
tools/emile-set-output floppy_ramdisk.bin.X --printer --modem
|
||||||
|
endif
|
||||||
|
ifdef GESTALTID
|
||||||
|
tools/emile-set-output floppy_ramdisk.bin.X --gestaltid $(GESTALTID)
|
||||||
endif
|
endif
|
||||||
mv floppy_ramdisk.bin.X floppy_ramdisk.bin
|
mv floppy_ramdisk.bin.X floppy_ramdisk.bin
|
||||||
|
|
||||||
debian-installer.bin: floppy.bin
|
debian-installer.bin: floppy.bin
|
||||||
rm -f last.bin
|
rm -f last.bin
|
||||||
cp floppy.bin debian-installer.bin.X
|
cp floppy.bin debian-installer.bin.X
|
||||||
tools/emile-set-cmdline debian-installer.bin.X $(INSTALLER_ARGS)
|
tools/emile-set-cmdline -a $(INSTALLER_ARGS) debian-installer.bin.X
|
||||||
mv debian-installer.bin.X debian-installer.bin
|
mv debian-installer.bin.X debian-installer.bin
|
||||||
ln -s debian-installer.bin last.bin
|
ln -s debian-installer.bin last.bin
|
||||||
|
|
||||||
netboot.bin: floppy.bin
|
netboot.bin: floppy.bin
|
||||||
rm -f last.bin
|
rm -f last.bin
|
||||||
cp floppy.bin netboot.bin.X
|
cp floppy.bin netboot.bin.X
|
||||||
tools/emile-set-cmdline netboot.bin.X $(NETBOOT_ARGS)
|
tools/emile-set-cmdline -a $(NETBOOT_ARGS) netboot.bin.X
|
||||||
mv netboot.bin.X netboot.bin
|
mv netboot.bin.X netboot.bin
|
||||||
ln -s netboot.bin last.bin
|
ln -s netboot.bin last.bin
|
||||||
|
|
||||||
rescue.bin: floppy_ramdisk.bin
|
rescue.bin: floppy_ramdisk.bin
|
||||||
rm -f last.bin
|
rm -f last.bin
|
||||||
cp floppy_ramdisk.bin rescue.bin.X
|
cp floppy_ramdisk.bin rescue.bin.X
|
||||||
tools/emile-set-cmdline rescue.bin.X $(RESCUE_ARGS)
|
tools/emile-set-cmdline -a $(RESCUE_ARGS) rescue.bin.X
|
||||||
mv rescue.bin.X rescue.bin
|
mv rescue.bin.X rescue.bin
|
||||||
ln -s rescue.bin last.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
|
boot.bin: floppy.bin
|
||||||
rm -f last.bin
|
rm -f last.bin
|
||||||
cp floppy.bin boot.bin.X
|
cp floppy.bin boot.bin.X
|
||||||
tools/emile-set-cmdline boot.bin.X $(BOOT_ARGS)
|
tools/emile-set-cmdline -a $(BOOT_ARGS) boot.bin.X
|
||||||
mv boot.bin.X boot.bin
|
mv boot.bin.X boot.bin
|
||||||
ln -s boot.bin last.bin
|
ln -s boot.bin last.bin
|
||||||
|
|
||||||
vmlinux.bin: $(KERNEL)
|
vmlinuz: $(LINUX)
|
||||||
$(M68K_OBJCOPY) -I elf32-big -O binary -R .note -R .comment -S $(KERNEL) vmlinux.bin
|
$(KSTRIP) -s $(LINUX) -o $(LINUX).stripped
|
||||||
|
gzip -9 $(LINUX).stripped
|
||||||
vmlinuz: vmlinux.bin
|
mv $(LINUX).stripped.gz vmlinuz
|
||||||
cp vmlinux.bin vmlinuz.out
|
|
||||||
gzip -9 vmlinuz.out
|
|
||||||
mv vmlinuz.out.gz vmlinuz
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
first/first_floppy::
|
NETBSDPATH=netbsd
|
||||||
$(MAKE) -C first OBJCOPY=$(M68K_OBJCOPY) LD=$(M68K_LD) CC=$(M68K_CC) AS=$(M68K_AS) SIGNATURE="$(SIGNATURE)"
|
|
||||||
|
|
||||||
second/$(KARCH)-second_floppy::
|
NETBSD=$(shell ls $(NETBSDPATH) 2> /dev/null)
|
||||||
$(MAKE) -C second OBJCOPY=$(M68K_OBJCOPY) LD=$(M68K_LD) CC=$(M68K_CC) \
|
|
||||||
AS=$(M68K_AS) VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)" \
|
|
||||||
$(KARCH)-second_floppy
|
|
||||||
|
|
||||||
second/$(KARCH)-second_scsi::
|
ifeq ($(NETBSD),$(NETBSDPATH))
|
||||||
$(MAKE) -C second OBJCOPY=$(M68K_OBJCOPY) LD=$(M68K_LD) CC=$(M68K_CC) \
|
netbsd-floppy.bin: tools first netbsd.gz \
|
||||||
AS=$(M68K_AS) VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)" \
|
second/m68k-netbsd-floppy/second
|
||||||
$(KARCH)-second_scsi
|
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
|
||||||
|
mv netbsd-floppy.bin.X netbsd-floppy.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
|
||||||
|
|
||||||
|
netbsd.gz: $(NETBSD)
|
||||||
|
$(KSTRIP) -s $(NETBSD) -o $(NETBSD).stripped
|
||||||
|
gzip -9 $(NETBSD).stripped
|
||||||
|
mv $(NETBSD).stripped.gz netbsd.gz
|
||||||
|
endif
|
||||||
|
|
||||||
|
all_bin: $(ALL_BIN)
|
||||||
|
rm -f last.bin
|
||||||
|
|
||||||
|
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::
|
libemile::
|
||||||
$(MAKE) -C libemile all VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)" \
|
$(MAKE) -C libemile all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
|
||||||
CROSS_COMPILE=$(CROSS_COMPILE)
|
|
||||||
|
|
||||||
tools::
|
libfloppy::
|
||||||
$(MAKE) -C tools all VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)" \
|
$(MAKE) -C libfloppy all CC=$(M68K_CC) AS=$(M68K_AS)
|
||||||
PREFIX=$(PREFIX) CROSS_COMPILE=$(CROSS_COMPILE)
|
|
||||||
|
libscsi::
|
||||||
|
$(MAKE) -C libscsi all CC=$(M68K_CC) AS=$(M68K_AS)
|
||||||
|
|
||||||
|
libstream::
|
||||||
|
$(MAKE) -C libstream all CC=$(M68K_CC) AS=$(M68K_AS)
|
||||||
|
|
||||||
|
libmap::
|
||||||
|
$(MAKE) -C libmap all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
|
||||||
|
|
||||||
|
libmap-m68k::
|
||||||
|
$(MAKE) -C libmap all TARGET=m68k-linux
|
||||||
|
|
||||||
|
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::
|
docs::
|
||||||
$(MAKE) -C docs all
|
$(MAKE) -C docs all
|
||||||
|
|
||||||
dump: last.bin
|
dump: last.bin
|
||||||
dd if=last.bin of=$(FLOPPY) bs=512
|
dd if=last.bin of=$(FLOPPY) bs=512
|
||||||
# eject makes hanging my USB floppy device
|
|
||||||
#eject $(FLOPPY)
|
|
||||||
|
|
||||||
install: all
|
install: tools-install first-install second-install docs-install
|
||||||
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/$(KARCH)-second_scsi $(DESTDIR)/$(PREFIX)/boot/emile/$(KARCH)-second_scsi
|
|
||||||
install -d $(DESTDIR)/$(PREFIX)/lib/emile/
|
|
||||||
install second/$(KARCH)-second_floppy $(DESTDIR)/$(PREFIX)/lib/emile/$(KARCH)-second_floppy
|
|
||||||
$(MAKE) -C docs install
|
|
||||||
|
|
||||||
uninstall:
|
uninstall: tools-uninstall first-uninstall second-uninstall docs-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/$(KARCH)-second_scsi
|
|
||||||
rm -f $(DESTDIR)/$(PREFIX)/lib/emile/$(KARCH)-second_floppy
|
|
||||||
$(MAKE) -C docs uninstall
|
|
||||||
|
|
||||||
clean:
|
libemile-clean:
|
||||||
$(MAKE) -C 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
|
$(MAKE) -C tools clean
|
||||||
|
|
||||||
|
first-clean:
|
||||||
$(MAKE) -C first clean
|
$(MAKE) -C first clean
|
||||||
|
|
||||||
|
second-clean:
|
||||||
$(MAKE) -C second clean
|
$(MAKE) -C second clean
|
||||||
|
|
||||||
|
docs-clean:
|
||||||
$(MAKE) -C docs clean
|
$(MAKE) -C docs clean
|
||||||
|
|
||||||
|
libfloppy-clean:
|
||||||
|
$(MAKE) -C libfloppy clean
|
||||||
|
|
||||||
|
distclean:: clean
|
||||||
|
rm -f tools.mk
|
||||||
|
|
||||||
|
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 \
|
rm -f floppy.bin floppy.bin.X floppy_ramdisk.bin \
|
||||||
floppy_ramdisk.bin.X rescue.bin rescue.bin.X \
|
floppy_ramdisk.bin.X rescue.bin rescue.bin.X \
|
||||||
debian-installer.bin debian-installer.bin.X \
|
debian-installer.bin debian-installer.bin.X \
|
||||||
netboot.bin netboot.bin.X boot.bin boot.bin.X \
|
netboot.bin netboot.bin.X boot.bin boot.bin.X \
|
||||||
vmlinuz vmlinux.bin last.bin
|
vmlinuz last.bin cdboot-sarge.bin cdboot-woody.bin \
|
||||||
|
multiboot.bin
|
||||||
|
|
||||||
MAIN_FILES = AUTHORS ChangeLog COPYING Makefile README README.floppy \
|
DISTFILES = AUTHORS ChangeLog COPYING Makefile README README.floppy \
|
||||||
README.scsi
|
README.scsi Rules.mk config/floppy.conf kernel.mk config.mk
|
||||||
|
|
||||||
FIRST_FILES = first/Makefile first/first.S
|
|
||||||
|
|
||||||
SECOND_FILES = second/MMU030.c second/MMU030.h second/MMU030_asm.S \
|
|
||||||
second/MMU040.c second/MMU040.h second/MMU040_asm.S \
|
|
||||||
second/PPC_asm.S second/bootx.h second/bootx.c \
|
|
||||||
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/enter_kernelPPC.S second/enter_kernelPPC.h \
|
|
||||||
second/enter_kernelnoMMU.S \
|
|
||||||
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 second/keyboard.h \
|
|
||||||
second/keyboard.c second/cli.h second/cli.c
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
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 \
|
|
||||||
libemile/emile_map_get_bootinfo.c libemile/emile_map_dev.c \
|
|
||||||
libemile/emile_checksum.c \
|
|
||||||
libemile/emile_map_set_driver_number.c \
|
|
||||||
libemile/emile_map_set_driver_info.c \
|
|
||||||
libemile/emile_map_set_bootinfo.c \
|
|
||||||
libemile/emile_block0_write.c
|
|
||||||
|
|
||||||
DISTFILES = $(MAIN_FILES) $(FIRST_FILES) $(SECOND_FILES) $(LIB_FILES) \
|
|
||||||
$(TOOLS_FILES)
|
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
rm -fr $(PACKAGE)-$(VERSION)
|
rm -fr $(PACKAGE)-$(VERSION)
|
||||||
mkdir $(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); \
|
dir=$$(dirname $$file); \
|
||||||
if [ "$$dir" != "" ] ; then \
|
if [ "$$dir" != "" ] ; then \
|
||||||
mkdir -p $(PACKAGE)-$(VERSION)/$$dir; \
|
mkdir -p $(PACKAGE)-$(VERSION)/$$dir; \
|
||||||
fi; \
|
fi; \
|
||||||
cp -p $$file $(PACKAGE)-$(VERSION)/$$file; \
|
cp -p $$file $(PACKAGE)-$(VERSION)/$$file; \
|
||||||
done
|
done
|
||||||
rm -f $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION).tar.bz2
|
@rm -f $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION).tar.bz2
|
||||||
tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
|
@tar cf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
|
||||||
bzip2 -9 $(PACKAGE)-$(VERSION).tar
|
@bzip2 -9 $(PACKAGE)-$(VERSION).tar
|
||||||
rm -fr $(PACKAGE)-$(VERSION)
|
@rm -fr $(PACKAGE)-$(VERSION)
|
||||||
|
|
||||||
|
ChangeLog::
|
||||||
|
cvs2cl -U CVS/users --no-common-dir --accum
|
||||||
|
11
README
11
README
@@ -1,5 +1,5 @@
|
|||||||
EMILE 0.1
|
EMILE
|
||||||
(C) 2004 Laurent Vivier
|
(C) 2004-2013 Laurent Vivier
|
||||||
|
|
||||||
All files are distributed under the terms of GPL license. See COPYING.
|
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
|
"make vmlinux". If a ramdisk (ramdisk.gz) is found, it is also added in
|
||||||
the floppy image.
|
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
|
This work is based on the penguin booter for mac68k, on linux kernel, and
|
||||||
perhaps on the ppc booter BootX.
|
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.
|
and ethernet card sonic.
|
||||||
|
|
||||||
Have fun
|
Have fun
|
||||||
Laurent Vivier <LaurentVivier@wanadoo.fr>
|
Laurent Vivier <Laurent@Vivier.EU>
|
||||||
11 Fevrier 2004 ;-)
|
|
||||||
|
@@ -50,32 +50,21 @@ To set root filesystem on NFS
|
|||||||
|
|
||||||
You can also read current boot arguments from floppy:
|
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"
|
Current command line: "root=/dev/ramdisk ramdisk_size=2048"
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
How to Create your floppy image with your kernel
|
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):
|
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:
|
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:
|
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:
|
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"
|
# emile-set-cmdline /dev/fd0 "root=/dev/ramdisk ramdisk_size=2048"
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Laurent Vivier <LaurentVivier@wanadoo.fr>
|
Laurent Vivier <Laurent@Vivier.EU>
|
||||||
|
@@ -126,4 +126,4 @@ partition to HFS... and all works fine ;-)
|
|||||||
|
|
||||||
And now, you can start linux in less than 2 seconds...
|
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
37
Rules.mk
Normal 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
24
config.mk
Normal 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
18
config/cdrom-etch.conf
Normal 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
18
config/cdrom-sarge.conf
Normal 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
19
config/emile.conf
Normal 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
51
config/floppy.conf
Normal 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
167
configure
vendored
Executable 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
14
debian/Makefile
vendored
Normal 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
30
debian/changelog
vendored
Normal 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
1
debian/compat
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
9
|
35
debian/control
vendored
Normal file
35
debian/control
vendored
Normal 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
126
debian/copyright
vendored
Normal 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
2
debian/emile-bootblocks.dirs
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
lib/emile
|
||||||
|
boot/emile
|
5
debian/emile-bootblocks.install
vendored
Normal file
5
debian/emile-bootblocks.install
vendored
Normal 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
5
debian/emile-bootblocks.postinst
vendored
Normal 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
15
debian/emile.install
vendored
Normal 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
102
debian/rules
vendored
Executable 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
|
@@ -1,24 +1,58 @@
|
|||||||
|
#
|
||||||
|
# (c) 2005-2008 Laurent Vivier <Laurent@Vivier.EU>
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
MANPAGES = emile.8.gz emile-install.8.gz emile-set-cmdline.8.gz emile-first-tune.8.gz emile-map-set.8.gz emile-set-output.8.gz
|
TOP=$(shell pwd)
|
||||||
|
|
||||||
MANPATH = /usr/share/man/man8
|
MODULE ?= $(shell basename $(TOP))
|
||||||
|
|
||||||
MANPAGESWPATH = $(foreach file, $(MANPAGES), $(MANPATH)/$(file))
|
SECTION5 = emile.conf.sgml
|
||||||
|
|
||||||
all: $(MANPAGES)
|
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
|
||||||
|
|
||||||
%.8: %.sgml
|
MANPATH ?= /usr/share/man/
|
||||||
docbook-to-man $< > $@
|
|
||||||
|
|
||||||
%.8.gz: %.8
|
MANPAGES = $(SECTION5:.sgml=.5.gz) $(SECTION8:.sgml=.8.gz)
|
||||||
gzip -9c $< > $@
|
|
||||||
|
|
||||||
clean:
|
DISTFILES ?= $(SECTION5) $(SECTION8) Makefile
|
||||||
-rm -f *.8.gz
|
|
||||||
|
all: man
|
||||||
|
|
||||||
|
%.gz: %
|
||||||
|
gzip -9f $<
|
||||||
|
|
||||||
|
man: $(MANPAGES)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
install -m 755 -d $(DESTDIR)/$(PREFIX)/$(MANPATH)
|
install -m 755 -d $(DESTDIR)/$(PREFIX)/$(MANPATH)/man5
|
||||||
install -m 644 *.8.gz $(DESTDIR)/$(PREFIX)/$(MANPATH)
|
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:
|
uninstall:
|
||||||
rm -f $(MANPAGESWPATH)
|
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
|
||||||
|
@@ -59,67 +59,99 @@ manpage.1: manpage.sgml
|
|||||||
<arg>image</arg>
|
<arg>image</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
<refsect1>
|
|
||||||
<title>DESCRIPTION</title>
|
|
||||||
|
|
||||||
<para><command>&dhprogram;</command> sets the
|
|
||||||
<command>&dhpackage;</command> bootloader first level
|
|
||||||
boot block info.
|
|
||||||
Display current values if no flags provided.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</refsect1>
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>OPTIONS</title>
|
<title>OPTIONS</title>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-h</option>
|
<term><option>-h</option>, <option>--help</option></term>
|
||||||
<option>--help</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Show summary of options.</para>
|
<para>Show summary of options.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-d</option>
|
<term><option>-d</option>, <option>--drive=DRIVE</option></term>
|
||||||
<option>--drive DRIVE</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set the drive number (default 1).</para>
|
<para>Set the drive number (default 1).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-o</option>
|
<term><option>-o</option>, <option>--offset=OFFSET</option></term>
|
||||||
<option>--offset SIZE</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set offset of second level in bytes.</para>
|
<para>Set offset of second level in bytes.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-s</option>
|
<term><option>-s</option>, <option>--size=SIZE</option></term>
|
||||||
<option>--size SIZE</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set size of second level in bytes.</para>
|
<para>Set size of second level in bytes.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>WARNING</title>
|
<title>DESCRIPTION</title>
|
||||||
<para>
|
<para>
|
||||||
!!! USE WITH CAUTION AND AT YOUR OWN RISK !!!
|
<command>&dhprogram;</command> is used to set EMILE first level boot block info.
|
||||||
</para>
|
</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 <Laurent@Vivier.EU></para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>SEE ALSO</title>
|
<title>SEE ALSO</title>
|
||||||
|
|
||||||
<para>emile(8), emile-install(8), emile-set-cmdline(8),
|
<para>emile(8), emile-install(8), emile-set-cmdline(8),
|
||||||
emile-map-set(8), emile-set-output(8).</para>
|
emile-map-set(8), emile-set-output(8), emile-mkisofs(8).</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
@@ -132,6 +164,8 @@ manpage.1: manpage.sgml
|
|||||||
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
||||||
or any later version published by the Free Software Foundation.
|
or any later version published by the Free Software Foundation.
|
||||||
</para>
|
</para>
|
||||||
|
<para>This manual page has been updated by Laurent Vivier
|
||||||
|
<Laurent@Vivier.EU>.</para>
|
||||||
<para>
|
<para>
|
||||||
On Debian systems, the complete text of the GNU General Public
|
On Debian systems, the complete text of the GNU General Public
|
||||||
License can be found in /usr/share/common-licenses/GPL.
|
License can be found in /usr/share/common-licenses/GPL.
|
||||||
|
@@ -73,66 +73,58 @@ manpage.1: manpage.sgml
|
|||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-h</option>
|
<term><option>-h</option>, <option>--help</option></term>
|
||||||
<option>--help</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Show summary of options.</para>
|
<para>Show summary of options.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-v</option>
|
<term><option>-v</option>, <option>--verbose</option></term>
|
||||||
<option>--verbose</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Activate verbose mode.</para>
|
<para>Activate verbose mode.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-f</option>
|
<term><option>-f</option>, <option>--first=PATH</option></term>
|
||||||
<option>--first PATH</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set path of EMILE first level.</para>
|
<para>Set path of EMILE first level.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-s</option>
|
<term><option>-s</option>, <option>--second=PATH</option></term>
|
||||||
<option>--second PATH</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set path of EMILE second level.</para>
|
<para>Set path of EMILE second level.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-k</option>
|
<term><option>-k</option>, <option>--kernel=PATH</option></term>
|
||||||
<option>--kernel PATH</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set path of kernel.</para>
|
<para>Set path of kernel.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-r</option>
|
<term><option>-r</option>, <option>--ramdisk=PATH</option></term>
|
||||||
<option>--ramdisk PATH</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set path to ramdisk.</para>
|
<para>Set path to ramdisk.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-b</option>
|
<term><option>-g</option>, <option>--get-info</option></term>
|
||||||
<option>--buffer SIZE</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Uncompressed size of kernel.</para>
|
<para>Get information from image.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-g</option>
|
<term><option>-c</option>, <option>--config=FILE</option></term>
|
||||||
<option>--get-info</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Get information from image.</para>
|
<para>set configuration according to a config file.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@@ -140,17 +132,15 @@ manpage.1: manpage.sgml
|
|||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>WARNING</title>
|
<title>REPORTING BUGS</title>
|
||||||
<para>
|
<para>Report bugs to Laurent Vivier <Laurent@Vivier.EU></para>
|
||||||
!!! USE WITH CAUTION AND AT YOUR OWN RISK !!!
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>SEE ALSO</title>
|
<title>SEE ALSO</title>
|
||||||
|
|
||||||
<para>emile(8), emile-first-tune(8), emile-map-set(8),
|
<para>emile(8), emile-first-tune(8), emile-map-set(8),
|
||||||
emile-set-cmdline(8), emile-set-output(8).</para>
|
emile-set-cmdline(8), emile-set-output(8), emile-mkisofs(8).</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
@@ -163,6 +153,8 @@ manpage.1: manpage.sgml
|
|||||||
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
||||||
or any later version published by the Free Software Foundation.
|
or any later version published by the Free Software Foundation.
|
||||||
</para>
|
</para>
|
||||||
|
<para>This manual page has been updated by Laurent Vivier
|
||||||
|
<Laurent@Vivier.EU>.</para>
|
||||||
<para>
|
<para>
|
||||||
On Debian systems, the complete text of the GNU General Public
|
On Debian systems, the complete text of the GNU General Public
|
||||||
License can be found in /usr/share/common-licenses/GPL.
|
License can be found in /usr/share/common-licenses/GPL.
|
||||||
|
@@ -56,7 +56,7 @@ manpage.1: manpage.sgml
|
|||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>&dhprogram;</command>
|
<command>&dhprogram;</command>
|
||||||
<arg><replaceable>options</replaceable></arg>
|
<arg><replaceable>options</replaceable></arg>
|
||||||
<arg>partition</arg>
|
<arg>disk | partition | disk partition-number</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
<refsect1>
|
<refsect1>
|
||||||
@@ -75,34 +75,58 @@ manpage.1: manpage.sgml
|
|||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-h</option>
|
<term><option>-h</option>, <option>--help</option></term>
|
||||||
<option>--help</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Show summary of options.</para>
|
<para>Show summary of options.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-f</option>
|
<term><option>-v</option>, <option>--verbose</option></term>
|
||||||
<option>--flags FLAGS</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set the flags for the partition.</para>
|
<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>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-t</option>
|
<term><option>-t</option>, <option>--type=TYPE</option></term>
|
||||||
<option>--type TYPE</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set the type of the partition.</para>
|
<para>Set the type of the partition.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-s</option>
|
<term><option>-f</option>, <option>--flags=FLAGS</option></term>
|
||||||
<option>--startup</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Set the startup partition.</para>
|
<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>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@@ -110,17 +134,15 @@ manpage.1: manpage.sgml
|
|||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>WARNING</title>
|
<title>REPORTING BUGS</title>
|
||||||
<para>
|
<para>Report bugs to Laurent Vivier <Laurent@Vivier.EU></para>
|
||||||
!!! USE WITH CAUTION AND AT YOUR OWN RISK !!!
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>SEE ALSO</title>
|
<title>SEE ALSO</title>
|
||||||
|
|
||||||
<para>emile(8), emile-install(8), emile-first-tune(8),
|
<para>emile(8), emile-install(8), emile-first-tune(8),
|
||||||
emile-set-cmdline(8), emile-set-output(8).</para>
|
emile-set-cmdline(8), emile-set-output(8), emile-mkisofs(8).</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
@@ -133,6 +155,8 @@ manpage.1: manpage.sgml
|
|||||||
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
||||||
or any later version published by the Free Software Foundation.
|
or any later version published by the Free Software Foundation.
|
||||||
</para>
|
</para>
|
||||||
|
<para>This manual page has been updated by Laurent Vivier
|
||||||
|
<Laurent@Vivier.EU>.</para>
|
||||||
<para>
|
<para>
|
||||||
On Debian systems, the complete text of the GNU General Public
|
On Debian systems, the complete text of the GNU General Public
|
||||||
License can be found in /usr/share/common-licenses/GPL.
|
License can be found in /usr/share/common-licenses/GPL.
|
||||||
|
260
docs/emile-mkisofs.sgml
Normal file
260
docs/emile-mkisofs.sgml
Normal 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 <Laurent@Vivier.EU></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:
|
||||||
|
-->
|
@@ -60,7 +60,7 @@ manpage.1: manpage.sgml
|
|||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>&dhprogram;</command>
|
<command>&dhprogram;</command>
|
||||||
<arg>-r</arg>
|
<arg>-g</arg>
|
||||||
<arg>image</arg>
|
<arg>image</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
@@ -70,7 +70,7 @@ manpage.1: manpage.sgml
|
|||||||
<para><command>&dhprogram;</command> sets the kernel command line
|
<para><command>&dhprogram;</command> sets the kernel command line
|
||||||
to cmdline for a <command>&dhpackage;</command>
|
to cmdline for a <command>&dhpackage;</command>
|
||||||
bootloader disk image, floppy disk device (/dev/fd0),
|
bootloader disk image, floppy disk device (/dev/fd0),
|
||||||
or the second level file. Executing with "-r" flag,
|
or the second level file. Executing with "-g" flag,
|
||||||
displays the current command line.
|
displays the current command line.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ manpage.1: manpage.sgml
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-r</option></term>
|
<term><option>-g</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Display current kernel command line.</para>
|
<para>Display current kernel command line.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -102,35 +102,33 @@ manpage.1: manpage.sgml
|
|||||||
<para>
|
<para>
|
||||||
To set root filesystem on disk 1 partition 4:
|
To set root filesystem on disk 1 partition 4:
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<programlisting>
|
||||||
<command>&dhprogram;</command> floppy.img "root=/dev/sda4"
|
<command>&dhprogram;</command> floppy.img "root=/dev/sda4"
|
||||||
</para>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
To set root filesystem on ramdisk:
|
To set root filesystem on ramdisk:
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<programlisting>
|
||||||
<command>&dhprogram;</command> floppy.img "root=/dev/ramdisk ramdisk_size=2048"
|
<command>&dhprogram;</command> floppy.img "root=/dev/ramdisk ramdisk_size=2048"
|
||||||
</para>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
To set root filesystem on NFS:
|
To set root filesystem on NFS:
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<programlisting>
|
||||||
<command>&dhprogram;</command> floppy.img "root=/dev/nfs ip=dhcp nfsroot=192.168.100.1:/tftboot/192.168.100.51"
|
<command>&dhprogram;</command> floppy.img "root=/dev/nfs ip=dhcp nfsroot=192.168.100.1:/tftboot/192.168.100.51"
|
||||||
</para>
|
</programlisting>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>WARNING</title>
|
<title>REPORTING BUGS</title>
|
||||||
<para>
|
<para>Report bugs to Laurent Vivier <Laurent@Vivier.EU></para>
|
||||||
!!! USE WITH CAUTION AND AT YOUR OWN RISK !!!
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>SEE ALSO</title>
|
<title>SEE ALSO</title>
|
||||||
|
|
||||||
<para>emile(8), emile-install(8), emile-first-tune(8),
|
<para>emile(8), emile-install(8), emile-first-tune(8),
|
||||||
emile-map-set(8), emile-set-output(8).</para>
|
emile-map-set(8), emile-set-output(8), , emile-mkisofs(8).</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
@@ -143,6 +141,8 @@ manpage.1: manpage.sgml
|
|||||||
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
||||||
or any later version published by the Free Software Foundation.
|
or any later version published by the Free Software Foundation.
|
||||||
</para>
|
</para>
|
||||||
|
<para>This manual page has been updated by Laurent Vivier
|
||||||
|
<Laurent@Vivier.EU>.</para>
|
||||||
<para>
|
<para>
|
||||||
On Debian systems, the complete text of the GNU General Public
|
On Debian systems, the complete text of the GNU General Public
|
||||||
License can be found in /usr/share/common-licenses/GPL.
|
License can be found in /usr/share/common-licenses/GPL.
|
||||||
|
@@ -157,17 +157,15 @@ manpage.1: manpage.sgml
|
|||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>WARNING</title>
|
<title>REPORTING BUGS</title>
|
||||||
<para>
|
<para>Report bugs to Laurent Vivier <Laurent@Vivier.EU></para>
|
||||||
!!! USE WITH CAUTION AND AT YOUR OWN RISK !!!
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>SEE ALSO</title>
|
<title>SEE ALSO</title>
|
||||||
|
|
||||||
<para>emile(8), emile-install(8), emile-first-tune(8),
|
<para>emile(8), emile-install(8), emile-first-tune(8),
|
||||||
emile-map-set(8), emile-set-cmdline(8).</para>
|
emile-map-set(8), emile-set-cmdline(8), emile-mkisofs(8).</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
@@ -180,6 +178,8 @@ manpage.1: manpage.sgml
|
|||||||
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
||||||
or any later version published by the Free Software Foundation.
|
or any later version published by the Free Software Foundation.
|
||||||
</para>
|
</para>
|
||||||
|
<para>This manual page has been updated by Laurent Vivier
|
||||||
|
<Laurent@Vivier.EU>.</para>
|
||||||
<para>
|
<para>
|
||||||
On Debian systems, the complete text of the GNU General Public
|
On Debian systems, the complete text of the GNU General Public
|
||||||
License can be found in /usr/share/common-licenses/GPL.
|
License can be found in /usr/share/common-licenses/GPL.
|
||||||
|
247
docs/emile.conf.sgml
Normal file
247
docs/emile.conf.sgml
Normal 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 <Laurent@Vivier.EU></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:
|
||||||
|
-->
|
@@ -72,24 +72,21 @@ manpage.1: manpage.sgml
|
|||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-h</option>
|
<term><option>-h</option>, <option>--help</option></term>
|
||||||
<option>--help</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Show summary of options.</para>
|
<para>Show summary of options.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-v</option>
|
<term><option>-v</option>, <option>--verbose</option></term>
|
||||||
<option>--verbose</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Activate verbose mode.</para>
|
<para>Activate verbose mode.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-t</option>
|
<term><option>-t</option>, <option>--test</option></term>
|
||||||
<option>--test</option></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Activate test mode (don't write to disk).</para>
|
<para>Activate test mode (don't write to disk).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -102,46 +99,6 @@ manpage.1: manpage.sgml
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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>-a</option>
|
|
||||||
<option>--append ARG</option></term>
|
|
||||||
<listitem>
|
|
||||||
<para>Set kernel command line.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><option>-p</option>
|
|
||||||
<option>--partition DEV</option></term>
|
|
||||||
<listitem>
|
|
||||||
<para>Define device where to install boot block.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--restore[=FILE]</option></term>
|
<term><option>--restore[=FILE]</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -164,21 +121,33 @@ manpage.1: manpage.sgml
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>WARNING</title>
|
<title>REPORTING BUGS</title>
|
||||||
<para>
|
<para>Report bugs to Laurent Vivier <Laurent@Vivier.EU></para>
|
||||||
!!! USE WITH CAUTION AND AT YOUR OWN RISK !!!
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>SEE ALSO</title>
|
<title>SEE ALSO</title>
|
||||||
|
|
||||||
<para>emile-install(8), emile-set-cmdline(8), emile-first-tune(8),
|
<para>emile-install(8), emile-set-cmdline(8), emile-first-tune(8),
|
||||||
emile-map-set(8), emile-set-output(8).</para>
|
emile-map-set(8), emile-set-output(8), emile-mkisofs(8).</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
@@ -191,6 +160,8 @@ manpage.1: manpage.sgml
|
|||||||
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
the terms of the <acronym>GNU</acronym> GPL License, Version 2
|
||||||
or any later version published by the Free Software Foundation.
|
or any later version published by the Free Software Foundation.
|
||||||
</para>
|
</para>
|
||||||
|
<para>This manual page has been updated by Laurent Vivier
|
||||||
|
<Laurent@Vivier.EU>.</para>
|
||||||
<para>
|
<para>
|
||||||
On Debian systems, the complete text of the GNU General Public
|
On Debian systems, the complete text of the GNU General Public
|
||||||
License can be found in /usr/share/common-licenses/GPL.
|
License can be found in /usr/share/common-licenses/GPL.
|
||||||
|
45
first/32bitmode.i
Normal file
45
first/32bitmode.i
Normal 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
|
@@ -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)
|
TOP = $(shell pwd)
|
||||||
VPATH = $(TOP)
|
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 $^ $@
|
$(OBJCOPY) -O binary $^ $@
|
||||||
|
|
||||||
first.o: first.S
|
first_scsi.o first_floppy.o first_ata.o: first.S
|
||||||
$(AS) $(ASFLAGS) $(SCSIFLAGS) -o $@ $^
|
$(AS) $(ASFLAGS) -o $@ $^
|
||||||
|
|
||||||
first_floppy::
|
install::
|
||||||
test -d floppy || mkdir floppy
|
install -d $(DESTDIR)/$(PREFIX)/boot/emile/
|
||||||
cd floppy && make -f $(TOP)/Makefile TOP=$(TOP) AS=$(AS) \
|
install first_scsi $(DESTDIR)/$(PREFIX)/boot/emile/first_scsi
|
||||||
OBJCOPY=$(OBJCOPY) first
|
install -d $(DESTDIR)/$(PREFIX)/lib/emile/
|
||||||
mv floppy/first first_floppy
|
install first_floppy $(DESTDIR)/$(PREFIX)/lib/emile/first_floppy
|
||||||
|
|
||||||
first_scsi::
|
uninstall::
|
||||||
test -d scsi || mkdir scsi
|
rm -f $(DESTDIR)/$(PREFIX)/boot/emile/first_scsi
|
||||||
cd scsi && make -f $(TOP)/Makefile TOP=$(TOP) AS=$(AS) \
|
rm -f $(DESTDIR)/$(PREFIX)/lib/emile/first_floppy
|
||||||
OBJCOPY=$(OBJCOPY) SCSIFLAGS="--defsym SCSI_SUPPORT=1" first
|
|
||||||
mv scsi/first first_scsi
|
|
||||||
|
|
||||||
clean:
|
include $(TOP)/../tools.mk
|
||||||
rm -f first_floppy first_scsi floppy/*.o scsi/*.o
|
include $(TOP)/../Rules.mk
|
||||||
|
286
first/first.S
286
first/first.S
@@ -1,94 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
* (c) 2004,2005 Laurent Vivier <Laurent@Vivier.EU>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.chip 68000
|
.cpu 68000
|
||||||
|
|
||||||
.equ sector_size, 512
|
.equ sector_size, 512
|
||||||
.equ first_level_size, 2 * sector_size
|
.equ first_level_size, 2 * sector_size
|
||||||
|
|
||||||
.ifdef SCSI_SUPPORT
|
.include "macos.i"
|
||||||
/* SCSI constants */
|
.include "32bitmode.i"
|
||||||
|
|
||||||
.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
|
|
||||||
.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 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
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
@@ -116,67 +38,13 @@ SysHeapSize: .long 0x00020000 /* system heap size on all machines */
|
|||||||
|
|
||||||
.ifdef SCSI_SUPPORT
|
.ifdef SCSI_SUPPORT
|
||||||
|
|
||||||
.equ READ_10, 0x28
|
.include "scsi.i"
|
||||||
.equ CDB_offset, 2
|
|
||||||
.equ CDB_nb_blocks, 7
|
|
||||||
|
|
||||||
.align 4
|
.else
|
||||||
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
|
.include "floppy.i"
|
||||||
.equ op_no_inc, 2
|
|
||||||
.equ op_stop, 7
|
|
||||||
|
|
||||||
.equ TIB_buffer, 2
|
.endif
|
||||||
.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 */
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
@@ -196,60 +64,16 @@ start:
|
|||||||
SetApplBase
|
SetApplBase
|
||||||
movel SysZone,TheZone
|
movel SysZone,TheZone
|
||||||
|
|
||||||
/* is a 32bit aware ROM ? */
|
/* test if we are in 32bit mode, otherwise reboot in 32bit mode */
|
||||||
|
|
||||||
movea.l ROMBase,%a0
|
switch32bitmode
|
||||||
move.w 8(%a0), %d1 /* read ROM id */
|
|
||||||
|
|
||||||
cmp.w #0x0178, %d1 /* only 24bit ROM */
|
/* buffer size to store second stage booter */
|
||||||
bls.S bit32_ok
|
|
||||||
|
|
||||||
/* is a 32bit aware processor ? */
|
get_second_size %d0
|
||||||
|
|
||||||
cmp.w #1, CPUFlags /* 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:
|
|
||||||
|
|
||||||
/* Allocate Memory for second stage loader */
|
/* 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
|
add.l #4, %d0
|
||||||
NewPtr
|
NewPtr
|
||||||
move.l %a0, %d0
|
move.l %a0, %d0
|
||||||
@@ -260,91 +84,9 @@ malloc_ok:
|
|||||||
add.l #3, %d0
|
add.l #3, %d0
|
||||||
and.l #0xFFFFFFFC.l, %d0
|
and.l #0xFFFFFFFC.l, %d0
|
||||||
|
|
||||||
.ifdef SCSI_SUPPORT
|
/* load second stage */
|
||||||
|
|
||||||
lea container_end(%pc), %a6
|
load_second
|
||||||
|
|
||||||
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 */
|
|
||||||
|
|
||||||
/* call second stage bootloader */
|
/* call second stage bootloader */
|
||||||
|
|
||||||
|
75
first/floppy.i
Normal file
75
first/floppy.i
Normal 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
50
first/macos.i
Normal 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
129
first/scsi.i
Normal 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
36
kernel.mk
Normal 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
21
libblock/Makefile
Normal 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
22
libblock/block.h
Normal 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
17
libblock/block_close.c
Normal 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
21
libblock/block_fstat.c
Normal 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
20
libblock/block_init.c
Normal 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
33
libblock/block_lseek.c
Normal 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
17
libblock/block_mount.c
Normal 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
53
libblock/block_open.c
Normal 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
51
libblock/block_read.c
Normal 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
19
libblock/libblock.h
Normal 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
33
libconfig/Makefile
Normal 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
|
25
libconfig/config_add_property.c
Normal file
25
libconfig/config_add_property.c
Normal 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;
|
||||||
|
}
|
36
libconfig/config_find_entry.c
Normal file
36
libconfig/config_find_entry.c
Normal 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;
|
||||||
|
}
|
45
libconfig/config_find_indexed_property.c
Normal file
45
libconfig/config_find_indexed_property.c
Normal 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;
|
||||||
|
}
|
20
libconfig/config_get_indexed_property.c
Normal file
20
libconfig/config_get_indexed_property.c
Normal 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;
|
||||||
|
}
|
90
libconfig/config_get_next_property.c
Normal file
90
libconfig/config_get_next_property.c
Normal 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;
|
||||||
|
}
|
14
libconfig/config_get_property.c
Normal file
14
libconfig/config_get_property.c
Normal 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);
|
||||||
|
}
|
36
libconfig/config_remove_indexed_property.c
Normal file
36
libconfig/config_remove_indexed_property.c
Normal 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;
|
||||||
|
}
|
15
libconfig/config_remove_property.c
Normal file
15
libconfig/config_remove_property.c
Normal 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);
|
||||||
|
}
|
85
libconfig/config_set_indexed_property.c
Normal file
85
libconfig/config_set_indexed_property.c
Normal 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;
|
||||||
|
}
|
16
libconfig/config_set_property.c
Normal file
16
libconfig/config_set_property.c
Normal 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
19
libconfig/libconfig.h
Normal 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
23
libcontainer/Makefile
Normal 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
24
libcontainer/container.h
Normal 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_ */
|
23
libcontainer/container_close.c
Normal file
23
libcontainer/container_close.c
Normal 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;
|
||||||
|
}
|
21
libcontainer/container_fstat.c
Normal file
21
libcontainer/container_fstat.c
Normal 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;
|
||||||
|
}
|
20
libcontainer/container_init.c
Normal file
20
libcontainer/container_init.c
Normal 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;
|
||||||
|
}
|
36
libcontainer/container_lseek.c
Normal file
36
libcontainer/container_lseek.c
Normal 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;
|
||||||
|
}
|
19
libcontainer/container_mount.c
Normal file
19
libcontainer/container_mount.c
Normal 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;
|
||||||
|
}
|
51
libcontainer/container_open.c
Normal file
51
libcontainer/container_open.c
Normal 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;
|
||||||
|
}
|
89
libcontainer/container_read.c
Normal file
89
libcontainer/container_read.c
Normal 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;
|
||||||
|
}
|
33
libcontainer/libcontainer.h
Normal file
33
libcontainer/libcontainer.h
Normal 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_ */
|
@@ -1,47 +1,33 @@
|
|||||||
AS=$(CROSS_COMPILE)as
|
#
|
||||||
CC=$(CROSS_COMPILE)gcc
|
# (c) 2004-2007 Laurent Vivier <Laurent@Vivier.EU>
|
||||||
LD=$(CROSS_COMPILE)ld
|
#
|
||||||
AR=$(CROSS_COMPILE)ar
|
#
|
||||||
|
|
||||||
|
TOP=$(shell pwd)
|
||||||
|
VPATH=$(TOP)
|
||||||
|
|
||||||
CPPFLAGS = $(CROSS_COMPILE_CPPFLAGS)
|
CPPFLAGS = $(CROSS_COMPILE_CPPFLAGS)
|
||||||
LDFLAGS = $(CROSS_COMPILE_LDFLAGS)
|
LDFLAGS = $(CROSS_COMPILE_LDFLAGS)
|
||||||
|
|
||||||
LIBRARY = libemile.a
|
LIBRARY = libemile.a
|
||||||
|
|
||||||
OBJS = emile_first_get_param.o emile_first_set_param.o \
|
SOURCES = emile_first_get_param.c \
|
||||||
emile_first_set_param_scsi.o emile_floppy_create_image.o \
|
emile_first_set_param.c emile_first_set_param_scsi.c \
|
||||||
emile_scsi_create_container.o emile_second_get_cmdline.o \
|
emile_floppy_create_image.c emile_second_create_mapfile.c \
|
||||||
emile_second_get_kernel.o emile_second_get_output.o \
|
emile_scsi_create_container.c emile_scsi_get_dev.c \
|
||||||
emile_second_set_cmdline.o emile_second_set_kernel.o \
|
emile_scsi_get_rdev.c emile_second_get_configuration.c \
|
||||||
emile_second_set_kernel_scsi.o emile_second_set_output.o \
|
emile_second_set_configuration.c \
|
||||||
emile_second_get_buffer_size.o emile_second_set_buffer_size.o \
|
emile_second_set_param.c emile_second_get_param.c \
|
||||||
emile_map_open.o emile_map_close.o emile_map_read.o \
|
emile_first_set_param_scsi_extents.c
|
||||||
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 emile_checksum.o \
|
|
||||||
emile_map_get_bootinfo.o emile_map_dev.o emile_map_set_bootinfo.o \
|
|
||||||
emile_map_set_driver_info.o emile_map_set_driver_number.o \
|
|
||||||
emile_block0_write.o
|
|
||||||
|
|
||||||
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)
|
include $(TOP)/../tools.mk
|
||||||
$(AR) rc $@ $^
|
include $(TOP)/../Rules.mk
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(OBJS) $(LIBRARY)
|
|
||||||
|
@@ -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
|
#ifndef _BOOTBLOCK_H
|
||||||
#define _BOOTBLOCK_H
|
#define _BOOTBLOCK_H
|
||||||
static __attribute__((used)) char* bootblock_header = "$CVSHeader$";
|
static __attribute__((used)) char* bootblock_header = "$CVSHeader$";
|
||||||
#include "../second/glue.h"
|
|
||||||
|
|
||||||
/* first level structure */
|
/* first level structure */
|
||||||
|
|
||||||
@@ -41,6 +40,30 @@ struct BootBlkHdr {
|
|||||||
|
|
||||||
#define ASSERT_BBH(a) if ( sizeof(BootBlkHdr_t) != 138 ) { a }
|
#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 */
|
/* EMILE Boot block structure */
|
||||||
|
|
||||||
typedef struct eBootBlock eBootBlock_t;
|
typedef struct eBootBlock eBootBlock_t;
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
* (c) 2004,2005 Laurent Vivier <Laurent@Vivier.EU>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _EMILE_H
|
#ifndef _EMILE_H
|
||||||
#define _EMILE_H
|
#define _EMILE_H
|
||||||
static __attribute__((used)) char* emile_header = "$CVSHeader$";
|
static __attribute__((used)) char* emile_header = "$CVSHeader: $";
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
|
|
||||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
@@ -1,25 +0,0 @@
|
|||||||
static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include "partition.h"
|
|
||||||
#include "libemile.h"
|
|
||||||
|
|
||||||
int emile_block0_write(emile_map_t *map)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = lseek(map->fd, 0, SEEK_SET);
|
|
||||||
if (ret != 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
ret = write(map->fd, &map->drivers, sizeof(map->drivers));
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
@@ -1,7 +1,7 @@
|
|||||||
static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
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))
|
if (ret != sizeof(firstBlock))
|
||||||
return EEMILE_CANNOT_READ_FIRST;
|
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 )
|
"Mac Bootloader", 14) == 0 )
|
||||||
{
|
{
|
||||||
*drive_num = read_short(&firstBlock.second_param_block.ioVRefNum);
|
*drive_num = read_short((u_int16_t*)&firstBlock.second_param_block.ioVRefNum);
|
||||||
*second_offset = read_long(&firstBlock.second_param_block.ioPosOffset);
|
*second_offset = read_long((u_int32_t*)&firstBlock.second_param_block.ioPosOffset);
|
||||||
*second_size = read_long(&firstBlock.second_param_block.ioReqCount);
|
*second_size = read_long(&firstBlock.second_param_block.ioReqCount);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
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))
|
if (ret != sizeof(firstBlock))
|
||||||
return EEMILE_CANNOT_READ_FIRST;
|
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 )
|
"Mac Bootloader", 14) == 0 )
|
||||||
{
|
{
|
||||||
if (tune_mask & EMILE_FIRST_TUNE_DRIVE)
|
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);
|
drive_num);
|
||||||
|
|
||||||
if (tune_mask & EMILE_FIRST_TUNE_OFFSET)
|
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);
|
second_offset);
|
||||||
|
|
||||||
if (tune_mask & EMILE_FIRST_TUNE_SIZE)
|
if (tune_mask & EMILE_FIRST_TUNE_SIZE)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
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"
|
#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 emile_first_set_param_scsi(int fd, char *second_name)
|
||||||
{
|
{
|
||||||
int ret;
|
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 *block_size = (unsigned short*)&first[1014];
|
||||||
unsigned short *count;
|
unsigned short *count;
|
||||||
unsigned long *offset;
|
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);
|
ret = read(fd, first, 1024);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
@@ -42,44 +49,39 @@ int emile_first_set_param_scsi(int fd, char *second_name)
|
|||||||
if (container == NULL)
|
if (container == NULL)
|
||||||
return EEMILE_MALLOC_ERROR;
|
return EEMILE_MALLOC_ERROR;
|
||||||
|
|
||||||
container->max_blocks = max_blocks;
|
|
||||||
fd_second = open(second_name, O_RDONLY);
|
fd_second = open(second_name, O_RDONLY);
|
||||||
if (fd_second == -1)
|
if (fd_second == -1)
|
||||||
return EEMILE_CANNOT_OPEN_FILE;
|
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)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
close(fd_second);
|
close(fd_second);
|
||||||
|
|
||||||
*unit_id = container->unit_id;
|
*block_size = BLOCK_SIZE;
|
||||||
*block_size = container->block_size;
|
|
||||||
|
|
||||||
*second_size = 0;
|
*second_size = 0;
|
||||||
current = 1014;
|
current = 1014;
|
||||||
for(i = 0; i < max_blocks - 1; i++)
|
for(i = 0; i < max_blocks - 1; i++)
|
||||||
{
|
{
|
||||||
current -= 2;
|
current -= 2;
|
||||||
count = (short*)(&first[current]);
|
count = (unsigned short*)(&first[current]);
|
||||||
*count = container->blocks[i].count;
|
*count = container->blocks[i].count;
|
||||||
if (container->blocks[i].count == 0)
|
if (container->blocks[i].count == 0)
|
||||||
break;
|
break;
|
||||||
printf("(%d, %d) ", container->blocks[i].offset,
|
|
||||||
container->blocks[i].count);
|
|
||||||
current -= 4;
|
current -= 4;
|
||||||
offset = (long*)(&first[current]);
|
offset = (unsigned long*)(&first[current]);
|
||||||
*offset = container->blocks[i].offset;
|
*offset = container->blocks[i].offset;
|
||||||
(*second_size) += container->blocks[i].count;
|
(*second_size) += container->blocks[i].count;
|
||||||
}
|
}
|
||||||
putchar('\n');
|
|
||||||
/* mark end of blocks list */
|
/* mark end of blocks list */
|
||||||
current -= 2;
|
current -= 2;
|
||||||
count = (short*)(&first[current]);
|
count = (unsigned short*)(&first[current]);
|
||||||
*count = 0;
|
*count = 0;
|
||||||
/* set second level size */
|
/* 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)
|
if (ret != 0)
|
||||||
return EEMILE_CANNOT_WRITE_FIRST;
|
return EEMILE_CANNOT_WRITE_FIRST;
|
||||||
|
|
||||||
|
63
libemile/emile_first_set_param_scsi_extents.c
Normal file
63
libemile/emile_first_set_param_scsi_extents.c
Normal 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;
|
||||||
|
}
|
@@ -1,7 +1,7 @@
|
|||||||
static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
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 <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "libemile.h"
|
#include "libemile.h"
|
||||||
#include "emile.h"
|
#include "emile.h"
|
||||||
#include "bootblock.h"
|
#include "bootblock.h"
|
||||||
|
|
||||||
static int copy_file(int fd, char* file)
|
static ssize_t copy_file(int fd, char* file)
|
||||||
{
|
{
|
||||||
int source;
|
int source;
|
||||||
int size_read;
|
ssize_t size_read;
|
||||||
int size_written;
|
ssize_t size_written;
|
||||||
int total;
|
ssize_t total;
|
||||||
static char buffer[FLOPPY_SECTOR_SIZE];
|
static char buffer[FLOPPY_SECTOR_SIZE];
|
||||||
|
|
||||||
source = open(file, O_RDONLY);
|
source = open(file, O_RDONLY);
|
||||||
@@ -66,11 +67,11 @@ static int copy_file(int fd, char* file)
|
|||||||
return total;
|
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];
|
static char buffer[FLOPPY_SECTOR_SIZE];
|
||||||
int size_written;
|
ssize_t size_written;
|
||||||
int total;
|
ssize_t total;
|
||||||
|
|
||||||
if (size % FLOPPY_SECTOR_SIZE) {
|
if (size % FLOPPY_SECTOR_SIZE) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
@@ -90,86 +91,47 @@ static int pad_image(int fd, int size)
|
|||||||
return total;
|
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;
|
return path && ((strncmp(path, "iso9660:", strlen("iso9660:")) == 0) ||
|
||||||
int total;
|
(strncmp(path, "container:", strlen("container:")) == 0) ||
|
||||||
|
(strncmp(path, "block:", strlen("block:")) == 0) ||
|
||||||
ret = copy_file(fd, first_level);
|
(strncmp(path, "ext2:", strlen("ext2")) == 0));
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int emile_floppy_create_image(char* first_level, char* second_level,
|
int emile_floppy_create(char *image, char* first_level, char* second_level)
|
||||||
char* kernel_image, char* ramdisk,
|
|
||||||
unsigned long buffer_size, char* image)
|
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
int fd;
|
int fd;
|
||||||
|
off_t offset;
|
||||||
|
ssize_t size;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (image == NULL)
|
if (first_level == NULL)
|
||||||
return -1;
|
{
|
||||||
|
return EEMILE_MISSING_FIRST;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (second_level == NULL)
|
||||||
|
{
|
||||||
|
return EEMILE_MISSING_SECOND;
|
||||||
|
}
|
||||||
|
|
||||||
fd = open(image, O_RDWR|O_CREAT|O_TRUNC,
|
fd = open(image, O_RDWR|O_CREAT|O_TRUNC,
|
||||||
S_IRUSR| S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
|
S_IRUSR| S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
return EEMILE_CANNOT_CREATE_IMAGE;
|
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)
|
size = copy_file(fd, second_level);
|
||||||
{
|
if (size < 0)
|
||||||
close(fd);
|
return EEMILE_CANNOT_WRITE_SECOND;
|
||||||
return EEMILE_MISSING_FIRST;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 */
|
/* 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 |
|
ret = emile_first_set_param(fd, EMILE_FIRST_TUNE_DRIVE |
|
||||||
EMILE_FIRST_TUNE_OFFSET|
|
EMILE_FIRST_TUNE_OFFSET|
|
||||||
EMILE_FIRST_TUNE_SIZE,
|
EMILE_FIRST_TUNE_SIZE,
|
||||||
@@ -181,16 +143,89 @@ int emile_floppy_create_image(char* first_level, char* second_level,
|
|||||||
return ret;
|
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 */
|
/* set second level info */
|
||||||
|
|
||||||
ret = emile_second_set_kernel(fd, kernel_image,
|
ret = emile_second_set_param(fd, kernel_url, NULL, ramdisk_url);
|
||||||
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);
|
|
||||||
|
|
||||||
close(fd);
|
emile_floppy_close(fd);
|
||||||
|
|
||||||
|
free(kernel_url);
|
||||||
|
free(ramdisk_url);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
|
||||||
}
|
|
@@ -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);
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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);
|
|
||||||
}
|
|
@@ -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_dev(emile_map_t *map)
|
|
||||||
{
|
|
||||||
if (!emile_map_partition_is_valid(map))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return map->name;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -1,28 +0,0 @@
|
|||||||
static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "partition.h"
|
|
||||||
#include "libemile.h"
|
|
||||||
|
|
||||||
int emile_map_get_bootinfo(emile_map_t *map, int* bootstart, int *bootsize,
|
|
||||||
int *bootaddr, int *bootentry, int* checksum,
|
|
||||||
char* processor)
|
|
||||||
{
|
|
||||||
if (!emile_map_is_valid(map))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
*bootstart = map->partition.LgBootStart;
|
|
||||||
*bootsize = map->partition.BootSize;
|
|
||||||
*bootaddr = map->partition.BootAddr;
|
|
||||||
*bootentry = map->partition.BootEntry;
|
|
||||||
*checksum = map->partition.BootCksum;
|
|
||||||
strcpy(processor, map->partition.Processor);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
@@ -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;
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user