Welcome! Log In Create A New Profile

Advanced

tftpboot

Posted by balanga 
tftpboot
July 19, 2017 05:53PM
How do I go about initiating a boot via tftp from a GoFlexHome dock?
Re: tftpboot
July 19, 2017 06:05PM
balanga,

> How do I go about initiating a boot via tftp from
> a GoFlexHome dock?

You need to be a little bit more specific. Which u-boot is is installed on GFHome? what are the u-boot envs?

Here is the summary:

- Install tftp server on another Linux box to use as the tftp server.
- Create /tftproot folder on tftp server.
- Copy the kernel files (uImage, uInitrd, DTB) to /tftproot

- Set some GFHome u-boot envs to load from tftp server and load them like this
setenv ipaddr 192.168.0.xxx
setenv serverip 192.168.0.yyy
tftp 0x800000 uImage
tftp 0x1100000 uInitrd
tftp 0x1c00000 kirkwood-goflexhome.dtb

- Then boot
bootm 0x800000  0x1100000  0x1c00000

Depending your current u-boot envs, more might need to be adjusted.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: tftpboot
July 21, 2017 05:00AM
Is there any way of using PXE?
Re: tftpboot
November 13, 2017 05:24PM
bodhi Wrote:
-------------------------------------------------------
> balanga,
>
> > How do I go about initiating a boot via tftp
> from
> > a GoFlexHome dock?
>
> You need to be a little bit more specific. Which
> u-boot is is installed on GFHome? what are the
> u-boot envs?
>
> Here is the summary:
>
> - Install tftp server on another Linux box to use
> as the tftp server.
> - Create /tftproot folder on tftp server.
> - Copy the kernel files (uImage, uInitrd, DTB) to
> /tftproot
>
> - Set some GFHome u-boot envs to load from tftp
> server and load them like this
>
> setenv ipaddr 192.168.0.xxx
> setenv serverip 192.168.0.yyy
> tftp 0x800000 uImage
> tftp 0x1100000 uInitrd
> tftp 0x1c00000 kirkwood-goflexhome.dtb
>
>
> - Then boot
>
> bootm 0x800000  0x1100000  0x1c00000
>
>
> Depending your current u-boot envs, more might
> need to be adjusted.

Having managed to get U-Boot updated to uboot.2017.07-tld-1.goflexhome, should I simply copy uImage. uInitrd and kirkwood-goflexhome.dtb
from my Debian rootfs to my tftp server and issue the commands:-

fw_setenv ipaddr 192.168.0.xxx
fw_setenv serverip 192.168.0.yyy
fw_setenv tftp 0x800000 uImage
fw_setenv tftp 0x1100000 uInitrd
fw_setenv tftp 0x1c00000 kirkwood-goflexhome.dtb
fw_setenv bootm 0x800000  0x1100000  0x1c00000
reboot

at the command prompt?
Re: tftpboot
November 14, 2017 03:18AM
balanga,

No. The commands I posted are to be excuted at serial console prompt (replace xxx and yyy with real number). Not in Linux shell.

setenv ipaddr 192.168.0.xxx
setenv serverip 192.168.0.yyy
tftp 0x800000 uImage
tftp 0x1100000 uInitrd
tftp 0x1c00000 kirkwood-goflexhome.dtb

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: tftpboot
November 14, 2017 05:42AM
I guess I must have an outdated file somewhere or something else isn't setup correctly...
bootm 0x800000 0x1100000 0x1c00000
## Booting kernel from Legacy Image at 00800000
     Image Name:  Linux-4.4.0-kirkwood-tld-1
     Created: 2016-02-19      5:55:25 UTC 
....
....
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid 
Re: tftpboot
November 27, 2017 04:59PM
After updating some files I get:-

root@Test:~ # cu -l /dev/cuaU0 -s 115200
Connected


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:21:31 -0700)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0 
GoFlexHome> setenv ipaddr 192.168.1.23 
GoFlexHome> setenv serverip 192.168.1.43 
GoFlexHome> tftp 0x800000 uImage
Using egiga0 device
TFTP from server 192.168.1.43; our IP address is 192.168.1.23
Filename 'uImage'.
Load address: 0x800000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #
	 2.3 MiB/s
done
Bytes transferred = 3821592 (3a5018 hex)
GoFlexHome> tftp 0x1100000 uInitrd
Using egiga0 device
TFTP from server 192.168.1.43; our IP address is 192.168.1.23
Filename 'uInitrd'.
Load address: 0x1100000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #######################################
	 2.4 MiB/s
done
Bytes transferred = 7245696 (6e8f80 hex)
GoFlexHome> tftp 0x1c00000 kirkwood-goflexhome.dtb
Using egiga0 device
TFTP from server 192.168.1.43; our IP address is 192.168.1.23
Filename 'kirkwood-goflexhome.dtb'.
Load address: 0x1c00000
Loading: #
	 1.3 MiB/s
done
Bytes transferred = 10603 (296b hex)
GoFlexHome> bootm 0x800000  0x1100000  0x1c00000
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 07424000, end 07b0cf40 ... OK
   Loading Device Tree to 0741e000, end 0742396a ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Seagate GoFlex Home
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200n8 earlyprintk root=/dev/sda1 rootdelay=10
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 109428K/131072K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 21644K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000008] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007981] Switching to timer-based delay loop, resolution 5ns
[    0.014472] Console: colour dummy device 80x30
[    0.019098] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.029804] pid_max: default: 32768 minimum: 301
[    0.034719] Security Framework initialized
[    0.039081] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.045825] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.053887] CPU: Testing write buffer coherency: ok
[    0.059950] Setting up static identity map for 0x100000 - 0x100058
[    0.066494] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.075112] devtmpfs: initialized
[    0.082519] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.092575] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.099231] prandom: seed boundary self test passed
[    0.107963] prandom: 100 self tests passed
[    0.112214] pinctrl core: initialized pinctrl subsystem
[    0.118786] NET: Registered protocol family 16
[    0.123795] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.132399] cpuidle: using governor ladder
[    0.136668] cpuidle: using governor menu
[    0.141169] Feroceon L2: Enabling L2
[    0.144881] Feroceon L2: Cache support initialised.
[    0.150258] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.165515] No ATAGs?
[    0.174658] vgaarb: loaded
[    0.180202] SCSI subsystem initialized
[    0.184513] usbcore: registered new interface driver usbfs
[    0.190224] usbcore: registered new interface driver hub
[    0.195718] usbcore: registered new device driver usb
[    0.202012] clocksource: Switched to clocksource orion_clocksource
[    0.298003] VFS: Disk quotas dquot_6.6.0
[    0.302179] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.319867] NET: Registered protocol family 2
[    0.325122] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.332255] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.338736] TCP: Hash tables configured (established 1024 bind 1024)
[    0.345308] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.351269] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.357841] NET: Registered protocol family 1
[    0.362738] RPC: Registered named UNIX socket transport module.
[    0.368773] RPC: Registered udp transport module.
[    0.373661] RPC: Registered tcp transport module.
[    0.378469] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.385288] Unpacking initramfs...
[    1.049137] Freeing initrd memory: 7076K
[    1.053378] NetWinder Floating Point Emulator V0.97 (double precision)
[    1.060975] audit: initializing netlink subsys (disabled)
[    1.067015] Initialise system trusted keyrings
[    1.071614] Key type blacklist registered
[    1.075804] audit: type=2000 audit(1.054:1): state=initialized audit_enabled=0 res=1
[    1.083871] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.090482] zbud: loaded
[    1.094155] NFS: Registering the id_resolver key type
[    1.099332] Key type id_resolver registered
[    1.103673] Key type id_legacy registered
[    1.107795] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.114645] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    1.121314] jffs2: version 2.2. (NAND) (SUMMARY)  �� 2001-2006 Red Hat, Inc.
[    1.128703] fuse init (API version 7.26)
[    1.133108] orangefs_debugfs_init: called with debug mask: :none: :0:
[    1.139929] orangefs_init: module version upstream loaded
[    1.145468] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.562019] random: fast init done
[    7.031375] Key type asymmetric registered
[    7.035898] Asymmetric key parser 'x509' registered
[    7.040950] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    7.048624] io scheduler noop registered
[    7.052712] io scheduler deadline registered
[    7.057167] io scheduler cfq registered (default)
[    7.063341] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    7.072670] mv_xor f1060800.xor: Marvell shared XOR driver
[    7.132784] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    7.140681] mv_xor f1060900.xor: Marvell shared XOR driver
[    7.202779] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    7.210890] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.218659] console [ttyS0] disabled
[    7.222464] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    7.231591] console [ttyS0] enabled
[    7.231591] console [ttyS0] enabled
[    7.238730] bootconsole [earlycon0] disabled
[    7.238730] bootconsole [earlycon0] disabled
[    7.255994] loop: module loaded
[    7.259682] sata_mv f1080000.sata: slots 32 ports 1
[    7.266223] scsi host0: sata_mv
[    7.269618] ata1: SATA max UDMA/133 irq 32
[    7.274449] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xda
[    7.280873] nand: Toshiba NAND 256MiB 3,3V 8-bit
[    7.285544] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    7.293172] Scanning device for bad blocks
[    7.516352] 3 ofpart partitions found on MTD device orion_nand
[    7.522248] Creating 3 MTD partitions on "orion_nand":
[    7.527436] 0x000000000000-0x000000100000 : "u-boot"
[    7.533691] 0x000000100000-0x000000700000 : "uImage"
[    7.539944] 0x000000600000-0x00000de00000 : "root"
[    7.548577] libphy: Fixed MDIO Bus: probed
[    7.553610] libphy: orion_mdio_bus: probed
[    7.562856] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    7.605193] ata1: SATA link down (SStatus 0 SControl F300)
[    8.663773] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[    8.672681] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.679260] ehci-pci: EHCI PCI platform driver
[    8.683818] ehci-orion: EHCI orion driver
[    8.688051] orion-ehci f1050000.ehci: EHCI Host Controller
[    8.693627] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    8.701483] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    8.732047] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    8.738312] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    8.745159] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.752440] usb usb1: Product: EHCI Host Controller
[    8.757338] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[    8.764089] usb usb1: SerialNumber: f1050000.ehci
[    8.769563] hub 1-0:1.0: USB hub found
[    8.773424] hub 1-0:1.0: 1 port detected
[    8.778077] usbcore: registered new interface driver usb-storage
[    8.784507] mousedev: PS/2 mouse device common for all mice
[    8.790652] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    8.797768] i2c /dev entries driver
[    8.802785] hidraw: raw HID events driver (C) Jiri Kosina
[    8.808559] drop_monitor: Initializing network drop monitor service
[    8.815155] NET: Registered protocol family 17
[    8.819700] Key type dns_resolver registered
[    8.824763] registered taskstats version 1
[    8.828883] Loading compiled-in X.509 certificates
[    8.833782] zswap: loaded using pool lzo/zbud
[    8.848361] Key type big_key registered
[    8.861813] Key type encrypted registered
[    8.867351] rtc-mv f1010300.rtc: setting system clock to 2013-01-01 19:59:55 UTC (1357070395)
[    8.879361] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[    9.132130] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    9.373280] usb 1-1: New USB device found, idVendor=0951, idProduct=1665
[    9.380047] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    9.400299] usb 1-1: Product: DataTraveler 2.0
[    9.409737] usb 1-1: Manufacturer: Kingston
[    9.418610] usb 1-1: SerialNumber: 001731F2AB3E1FC0B95E08EA
[    9.430011] usb-storage 1-1:1.0: USB Mass Storage device detected
[    9.448070] scsi host1: usb-storage 1-1:1.0
[    9.622832] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
[   10.494218] scsi 1:0:0:0: Direct-Access     Kingston DataTraveler 2.0 0000 PQ: 0 ANSI: 4
[   10.508699] sd 1:0:0:0: [sda] 15280192 512-byte logical blocks: (7.82 GB/7.29 GiB)
[   10.522684] sd 1:0:0:0: [sda] Write Protect is off
[   10.532175] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   10.551902]  sda: sda1
[   10.564166] sd 1:0:0:0: [sda] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Warning: fsck not present, so skipping root file system
[   19.733703] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   19.750940] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Starting the hotplug events dispatcher: udevd[   21.182964] systemd-udevd[276]: starting version 215
. ok 
[ ok ] Synthesizing the initial hotplug events...done.
[ ok ] Waiting for /dev to be fully populated...done.
[ ok ] Activating swap...done.
[   23.216142] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Checking root file system...fsck from util-linux 2.25.2
rootfs: clean, 17269/477664 files, 284928/1909768 blocks
done.
[   24.500228] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[ ok ] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.25.2
done.
[ ok ] Loading kernel modules...done.
[ ok ] Cleaning up temporary files... /tmp.
[   26.334452] random: crng init done
[ ok ] Mounting local filesystems...done.
[ ok ] Activating swapfile swap...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables ...done.
[   29.876373] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control disabled
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/52:3b:20:9c:11:51
Sending on   LPF/eth0/52:3b:20:9c:11:51
Sending on   Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.54 -- renewal in 34833 seconds.
done.
rpcbind: cannot create socket for udp6
rpcbind: cannot create socket for tcp6
[ ok ] Starting rpcbind daemon....
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1228 (syslogd)
. ok 
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1229 (klogd)
. ok 
[....] Starting web server: apache2AH00557: apache2: apr_sockaddr_info_get() failed for debian
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
. ok 
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting OpenBSD Secure Shell server: sshd.

Debian GNU/Linux 8 debian ttyS0

debian login: ~[sh]

Does this look OK?
Re: tftpboot
November 27, 2017 06:31PM
It looks good!

With this exception:

> *** Warning - bad CRC, using default environment

This means you did not flash the defaut envs image. The internal envs in this u-boot version has been improved so that's why it booted OK. But the default envs image is what you really want.

And this also,
[    0.000000] Kernel command line: console=ttyS0,115200n8 earlyprintk root=/dev/sda1 rootdelay=10

Because the default envs image was not flashed, the kernel bootargs did not have the root device specified as root=LABEL=rootfs.

The current bootargs root=/dev/sda1 is OK for a single drive that has the rootfs on it. But as soon as you plug in another drive and reboot, you might have some problem booting. The order of drives spin up cannot be relied upon to assign the rootfs drive as sda1 always, it could potentially be sdb1 at the next boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: tftpboot
November 28, 2017 04:11AM
Given that I can now tftp boot Debian, would this work as far as getting FreeBSD started?

setenv ipaddr 192.168.0.xxx
setenv serverip 192.168.0.yyy
tftp 0x800000 ubldr.bin
bootelf 0x800000

I know which file to retrieve, but not sure which address to load it to, or how to kick it off... Some examples use 'go' and also load the file at 0x900000.

https://wiki.freebsd.org/FreeBSDMarvell

I do know that kernel.bin has now been replaced by ubldr.bin but where it should get loaded it a mystery to me..
Re: tftpboot
November 28, 2017 06:02AM
balanga Wrote:
-------------------------------------------------------
> Given that I can now tftp boot Debian, would this
> work as far as getting FreeBSD started?
>
>
> setenv ipaddr 192.168.0.xxx
> setenv serverip 192.168.0.yyy
> tftp 0x800000 ubldr.bin
> bootelf 0x800000
>
>
> I know which file to retrieve, but not sure which
> address to load it to, or how to kick it off...
> Some examples use 'go' and also load the file at
> 0x900000.
>
> https://wiki.freebsd.org/FreeBSDMarvell
>
> I do know that kernel.bin has now been replaced by
> ubldr.bin but where it should get loaded it a
> mystery to me..

looking at the boot address from the link you sent, the load address is
Filename 'mv5281/kernel.bin'.
Load address: 0x900000

and not the 0x8000 etc that bodhi stipulates
Re: tftpboot
November 28, 2017 06:14AM
@Gravelrash,

Yes, that would be the address for the go command. There are 2 different ways to boot FreeBSD:

1. use go to boot the kernel.bin at 0x900000
2. use a diffrent address such as 0x800000 to boot the ubldr.bin using bootelf.


@balanga,

The only way I know how to help you was stated here:

https://forum.doozan.com/read.php?3,34799,35928#msg-35928

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 11/28/2017 06:18AM by bodhi.
Re: tftpboot
November 28, 2017 07:15AM
Gravelrash Wrote:
-------------------------------------------------------
> balanga Wrote:
> -------------------------------------------------------
> > Given that I can now tftp boot Debian, would
> this
> > work as far as getting FreeBSD started?
> >
> >
> > setenv ipaddr 192.168.0.xxx
> > setenv serverip 192.168.0.yyy
> > tftp 0x800000 ubldr.bin
> > bootelf 0x800000
> >
> >
> > I know which file to retrieve, but not sure
> which
> > address to load it to, or how to kick it off...
> > Some examples use 'go' and also load the file
> at
> > 0x900000.
> >
> > https://wiki.freebsd.org/FreeBSDMarvell
> >
> > I do know that kernel.bin has now been replaced
> by
> > ubldr.bin but where it should get loaded it a
> > mystery to me..
>
> looking at the boot address from the link you
> sent, the load address is
>
> Filename 'mv5281/kernel.bin'.
> Load address: 0x900000
>
>
> and not the 0x8000 etc that bodhi stipulates

That link is over four years old, and other sources say that ubldr.bin should be loaded rather than kernel.bin.
Re: tftpboot
November 28, 2017 07:25AM
bodhi Wrote:
-------------------------------------------------------
> @Gravelrash,
>
> Yes, that would be the address for the go command.
> There are 2 different ways to boot FreeBSD:
>
> 1. use go to boot the kernel.bin at
> 0x900000
> 2. use a diffrent address such as 0x800000 to boot
> the ubldr.bin using bootelf.
>
>
> @balanga,
>
> The only way I know how to help you was stated
> here:
>
> https://forum.doozan.com/read.php?3,34799,35928#msg-35928

I have an updated U-Boot now, so I guess I don't need to run kwboot, since your latest version supports bootelf.

However I'm trying to simplify things as much as I can by using tftp booting as a means of following the boot process. If trying to tftpboot FreeBSD, should I use bootelf with address 0x800000? Ihe'm not sure of the significance of these two addresses.
Re: tftpboot
November 28, 2017 06:14PM
> That link is over four years old, and other
> sources say that ubldr.bin should be loaded rather
> than kernel.bin.


Gravelrash was correct. That link might be old, it is still relevant. As I mentioned, there are 2 different ways to boot FreeBSD, as far as I understood from my research.

Quote
bodhi
@Gravelrash,

Yes, that would be the address for the go command. There are 2 different ways to boot FreeBSD:

1. use go to boot the kernel.bin at 0x900000
2. use a diffrent address such as 0x800000 to boot the ubldr.bin using bootelf.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: tftpboot
November 28, 2017 06:19PM
balanga,

> I have an updated U-Boot now, so I guess I don't
> need to run kwboot, since your latest version
> supports bootelf.
>
> However I'm trying to simplify things as much as I
> can by using tftp booting as a means of following
> the boot process. If trying to tftpboot FreeBSD,
> should I use bootelf with address 0x800000? Ihe'm
> not sure of the significance of these two
> addresses.

No, the u-boot 2017.07-tld-1 cannot boot FreeBSD using bootelf. I did not activate this capability. You still need to kwboot the u-boot image I've built for your test before. If you want to use bootelf.

To boot FreeBSD with this u-boot-2017.07-tld-1 you must use the old option:

Quote

1. use go to boot the kernel.bin at 0x900000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: tftpboot
November 28, 2017 06:23PM
And by the way, I cannot help you further without this info.

Quote

@balanga,

The only way I know how to help you was stated here:

https://forum.doozan.com/read.php?3,34799,35928#msg-35928

If you don't know how to get the info, then just say so. There is no need to be embarassed because we all have to start somewhere. Don't ignore the request :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: tftpboot
November 29, 2017 03:27AM
bodhi Wrote:
-------------------------------------------------------
> And by the way, I cannot help you further without
> this info.
>
>
Quote

@balanga,
>
> The only way I know how to help you was stated
> here:
>
> https://forum.doozan.com/read.php?3,34799,35928#msg-35928
>
> If you don't know how to get the info, then just
> say so. There is no need to be embarassed because
> we all have to start somewhere. Don't ignore the
> request :)

From what I can make out FreeBSD's root filesystem is normally held on a UFS partition on the same disk as the FAT partition that the boot loader, ubldr.bin, is installed on although it knows where to find it.
Since U-Boot cannot access UFS partitions, it seems that it only needs to load ubldr.bin and go....

That's how I understand the instructions here
https://cooltrainer.org/freebsd-kirkwood/installation/
and here
https://wiki.freebsd.org/FreeBSDMarvell
Re: tftpboot
November 29, 2017 04:35AM
try this... if it doesnt work i cant help you further as i dont run *bsd and this should allow booting from the usb drive


fw_setenv usb_boot 'fatload usb $usb_device 0x900000 ubldr.bin; go 0x900000;'

fw_setenv usb_init 'usb start; if fatload usb 0 0x900000 ubldr.bin; then setenv usb_device 0; elif fatload usb 1 0x900000 ubldr.bin; then setenv usb_device 1; elif fatload usb 2 0x900000 ubldr.bin; then setenv usb_device 2; elif fatload usb 3 0x900000 ubldr.bin; then setenv usb_device 3; elif fatload usb 4 0x900000 ubldr.bin; then setenv usb_device 4; else run pogo_bootcmd; fi;'

usual caveats apply, take a backup of your settings first and you do this at your own risk.
Re: tftpboot
November 29, 2017 03:15PM
Gravelrash Wrote:
-------------------------------------------------------
> try this... if it doesnt work i cant help you
> further as i dont run *bsd and this should allow
> booting from the usb drive
>
>
>
> fw_setenv usb_boot 'fatload usb $usb_device
> 0x900000 ubldr.bin; go 0x900000;'
> 
> fw_setenv usb_init 'usb start; if fatload usb 0
> 0x900000 ubldr.bin; then setenv usb_device 0; elif
> fatload usb 1 0x900000 ubldr.bin; then setenv
> usb_device 1; elif fatload usb 2 0x900000
> ubldr.bin; then setenv usb_device 2; elif fatload
> usb 3 0x900000 ubldr.bin; then setenv usb_device
> 3; elif fatload usb 4 0x900000 ubldr.bin; then
> setenv usb_device 4; else run pogo_bootcmd; fi;'
>
>
> usual caveats apply, take a backup of your
> settings first and you do this at your own
> risk.


Thanks, I tried that but after the 'go 0x900000' there was no response, no output, no error msg, so I'm not sure if I've built ubldr.bin correctly. One problem is that there is no 'pogo_bootcmd'. I only have one USB anyway, so am not sure why so many USB devices are referenced (in the original guide).
Re: tftpboot
November 29, 2017 03:34PM
bodhi Wrote:
-------------------------------------------------------
> balanga,
>
> > I have an updated U-Boot now, so I guess I
> don't
> > need to run kwboot, since your latest version
> > supports bootelf.
> >
> > However I'm trying to simplify things as much as
> I
> > can by using tftp booting as a means of
> following
> > the boot process. If trying to tftpboot
> FreeBSD,
> > should I use bootelf with address 0x800000?
> Ihe'm
> > not sure of the significance of these two
> > addresses.
>
> No, the u-boot 2017.07-tld-1 cannot boot FreeBSD
> using bootelf. I did not activate this capability.
[/quote]

The bootelf command is available and it doesn't produce any error msgs when I run it.

Can you explain the difference between 'bootelf' and 'go'?
Re: tftpboot
November 29, 2017 06:00PM
balanga,

I'm not sure if you are trolling us here or not:) So I will try one last time. Please do not post about this FreeBSD subject again without doing the below.


Create the FreeBSD ARMV5 rootfs for Kirkwood on a USB drive first. You can get helps at FreeBSD forum for how to do this.

And then come back here. Post the listing of the top level folders and files on that rootfs.
ls -la .
ls -laR boot
ls -la kernel/
ls -la kernel/kernel

Then I can help you further.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: tftpboot
November 30, 2017 09:52AM
bodhi Wrote:
-------------------------------------------------------
> balanga,
>
> I'm not sure if you are trolling us here or not:)
> So I will try one last time. Please do not post
> about this FreeBSD subject again without doing the
> below.
>
>
> Create the FreeBSD ARMV5 rootfs for Kirkwood on a
> USB drive first. You can get helps at FreeBSD
> forum for how to do this.
>
> And then come back here. Post the listing of the
> top level folders and files on that rootfs.
>
> ls -la .
> ls -laR boot
> ls -la kernel/
> ls -la kernel/kernel
>
>
> Then I can help you further.

bodhi,

Apologies if I have cause any annoyance, that is not my aim, and I'm certainly not a troll, just someone who is rather lost that has found an oasis of knowledge on this forum, and I thank you for your efforts in trying to sort me out. Among the problems I find difficult to resolve is what U-Boot should load on FreeBSD. Different sources offer different opinions.

One thing you should understand is that the FreeBSD's root filesystem is invisible to U-Boot. It has to be on either UFS or ZFS, neither of which are recognised by U-Boot. FreeBSD has to be loaded via a FAT stub which U-Boot has access to. You may be pleased to know that I have finally made some progress and got U-Boot to execute this using the following:-

GoFlexHome> setenv ipaddr 192.168.1.23  
GoFlexHome> setenv serverip 192.168.1.55
GoFlexHome> ping 192.168.1.55           
Using egiga0 device
host 192.168.1.55 is alive
GoFlexHome> tftp 0x900000 kernel.bin
Using egiga0 device
TFTP from server 192.168.1.55; our IP address is 192.168.1.23
Filename 'kernel.bin'.
Load address: 0x900000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #############################################
	 1.8 MiB/s
done
Bytes transferred = 4468580 (442f64 hex)
GoFlexHome> go 0x900000

And here's what I see:-

## Starting application at 0x00900000 ...
Copyright (c) 1992-2017 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 11.1-RELEASE #0: Thu Nov 30 14:22:01 GMT 2017
    root@Test:/usr/obj/arm.arm/usr/src/sys/DB-88F6XXX arm
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)

Hooray!!!!!


I've just built this today so it seems like just a few steps left (you will be pleased to hear :) )



Edited 1 time(s). Last edit at 12/01/2017 03:27AM by balanga.
Re: tftpboot
November 30, 2017 04:43PM
balanga,


Quote

One thing you should understand is that the FreeBSD's root filesystem is invisible to U-Boot. It has to be on either UFS or ZFS, neither of which are recognised by U-Boot. FreeBSD has to be loaded via a FAT stub which U-Boot has access to.

Yes. I'm well aware of the above facts. That's why I asked you to list the top level folder and files on the rootfs. If you cannot do that, then either you don't have the rootfs prepared, or you just have some reservation about posting info that you think are personal. Either case is OK with me :) I just need to see the information if you have it.


Quote

## Starting application at 0x00900000 ...
Copyright (c) 1992-2017 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 11.1-RELEASE #0: Thu Nov 30 14:22:01 GMT 2017
root@Test:/usr/obj/arm.arm/usr/src/sys/DB-88F6XXX arm
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)

Very cool!

-----

Now what I need you to post is purely for the benefits of the oncoming users who search for this subject: we want information on the rootfs so that they can repeat what you've done. If you don't like posting the content, then post how you created the rootfs (e.g. using buildworld, or download the rootfs from somewhere).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: tftpboot
December 01, 2017 03:20AM
FreeBSD rootfs built yesterday for ARM arch:-

drwxr-xr-x  18 root  wheel   512 Nov 30 14:22 .
drwxr-xr-x   5 root  wheel   512 Nov 30 12:20 ..
drwxr-xr-x   2 root  wheel  1024 Nov 30 14:23 bin
drwxr-xr-x   8 root  wheel  1024 Nov 30 14:25 boot
dr-xr-xr-x   2 root  wheel   512 Nov 30 14:22 dev
drwxr-xr-x  27 root  wheel   512 Nov 30 14:22 etc
drwxr-xr-x   4 root  wheel  1536 Nov 30 14:24 lib
drwxr-xr-x   3 root  wheel   512 Nov 30 14:23 libexec
drwxr-xr-x   2 root  wheel   512 Nov 30 14:22 media
drwxr-xr-x   2 root  wheel   512 Nov 30 14:22 mnt
drwxr-xr-x   2 root  wheel   512 Nov 30 14:22 net
dr-xr-xr-x   2 root  wheel   512 Nov 30 14:22 proc
drwxr-xr-x   2 root  wheel  2560 Nov 30 14:24 rescue
drwxr-xr-x   2 root  wheel   512 Nov 30 14:22 root
drwxr-xr-x   2 root  wheel  2560 Nov 30 14:26 sbin
lrwxr-xr-x   1 root  wheel    11 Nov 30 14:22 sys -> usr/src/sys
drwxrwxrwt   2 root  wheel   512 Nov 30 14:22 tmp
drwxr-xr-x  14 root  wheel   512 Nov 30 14:22 usr
drwxr-xr-x  24 root  wheel   512 Nov 30 14:22 var

using this script:-

cd /
fetch http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.1-RELEASE/src.txz
tar zxf src.txz
cd /usr/src
setenv TARGET_ARCH arm
setenv TARGET arm
make -j 8 buildworld TARGET_ARCH=arm -DWITH_FDT
make -j 8 buildkernel TARGET_ARCH=arm KERNCONF=DB-88F6XXX
make installworld TARGET_ARCH=arm DESTDIR=/mnt/world
make distribution TARGET_ARCH=arm DESTDIR=/mnt
make installkernel TARGET_ARCH=arm KERNCONF=DB-88F6XXX DESTDIR=/mnt/kernel

/mnt/world should be the mount point for the UFS partition of a USB stick.
/mnt/kernel should be the mount point for the DOS partition of a USB stick.

root@Test:~ # gpart show da0
=>     63  3907520  da0  MBR  (1.9G)
       63    65536    1  !12  (32M)
    65599  3841984    2  freebsd  (1.8G)

mount -t msdosfs /dev/da0s1 /mnt/kernel
mount      /dev/da0s2 /mnt/world

I'm still unclear as to what should go on /dev/da0s1 - the FAT partition.

According to https://cooltrainer.org/freebsd-kirkwood/building/

Install the kernel

mount -t msdosfs /dev/da0s1 /root/usb
cp /usr/obj/arm/usr/src/sys/DOCKSTAR-COOLTRAINER/kernel.bin /root/usb
umount /root/usb

and this is the only file copied to the FAT partition.

On my build this equates to:-

cp /usr/obj/arm.arm/usr/src/sys/DB-88F6XXX/kernel.bin /mnt/kernel

but something is missing because FreeBSD only starts to load and then stops.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: