Difference between revisions of "Flameman/dht-walnut/rootfs"
(Created page with 'r') |
Peter Huewe (Talk | contribs) (Added to category DHT-Walnut) |
||
| (5 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | = rootfs = | |
| + | |||
| + | == what you need == | ||
| + | |||
| + | you need | ||
| + | * a PC running a tftpboot server | ||
| + | * the new ramrootfs | ||
| + | * for an empty 2..4Gbyte storage for the full gentoo rootfs | ||
| + | * for an empty 512Mb..1Gbyte storage for the embedded gentoo rootfs | ||
| + | |||
| + | == new ramrootfs, tftp uboot uImage: install/recovery/first-aid == | ||
| + | |||
| + | <pre> | ||
| + | Image Name: "ramrootfs" | ||
| + | Created: Fri Jul 3 15:51:20 2009 | ||
| + | Image Type: PowerPC unix Kernel uboot-uImage (gzip compressed) | ||
| + | Load Address: 0x00000000 | ||
| + | Entry Point: 0x00000000 | ||
| + | </pre> | ||
| + | |||
| + | ==== goal ==== | ||
| + | |||
| + | this is a pretty embedded kit able to bootstrap the dht-walunt with a early ram rootfs populated with the essential you need to | ||
| + | |||
| + | * mount/nfs mount a disk | ||
| + | * nano/hexedit configure mounted disk files from disaster | ||
| + | * badklocks/fsck.{ext2,ext3,minix} a disk | ||
| + | * fdisk, mac-fdisk a disk | ||
| + | * scp/wget file from the lan (it's very god to install gentoo stages from gentoo mirrors) | ||
| + | * ssh/telnet to/from hostes | ||
| + | * sync your system date to the internet rdate | ||
| + | |||
| + | ==== about ==== | ||
| + | |||
| + | this rootfs has been build with | ||
| + | * gcc powerpc-softfloat-linux-uclibc v4.1.2 | ||
| + | * static stripped elf | ||
| + | |||
| + | it is based on the following packages: | ||
| + | |||
| + | * bash-3.2_p33: ok | ||
| + | * busybox-1.7.4: ok | ||
| + | * dropbear-0.49: ok | ||
| + | * e2fsprogs-1.40.9: ok | ||
| + | * hexedit-1.2.12: ok | ||
| + | * mac-fdisk-hacked-for-mips-arm: ok | ||
| + | * nano-2.1.5: ok | ||
| + | * nfs-utils-1.1.0: ok | ||
| + | * openssh-4.7_p1-r6: ok | ||
| + | * shadow-4.0.18.2: ok | ||
| + | * sysvinit-2.86: ok | ||
| + | * my-init: no | ||
| + | * tty-redirect-openpty: ok | ||
| + | |||
| + | |||
| + | ==== it works ==== | ||
| + | |||
| + | * locally on the serial console, where it bootstrap | ||
| + | * remotely on telnet with the ip 192.168.1.2 | ||
| + | |||
| + | sorry sshd is not provided yet, you have to telnet | ||
| + | |||
| + | |||
| + | |||
| + | ==== issue ==== | ||
| + | |||
| + | there is an issue if you decide to use ssh/scp on the serial console | ||
| + | the problem is related to a redirection of /dev/console to /dev/tty | ||
| + | so to avoid you need to invoke openpty (an app i prepared as temporary fixup) | ||
| + | |||
| + | |||
| + | scp is reporting | ||
| + | <pre> | ||
| + | debug1: Next authentication method: password | ||
| + | debug1: read_passphrase: can't open /dev/tty: No such device or address | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | workaround | ||
| + | |||
| + | <pre> | ||
| + | uc-earlyrootfs ~ # tty | ||
| + | /dev/ttyS0 | ||
| + | uc-earlyrootfs ~ # echo "hAllo" > /dev/tty | ||
| + | /dev/tty no such decice or address | ||
| + | uc-earlyrootfs ~ # openpty | ||
| + | uc-earlyrootfs ~ # tty | ||
| + | /dev/pts/0 | ||
| + | uc-earlyrootfs ~ # echo "hAllo" > /dev/tty | ||
| + | hAllo | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | |||
| + | ==== missing ==== | ||
| + | |||
| + | * /dev/initctl | ||
| + | * halt/reset/shudown | ||
| + | * sshd, fptd | ||
| + | * ... | ||
| + | |||
| + | ==== download ==== | ||
| + | |||
| + | 07-2009: kernel 2.6.15.4+initramfs full tested and working [[Media:kernel-dht-walnut-ramrootfs-uImage.tgz|kernel-dht-walnut-ramrootfs-uImage.tgz]] | ||
| + | |||
| + | file size: 3.97 MB, MIME type, the original was 4.3Mb but this wiki is refusing to upload file greater than 4Mb, so the kernel has been reduced and in features: no scsi and graph console support | ||
| + | |||
| + | contents: | ||
| + | |||
| + | gentoo-2.6.15.4-dht-walnut-uImage -> what you have to tftpboot to dht-walnut | ||
| + | |||
| + | gentoo-2.6.15.4-dht-walnut-uImage.md5 -> the md5sum should be b6c1e725984c665e46c1428d0f953149 | ||
| + | |||
| + | ==== tested with ==== | ||
| + | |||
| + | * U-Boot 1.2.0-g7882751c-dirty (Apr 14 2007 - 16:44:37): working (with ide support, working, tftp bug) | ||
| + | * U-Boot 2009.06-00273-g59869ca-dirty (Jul 08 2009 - 08:12:46): working (but this version has no ide capabilities, so no disk-boot is possible) | ||
| + | * U-Boot 1.2-2009 (Jul 24 2009 - still under development): working (with ide support, working, suggest as the final firmware) | ||
| + | |||
| + | ==== firmware issues with ==== | ||
| + | |||
| + | reported issues with uboot 1.1.4 and ppcboot 1.1.6 | ||
| + | |||
| + | * host: tftp-boot-image, md5 check passes | ||
| + | ** gentoo-walnut-rammrootfs-uImage has md5 B6C1E725984C665E46C1428D0F953149 | ||
| + | ** the image file size is 4161527 bytes, crc32 of the file is 8031f4dc | ||
| + | * target: tftp | ||
| + | ** set up the ramrootfs boot args and tftp the image into the DHT-walnut | ||
| + | ** full 4161527 bytes were transferred. | ||
| + | ** loaded image, performed a crc32 command, passes | ||
| + | ** bootm, panic, It reports "4161463 Bytes = 4063 kB = 3 MB" | ||
| + | |||
| + | ==== usage ==== | ||
| + | |||
| + | assure you have bootargs console=ttyS0,9600 rdinit=/sbin/init init=/bin/bash in your tftp | ||
| + | |||
| + | here it is my whole environment, in where i simply invoke 2 macro + bootm | ||
| + | |||
| + | * run ramrootfs | ||
| + | * run boot-tftp | ||
| + | * bootm | ||
| + | |||
| + | <pre> | ||
| + | earlyrootfs login: root | ||
| + | Password: (enter, no password) | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | <pre> | ||
| + | => printenv | ||
| + | bootdelay=5 | ||
| + | loads_echo=1 | ||
| + | netdev=eth0 | ||
| + | ramargs=setenv bootargs root=/dev/ram rw | ||
| + | addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 | ||
| + | addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate} | ||
| + | kernel_addr=fff80000 | ||
| + | ramdisk_addr=fff80000 | ||
| + | update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;cp.b 100000 fffc0000 40000;setenv filesize;saveenv | ||
| + | ethact=ppc_4xx_eth0 | ||
| + | hostname=walnut-ppc405 | ||
| + | ethaddr=DE:AD:BE:EF:DE:AD | ||
| + | preboot=echo "ide.part.1th stores kernel rawimage" | ||
| + | myroot=/dev/hda4 | ||
| + | myinit=/sbin/init | ||
| + | fileaddr=800000 | ||
| + | netmask=255.255.255.0 | ||
| + | bootcmd=run boot-disk ; bootm | ||
| + | myboot_diskpart=0:1 | ||
| + | myboot_kernel_addr=800000 | ||
| + | baudrate=9600 | ||
| + | myuart=ttyS0 | ||
| + | setconsole_uart=setenv myconsole ${myuart},${baudrate} | ||
| + | setconsole_video=setenv myconsole tty video=${myvideofb} | ||
| + | myvideofb=matroxfb:800x600-16@60 | ||
| + | setbootargs=setenv bootargs console=${myconsole} root=${myroot} init=${myinit} | ||
| + | myconsole=ttyS0,9600 | ||
| + | bootargs=console=ttyS0,9600 root=/dev/hda4 init=/sbin/init | ||
| + | boot-tftp=tftpboot ${myboot_kernel_addr} ${myboot_file} | ||
| + | boot-disk=diskboot ${myboot_kernel_addr} ${myboot_diskpart} | ||
| + | ipaddr=192.168.1.5 | ||
| + | serverip=192.168.1.14 | ||
| + | gatewayip=192.168.1.1 | ||
| + | myboot_file=gentoo-walnut-ramrootfs.img | ||
| + | ramrootfs=setenv bootargs console=ttyS0,9600 rdinit=/sbin/init init=/bin/bash | ||
| + | stdin=serial | ||
| + | stdout=serial | ||
| + | stderr=serial | ||
| + | ver=U-Boot 1.2.0-g7882751c-dirty (Apr 14 2007 - 16:44:37) | ||
| + | |||
| + | Environment size: 1405/16379 bytes | ||
| + | => run ramrootfs | ||
| + | => run boot-tftp | ||
| + | PHY speed read failed, assuming 10bT | ||
| + | PHY duplex read failed, assuming half duplex | ||
| + | ENET Speed is 10 Mbps - HALF duplex connection (EMAC0) | ||
| + | Using ppc_4xx_eth0 device | ||
| + | TFTP from server 192.168.1.14; our IP address is 192.168.1.5 | ||
| + | Filename 'gentoo-walnut-ramrootfs.img'. | ||
| + | Load address: 0x800000 | ||
| + | Loading: ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ################################################################# | ||
| + | ############################## | ||
| + | done | ||
| + | Bytes transferred = 4161527 (3f7ff7 hex) | ||
| + | => bootm | ||
| + | ## Booting image at 00800000 ... | ||
| + | Image Name: "ramrootfs" | ||
| + | Created: 2009-07-06 11:19:06 UTC | ||
| + | Image Type: PowerPC Linux Kernel Image (gzip compressed) | ||
| + | Data Size: 4161463 Bytes = 4 MB | ||
| + | Load Address: 00000000 | ||
| + | Entry Point: 00000000 | ||
| + | Verifying Checksum ... OK | ||
| + | Uncompressing Kernel Image ... OK | ||
| + | kernel 2.6.15.4-sliding-snow-leopard-dht-walnut-ppc405 (root@minerva) (gcc version 4.1.2) #30 Fri Jul 3 15:14:11 CEST 2009 | ||
| + | IBM Walnut port (C) 2000-2002 MontaVista Software, Inc. (source@mvista.com) | ||
| + | ... | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | [[Category:DHT-Walnut]] | ||
Latest revision as of 04:33, 13 April 2011
Contents |
rootfs
what you need
you need
- a PC running a tftpboot server
- the new ramrootfs
- for an empty 2..4Gbyte storage for the full gentoo rootfs
- for an empty 512Mb..1Gbyte storage for the embedded gentoo rootfs
new ramrootfs, tftp uboot uImage: install/recovery/first-aid
Image Name: "ramrootfs" Created: Fri Jul 3 15:51:20 2009 Image Type: PowerPC unix Kernel uboot-uImage (gzip compressed) Load Address: 0x00000000 Entry Point: 0x00000000
goal
this is a pretty embedded kit able to bootstrap the dht-walunt with a early ram rootfs populated with the essential you need to
- mount/nfs mount a disk
- nano/hexedit configure mounted disk files from disaster
- badklocks/fsck.{ext2,ext3,minix} a disk
- fdisk, mac-fdisk a disk
- scp/wget file from the lan (it's very god to install gentoo stages from gentoo mirrors)
- ssh/telnet to/from hostes
- sync your system date to the internet rdate
about
this rootfs has been build with
- gcc powerpc-softfloat-linux-uclibc v4.1.2
- static stripped elf
it is based on the following packages:
- bash-3.2_p33: ok
- busybox-1.7.4: ok
- dropbear-0.49: ok
- e2fsprogs-1.40.9: ok
- hexedit-1.2.12: ok
- mac-fdisk-hacked-for-mips-arm: ok
- nano-2.1.5: ok
- nfs-utils-1.1.0: ok
- openssh-4.7_p1-r6: ok
- shadow-4.0.18.2: ok
- sysvinit-2.86: ok
- my-init: no
- tty-redirect-openpty: ok
it works
- locally on the serial console, where it bootstrap
- remotely on telnet with the ip 192.168.1.2
sorry sshd is not provided yet, you have to telnet
issue
there is an issue if you decide to use ssh/scp on the serial console the problem is related to a redirection of /dev/console to /dev/tty so to avoid you need to invoke openpty (an app i prepared as temporary fixup)
scp is reporting
debug1: Next authentication method: password debug1: read_passphrase: can't open /dev/tty: No such device or address
workaround
uc-earlyrootfs ~ # tty
/dev/ttyS0
uc-earlyrootfs ~ # echo "hAllo" > /dev/tty
/dev/tty no such decice or address
uc-earlyrootfs ~ # openpty
uc-earlyrootfs ~ # tty
/dev/pts/0
uc-earlyrootfs ~ # echo "hAllo" > /dev/tty
hAllo
missing
- /dev/initctl
- halt/reset/shudown
- sshd, fptd
- ...
download
07-2009: kernel 2.6.15.4+initramfs full tested and working kernel-dht-walnut-ramrootfs-uImage.tgz
file size: 3.97 MB, MIME type, the original was 4.3Mb but this wiki is refusing to upload file greater than 4Mb, so the kernel has been reduced and in features: no scsi and graph console support
contents:
gentoo-2.6.15.4-dht-walnut-uImage -> what you have to tftpboot to dht-walnut
gentoo-2.6.15.4-dht-walnut-uImage.md5 -> the md5sum should be b6c1e725984c665e46c1428d0f953149
tested with
- U-Boot 1.2.0-g7882751c-dirty (Apr 14 2007 - 16:44:37): working (with ide support, working, tftp bug)
- U-Boot 2009.06-00273-g59869ca-dirty (Jul 08 2009 - 08:12:46): working (but this version has no ide capabilities, so no disk-boot is possible)
- U-Boot 1.2-2009 (Jul 24 2009 - still under development): working (with ide support, working, suggest as the final firmware)
firmware issues with
reported issues with uboot 1.1.4 and ppcboot 1.1.6
- host: tftp-boot-image, md5 check passes
- gentoo-walnut-rammrootfs-uImage has md5 B6C1E725984C665E46C1428D0F953149
- the image file size is 4161527 bytes, crc32 of the file is 8031f4dc
- target: tftp
- set up the ramrootfs boot args and tftp the image into the DHT-walnut
- full 4161527 bytes were transferred.
- loaded image, performed a crc32 command, passes
- bootm, panic, It reports "4161463 Bytes = 4063 kB = 3 MB"
usage
assure you have bootargs console=ttyS0,9600 rdinit=/sbin/init init=/bin/bash in your tftp
here it is my whole environment, in where i simply invoke 2 macro + bootm
- run ramrootfs
- run boot-tftp
- bootm
earlyrootfs login: root Password: (enter, no password)
=> printenv
bootdelay=5
loads_echo=1
netdev=eth0
ramargs=setenv bootargs root=/dev/ram rw
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1
addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}
kernel_addr=fff80000
ramdisk_addr=fff80000
update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;cp.b 100000 fffc0000 40000;setenv filesize;saveenv
ethact=ppc_4xx_eth0
hostname=walnut-ppc405
ethaddr=DE:AD:BE:EF:DE:AD
preboot=echo "ide.part.1th stores kernel rawimage"
myroot=/dev/hda4
myinit=/sbin/init
fileaddr=800000
netmask=255.255.255.0
bootcmd=run boot-disk ; bootm
myboot_diskpart=0:1
myboot_kernel_addr=800000
baudrate=9600
myuart=ttyS0
setconsole_uart=setenv myconsole ${myuart},${baudrate}
setconsole_video=setenv myconsole tty video=${myvideofb}
myvideofb=matroxfb:800x600-16@60
setbootargs=setenv bootargs console=${myconsole} root=${myroot} init=${myinit}
myconsole=ttyS0,9600
bootargs=console=ttyS0,9600 root=/dev/hda4 init=/sbin/init
boot-tftp=tftpboot ${myboot_kernel_addr} ${myboot_file}
boot-disk=diskboot ${myboot_kernel_addr} ${myboot_diskpart}
ipaddr=192.168.1.5
serverip=192.168.1.14
gatewayip=192.168.1.1
myboot_file=gentoo-walnut-ramrootfs.img
ramrootfs=setenv bootargs console=ttyS0,9600 rdinit=/sbin/init init=/bin/bash
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 1.2.0-g7882751c-dirty (Apr 14 2007 - 16:44:37)
Environment size: 1405/16379 bytes
=> run ramrootfs
=> run boot-tftp
PHY speed read failed, assuming 10bT
PHY duplex read failed, assuming half duplex
ENET Speed is 10 Mbps - HALF duplex connection (EMAC0)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.14; our IP address is 192.168.1.5
Filename 'gentoo-walnut-ramrootfs.img'.
Load address: 0x800000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################
done
Bytes transferred = 4161527 (3f7ff7 hex)
=> bootm
## Booting image at 00800000 ...
Image Name: "ramrootfs"
Created: 2009-07-06 11:19:06 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 4161463 Bytes = 4 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
kernel 2.6.15.4-sliding-snow-leopard-dht-walnut-ppc405 (root@minerva) (gcc version 4.1.2) #30 Fri Jul 3 15:14:11 CEST 2009
IBM Walnut port (C) 2000-2002 MontaVista Software, Inc. (source@mvista.com)
...