Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Iomega_ez_debian_5.2.9
##based on braian87b/pure_debian_on_iomega_ez.sh https://gist.github.com/braian87b/b5a4c5f20d1112473c470b096df766a3#file-pure_debian_on_iomega_ez-sh-L114
#download rootfs
root@osmc:/home/osmc/529# wget https://www.dropbox.com/s/pa2cbg93qgcnp8w/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2
root@osmc:/home/osmc/529# mkdir Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi
root@osmc:/home/osmc/529# tar -jxvf Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 -C Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi
# These are the files:
root@osmc:/home/osmc/529# ls -lht ./Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi
#total 76K
#drwx------ 5 root root 4.0K Aug 25 05:56 root
#drwxr-xr-x 57 root root 4.0K Aug 25 05:53 etc
#drwxr-xr-x 3 root root 4.0K Aug 25 04:50 boot
#drwxr-xr-x 13 root root 4.0K Aug 25 04:48 lib
#drwxr-xr-x 2 root root 4.0K Aug 25 03:47 sbin
#drwxr-xr-x 2 root root 4.0K Aug 25 03:47 bin
#drwxr-xr-x 2 root root 4.0K Feb 10 2015 mnt
#drwxr-xr-x 2 root root 4.0K Feb 8 2013 run
#drwxr-xr-x 5 root root 4.0K Feb 24 2012 dev
#drwxr-xr-x 2 root root 4.0K Feb 24 2012 media
#drwxr-xr-x 2 root root 4.0K Feb 24 2012 opt
#drwxr-xr-x 2 root root 4.0K Feb 24 2012 srv
#drwxr-xr-x 10 root root 4.0K Feb 24 2012 usr
#drwx------ 2 root root 4.0K Feb 24 2012 lost+found
#drwxr-xr-x 2 root root 4.0K Jan 22 2012 home
#drwxr-xr-x 2 root root 4.0K Jan 22 2012 proc
#drwxr-xr-x 2 root root 4.0K Jan 1 2011 sys
#drwxrwxrwt 2 root root 4.0K Jan 1 1970 tmp
#drwxr-xr-x 11 root root 4.0K Jan 1 1970 var
root@osmc:/home/osmc/529#
#Creating uImage & uInitrd and putting it to the disk
root@osmc:/home/osmc/529# cd Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot/
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# cp -a zImage-5.2.9-kirkwood-tld-1 zImage.fdt
#root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# cat dts/kirkwood-lenovo-ix2-ng.dtb >> zImage.fdt
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/bootcat dts/kirkwood-lenovo-iomega-ez.dtb >> zImage.fdt
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# cp -a uImage uImage.bak
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# cp -a uInitrd uInitrd.bak
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n linux-headers-5.2.9-kirkwood-tld-1 -d zImage.fdt uImage
#Image Name: linux-headers-5.2.9-kirkwood-tld
#Created: Fri Feb 21 23:47:29 2020
#Image Type: ARM Linux Kernel Image (uncompressed)
#Data Size: 4988910 Bytes = 4871.98 kB = 4.76 MB
#Load Address: 00008000
#Entry Point: 00008000
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd.img-5.2.9-kirkwood-tld-1 -d initrd.img-5.2.9-kirkwood-tld-1 uInitrd
#Image Name: initrd.img-5.2.9-kirkwood-tld-1
#Created: Fri Feb 21 23:49:22 2020
#Image Type: ARM Linux RAMDisk Image (gzip compressed)
#Data Size: 9713872 Bytes = 9486.20 kB = 9.26 MB
#Load Address: 00000000
#Entry Point: 00000000
#writing data do disk:
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# dd if=uImage of=/dev/sda bs=1MiB seek=10
#4+1 records in
#4+1 records out
#4988974 bytes (5.0 MB, 4.8 MiB) copied, 3.01358 s, 1.7 MB/s
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# dd if=uInitrd of=/dev/sda bs=1MiB seek=20
#9+1 records in
#9+1 records out
#9713936 bytes (9.7 MB, 9.3 MiB) copied, 0.42231 s, 23.0 MB/s
# create partitions on the disk, using GPT
parted -s /dev/sda mklabel gpt \
> mkpart swap linux-swap 100MiB 1.1GiB \
> mkpart rootfs ext3 1.1GiB 3.5GiB \
> mkpart Data ext3 3.5GiB 100%
/dev/sda print
#Model: WDC WD32 00BPVT-80ZEST0 (scsi)
#Disk /dev/sda: 320GB
#Sector size (logical/physical): 512B/512B
#Partition Table: gpt
#Disk Flags:
#Number Start End Size File system Name Flags
#1 105MB 1181MB 1076MB swap
#2 1181MB 3758MB 2577MB ext3 rootfs
#3 3758MB 320GB 316GB Data
gdisk /dev/sda -l
#(...)
#Number Start (sector) End (sector) Size Code Name
# 1 204800 2306866 1.0 GiB 8200 swap
# 2 2306867 7340031 2.4 GiB 8300 rootfs
# 3 7340032 625141759 294.6 GiB 8300 Data
#set label on sda2 (sda2 was automatically mounted so first sda2 has to be unmounted)
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# umount /dev/sda2
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# mkfs.ext3 /dev/sda2 -L rootfs
# Create mountpoint and mount partition
root@osmc:/home/osmc/529/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/boot# mkdir /mnt/sda2 && mount /dev/sda2 /mnt/sda2
#change directory
cd..
cd..
root@osmc:/home/osmc/529# tar -C ./Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi/ -cvf - . | tar -C /mnt/sda2 -xf -
sync; sync; sync
# unmount and remove mountpoint
umount /dev/sda2
#checking labels:
root@osmc:/home/osmc/529# e2label /dev/sda2
#rootfs
#Disconnecting HDD from linux machine (raspberry pi 3B + with osmc) and starting Iomega drive with plugged HDD. Serial also connected to track the progres:
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__| ** ix1-spi ** ** uboot_ver:0.0.8 **
** MARVELL BOARD: DB-88F6282A-BP LE
U-Boot 1.1.4 (Oct 28 2011 - 15:17:21) Marvell version: 3.6.1 - EMC
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CD5A0
Soc: 88F6282 A1 CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz
DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000 size 128MB
DRAM Total size 128MB 16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
[1024kB@f8000000] Flash: 1 MB
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
Device 0 @ 0 0:
Model: WDC WD3200BPVT-80ZEST0 Firm: 01.01A01 Ser#: WD-WX51AC084375
Type: Hard Disk
Supports 48-bit addressing
Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
CPU : Marvell Feroceon (Rev 1)
Streaming disabled
Write allocate disabled
USB 0: host mode
PEX 0: interface detected no Link.
PEX 1: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 0
IDE read: device 0 block # 20480, count 8192 ... 8192 blocks read: OK
IDE read: device 0 block # 40960, count 16384 ... 16384 blocks read: OK
## Booting image at 00040000 ...
Image Name: linux-headers-5.2.9-kirkwood-tld
Created: 2020-02-21 22:47:29 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4988910 Bytes = 4.8 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... Bad Data CRC
To fix this data you need to change boot env:
setenv bootcmd 'ide read 0x40000 0x5000 0x2A00; ide read 0x2100000 0xA000 0x5000; bootm 0x40000 0x2100000'
saveenv
my env :
Marvell>> printenv
baudrate=115200
loads_echo=0
rootpath=/srv/ubuntu
run_diag=yes
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
console=console=ttyS0,115200
bootargs_root=root=/dev/ram0
bootargs_mtd=mtdparts=spi_flash:0x7e000@0(u-boot),0x1000@0x7f000(env),0x1000@0x7e000(env2)
kernelimage=zImage
initrdimage=mfginitrd
mfgmodel=ix1
preroot_ver=0.0.2
uboot_ver=0.0.8
serial_number=5563Z01001G3180036FJ0C1
ethaddr=00:D0:B8:14:41:12
serialNo=EUAD19009R
modelname=32041100
serialno=0,01IwLhPM5+5+jdZI07rVgbhfeCiqQrioX6Glf/Nudm0r9qIKdB9hjMm1dcDPhK05GM,EUAD19009R,
fw_ver=4.0.2.9497
runintime=10800
ftpserver=192.168.43.4
testfile=100M
mfgtest_state=system_tested_ok
pre_path=IX1/1.0.5/download_runin.sh
pre_path_conf=IX1/1.0.5/download_runin.conf
pre_serverip=192.168.32.4
pre_user=ixxrunin
pre_passwd=123
pre_dirzi=IX1/1.0.5
bootcmd2=ide dev 1;ide read 0x40000 0x800 0x1800; ide read 0x900000 0x2000 0x2000; bootm 0x40000 0x900000;
filesize=9438d0
fileaddr=900000
gatewayip=192.168.0.1
netmask=255.255.255.0
hostname=kieszen
ipaddr=192.168.0.90
serverip=192.168.0.1
bootcmd=ide read 0x40000 0x5000 0x2A00; ide read 0x2100000 0xA000 0x5000; bootm 0x40000 0x2100000
bootargs=root=/dev/sda2 init=/bin/systemd fsck.mode=force fsck.repair=yes console=ttyS0,115200
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
pcieTune1=no
Rememeber about proper root path:
setenv bootargs 'root=/dev/sda2 init=/bin/systemd fsck.mode=force fsck.repair=yes console=ttyS0,115200
saveenv
CRC issue is gone and system is started properly!
Debian GNU/Linux 10 debian ttyS0
debian login: root
Password:
Last login: Wed May 27 09:52:27 PDT 2020 on ttyS0
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian:~# uname -a
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel GNU/Linux
root@debian:~#
@koczaj

This comment has been minimized.

Copy link
Owner Author

@koczaj koczaj commented May 27, 2020

Big thanks to @braian87b and @dferrg!

@braian87b

This comment has been minimized.

Copy link

@braian87b braian87b commented May 28, 2020

Thanks to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment