9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] Problems building Raspberry Pi image
@ 2019-03-30  4:05 cinap_lenrek
  0 siblings, 0 replies; 5+ messages in thread
From: cinap_lenrek @ 2019-03-30  4:05 UTC (permalink / raw)
  To: 9front

the issue is that it binds /sys/lib/dist/usr over /usr. and you probably
dont have a separate repo to build the iso from but use the your root
filesystem as /n/src9.

so to get arround this, try to create the target file in some other
directory, say /tmp.

i'll see if i can get arround this limitation in the mkfile.

--
cinap


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] Problems building Raspberry Pi image
  2019-03-31 14:59 cinap_lenrek
@ 2019-04-01  5:56 ` Pablo Tesari
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Tesari @ 2019-04-01  5:56 UTC (permalink / raw)
  To: 9front

It detects the sd card now, many thanks for your help.

Pablo

On Sun, 31 Mar 2019 at 12:00, <cinap_lenrek@felloff.net> wrote:
>
> sysupdate and rebuild the kernel.
>
> changeset:   7012:00bf6c34e13e
> user:        cinap_lenrek@felloff.net
> date:        Fri Feb 01 23:31:44 2019 +0100
> summary:     bcm: include sdmmc in pi kernel configuration
>
> diff -r 79938a709ae3 -r 00bf6c34e13e sys/src/9/bcm/pi
> --- a/sys/src/9/bcm/pi  Wed Jan 30 18:22:52 2019 +0100
> +++ b/sys/src/9/bcm/pi  Fri Feb 01 23:31:44 2019 +0100
> @@ -39,7 +39,7 @@
>  misc
>         armv6
>         uartmini
> -#      sdmmc   emmc
> +       sdmmc   emmc
>         dma
>         vcore
>         vfp3    coproc
>
> --
> cinap


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] Problems building Raspberry Pi image
@ 2019-03-31 14:59 cinap_lenrek
  2019-04-01  5:56 ` Pablo Tesari
  0 siblings, 1 reply; 5+ messages in thread
From: cinap_lenrek @ 2019-03-31 14:59 UTC (permalink / raw)
  To: 9front

sysupdate and rebuild the kernel.

changeset:   7012:00bf6c34e13e
user:        cinap_lenrek@felloff.net
date:        Fri Feb 01 23:31:44 2019 +0100
summary:     bcm: include sdmmc in pi kernel configuration

diff -r 79938a709ae3 -r 00bf6c34e13e sys/src/9/bcm/pi
--- a/sys/src/9/bcm/pi	Wed Jan 30 18:22:52 2019 +0100
+++ b/sys/src/9/bcm/pi	Fri Feb 01 23:31:44 2019 +0100
@@ -39,7 +39,7 @@
 misc
 	armv6
 	uartmini
-#	sdmmc	emmc
+	sdmmc	emmc
 	dma
 	vcore
 	vfp3	coproc

--
cinap


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] Problems building Raspberry Pi image
  2019-03-30  4:44 cinap_lenrek
@ 2019-03-30 17:47 ` Pablo Tesari
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Tesari @ 2019-03-30 17:47 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 950 bytes --]

It works! the building process completed successfully. But when I try
to boot the generated image, the device for the sd card is not there.

Attached I leave the building log and a image of the boot screen.

Thanks again
Pablo

On Sat, 30 Mar 2019 at 01:45, <cinap_lenrek@felloff.net> wrote:
>
> i found a solution. you can apply the following change in /sys/lib/dist/mkfile:
>
> diff -r ea7fc8e2526a sys/lib/dist/mkfile
> --- a/sys/lib/dist/mkfile       Fri Mar 29 06:35:41 2019 +0100
> +++ b/sys/lib/dist/mkfile       Sat Mar 30 05:42:27 2019 +0100
> @@ -146,4 +146,5 @@
>         bind mail/lib /n/src9/mail/lib
>         bind ndb /n/src9/lib/ndb
>         bind -a adm/timezone /n/src9/adm/timezone
> +       aux/stub -d /n/src9/usr
>         bind usr /n/src9/usr
>
> this works as aux/stub mounts itself on /n/src9, so the bind
> for /n/src9/usr will not override /usr in the root filesystem
> but the stub directory from aux/stub.
>
> --
> cinap

[-- Attachment #2: plan9_boot_0.jpg --]
[-- Type: image/jpeg, Size: 1473953 bytes --]

[-- Attachment #3: rpi_log --]
[-- Type: application/octet-stream, Size: 3950 bytes --]

cirno% objtype=arm
cirno% cd /sys/lib/dist
cirno% bind / /n/src9
cirno% mk /usr/glenda/r.pi.img
@{
objtype=arm
bootcode=/sys/src/boot/bcm/^(bootcode.bin fixup_cd.dat start_cd.elf LICENCE.broadcom)
kernels=/n/src9/$objtype/^(9pi 9pi2)
> /env/config.txt {
	echo '[pi0]'
	echo 'kernel=9pi'
	echo '[pi1]'
	echo 'kernel=9pi'
	echo '[pi2]'
	echo 'kernel=9pi2'
	echo '[pi3]'
	echo 'kernel=9pi2'
	echo 'core_freq=250'
	echo '[all]'
	echo 'gpu_mem=16'
	echo 'enable_uart=1'
}
> /env/cmdline.txt {
	echo 'console=0'
}
fatfiles=(/env/config.txt /env/cmdline.txt $bootcode $kernels)
mb=1919	# storage vendors idea of 2GB
mk /usr/glenda/r.pi.img.1999.disk
mv /usr/glenda/r.pi.img.1999.disk /usr/glenda/r.pi.img
}
@{rfork n
mk binds
rm -f /usr/glenda/r.pi.img.2001.disk
dd -if /dev/zero -of /usr/glenda/r.pi.img.2001.disk -bs 1048576 -oseek $mb -count 1
s=`{basename $target}
disk/partfs -m /n/$s /usr/glenda/r.pi.img.2001.disk
d=/n/$s/sdXX
disk/mbr $d/data
if(~ /usr/glenda/r.pi.img.2001.disk *.pi.img.*){
	{
		echo 'a p1 . .+100M'
		echo 't p1 FAT32'
		echo 'a p2 . $'
		echo 't p2 PLAN9'
		echo 'A p1'
		echo 'p'
		echo 'w'
		echo 'q'
	} | disk/fdisk -b $d/data
	disk/prep -bw -a^(nvram fs) $d/plan9
	disk/format -d $d/dos $fatfiles
}
if not {
	disk/fdisk -baw $d/data
	disk/prep -bw -a^(9fat nvram fs) $d/plan9
	disk/format -d -r 2 $d/9fat $fatfiles
}
hjfs -f $d/fs -n $s -S -r
{
	echo echo on
	echo create /dist sys sys 775 d
	echo create /usr sys sys 775 d
	user=glenda
	echo newuser $user
	echo newuser adm +$user
	echo newuser sys +$user
	echo newuser upas +$user
	echo echo off
	sleep 1
} >> /srv/$s.cmd
mount -N -c /srv/$s /n/newfs
disk/mkfs -z 4096 -U -s /n/src9 -d /n/newfs /n/src9/sys/lib/sysconfig/proto/distproto
echo sync >> /srv/$s.cmd
echo halt >> /srv/$s.cmd
while(test -e /srv/$s.cmd) sleep 1
exit ''
}
test -d /n/src9/.hg && bind /n/src9 /n/src9/dist/plan9front
bind cfg /n/src9/cfg
bind mail/lib /n/src9/mail/lib
bind ndb /n/src9/lib/ndb
bind -a adm/timezone /n/src9/adm/timezone
aux/stub -d /n/src9/usr
aux/stub -d /n/src9/usr/glenda
aux/stub -d /n/src9/usr/glenda/bin
aux/stub -d /n/src9/usr/glenda/bin/arm
bind usr /n/src9/usr
1+0 records in
1+0 records out
cylinder = 2064384 bytes
   empty                 0 975        (975 cylinders, 1.87 GB) 
>>> >>> >>> >>> >>> >>> '* p1                    0 50         (50 cylinders, 98.43 MB) FAT32
'  p2                   50 975        (925 cylinders, 1.77 GB) PLAN9
>>> >>> nvram 1
fs 3729596
add config.txt at clust 2
add cmdline.txt at clust 3
add bootcode.bin at clust 4
add fixup_cd.dat at clust 11
add start_cd.elf at clust 12
add LICENCE.broadcom at clust b9
add 9pi at clust ba
add 9pi2 at clust 428
Initializing FAT file system
type hard, 49 tracks, 64 heads, 63 sectors/track, 512 bytes/sec
Adding file /env/config.txt, length 115
add config.txt at clust 2
Adding file /env/cmdline.txt, length 10
add cmdline.txt at clust 3
Adding file /sys/src/boot/bcm/bootcode.bin, length 52296
add bootcode.bin at clust 4
Adding file /sys/src/boot/bcm/fixup_cd.dat, length 2623
add fixup_cd.dat at clust 11
Adding file /sys/src/boot/bcm/start_cd.elf, length 683172
add start_cd.elf at clust 12
Adding file /sys/src/boot/bcm/LICENCE.broadcom, length 1494
add LICENCE.broadcom at clust b9
Adding file /n/src9/arm/9pi, length 3595289
add 9pi at clust ba
Adding file /n/src9/arm/9pi2, length 3606940
add 9pi2 at clust 428
used 7962624 bytes
hjfs: reaming /n/r.pi.img.2001.disk/sdXX/fs
hjfs: ream successful
hjfs: fs is /n/r.pi.img.2001.disk/sdXX/fs
hjfs: >create /dist sys sys 775 d
hjfs: >create /usr sys sys 775 d
hjfs: >newuser glenda
hjfs: >newuser adm +glenda
hjfs: >newuser sys +glenda
hjfs: >newuser upas +glenda
hjfs: >echo off
processing /n/src9/sys/lib/sysconfig/proto/distproto
mkfs: /n/src9/sys/lib/sysconfig/proto/distproto: can't stat file /n/src9/usr/glenda/bin/arm: '/n/src9/usr/glenda/bin/arm' does not exist
file system made
hjfs: sync
hjfs: ending
cirno% cat /dev/text > $home/rpi_log

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] Problems building Raspberry Pi image
@ 2019-03-30  4:44 cinap_lenrek
  2019-03-30 17:47 ` Pablo Tesari
  0 siblings, 1 reply; 5+ messages in thread
From: cinap_lenrek @ 2019-03-30  4:44 UTC (permalink / raw)
  To: 9front

i found a solution. you can apply the following change in /sys/lib/dist/mkfile:

diff -r ea7fc8e2526a sys/lib/dist/mkfile
--- a/sys/lib/dist/mkfile	Fri Mar 29 06:35:41 2019 +0100
+++ b/sys/lib/dist/mkfile	Sat Mar 30 05:42:27 2019 +0100
@@ -146,4 +146,5 @@
 	bind mail/lib /n/src9/mail/lib
 	bind ndb /n/src9/lib/ndb
 	bind -a adm/timezone /n/src9/adm/timezone
+	aux/stub -d /n/src9/usr
 	bind usr /n/src9/usr

this works as aux/stub mounts itself on /n/src9, so the bind
for /n/src9/usr will not override /usr in the root filesystem
but the stub directory from aux/stub.

--
cinap


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-01  5:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-30  4:05 [9front] Problems building Raspberry Pi image cinap_lenrek
2019-03-30  4:44 cinap_lenrek
2019-03-30 17:47 ` Pablo Tesari
2019-03-31 14:59 cinap_lenrek
2019-04-01  5:56 ` Pablo Tesari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).