Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wscons kernel?



john%ziaspace.com@localhost (John Klos) writes:

>#      link  LILITH/netbsd
>/usr/src/../tools/bin/m68k--netbsdelf-ld -Map netbsd.map --cref -n -Ttext 
>0 -e start -S -o netbsd ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
>conf.o:(.data+0x30): undefined reference to `grfcnprobe'
>conf.o:(.data+0x34): undefined reference to `grfcninit'
>*** [netbsd] Error code 1

>If I leave one of the CyberVision, the kernel links and boots:


As I said, you need one of the grfN devices even when not really used.
WSCONS has several, I usually keep grf0 around so that the grfcn* routines
get linked in.


>Now I just have to figure out how to compile a kernel with a wedge set as 
>the root filesystem...

That needs some twists on Amiga because on that platform you use
the "native" partitioning scheme ("rigid disk blocks") and there
is no wedge discovery code for that.

On my emulated Amiga I currently get:

wd0 at atabus0 drive 0
wd0: <UAE Harddrive>
wd0: 10240 MB, 163840 cyl, 16 head, 8 sec, 512 bytes/sect x 20971520 sectors
dk0 at wd0: "dummy/a", 200000 blocks at 128, type: ffs
dk1 at wd0: "dummy/b", 1024000 blocks at 200128, type: swap
dk2 at wd0: "dummy/e", 1400000 blocks at 1224128, type: ffs
dk3 at wd0: "dummy/f", 1471872 blocks at 2624128, type: ffs
dk4 at wd0: "dummy/g", 16875520 blocks at 4096000, type: ffs
wd1 at atabus0 drive 1
wd1: <UAE Harddrive>
wd1: 10240 MB, 40960 cyl, 16 head, 32 sec, 512 bytes/sect x 20971520 sectors
dk5 at wd1: "work/d", 20971008 blocks at 512, type: ffs


wd0 has a "native" partitioning including the bootblock. However, the
RDB blocks start at sector 2 (by default the RDB starts at sector 0).

It also has a BSD disklabel on sector 1 which is the reason why RDB
must not start from sector 0. The label configures the same partitions
as the RDB. It's even a byte-swapped label (i.e. little endian) so that
a standard x86 system will interpret it.

The wedge autodiscover code only reads the disklabel and creates dk0..dk4.
The current autodiscover code (enabled with DKWEDGE_METHOD_BSDLABEL)
interprets labels independent of endianess, which can cause some
confusion.

wd1 is similar but has disklabel on sector 0 and RDB starting from
sector 1 to not overwrite the disklabel and the disklabel is big-endian.


You could also use GPT partitioned disks. GPT usually has a protecting MBR
on sector 0, the GPT spans sector 1-32. The RDB however must start somewhere
between block 0 and 15. So you cannot use both together and the disk cannot
be accessed from AmigaOS or used for booting.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index