Here are the instructions for a hypothetical box that has a boot loader that can load an image from a FAT partition of a SD card, and FreeBSD runs off of a ufs partition on the SD card. This will be for a big endian ARM target, based on the AVILA kernel. I'm also assuming that this platform doesn't use FreeBSD's normal /boot/loader.
- setenv MAKEOBJDIRPREFIX /blah
- setenv TARGET arm
- setenv TARGET_ARCH arm
- setenv TARGET_CPU xscale
- make buildworld
- make buildkernel KERNCONF=AVILA
- fdisk -I da0
- fdisk -f disk-partitions da1
- newfs -t msdos /dev/da0s1
- bsdlabel -w da0s2 auto
- newfs /dev/da0s2a
- mount /dev/da0s2a /mnt
- make installworld DESTDIR=/mnt
- make installkernel DESTDIR=/mnt KERNCONF=AVILA INSTALL_NODEBUG=t
- make distrib-dirs DESTDIR=/mnt
- make distribution DESTDIR=/mnt
- echo /dev/da0s2a / ufs rw 1 1 > /mnt/etc/fstab
- echo ifconfig_DEFAULT=DHCP > /mnt/etc/rc.conf
- echo hostname=demo >> /mnt/etc/rc.conf
- cp /mnt/boot/kernel/kernel /tmp
- umount /mnt
- mount -t msdos /dev/da0s1 /mnt
- cp /tmp/kernel /mnt
- umount /mnt
# partition table
g c940 h32 s63
p 1 6 63 201537
p 2 165 201600 1780128
Clearly, one needs to tune the above for their specific part. NanoBSD tries to automate this process, but that is beyond the scope of this posting.
Update: fixed step 17.
2 comments:
Hi Warner,
this article is a great help. I'm looking forward for the next one about NanoBSD and ARM.
Greetings
Hi, This is a great article to help newcomers like myself.
I'm trying to run step 7 above but for a USB Key on a Sheevaplug - having done what i understand to be the equivalent of steps 1-6 using http://wiki.freebsd.org/FreeBSDMarvell
But i get the following error:
step7:
# fdisk -I da0
******* Working on device da0 *******
fdisk: /boot/mbr: No such file or directory
is this the result of a difference in kernel compilation or can you offer any direction? (post to MilingList freebsd-arm
is as yet unanswered)
Thanks
Post a Comment