What version of Rescue am I running? May 10, 2018 10:40AM |
Registered: 6 years ago Posts: 8 |
Re: What version of Rescue am I running? May 10, 2018 05:08PM |
Admin Registered: 13 years ago Posts: 18,998 |
Re: What version of Rescue am I running? May 10, 2018 06:34PM |
Registered: 6 years ago Posts: 8 |
Re: What version of Rescue am I running? May 10, 2018 11:30PM |
Admin Registered: 13 years ago Posts: 18,998 |
fw_printenvAnd post the log of the terminal session here.
Quote
Updated 24 Jul 2017:
Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:
- tarball size: 188M
- install size: 488M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root
Download at Dropbox:
Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
md5:
bf3d29569943875df348fb5ca03b348c
sha256:
4ed5714fdb123cdb40e973f3d0754e91cd199b75a9874018f2b5dc9cfa8ae8bb
And remember to check the hash of what you download, as always.
Installation:
Installation can be done on any Linux box, with a fresh USB drive (SD card or HDD would work fine too).
Note: all steps below must be done while logging in as root user (not sudo). If you are not the root user then don't continue, because the rootfs will not work.
1. Format a new USB drive with a single Ext3 partition, and label it rootfs. If you are running the latest U-Boot for Kirkwood then you can use Ext4.
2. Mount the drive on a Linux box. cd to top level directory and extract it. It is assuming the USB drive is mounted at /media/sdb1
cd /media/sdb1
tar -xjf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
3. Adjust fstab (optional).
Edit /media/sdb1/etc/fstab entry for root device to match the rootfstype of your rootfstype if you use Ext4 or Ext2. However, you can keep it as is without problem in booting since the kernel will figure out which file system the rootfs was formatted.
LABEL=rootfs / ext3 noatime,errors=remount-ro 0 1
4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Skip this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).
Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).
Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-4.12.1-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.12.1-kirkwood-tld-1 -d zImage.fdt uImage
sync
If your Linux box does not have mkimage, then install it
apt-get install u-boot-tools
5. Done. Take this USB rootfs to your plug and cold start. After booted into Debian, see Note1 and Note2 below. It is very important that you do Note1 steps to secure your box.
Re: What version of Rescue am I running? May 11, 2018 05:38AM |
Registered: 6 years ago Posts: 8 |
(rescue)[root@alarm ~]# fw_printenv baudrate=115200 bootdelay=3 bootm=echo Booting from ${disk} ...; run setargs; bootm ${loadaddr}; bootz=echo Booting from ${disk} ...; run setargs; bootz ${loadaddr} - ${fdt_addr}; console=ttyS0 ethact=egiga0 fdt_addr=0x800000 fdt_file=/boot/dtbs/kirkwood-goflexnet.dtb importbootenv=echo Importing environment (uEnv.txt)...; env import -t $loadaddr $filesize load=echo Attempting to boot from ${type} ${disk}:1...;if run loadbootenv; then run importbootenv;fi;echo Checking if uenvcmd is set .. .;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;echo Running default loadzimage ...;if run loadzimage; then run loa dfdt;run bootz;fi;echo Running default loaduimage ...;if run loaduimage; then run bootm;fi; loadaddr=0x810000 loadbootenv=load ${type} ${disk}:1 ${loadaddr} /boot/uEnv.txt loadfdt=load ${type} ${disk}:1 ${fdt_addr} ${fdt_file} loaduimage=load ${type} ${disk}:1 ${loadaddr} ${uimage} loadzimage=load ${type} ${disk}:1 ${loadaddr} ${zimage} mtdids=nand0=orion_nand mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs) setargs=setenv bootargs console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${mtdparts} uimage=/boot/uImage zimage=/boot/zImage ethaddr=02:50:43:92:a6:65 mountubi=ubi part rootfs; ubifsmount ubi0:rootfs loadubizimage=ubifsload ${loadaddr} ${zimage} loadubifdt=ubifsload ${fdt_addr} ${fdt_file} bootzubi=echo Booting from nand ...; run setargsubi; bootz ${loadaddr} - ${fdt_addr}; setargsubi=setenv bootargs console=${console},${baudrate} ${optargs} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdpart s} loadubi=echo Trying to boot from NAND ...;if run mountubi; then run loadubizimage;run loadubifdt;ubifsumount;run bootzubi;fi bootcmd=ide reset; usb start; setenv letter 9;for type in ide usb; do for disk in 0; do if ${type} part ${disk};then setexpr letter $le tter + 1; run load;fi;done;done;run loadubi
Re: What version of Rescue am I running? May 11, 2018 04:38PM |
Admin Registered: 13 years ago Posts: 18,998 |
Re: What version of Rescue am I running? May 12, 2018 05:52PM |
Registered: 6 years ago Posts: 8 |
Re: What version of Rescue am I running? May 13, 2018 04:14PM |
Admin Registered: 13 years ago Posts: 18,998 |
Re: What version of Rescue am I running? June 02, 2018 11:15AM |
Registered: 7 years ago Posts: 337 |
Re: What version of Rescue am I running? June 02, 2018 05:08PM |
Admin Registered: 13 years ago Posts: 18,998 |
Re: What version of Rescue am I running? June 03, 2018 02:28AM |
Registered: 7 years ago Posts: 337 |
Re: What version of Rescue am I running? June 03, 2018 07:53AM |
Registered: 6 years ago Posts: 8 |
Re: What version of Rescue am I running? June 03, 2018 08:11AM |
Registered: 7 years ago Posts: 337 |
Re: What version of Rescue am I running? June 03, 2018 08:12AM |
Registered: 6 years ago Posts: 8 |
Re: What version of Rescue am I running? June 03, 2018 01:28PM |
Registered: 7 years ago Posts: 337 |
Re: What version of Rescue am I running? June 03, 2018 02:06PM |
Registered: 6 years ago Posts: 8 |
Re: What version of Rescue am I running? June 03, 2018 04:38PM |
Admin Registered: 13 years ago Posts: 18,998 |
[root@alarm ~]# fw_printenv > Cannot parse config file '/etc/fw_env.config': > Invalid argument >> Do I need to edit /etc/fw_env.config first?
# MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd0 0xc0000 0x20000 0x20000
grep -a --null-data U-Boot /dev/mtd0ro
Re: What version of Rescue am I running? June 03, 2018 04:46PM |
Registered: 7 years ago Posts: 337 |
Linux alarm 4.4.97-1-ARCH #1 PREEMPT Sat Nov 11 04:51:38 UTC 2017 armv5tel GNU/Linux
Re: What version of Rescue am I running? June 03, 2018 04:48PM |
Admin Registered: 13 years ago Posts: 18,998 |
Quote
Linux alarm 4.4.97-1-ARCH #1 PREEMPT Sat Nov 11 04:51:38 UTC 2017 armv5tel GNU/Linux
Re: What version of Rescue am I running? June 03, 2018 05:49PM |
Registered: 7 years ago Posts: 337 |
Re: What version of Rescue am I running? June 03, 2018 06:00PM |
Admin Registered: 13 years ago Posts: 18,998 |
Re: What version of Rescue am I running? June 03, 2018 10:13PM |
Admin Registered: 13 years ago Posts: 18,998 |
Re: What version of Rescue am I running? June 03, 2018 10:57PM |
Registered: 7 years ago Posts: 337 |
[root@alarm ~]# fw_printenv > > Cannot parse config file '/etc/fw_env.config': > > Invalid argument > >> > Do I need to edit /etc/fw_env.config first?
> # MTD device name Device offset Env. size Flash > sector size Number of sectors > /dev/mtd0 0xc0000 0x20000 0x20000 >
[root@alarm ~]# cat /etc/fw_env.config # Configuration file for fw_(printenv/saveenv) utility. # Up to two entries are valid, in this case the redundand # environment sector is assumed present. # MTD device name Device offset Env. size Flash sector size #/dev/mtd2 0x0000 0x20000 0x20000 # segate dockstar: # /dev/mtd0 0xc0000 0x20000 0x20000 # iomega iconnect # /dev/mtd0 0xa0000 0x20000 0x20000 # CuBox # /dev/mtd0 0xc0000 0x10000 0x10000 # CuBox-i/Hummingboard # /dev/mmcblk0 0x60000 0x2000 0x2000 # Utilite 1 # /dev/mtd1 0x0000 0x2000 0x2000
> grep -a --null-data U-Boot /dev/mtd0ro >
[root@alarm ~]# grep -a --null-data U-Boot /dev/mtd0ro Warning: U-Boot configured device %s at address %llx, but the device tree has it address %llx. U-Boot** Invalid partition type "%.32s" (expect "U-Boot") U-Boot BUG at %s:%d! U-Boot 2014.04.R2-1 (May 15 2014 - 14:36:05) Arch Linux ARM
Re: What version of Rescue am I running? June 03, 2018 11:36PM |
Registered: 7 years ago Posts: 337 |
> > grep -a --null-data U-Boot /dev/mtd0ro > >>
> [root@alarm ~]# grep -a --null-data U-Boot > /dev/mtd0ro > Warning: U-Boot configured device %s at address > %llx, > but the device tree has it address %llx. > U-Boot** Invalid partition type "%.32s" (expect > "U-Boot") > U-Boot BUG at %s:%d! > U-Boot 2014.04.R2-1 (May 15 2014 - 14:36:05) Arch > Linux ARM >>
baudrate=115200 bootcmd=ide reset; usb start; setenv letter 9;for type in ide usb; do for disk in 0; do if ${type} part ${disk};then setexpr letter $letter + 1;run load;fi;done;done; bootdelay=3 bootm=echo Booting from ${disk} ...; run setargs; bootm ${loadaddr}; bootz=echo Booting from ${disk} ...; run setargs; bootz ${loadaddr} - ${fdt_addr}; console=ttyS0 ethact=egiga0 fdt_addr=0x800000 fdt_file=/boot/dtbs/kirkwood-goflexnet.dtb importbootenv=echo Importing environment (uEnv.txt)...; env import -t $loadaddr $filesize load=echo Attempting to boot from ${type} ${disk}:1...;if run loadbootenv; then run importbootenv;fi;echo Checking if uenvcmd is set ...;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;echo Running default loadzimage ...;if run loadzimage; then run loadfdt;run bootz;fi;echo Running default loaduimage ...;if run loaduimage; then run bootm;fi; loadaddr=0x810000 loadbootenv=load ${type} ${disk}:1 ${loadaddr} /boot/uEnv.txt loadfdt=load ${type} ${disk}:1 ${fdt_addr} ${fdt_file} loaduimage=load ${type} ${disk}:1 ${loadaddr} ${uimage} loadzimage=load ${type} ${disk}:1 ${loadaddr} ${zimage} mtdids=nand0=orion_nand mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs) setargs=setenv bootargs console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${mtdparts} uimage=/boot/uImage zimage=/boot/zImage ethaddr=00:10:75:2C:A9:58
grep -a --null-data U-Boot /dev/mtd0ro
Re: What version of Rescue am I running? June 04, 2018 12:07AM |
Admin Registered: 13 years ago Posts: 18,998 |
Quote
It is all commented out, so do I simply uncomment the 'segate dockstar' entry?
Quote
[root@alarm ~]# grep -a --null-data U-Boot /dev/mtd0ro
Warning: U-Boot configured device %s at address %llx,
but the device tree has it address %llx.
U-Boot** Invalid partition type "%.32s" (expect "U-Boot")
U-Boot BUG at %s:%d!
U-Boot 2014.04.R2-1 (May 15 2014 - 14:36:05) Arch Linux ARM
Quote
After changing /etc/fw_env.config, fw_printenv shows:-
baudrate=115200 bootcmd=ide reset; usb start; setenv letter 9;for type in ide usb; do for disk in 0; do if ${type} part ${disk};then setexpr letter $letter + 1;run load;fi;done;done; bootdelay=3 bootm=echo Booting from ${disk} ...; run setargs; bootm ${loadaddr}; bootz=echo Booting from ${disk} ...; run setargs; bootz ${loadaddr} - ${fdt_addr}; console=ttyS0 ethact=egiga0 fdt_addr=0x800000 fdt_file=/boot/dtbs/kirkwood-goflexnet.dtb importbootenv=echo Importing environment (uEnv.txt)...; env import -t $loadaddr $filesize load=echo Attempting to boot from ${type} ${disk}:1...;if run loadbootenv; then run importbootenv;fi;echo Checking if uenvcmd is set ...;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;echo Running default loadzimage ...;if run loadzimage; then run loadfdt;run bootz;fi;echo Running default loaduimage ...;if run loaduimage; then run bootm;fi; loadaddr=0x810000 loadbootenv=load ${type} ${disk}:1 ${loadaddr} /boot/uEnv.txt loadfdt=load ${type} ${disk}:1 ${fdt_addr} ${fdt_file} loaduimage=load ${type} ${disk}:1 ${loadaddr} ${uimage} loadzimage=load ${type} ${disk}:1 ${loadaddr} ${zimage} mtdids=nand0=orion_nand mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs) setargs=setenv bootargs console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${mtdparts} uimage=/boot/uImage zimage=/boot/zImage ethaddr=00:10:75:2C:A9:58
Re: What version of Rescue am I running? June 04, 2018 06:57AM |
Registered: 7 years ago Posts: 337 |
Re: What version of Rescue am I running? June 04, 2018 09:53PM |
Admin Registered: 13 years ago Posts: 18,998 |
Quote
Wiki thread
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
Re: What version of Rescue am I running? June 05, 2018 06:01AM |
Registered: 7 years ago Posts: 337 |
Re: What version of Rescue am I running? June 05, 2018 02:36PM |
Admin Registered: 13 years ago Posts: 18,998 |
mkdir -p /tmp/nand/ mount -t ubifs /dev/mtdblock3 /tmp/nand/
ubiattach /dev/ubi_ctrl -m 3
Re: What version of Rescue am I running? June 05, 2018 02:40PM |
Admin Registered: 13 years ago Posts: 18,998 |