SG-1000 alternative use
-
Now that the SG-1000 were practically taken out of business, I have to take back several appliances from customers and replace them with new hardware to be able to run pfSense-23.01
The SG-1000s are working fine, and I would like to find other use-cases. For example they would make a great ssh-jumphost etc / Does anyone have a pointer how to install some other OS as Linux to these appliances?
-
As far as I'm aware we haven't run Linux on the 1000 devices. It might be possible, but it might take some work. There aren't many of them left running around here, and the ones that do are limping along on SD since their MMC has given up (years of abuse from snapshot testing will do that!).
If you just plan to use them for some basic networking tasks like ssh, you could keep running an older build of pfSense on them. You'll get quite a lot of basic FreeBSD functionality under the hood there, plus all the extras from pfSense Plus.
That said, they can run plain FreeBSD 13.1, but NOT 14 which is why we can't support them on Plus 23.01.
Getting a plain FreeBSD 13.1 armv7 image going on there can be a challenge, however. I'm not aware of any written guides. There are generic docs for FreeBSD ARM images that cover most of it (in the FreeBSD docs/wiki), but there are certain files you need to copy off a running SG-1000 in order to craft a usable FreeBSD disk image. There are too many ways for that to go wrong for us to officially recommend doing that, so it's left as an exercise for the reader.
Personally, because I am a fan of tinkering and madness I have a 1000 here that I managed to get FreeBSD 13 working with USB OTG gadget support so it can pretend to be a USB thumb drive to another host, serving up disk images from its SD card, but that takes even more changes that aren't for the faint of heart, like modifying the stock DTB.
Honestly if you're after something like that you'd have a smoother experience going with something like an Orange Pi One where that's practically built-in on Armbian.
-
I don't believe there are any Linux builds that will run on the SG-1000 directly. At least there wasn't last time I checked. The SG-1000 is very similar to the Beaglebone Black board but with two significant differences. The SG-1000 has an onboard switch and both NICs are connected via that. the BBB does not. The CPU in the SG-1000 runs 200MHz slower to remain inside the thermal envelope with the additonal components.
But if you are trying this I would start with a BBB image.
Steve
-
@stephenw10 @jimp thanks to both of you for your feedback.
I'll see if I take the effort to try a BBB image or just modify the installed 22.05 to my needs. Too bad there is no ready linux image ... -
Yup after some testing there is enough upstreamed in FreeBSD that, for example, this image will just work if you boot it from SD. The dtb file describing the sg-1000 hardware is included.
Booting Linux probably requires changing the uboot values at a minimum.
Steve
-
@stephenw10 Ah, great, thanks for the pointer. Did you actually try that?
-
I did:
root@generic:~ # uname -a FreeBSD generic 12.4-STABLE FreeBSD 12.4-STABLE r372994 GENERIC arm root@generic:~ # ifconfig cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE> ether 68:9e:19:8c:14:86 inet6 fe80::6a9e:19ff:fe8c:1486%cpsw0 prefixlen 64 scopeid 0x1 inet 172.21.16.128 netmask 0xffffff00 broadcast 172.21.16.255 media: Ethernet autoselect (1000baseT <full-duplex,master>) status: active nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> cpsw1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE> ether 68:9e:19:8c:14:88 inet6 fe80::6a9e:19ff:fe8c:1488%cpsw1 prefixlen 64 scopeid 0x2 media: Ethernet autoselect (none) status: no carrier nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
-
@stephenw10 said in SG-1000 alternative use:
FreeBSD 12.4
will try asap. I assume it's enough to write the img to USB media and then "run usbrecovery" ? thanks!
-
It probably will run from USB fine. I tested it from a uSD card internally.
You don't need to run anything from uboot. The envs in the SG-1000 will try to boot from both USB and SD card before eMMC.
-
You'll probably need to write that to an SD card, open the case and put the card in, and put a jumper on the SD boot pins so it will boot from SD.
That or you can boot from USB and manually write that image to the mmc, but using SD is probably a better move.
-
I actually found it won't boot from the SD card directly, using the jumper. The uboot version in the image doesn't seem to be compatible. I forget exactly what changes we did there.
Without the jumper it runs uboot from eMMC then loads ubldr.bin from the SD card and boots that.
-
Ah, yeah that might help. Probably a difference in how I made my FreeBSD image since my MMC is dead so I couldn't rely on its u-boot.
When I made the SD card image I use there was a way to inject a specific u-boot into it with
dd
and I used the u-boot I copied out of the existing 1000 image.I can't remember which page had the instructions for that but it's under https://wiki.freebsd.org/arm/ somewhere.
Personally I'm more comfortable knowing it is 100% on SD so it's a consistent environment.
-
oh, that seems complicated ;-)
Tried to write the img to a SD card, inserted it ... had to choose a boot device ... not really successful so far.As I understand you, the image won't boot this way. Reading the docs I learn that the jumper isn't there per default. So I wonder if I need one ... and I wonder if I have to insert that uboot somehow.
That is a bit too much for me right now, I have to wait for a free time slot to attack this from start. Thanks anyway for your help.
-
I would expect it to boot that if a uboot image is present and readable on the eMMC.
It looks like this:
U-Boot SPL 2016.03 (Jul 18 2019 - 08:00:56) 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 (Jul 18 2019 - 08:00:56 -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 Booting from: mmc 0 ubldr.bin reading ubldr.bin 386136 bytes read in 32 ms (11.5 MiB/s) ## Starting application at 0x88000000 ... Consoles: U-Boot console Compatible U-Boot API signature found @0x9ef3bb58 FreeBSD/armv7 U-Boot loader, Revision 1.2 DRAM: 512MB Number of U-Boot devices: 3 U-Boot env: loaderdev='mmc 0' Found U-Boot device: disk Checking unit=0 slice=<auto> partition=<auto>... good. Booting from disk0s2a: Loading /boot/defaults/loader.conf Loading /boot/defaults/loader.conf Loading /boot/device.hints Loading /boot/loader.conf Loading /boot/loader.conf.local Loading kernel... /boot/kernel/kernel text=0x1b4 text=0x735378 text=0x185aec data=0xa52b0 data=0x0+0x1f0000 syms=[0x4+0xa6ff0+0x4+0x109fc4] Loading configured modules... /boot/kernel/umodem.ko text=0x14c0 text=0xed0 data=0x22c+0x4 syms=[0x4+0xe10+0x4+0xa4f] loading required module 'ucom' /boot/kernel/ucom.ko text=0x1714 text=0x2cbc data=0x3c4+0x838 syms=[0x4+0x13e0+0x4+0xbac] /boot/entropy size=0x1000 /etc/hostid size=0x25 Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... /boot/dtb/ufw.dtb size=0x12b06 Loaded DTB from file 'ufw.dtb'. Kernel entry at 0x88400200... Kernel args: (null) ---<<BOOT>>--- Copyright (c) 1992-2021 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.4-STABLE r372994 GENERIC arm FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
-
@stephenw10 forgive me following up this old thread. I actually didn't try anything related since back then.
Now with my failed beta-upgrade etc I want to set up some minimal appliance just to get me online again quickly for rescue research etc ;-)
I am currently running a firmware recovery to one of these SG-1000 boxes. The file used brings pfSense Plus 21.02p1 ... I am not sure if I could get anything later by filing a ticket, but anyway: even the latest release for that platform is unsupported (and unsafe?) for a long time now.
The recovery stick boots and writes stuff to the internal SD (?) mmcsd1. Is that correct? Because it takes a while, shuts down, tells me to remove the recovery stick and cycle the power. After that no booting ...
EDIT: ah, remove that extra SD. Now: mmcsd0
-
You can get a 22.05 recovery image but that was the last version that built for it. You should still be able to upgrade to that too.