• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Trouble installing FreeBSD onto sg-1000

Official Netgate® Hardware
freebsd sg-1000 boot boot hung
3
10
1.3k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    nguser
    last edited by Oct 19, 2020, 8:20 PM

    Hello,

    I own a netgate SG-1000 device that I would like to load FreeBSD 12.1 (not pfsense) onto.

    This seems simple ... I just need to short the "SD Boot" jumper on the board and insert a bootable microSD card.

    So I did that ... I created a microSD on my Mac using diskutil on the command line, eventually running:

    dd if=./FreeBSD-12.1-RELEASE-arm-armv7-GENERICSD.img of=/dev/disk7 bs=1024000 conv=sync
    

    But when I power on the device, I immediately get:

    CCCCCCCCCCCCCCCC
    

    ... repeating forever.

    The device works fine, however - if I remove the jumper and boot from the original device it powers on and boots to pfsense just fine.

    So, either I am using the wrong FreeBSD image (I tried both arm64 and armv7) or I am not formatting the SD card properly or ... ?

    Thank you.

    1 Reply Last reply Reply Quote 0
    • K
      kiokoman LAYER 8
      last edited by kiokoman Oct 19, 2020, 11:11 PM Oct 19, 2020, 11:01 PM

      i don't own a sg device but
      cccccc is printed when it is unable to find the files to boot
      wrong img, unaligned partition or something..
      TI AM3352 ARM Cortex-A8 should be armv7 compliant

      ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
      Please do not use chat/PM to ask for help
      we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
      Don't forget to Upvote with the 👍 button for any post you find to be helpful.

      1 Reply Last reply Reply Quote 0
      • N
        nguser
        last edited by nguser Oct 19, 2020, 11:17 PM Oct 19, 2020, 11:14 PM

        Thank you.

        Yes, I think the:

        FreeBSD-12.1-RELEASE-arm-armv7-GENERICSD.img

        image is the correct boot image to be using here.

        I think my 'dd' command in OP is correct also. I am not sure what other factors are in play here that I might be doing incorrectly ...

        I am using a 32GB microSD card - any issues there ?

        1 Reply Last reply Reply Quote 0
        • K
          kiokoman LAYER 8
          last edited by kiokoman Oct 19, 2020, 11:19 PM Oct 19, 2020, 11:18 PM

          are you able to mount the partition after writing it on the mac ?
          i think there should be a msdosfs and a ufs partition that you should be able to mount from terminal

          ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
          Please do not use chat/PM to ask for help
          we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
          Don't forget to Upvote with the 👍 button for any post you find to be helpful.

          1 Reply Last reply Reply Quote 0
          • N
            nguser
            last edited by Oct 20, 2020, 3:27 PM

            When I insert this microSD card into the mac OSX system, it comes up as a MSDOSBOOT volume and it contains three items:

            • dtb (directory)
            • EFI (directory)
            • ubldr.bin (regular file)

            When I insert it into the mac, it just automounts the volume and names it "MSDOSBOOT".

            Is that what you would expect ?

            1 Reply Last reply Reply Quote 0
            • S
              stephenw10 Netgate Administrator
              last edited by stephenw10 Oct 21, 2020, 5:38 PM Oct 21, 2020, 5:37 PM

              The cccc output like that means it cannot find a bootloader and it waiting for you to upload something via serial.
              Unlike the other ARM devices SG-1000 does not have any storage for uboot, it's on the boot media. Hence it can only boot USB if uboot is still present on the eMMC.

              So you will either need to have uboot still present on the eMMC or on the SD card you are trying to boot.

              It's been a while but I believe the Beagle Bone Black image will boot on the SG-1000 but does not 'see' the NICs as the switch code is not present.

              See: https://github.com/Netgate/u-boot-sg1000
              And: https://github.com/Netgate/meta-ubmc

              Steve

              1 Reply Last reply Reply Quote 0
              • N
                nguser
                last edited by Oct 22, 2020, 4:20 PM

                Thank you.

                I am happy to place the bootloader on the SD card which is one of the options you list.

                How does one do that ? If I 'dd' a FreeBSD bootable image to the card, that's it - that's what is on there.

                How do I add the bootloader after the fact ?

                OR ...

                The device still properly boots from the factory installed pfsense load that is on it - is there any way to interrupt that boot process before it loads pfsense and tell it to boot the SD card instead ?

                That is a manual process that requires human intervention, but at least it would get me started ...

                1 Reply Last reply Reply Quote 0
                • S
                  stephenw10 Netgate Administrator
                  last edited by Oct 22, 2020, 9:03 PM

                  I would install pfSense onto the eMMC, so you have uboot on there, then boot FreeBSD from SD card.
                  It will boot the SD card (mmc 0) by default if a fat partition exists on it. You can see that if you interrupt uboot and check the envs:

                  Trying to boot from MMC
                  Card doesn't support part_switch
                  MMC partition switch failed
                  *** Warning - MMC partition switch failed, using default environment
                  
                  reading u-boot.img
                  reading u-boot.img
                  
                  
                  U-Boot 2016.03 (May 30 2018 - 12:13:49 -0400)
                  
                         Watchdog enabled
                  I2C:   ready
                  DRAM:  512 MiB
                  MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
                  reading u-boot.env
                  
                  ** Unable to read "u-boot.env" from mmc0:1 **
                  Using default environment
                  
                  Net:   <ethaddr> not set. Validating first E-fuse MAC
                  cpsw, usb_ether
                  starting USB...
                  USB0:   Port not available.
                  ** Bad device usb 0 **
                  Hit any key to stop autoboot:  0
                  => printenv
                  Fatboot=env exists loaderdev || env set loaderdev ${fatdev}; env exists UserFatboot && run UserFatboot; env exists trynetboot && env exists Netboot && run Netboot; echo Booting from: ${fatdev} ${bootfile}; fatload ${fatdev} ${loadaddr} ${bootfile} && go ${loadaddr};
                  Netboot=env exists loaderdev || env set loaderdev net; env exists UserNetboot && run UserNetboot; echo Booting from: DHCP; dhcp ${loadaddr} ${bootfile} && go ${loadaddr};
                  Preboot=env exists bootfile || bootfile=ubldr.bin; env exists SetupFdtfile && run SetupFdtfile; env exists SetupSpiboot && run SetupSpiboot; env exists SetupFatdev && run SetupFatdev; env exists UserPreboot && run UserPreboot;
                  SetupFatdev=env exists fatdev || usb start && fatdev='usb 0'; fatsize ${fatdev} ${bootfile} || fatdev='mmc 0'; fatsize ${fatdev} ${bootfile} || fatdev='mmc 1'; fatsize ${fatdev} ${bootfile} || env set trynetboot 1;
                  SetupFdtfile=if test ${board_name} = A335uBMC; then env set fdt_file ubmc.dtb; elif test ${board_name} = A335uFW; then env set fdt_file ufw.dtb; fi;
                  SetupSpiboot=env set ubldroff 0xe0000;env set ubldrsize 0x80000;
                  Spiboot=sf probe; sf read ${loadaddr} ${ubldroff} ${ubldrsize}; go ${loadaddr};
                  api_address=9ef3bb58
                  arch=arm
                  baudrate=115200
                  board=am335x
                  board_name=A335uFW
                  board_rev=G00
                  bootcmd=run Fatboot
                  bootcount=1
                  bootdelay=2
                  cpu=armv7
                  eth1addr=0c:b2:b7:af:2f:51
                  ethact=cpsw
                  ethaddr=0c:b2:b7:af:2f:4f
                  fdt_file=ufw.dtb
                  filesize=37d28
                  loadaddr=88000000
                  preboot=run Preboot
                  soc=am33xx
                  stderr=ns16550_serial
                  stdin=ns16550_serial
                  stdout=ns16550_serial
                  ubldroff=0xe0000
                  ubldrsize=0x80000
                  usbnet_devaddr=0c:b2:b7:af:2f:51
                  vendor=ti
                  ver=U-Boot 2016.03 (May 30 2018 - 12:13:49 -0400)
                  
                  Environment size: 1732/131067 bytes
                  =>
                  

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • N
                    nguser
                    last edited by Oct 22, 2020, 11:45 PM

                    Steve,

                    Thank you - I appear to have this working.

                    I did not do anything but remove the "SD BOOT" jumper.

                    So, tell me if I understand correctly - if I want to actually boot from an SD card, I need to enable the "SD BOOT" jumper, but I also need to have a uboot bootloader on my sd card.

                    OR, I can just put a normal, bootable sd card in the system without setting the "SD BOOT" jumper and the eMMC uboot will automatically boot from that instead of the built-in OS ...

                    Do I have that right ?

                    1 Reply Last reply Reply Quote 0
                    • S
                      stephenw10 Netgate Administrator
                      last edited by Oct 22, 2020, 11:51 PM

                      Yup, both those things are true.

                      The jumper is there in case you end up with a damaged uboot image on the eMMC, you can force it to ignore that and load from SD to recover. If the eMMC is complete blank it should try to load from SD anyway without the jumper.

                      Steve

                      1 Reply Last reply Reply Quote 0
                      9 out of 10
                      • First post
                        9/10
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.