TODO

MISC

3.2.4 : ON HOST

url='http://rzr.online.fr//debian/'
url='http://rzr.chez.com/www.rzr.online.fr/debian/'
name='3.2.41lsproduo-00019-g6e228b8'
wget -c "$url/linux-image-${name}_armel.deb"
fakeroot dpkg -x "linux-image-${name}_armel.deb"  .

cd boot

ln -fs vmlinuz-$name* vmlinuz
ln -fs initrd.img-$name* initrd.img

3.1.1 : ON TARGET

sudo aptitude install uboot-mkimage devio sudo hddtemp screen rsync
# PATH=$PATH:/usr/local/sbin
KVERS='3.2.41lsproduo-00019-g6e228b8'
KVERS='3.2.57lsproduo-00031-gfd33ad9' # same as uname -r 
# address=0x02000000 # 0x00000000
# # scp ../linux-image-*_armel.deb root@nas:/boot/local/
cd /boot/local/ #@target
# rm -rf /lib/modules 
dpkg -i *${KVERS}*.deb
KVERS=$(ls /lib/modules/ | sort -n | tail -n1) && echo "KVERS=${KVERS}"
ls /lib/modules/ | grep $KVERS
cd /boot/  
d="/boot/local/$(date +%s).bak"
ls *${KVERS}*
mkdir -p $d && cp -av *".buffalo" "$d"
ln -fs vmlinuz-${KVERS}* vmlinuz
ln -fs initrd.img-${KVERS}* initrd.img
ls -l vmlinuz initrd.img

image : uboot / buffalo

# name='3.2.41lsproduo-00019-g6e228b8'
# KVERS='3.2.57+' # same as uname -r 
#
cd /boot
# sudo rdev vmlinuz #  0xf00e #  cp vmlinuz vmlinuz.orig
devio > uboot.dat 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' # debian ok vs  'wl 0xe3a01c07,4' 'wl 0xe3811027,4'
# xxd uboot.dat # http://www.arm.linux.org.uk/developer/machines/list.php?id=1831
# 0000000: 061c a0e3 3110 81e3                      ....1...
# diff -u  orig.hex  mine.hex 
# -0000000: 06  . +0000000: 07  .
# -0000004: 31  1 +0000004: 27  '
#
image=vmlinuz-${KVERS}
address=0x02000000 # 0x00000000
#
ls -l $image
$sudo cat uboot.dat "$image" > "$image.uboot"
$sudo mkimage \
   -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "${KVERS}" \
   -d "$image.uboot" "$image.buffalo"
# xxd <  uImage.buffalo >  uImage.buffalo.hex
#
mv uImage.buffalo  uImage.buffalo.bak 
cp -av ${image}.buffalo uImage.buffalo

initrd

This is done on TargeT :

$sudo apt-get remove firmware-linux-free
#KVERS='3.2.41lsproduo-00019-g6e228b8'
#KVERS='3.2.57+' # same as uname -r 
#
initrd=initrd.img-${KVERS}
address=0x02000000 # 0x00000000
#
ls -l $initrd
$sudo mkimage \
  -A arm -O linux -T ramdisk -C none \
  -a "${address}" -e "${address}" -n "${KVERS}" -d "${initrd}" \
  ${initrd}.buffalo
#
# xxd <  initrd.buffalo >  initrd.buffalo.hex
mv initrd.buffalo  initrd.buffalo.bak 
cp -av ${initrd}.buffalo initrd.buffalo
sync ;  sync ;  sync ; 
reboot

ping nas

Then copy those 2 initrd.buffalo uImage.buffalo files to /boot

boot

On TFtp Server :

scp *.buffalo root@192.168.11.1:/srv/tftp/ # initrd.buffalo uImage.buffalo

On HardDisk :

/boot/

debian

diff  -d --suppress-common-lines -U 1  ../../d-i.debian.org/daily-images/armel/daily/orion5x/network-console/buffalo/lspro/uImage.buffalo.hex  uImage.buffalo.hex  
--- ../../d-i.debian.org/daily-images/armel/daily/orion5x/network-console/buffalo/lspro/uImage.buffalo.hex	2011-12-01 13:17:37.397811647 +0100
+++ uImage.buffalo.hex	2011-12-01 13:44:56.153708612 +0100
@@ -1,6 +1,6 @@
-0000000: 2705 1956 b8ba 1103 4ed0 877a 0016 7248  '..V....N..z..rH
+0000000: 2705 1956 d336 5be9 4ed7 7695 0016 7248  '..V.6[.N.v...rH
                    !!!! !!!!   !! !!!!

-0000010: 0000 8000 0000 8000 23d5 f4bc 0502 0200  ........#.......
+0000010: 0000 8000 0000 8000 0e05 623b 0502 0200  ..........b;....
                              !!!! !!!!

-0000040: 061c a0e3 3110 81e3 0000 a0e1 0000 a0e1  ....1...........
+0000040: 071c a0e3 2710 81e3 0000 a0e1 0000 a0e1  ....'...........
          !!        !!

Let's compare with debian one :

# Set machine id 1585 (0x0631)
devio > ./tmp/orion5x_network-console/lspro/kernel 'wl 0xe3a01c06,4' 'wl 0xe3811031,4'
cat ./tmp/orion5x_network-console/vmlinuz-3.1.0-1-orion5x >> ./tmp/orion5x_network-console/lspro/kernel
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "Debian kernel" -d ./tmp/orion5x_network-console/lspro/kernel ./tmp/orion5x_network-console/lspro/kernel.uboot
Image Name:   Debian kernel
Created:      Thu Dec  1 06:33:19 2011
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    1471048 Bytes = 1436.57 kB = 1.40 MB
Load Address: 00008000
Entry Point:  00008000
cp ./tmp/orion5x_network-console/lspro/kernel.uboot ./dest/orion5x/network-console/buffalo/lspro/uImage.buffalo
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x02000000 -e 0x02000000 -n "debian-installer ramdisk" -d ./tmp/orion5x_network-console/initrd.gz ./tmp/orion5x_network-console/lspro/initrd.uboot
Image Name:   debian-installer ramdisk
Created:      Thu Dec  1 06:33:20 2011
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    4755860 Bytes = 4644.39 kB = 4.54 MB
Load Address: 02000000
Entry Point:  02000000

root@lap:/srv/tftp# cp target/boot/vmlinuz-3.1.0-1-orion5x ./uImage.buffalo

root@lap:/srv/tftp# cp target/boot/initrd.img-3.1.0-1-orion5x initrd.buffalo
root@lap:/srv/tftp# rdev  uImage.buffalo
Root device 0xf00e
root@lap:/srv/tftp# rdev  uImage.buffalo /dev/sda2
root@lap:/srv/tftp# rdev  uImage.buffalo
Root device /dev/sda2
root@lap:/srv/tftp# file d-i.debian.org/daily-images/armel/daily/orion5x/network-console/buffalo/lspro/uImage.buffalo
#| u-boot legacy uImage, Debian kernel, Linux/ARM, OS Kernel Image (Not compressed), 1471048 bytes, Sat Nov 26 07:30:18 2011, Load Address: 0x00008000, Entry Point: 0x00008000, Header CRC: 0xB8BA1103, Data CRC: 0x23D5F4BC
#| u-boot legacy uImage, linux, Linux/ARM, OS Kernel Image (Not compressed), 1471048 bytes, Thu Dec  1 13:12:09 2011, Load Address: 0x00008000, Entry Point: 0x00008000, Header CRC: 0xF55A8618, Data CRC: 0x0E05623B
 diff -u target/boot/uImage.buffalo.hex d-i.debian.org/daily-images/armel/daily/orion5x/network-console/buffalo/lspro/uImage.buffalo.hex
--- target/boot/uImage.buffalo.hex	2011-12-01 13:17:59.577810713 +0100
+++ d-i.debian.org/daily-images/armel/daily/orion5x/network-console/buffalo/lspro/uImage.buffalo.hex	2011-12-01 13:17:37.397811647 +0100
@@ -1,8 +1,8 @@
-0000000: 2705 1956 f55a 8618 4ed7 6f19 0016 7248  '..V.Z..N.o...rH
-0000010: 0000 8000 0000 8000 0e05 623b 0502 0200  ..........b;....
-0000020: 6c69 6e75 7800 0000 0000 0000 0000 0000  linux...........
+0000000: 2705 1956 b8ba 1103 4ed0 877a 0016 7248  '..V....N..z..rH
+0000010: 0000 8000 0000 8000 23d5 f4bc 0502 0200  ........#.......
+0000020: 4465 6269 616e 206b 6572 6e65 6c00 0000  Debian kernel...
 0000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
-0000040: 071c a0e3 2710 81e3 0000 a0e1 0000 a0e1  ....'...........
+0000040: 061c a0e3 3110 81e3 0000 a0e1 0000 a0e1  ....1...........
 0000050: 0000 a0e1 0000 a0e1 0000 a0e1 0000 a0e1  ................
 0000060: 0000 a0e1 0000 a0e1 0200 00ea 1828 6f01  .............(o.
 0000070: 0000 0000 4072 1600 0170 a0e1 0280 a0e1  ....@r...p......

MISC

If you need diskspace :

find /usr/share/doc /usr/share/man /-type f -exec ln -fs /README.txt {} \;
find /usr/src/ -type f -exec ln -fs /README.txt {} \;
find /lib/modules/ -type f -exec ln -fs /README.txt {} \;

MachineId :

We adapt DebiaN Script for LsProDuo2 :

"Buffalo/Revogear Kurobox Pro")
# Set machine id 1509 (0x05e5)
devio > "$tmp" 'wl 0xe3a01c05,4' 'wl 0xe38110e5,4'
#ifdef CONFIG_MACH_LINKSTATION_PRODUO_REV2
MACHINE_START(LINKSTATION_PRODUO, "Buffalo Linkstation Pro Duo - Revision 2")
http://www.arm.linux.org.uk/developer/machines/download.php
// linkstation_produo	MACH_LINKSTATION_PRODUO	LINKSTATION_PRODUO	1831
 printf "0x%.4x\n" 1831
 0x0727
 

So we had those 2 values 07 and 27 using :

TODO: check if correct

"Buffalo Linkstation Pro Duo - Revision 2")
# Set machine id 1831 (0x0727)
devio > "$tmp" 'wl 0xe3a01c07,4' 'wl 0xe3811027,4'

MORE

uboot.txt · Last modified: 2024/03/05 22:53 by rzr
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki