Friday, 6 September 2019

Chroot to ARM Beaglebone or R-PI from FreeBSD 12.0

FreeBSD chroot to ARM from x86



  • First I burned a freeBSD image from a Linux system onto a class 10 micro Sdcard. 
  •  
  • I used this image ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv7/ISO-IMAGES/13.0/FreeBSD-13.0-CURRENT-arm-armv7-BEAGLEBONE-20190822-r351363.img.xz

From Linux I dd-it to the sdcard









How make the BB to boot from SDcard and skip the eMMC u-boot is not covered in this blog here. I suppose you already have a booting freeBSD BBB or R-PI.


Prerequisites:

  •  PC x86 with FreeBSD 12.0-RELEASE
  •  Beaglebone Black (or R-PI) with a flavour of freeBSD 

Procedure:


Get the sdcard and plug it to the PC slot
Type dmesg for find the mount block device. Mine is /dev/da0s2a
Create a working folder for this image



  • Now we have a root file system for ARM on the PC @ ./BBB/ROOTFS
  • Install the quemu and the arm toochains on freeBSD x86


  • Copy the qemu-arm-static to ARM ROOTFS


>

  • Create a bash file for chroot. Make sure you've pkg install bash
Make it x<pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> chmod +x ./chroot.sh
</code></pre>

  • Chroot to the BBB


Sept 6 2019











No comments:

Post a Comment