Port-zaurus archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD/zaurus 8.1 problems and possible fixes
On Fri, 1 Nov 2019 at 22:29, Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost> wrote:
>
> abs@ wrote:
>
> > Apologies for asking a possibly dumb question :) - assuming someone
> > has not used partition c, then would the upgrade fix be to run a new
> > MAKEDEV, or are there further steps required?
>
> I'm afraid userland binaries (like fdisk(8) and disklabel(8))
> with the changed new kernel could fail to open rawpartition.
fdisk, disklabel and friends should just work with a different
RAW_PART kernel - as long as the partition-letter-less device points
to the right dev or they are run with manually with the correct device
letter specified. It sounds like a migration should be possible - but
whether it is worth the effort is another question :)
Could the issue have been introduced by someone trying to move towards
userland sharing for same cpu arch ports?
Many thanks for all the work on continuing to make the port usable in
this and many other ways :)
David
> The problem is not in kernels but MAKEDEV.awk script,
> so I think someone[TM] can easily fix it.
>
> ---
> while (1) {
> inc = top "arch/" incdir "/include/disklabel.h"
> if (system("test -f '" inc "'") != 0) {
> print "ERROR: can't find kernel include file '" inc "'" > "/dev/stderr"
> exit 1
> }
> incdir = 0
> while (getline < inc) {
> if ($1 == "#define" && $2 == "MAXPARTITIONS")
> diskpartitions = $3
> else if ($1 == "#define" && $2 == "OLDMAXPARTITIONS")
> diskbackcompat = $3
> else if ($1 == "#define" && $2 == "RAW_PART")
> RAWDISK_OFF = $3
> else if ($1 == "#include" &&
> $2 ~ "<.*/disklabel.h>" &&
> $2 !~ ".*nbinclude.*")
> {
> # wrapper, switch to the right file
> incdir = substr($2, 2)
> sub("/.*", "", incdir)
> break;
> }
> ---
>
> It checks arch/zaurus/include/disklabel.h so it will find
> > #define RAW_PART 3
> line in it. However zaurus/include/disklabel.h also includes
> <arm/disklabel.h> and it also has the following definition:
> ---
> #ifndef RAW_PART
> #define RAW_PART 2 /* raw partition: XX?c */
> #endif
> ---
>
> The problem is MAKEDEV.awk cannot parse "#ifndef RAW_PART", isn't it?
>
> ---
> Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index