Skip to content

Commit 0b86ab2

Browse files
authored
RC04 - SD-Card RDB Boot and sagasd.device 2.18 (#156)
1 parent c6dce6c commit 0b86ab2

9 files changed

Lines changed: 39 additions & 2320 deletions

File tree

arch/m68k-amiga/boot/mmakefile.src

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ include $(SRCDIR)/config/aros.cfg
8888
#MM compiler-stdc \
8989
#MM compiler-stdcio \
9090
#MM kernel-sagasd-device-kobj \
91-
#MM sagasd-device \
9291
#MM compiler-posixc
9392

9493
#MM- kernel-workbench-devs-amiga-m68k : workbench-devs-amiga-m68k

arch/m68k-amiga/boot/romlog.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Idx Name Size VMA LMA File off Algn
2-
0 .rom 0007805c 00f80000 00f80000 0007c000 2**2
3-
1 .ext 00078c96 00e00000 00e00000 00002000 2**2
2+
0 .rom 00078074 00f80000 00f80000 0007c000 2**2
3+
1 .ext 00078c4a 00e00000 00e00000 00002000 2**2

arch/m68k-amiga/devs/sagasd/mmakefile

Lines changed: 0 additions & 2308 deletions
This file was deleted.

arch/m68k-amiga/devs/sagasd/mmakefile.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ USER_INCLUDES := -I$(SRCDIR)/$(CURDIR)/\
2828
-I$(SRCDIR)/$(CURDIR)/../include
2929

3030
USER_CFLAGS := -D__NOLIBBASE__ -O2 -DSIMULATE=0 \
31-
-DADATE="\"$(shell date "+%d.%m.%Y")\"" -fdata-sections -ffunction-sections -fno-zero-initialized-in-bss -fno-common
31+
-DADATE="\"$(shell date "+%d.%m.%Y")\"" -fdata-sections -ffunction-sections -fno-common -fno-zero-initialized-in-bss
3232

3333
USER_LDFLAGS := -static
3434

arch/m68k-amiga/devs/sagasd/sagasd.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
##begin config
22
basename SAGASD
3-
version 2.17
3+
version 2.18
44
libbasetype struct SAGASDBase
55
sysbase_field sd_ExecBase
66
seglist_field sd_SegList
-22.3 KB
Binary file not shown.

arch/m68k-amiga/devs/sagasd/sagasd_device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,8 +1109,8 @@ static void SAGASD_BootNode(struct SAGASDBase *SAGASDBase, struct Library *Expan
11091109
pp[DE_BUFMEMTYPE + 4] = MEMF_PUBLIC;
11101110
pp[DE_MAXTRANSFER + 4] = 0x00200000;
11111111
pp[DE_MASK + 4] = 0xFFFFFFFE;
1112-
pp[DE_BOOTPRI + 4] = -5; //Default Prio (-5) is lower than primary HDD (0)
1113-
pp[DE_DOSTYPE + 4] = 0x46415402; //FAT2 (FAT32) Default DosType for file-transfer
1112+
pp[DE_BOOTPRI + 4] = -5; //SD-Card Prio 2 is higher than ata.device to allow booting from SD-Card in case of both devices present
1113+
pp[DE_DOSTYPE + 4] = 0x46415402; //FAT32 by default, but it will be changed by AddPartitionVolume for RDB (e.g. OFS, FFS, SFS, PFS)
11141114
pp[DE_BOOTBLOCKS + 4] = 2;
11151115
devnode = MakeDosNode(pp);
11161116

rom/dosboot/bootscan.c

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static VOID AddPartitionVolume(struct ExpansionBase *ExpansionBase, struct Libra
101101
tags[8] = TAG_DONE;
102102
GetPartitionAttrs(pn, (struct TagItem *)tags);
103103

104-
D(bug("[BOOT] Partition name: %s | Bootable: %d | Automount: %d\n", name, bootable, automount));
104+
D(bug("[BOOT] Partition name: %s | Bootable: %d | Automount: %d \n", name, bootable, automount));
105105

106106
if (automount == FALSE)
107107
{
@@ -121,9 +121,10 @@ static VOID AddPartitionVolume(struct ExpansionBase *ExpansionBase, struct Libra
121121
tags[4] = TAG_DONE;
122122
GetPartitionAttrs(pn, (struct TagItem *)tags);
123123

124-
// Default behaviour is to give BOOT priority to RDB disks (user can choose in Early Startup)
124+
// [WD] Default behaviour is to give BOOT priority to RDB disks (user can choose to boot from FAT in Early Startup)
125+
//pp[4 + DE_BOOTPRI] = -5;
126+
125127
bootable = TRUE;
126-
pp[4 + DE_BOOTPRI] = -1;
127128

128129
/* make the name */
129130
devname = AROS_BSTR_ADDR(fssm->fssm_Device);
@@ -242,6 +243,34 @@ static VOID AddPartitionVolume(struct ExpansionBase *ExpansionBase, struct Libra
242243
AddBootFileSystem(fsnode);
243244
}
244245

246+
D(bug("\n[BOOT] dosName pp[0] = %s\n", pp[0]));
247+
D(bug("[BOOT] devName pp[1] = %s\n", pp[1]));
248+
D(bug("[BOOT] unitNum pp[2] = %d\n", pp[2]));
249+
D(bug("[BOOT] flags pp[3] = %d\n", pp[3]));
250+
D(bug("[BOOT] tableSize pp[4] = %d\n", pp[4 + DE_TABLESIZE]));
251+
D(bug("[BOOT] sizeBlock pp[5] = %d\n", pp[4 + DE_SIZEBLOCK]));
252+
D(bug("[BOOT] secOrg pp[6] = %d\n", pp[4 + DE_BLOCKSIZE]));
253+
D(bug("[BOOT] surfaces pp[7] = %d\n", pp[4 + DE_NUMHEADS]));
254+
D(bug("[BOOT] secPerBlock pp[8] = %d\n", pp[4 + DE_SECSPERBLOCK]));
255+
D(bug("[BOOT] blocksPerTrack pp[9] = %d\n", pp[4 + DE_BLKSPERTRACK]));
256+
D(bug("[BOOT] reservedBlks pp[10] = %d\n", pp[4 + DE_RESERVEDBLKS]));
257+
D(bug("[BOOT] preAlloc pp[11] = %d\n", pp[4 + DE_PREFAC]));
258+
D(bug("[BOOT] interleave pp[12] = %d\n", pp[4 + DE_INTERLEAVE]));
259+
D(bug("[BOOT] lowCyl pp[13] = %d\n", pp[4 + DE_LOWCYL]));
260+
D(bug("[BOOT] highCyl pp[14] = %d\n", pp[4 + DE_HIGHCYL]));
261+
D(bug("[BOOT] numBuffers pp[15] = %d\n", pp[4 + DE_NUMBUFFERS]));
262+
D(bug("[BOOT] bufMemType pp[16] = %d\n", pp[4 + DE_BUFMEMTYPE]));
263+
D(bug("[BOOT] maxTransfer pp[17] = %d\n", pp[4 + DE_MAXTRANSFER]));
264+
D(bug("[BOOT] mask pp[18] = %d\n", pp[4 + DE_MASK]));
265+
D(bug("[BOOT] bootPri pp[19] = %d\n", pp[4 + DE_BOOTPRI]));
266+
D(bug("[BOOT] dosType pp[20] = %d\n", pp[4 + DE_DOSTYPE]));
267+
268+
if (strcmp((char*)pp[1], "sagasd.device") == 0)
269+
{
270+
//pp[4 + DE_BOOTPRI] = pp[4 + DE_BOOTPRI] + 5;
271+
D(bug("[BOOT] sagasd.device detected, increasing boot priority to %d\n", pp[4 + DE_BOOTPRI]));
272+
}
273+
245274
devnode = MakeDosNode(pp);
246275

247276
struct FileSysStartupMsg *fssm_devnode = BADDR(devnode->dn_Startup);
@@ -254,7 +283,6 @@ static VOID AddPartitionVolume(struct ExpansionBase *ExpansionBase, struct Libra
254283
D(bug("[BOOT] [%s] dg_LowCyl : %d\n",__FUNCTION__ , de_devnode->de_LowCyl));
255284
D(bug("[BOOT] [%s] dg_HighCyl : %d\n\n",__FUNCTION__ , de_devnode->de_HighCyl));
256285

257-
258286
if (devnode != NULL) {
259287
AddBootNode(bootable ? pp[4 + DE_BOOTPRI] : -128, ADNF_STARTPROC, devnode, NULL);
260288
D(bug("[BOOT] AddBootNode(%b, 0, 0x%p, NULL)\n", devnode->dn_Name, pp[4 + DE_DOSTYPE]));

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Release 9.6
1+
Release 9.6 - RC04

0 commit comments

Comments
 (0)