onion omega2+

Mike Wolman mike at wolman.co.uk
Thu May 11 13:32:48 UTC 2017



On 11/05/2017 12:32, Aleksandr Rybalko wrote:
> BTW, Mike, join us on IRC in EFNet network, channel #bsdmips. There is 
> a lot of guys who able to help.
>

Ahh great thank will get myself on there - not used irc in quite some time!



I think I am almost there now just having a spot of trouble with getting 
the root mounting off the md device:



The standard kernel conf for MT7628_FDT has:

# Default rootfs device configuration, should be changed to suit target 
board
options         ROOTDEVNAME=\"ufs:md0.uzip\"

# Support geom_uzip(4) compressed disk images
device          geom_uzip
options         GEOM_UZIP

# Support md(4) and md-based rootfs
device          md
options         MD_ROOT




On booting I see:

random: harvesting attach, 8 bytes (4 bits) from uhub1
ugen1.2: <vendor 0x1005 USB Flash Drive> at usbus1
umass0 on uhub0
umass0: <vendor 0x1005 USB Flash Drive, class 0/0, rev 2.00/1.00, addr 
2> on usbus1
umass0:0:0: Attached to scbus0
random: harvesting attach, 8 bytes (4 bits) from umass0
mountroot: waiting for device md0.uzip...
(probe0:umass-sim0:0:0:0): Down reving Protocol Version from 2 to 0?
pass0 at umass-sim0 bus 0 scbus0 target 0 lun 0
pass0: <USB Flash Drive 2.04> Removable Direct Access SCSI device
pass0: Serial Number 070B00012340350
pass0: 1.000MB/s transfers
GEOM: new disk da0
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <USB Flash Drive 2.04> Removable Direct Access SCSI device
da0: Serial Number 070B00012340350
da0: 1.000MB/s transfers
da0: 495MB (1015805 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
da0: Delete methods: <NONE(*),ZERO>
(da0:umass-sim0:0:0:0): PREVENT ALLOW MEDIUM REMOVAL not supported.
Mounting from ufs:md0.uzip failed with error 19.


I have created a kernel.MT7628_FDT.lzma.uImage which is compressed and 
boots from uboot.

The mfsroot was created with:

X_DTS_FILE=OMEGA2P.dts KERNCONF=MT7628_FDT 
../freebsd-wifi-build/build/bin/build ralink mfsroot

and fsimage:

X_DTS_FILE=OMEGA2P.dts KERNCONF=MT7628_FDT 
../freebsd-wifi-build/build/bin/build ralink fsimage


 From digging about and looking at the build scripts I have made a 
geom_uzip image from the fsimage with:

mkuzip -L -d -s 65536 -v -o mfsroot-ralink.img.ulzma 
../img/mfsroot-ralink.img

and then joined this to the kernel with:

(
  dd if=kernel.MT7628_FDT.lzma.uImage bs=65536 conv=sync
  dd if=mfsroot-ralink.img.ulzma
) > MT7628_FDT.lzma.flash


Am I missing something in the stage between making the mfsroot and 
fsimage where I need to add a some config somewhere or give the kernel a 
hint  or set something in the u-boot env to where the fs image is?



I tried to use:  ../freebsd-wifi-build/build/bin/build ralink ubnt

But this fails as there is no specified firmware description - i have 
tried to run this without the build script with:

../freebsd-wifi-build/programs/ubnt-mkfwimage/mkfwimage -B -v \
-k kernel.MT7628_FDT.lzma.uImage  \
-r /home/mike/omega2/tftpboot/mfsroot-ralink.img.lzma \
-C -c ../cfgfs-ralink.img -B "" mips -o MT7628_FDT.initial.img





More information about the freebsd-mips mailing list