Re: Debian on Synology RS816 (Armada 385) May 16, 2019 11:29PM |
Admin Registered: 13 years ago Posts: 19,094 |
dev: size erasesize name mtd0: 00400000 00001000 "boot" mtd1: 00400000 00001000 "spi-rootfs"
# MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd1 0x0000 0x80000 0x20000 4
Warning: Bad CRC, using default environment bootcmd=run distro_bootcmd bootdelay=2 baudrate=115200 stdin=serial,cros-ec-keyb,usbkbd stdout=serial,vidconsole stderr=serial,vidconsole ethaddr=00:00:11:22:33:44 eth1addr=00:00:11:22:33:45 eth3addr=00:00:11:22:33:46 eth5addr=00:00:11:22:33:47 ipaddr=1.2.3.4 host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi boot_prefixes=/ /boot/ boot_scripts=boot.scr.uimg boot.scr boot_script_dhcp=boot.scr.uimg boot_targets=host1 host0 boot_syslinux_conf=extlinux/extlinux.conf boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf} scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr} scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done; scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done bootcmd_host1=setenv devnum 1; run host_boot bootcmd_host0=setenv devnum 0; run host_boot distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done bootm_size=0x10000000 kernel_addr_r=0x1000000 fdt_addr_r=0xc00000 ramdisk_addr_r=0x2000000 scriptaddr=0x1000 pxefile_addr_r=0x2000
# MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd1 0x3E0000 0x10000 0x00001000
fw_printenv
Re: Debian on Synology RS816 (Armada 385) May 16, 2019 11:43PM |
Registered: 5 years ago Posts: 257 |
CASset=max MALLOC_len=5 MPmode=SMP ata_hdd_detect=syno_hdd_detect=39,39,39,39 ata_hdd_enable=syno_hdd_enable=37,37,37,37 autoload=no baudrate=115200 boot_order=hd_scr usb_scr mmc_scr hd_img usb_img mmc_img pxe net_img net_scr bootargs= bootargs_dflt=$console $nandEcc $mtdparts_lgcy $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel bootargs_end=:10.4.50.254:255.255.255.0:Armada38x:eth0:none bootargs_root=root=/dev/nfs rw bootcmd=mw 0xf10a2620 0x251;mw 0xf10a2e20 0x251;usb xhciinit; run bootspi bootcmd_auto=stage_boot $boot_order bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr; bootcmd_fdt_boot=tftpboot 0x2000000 $image_name; setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr; bootcmd_fdt_edit=tftpboot $fdtaddr $fdtfile; fdt addr $fdtaddr; setenv bootcmd $bootcmd_fdt_boot bootcmd_lgcy=tftpboot 0x2000000 $image_name;setenv bootargs $console $nandEcc $mtdparts_lgcy $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootm $loadaddr; bootdelay=3 bootftp=run syno_bootargs;tftpboot $loadaddr_kernel $file_kernel;tftpboot $loadaddr_rootfs $file_rootfs;sf probe; sf read $loadaddr_dt $spi_pt_addr_dt $spi_pt_size_dt;fdt addr $loadaddr_dt;bootm $loadaddr_kernel $loadaddr_rootfs $loadaddr_dt; bootspi=run syno_bootargs;sf probe 0 50000000;sf read $loadaddr_kernel $spi_pt_addr_kernel $spi_pt_size_kernel;sf read $loadaddr_rootfs $spi_pt_addr_rootfs $spi_pt_size_rootfs;sf read $loadaddr_dt $spi_pt_addr_dt $spi_pt_size_dt;bootm $loadaddr_kernel $loadaddr_rootfs $loadaddr_dt; cacheShare=no clean_env=sf probe; sf erase $spi_pt_addr_env $spi_pt_size_env; console=console=ttyS0,115200 device_partition=0:1 disaMvPnp=no eeeEnable=no enaClockGating=no enaCpuStream=no enaFPU=yes enaMonExt=no enaWrAllo=no eth1addr=00:50:43:1c:24:27 eth1mtu=1500 eth2addr=00:50:43:1c:1c:27 eth2mtu=1500 eth3addr=00:50:43:24:1c:1c eth3mtu=1500 ethact=egiga0 ethaddr=00:50:43:1c:24:27 ethmtu=1500 ethprime=egiga0 fdt_addr=2040000 fdt_skip_update=yes fdtaddr=0x1000000 fdtfile=armada-38x.dtb file_flash=armada38x/flash.bin file_kernel=armada38x/uImage file_rootfs=armada38x/rd.bin file_uboot=armada38x/uboot.bin ide_path=/ image_name=uImage initrd_high=8000000 initrd_name=uInitrd kernel_addr_r=2080000 lcd0_enable=0 lcd0_params=640x480-16@60 lcd_panel=0 limit_dram_size=yes loadaddr=0x02000000 loadaddr_dt=0x1000000 loadaddr_kernel=0x2000000 loadaddr_rootfs=0x3000000 loads_echo=0 mtdids=spi0=spi_flash mtdparts=mtdparts=spi0.0:4m(boot),-(spi-rootfs) mtdparts_lgcy=mtdparts=spi_flash:4m(boot),-(spi-rootfs) mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500 mv_pon_addr=00:50:43:27:1c:1c netbsd_en=no netretry=no pcieTune=no pexMode=RC pxe_files_load=:default.arm-armadaxp-db:default.arm-armadaxp:default.arm pxefile_addr_r=3100000 ramdisk_addr_r=2880000 rootpath=/srv/nfs/ run_script=no sata_delay_reset=0 sata_dma_mode=yes script_addr_r=3000000 script_name=boot.scr sd_detection_dat3=no spi_pt_addr_dt=0x0E0000 spi_pt_addr_env=0x7e0000 spi_pt_addr_kernel=0x0F0000 spi_pt_addr_rootfs=0x3C0000 spi_pt_size_dt=0x010000 spi_pt_size_env=0x010000 spi_pt_size_kernel=0x2D0000 spi_pt_size_rootfs=0x410000 standalone=fsload 0x2000000 $image_name;setenv bootargs $console $nandEcc $mtdparts_lgcy root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000; stderr=serial stdin=serial stdout=serial syno_boot_dev=/dev/md0 syno_bootargs=setenv bootargs console=ttyS0,115200 ip=off initrd=$loadaddr_rootfs root=$syno_boot_dev rw $syno_extra_args syno_hw_version=$syno_hw_version hd_power_on_seq=$syno_hdd_powerup_seq ihd_num=$syno_hdd_powerup_seq netif_num=$syno_net_if_num $ata_hdd_detect $ata_hdd_enable flash_size=8 syno_extra_args=HddHotplug=4 sata_remap=0>4:4>0 syno_hdd_powerup_seq=4 syno_hw_version=RS816 syno_net_if_num=2 upd_flash=setenv tftpfile $file_flash; tftpboot $loadaddr $tftpfile; if test $? -eq 0; then echo "This may take a while, please be patient..."; sf probe; sf erase 0 +$filesize; sf write $loadaddr 0 $filesize; echo " Flash Update Done"; fi; upd_kernel=setenv tftpfile $file_kernel; mw.b $loadaddr 0xFF $spi_pt_size_kernel; tftpboot $loadaddr $tftpfile; if test $? -eq 0; then sf probe; sf erase $spi_pt_addr_kernel $spi_pt_size_kernel; sf write $loadaddr $spi_pt_addr_kernel $spi_pt_size_kernel; echo " Kernel Update Done"; fi; upd_rootfs=setenv tftpfile $file_rootfs; mw.b $loadaddr 0xFF $spi_pt_size_rootfs; tftpboot $loadaddr $tftpfile; if test $? -eq 0; then sf probe; sf erase $spi_pt_addr_rootfs +$filesize; sf write $loadaddr $spi_pt_addr_rootfs $filesize; echo " Rootfs Update Done"; fi; upd_uboot=setenv tftpfile $file_uboot; tftpboot $loadaddr $tftpfile; if test $? -eq 0; then sf probe; sf erase 0 +$filesize; sf write $loadaddr 0 $filesize; echo " Uboot Update Done"; fi; usb0Mode=host usbActive=0 usbType=2 vxworks_en=no yuk_ethaddr=00:00:00:EE:51:81
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 12:35AM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 12:46AM |
Registered: 5 years ago Posts: 257 |
setenv ipaddr 192.168.1.250 setenv serverip 192.168.1.2 setenv load_dtb_addr 0x1000000 setenv load_initrd_addr 0x3000000 setenv load_image_addr 0x02000000 setenv load_image 'echo loading zImage from tftpserver ...; tftpboot $load_image_addr zImage' setenv load_initrd 'echo loading uInitrd from tftpserver ...; tftpboot $load_initrd_addr uInitrd' setenv load_dtb 'echo loading DTB from tftpserver ...; tftpboot $load_dtb_addr armada-385-synology-rs816-v12.dtb' setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=20 $mtdparts earlyprintk=serial"' setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; run load_initrd; run load_dtb; bootz $load_image_addr $load_initrd_addr $load_dtb_addr' setenv bootcmd 'mw 0xf10a2620 0x251;mw 0xf10a2e20 0x251;usb xhciinit; run bootcmd_exec; run bootspi'
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 01:09AM |
Admin Registered: 13 years ago Posts: 19,094 |
bootspi=run syno_bootargs;sf probe 0 50000000;sf read $loadaddr_kernel $spi_pt_addr_kernel $spi_pt_size_kernel;sf read $loadaddr_rootfs $spi_pt_addr_rootfs $spi_pt_size_rootfs;sf read $loadaddr_dt $spi_pt_addr_dt $spi_pt_size_dt;bootm $loadaddr_kernel $loadaddr_rootfs $loadaddr_dt;
setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; run load_initrd; run load_dtb; bootz $load_image_addr $load_initrd_addr $load_dtb_addr' setenv bootcmd 'mw 0xf10a2620 0x251;mw 0xf10a2e20 0x251;usb xhciinit; run bootcmd_exec; run bootspi'
setenv ipaddr 192.168.1.250 setenv serverip 192.168.1.2 setenv load_dtb_addr 0x1000000 setenv load_initrd_addr 0x3000000 setenv load_image_addr 0x02000000 setenv load_image 'echo loading zImage from tftpserver ...; tftpboot $load_image_addr zImage' setenv load_initrd 'echo loading uInitrd from tftpserver ...; tftpboot $load_initrd_addr uInitrd' setenv load_dtb 'echo loading DTB from tftpserver ...; tftpboot $load_dtb_addr armada-385-synology-rs816-v12.dtb' setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=20 $mtdparts earlyprintk=serial"' setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; run load_initrd; run load_dtb; bootz $load_image_addr $load_initrd_addr $load_dtb_addr' setenv bootcmd 'mw 0xf10a2620 0x251;mw 0xf10a2e20 0x251;usb xhciinit; run bootcmd_exec; run bootspi' saveenv
resetIn Debian, reboot, come back to serial console and interrupt countdown, and try booting stock
run bootspi
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 01:40AM |
Registered: 5 years ago Posts: 257 |
run bootspi
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 01:52AM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 02:04AM |
Registered: 5 years ago Posts: 257 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 02:25AM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 02:43AM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 02:49AM |
Registered: 5 years ago Posts: 257 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 02:51AM |
Admin Registered: 13 years ago Posts: 19,094 |
Quote
setenv bootcmd 'mw 0xf10a2620 0x251;mw 0xf10a2e20 0x251;usb xhciinit; run bootcmd_exec; run bootspi'
usb xhciinitOn the surface, it looks like the USB 3.0 port on this box is activated by that. Is there one or more USB 3.0 ports availbe outside?
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 03:48AM |
Registered: 5 years ago Posts: 257 |
setenv usb_setup 'setenv usbActive 1; setenv usbType 3; usb start;'
run usb_setup;
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 04:08AM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 04:45AM |
Registered: 5 years ago Posts: 257 |
setenv bootcmd 'mw 0xf10a2620 0x251;mw 0xf10a2e20 0x251;usb xhciinit; run bootcmd_exec; run bootspi'
setenv bootcmd 'run bootcmd_exec; run bootspi'
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 05:15AM |
Registered: 5 years ago Posts: 257 |
Marvell>> help ? - alias for 'help' Creset - Creset - Run 'reset' or boot command in a loop, while counting. SatR - Sample At Reset sub-system WOLTest - WOLTest - Wake On Lan u-boot testing active_units- print active units on board base - print or set address offset bdinfo - print Board Info structure boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootelf - Boot from an ELF image in memory bootm - boot application image from memory bootp - boot image via network using BOOTP/TFTP protocol bootvx - Boot vxWorks from an ELF image bootz - boot Linux zImage image from memory cmp - memory compare coninfo - print console devices and information cp - memory copy cpss_env- set cpss environment variables permanently crc32 - checksum calculation date - get/set/reset date & time ddrPhyRead- ddrPhyRead - Read DDR PHY register ddrPhyWrite- ddrPhyWrite - Write DDR PHY register dhcp - boot image via network using DHCP/TFTP protocol diskboot- diskboot- boot from IDE device dma - dma - Perform DMA using the XOR engine echo - echo args to console editenv - edit environment variable eeprom - EEPROM sub-system env - environment handling commands exit - exit script false - do nothing, unsuccessfully fdt - flattened device tree utility commands flash_part_print- flash_part_print - print spi/nand FLASH memory information go - start application at address 'addr' help - print command description/usage i2c - I2C sub-system ide - ide - IDE sub-system iminfo - print header information for application image imxtract- extract a part of a multi-image ir - ir - reading and changing MV internal register values. itest - return true/false on integer compare loadb - load binary file over serial line (kermit mode) loads - load S-Record file over serial line loadx - load binary file over serial line (xmodem mode) loady - load binary file over serial line (ymodem mode) loop - infinite loop on address range map - map - Display address decode windows md - memory display me - me - PCIe master enable mm - memory modify (auto-incrementing address) mmc - MMC sub system mmcinfo - display MMC info mp - mp - map PCIe BAR mtdburn - Burn a Linux image and Filesystem` on the NAND/SPI flash. mtest - simple RAM read/write test mw - memory write (fill) nfs - boot image via network using NFS protocol nm - memory modify (constant address) pci - list and access PCI Configuration Space pciePhyRead- phyRead - Read PCI-E Phy register pciePhyWrite- pciePhyWrite - Write PCI-E Phy register phyRead - phyRead - Read Phy register phyWrite- phyWrite - Write Phy register ping - send ICMP ECHO_REQUEST to network host printenv- print environment variables pxe - commands to get and boot from pxe files qsgmii_sel- Select SFP or QSGMII modes on bc2. rcvr - rcvr - Start recovery process (with TFTP server) reset - Perform RESET of the CPU resetenv- resetenv - Erase environment sector to reset all variables to default. run - run commands in an environment variable saveenv - save environment variables to persistent storage scsi - SCSI sub-system scsiboot- boot from SCSI device se - se - PCIe Slave enable setenv - set environment variables sf - SPI flash sub-system sg - sg - scanning the PHYs status showvar - print local hushshell variables sleep - delay execution for some time smiscan - smiscan - Scan for marvell smi devices. source - run script from memory sp - scan and detect all devices on PCI-e interface sspi - SPI utility command switchCountersRead- switchCntPrint - Read switch port counters. switchPhyRegRead- - Read switch register switchPhyRegWrite- - Write switch register switchRegRead- switchRegRead - Read switch register switchRegWrite- switchRegWrite - Write switch register syno_pwoff- syno_pwoff - bring the system down syno_up - syno_up - Send a character to microp sysboot - command to get and boot from syslinux files temp - temp - Display the device temperature. tempCmd0- tempCmd - This command allocated for monitor extinction tempCmd1- tempCmd - This command allocated for monitor extinction tempCmd2- tempCmd - This command allocated for monitor extinction tempCmd3- tempCmd - This command allocated for monitor extinction test - minimal test like /bin/sh tftpboot- boot image via network using TFTP protocol training- training - prints the results of the DDR3 Training. trainingStability- training - prints the results of the DDR3 Training. true - do nothing, successfully ts_report- ts_report - report touch screen coordinate ts_test - ts_test - test touch screen usb - USB sub-system usbboot - boot from USB device version - print monitor, compiler and linker version whoAmI - - reading CPU ID
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 05:20AM |
Admin Registered: 13 years ago Posts: 19,094 |
helpto see the available commands. See if fatload, load, ext2load, ex4load are avaible.
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 05:23AM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 05:25AM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 05:26AM |
Registered: 5 years ago Posts: 257 |
Marvell>> help diskboot diskboot - diskboot- boot from IDE device Usage: diskboot loadAddr dev:part Marvell>> help usbboot usbboot - boot from USB device Usage: usbboot loadAddr dev:part
Marvell>> help scsiboot scsiboot - boot from SCSI device Usage: scsiboot loadAddr dev:part
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 05:32AM |
Registered: 5 years ago Posts: 257 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 06:00AM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 06:11AM |
Registered: 5 years ago Posts: 257 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 06:27AM |
Registered: 5 years ago Posts: 257 |
Quote
The SPI flash size is 8MB. At minimum 1MB must be reserved for u-boot. And the kernel files size are:
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 04:45PM |
Registered: 5 years ago Posts: 257 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 06:06PM |
Admin Registered: 13 years ago Posts: 19,094 |
Quote
Booting Debian on Pogoplug
How to set up U-Boot for booting in multiple drives configuration
Backup and Restore NAND mtds
UART Booting HowTo for Selected Kirkwood Devices
Migrating from Arch to Debian?
How to boot new Debian rootfs using stock u-boot tftp - Pogo E02
How to boot new Debian rootfs on USB using stock u-boot - NSA325
How to boot Debian rootfs on a GPT HDD with stock u-boot (kernel files stored in HDD raw sector), 2nd HowTo post
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 06:53PM |
Registered: 5 years ago Posts: 257 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 07:07PM |
Admin Registered: 13 years ago Posts: 19,094 |
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 07:10PM |
Registered: 5 years ago Posts: 257 |
# apt-get install fancontrol
# pwmconfig
# service fancontrol start
Re: Debian on Synology RS816 (Armada 385) May 17, 2019 07:17PM |
Registered: 5 years ago Posts: 257 |
Quote
My goal always has been to make it possible to run a full blown Debian system on disk.