diff options
| -rw-r--r-- | README.hardware | 99 |
1 files changed, 85 insertions, 14 deletions
diff --git a/README.hardware b/README.hardware index 7d2b0f8801..68e1dd2f89 100644 --- a/README.hardware +++ b/README.hardware | |||
| @@ -291,13 +291,85 @@ Load the kernel, and boot the system as follows: | |||
| 291 | 291 | ||
| 292 | --- Booting from USB root --- | 292 | --- Booting from USB root --- |
| 293 | 293 | ||
| 294 | NOTE: Since the USB disk is inside the edgerouter box, it's inconvenient to | 294 | To boot from the USB disk, you either need to remove it from the edgerouter |
| 295 | plug and unplug the USB disk. So in the following instructions it is | 295 | box and populate it from another computer, or use a previously booted NFS |
| 296 | assumed that you have already booted the device from NFS. Additionally, | 296 | image and populate from the edgerouter itself. |
| 297 | since vmlinux is not contained in core-image-xxx by default, it is | 297 | |
| 298 | necessary to copy it to the USB disk separately. | 298 | Type 1: Mounted USB disk |
| 299 | ------------------------ | ||
| 300 | |||
| 301 | To boot from the USB disk there are two available partitions on the factory | ||
| 302 | USB storage. The rest of this guide assumes that these partitions are left | ||
| 303 | intact. If you change the partition scheme, you must update your boot method | ||
| 304 | appropriately. | ||
| 305 | |||
| 306 | The standard partitions are: | ||
| 307 | |||
| 308 | - 1: vfat partition containing factory kernels | ||
| 309 | - 2: ext3 partition for the root filesystem. | ||
| 310 | |||
| 311 | You can place the kernel on either partition 1, or partition 2, but the roofs | ||
| 312 | must go on partition 2 (due to its size). | ||
| 313 | |||
| 314 | Note: If you place the kernel on the ext3 partition, you must re-create the | ||
| 315 | ext3 filesystem, since the factory u-boot can only handle 128 byte inodes and | ||
| 316 | cannot read the partition otherwise. | ||
| 317 | |||
| 318 | Steps: | ||
| 319 | |||
| 320 | 1. Remove the USB disk from the edgerouter and insert it into a computer | ||
| 321 | that has access to your build artifacts. | ||
| 322 | |||
| 323 | 2. Copy the kernel image to the USB storage (assuming discovered as 'sdb' on | ||
| 324 | the development machine): | ||
| 325 | |||
| 326 | 2a) if booting from vfat | ||
| 327 | |||
| 328 | # mount /dev/sdb1 /mnt | ||
| 329 | # cp tmp/deploy/images/edgerouter/vmlinux /mnt | ||
| 330 | # umount /mnt | ||
| 331 | |||
| 332 | 2b) if booting from ext3 | ||
| 333 | |||
| 334 | # mkfs.ext3 -I 128 /dev/sdb2 | ||
| 335 | # mount /dev/sdb2 /mnt | ||
| 336 | # mkdir /mnt/boot | ||
| 337 | # cp tmp/deploy/images/edgerouter/vmlinux /mnt/boot | ||
| 338 | # umount /mnt | ||
| 339 | |||
| 340 | 3. Extract the rootfs to the USB storage ext3 partition | ||
| 341 | |||
| 342 | # mount /dev/sdb2 /mnt | ||
| 343 | # tar -xvjpf core-image-minimal-XXX.tar.bz2 -C /mnt | ||
| 344 | # umount /mnt | ||
| 345 | |||
| 346 | 4. Reboot the board and press a key on the terminal when prompted to get to the U-Boot | ||
| 347 | command line: | ||
| 348 | |||
| 349 | 5. Load the kernel and boot: | ||
| 350 | |||
| 351 | 5a) vfat boot | ||
| 352 | |||
| 353 | => fatload usb 0:1 $loadaddr vmlinux | ||
| 354 | |||
| 355 | 5b) ext3 boot | ||
| 356 | |||
| 357 | => ext2load usb 0:2 $loadaddr boot/vmlinux | ||
| 358 | |||
| 359 | => bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rw rootwait mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom) | ||
| 360 | |||
| 361 | |||
| 362 | Type 2: NFS | ||
| 363 | ----------- | ||
| 364 | |||
| 365 | Note: If you place the kernel on the ext3 partition, you must re-create the | ||
| 366 | ext3 filesystem, since the factory u-boot can only handle 128 byte inodes and | ||
| 367 | cannot read the partition otherwise. | ||
| 368 | |||
| 369 | These boot instructions assume that you have recreated the ext3 filesystem with | ||
| 370 | 128 byte inodes, you have an updated uboot or you are running and image capable | ||
| 371 | of making the filesystem on the board itself. | ||
| 299 | 372 | ||
| 300 | Load the kernel, and boot the system as follows: | ||
| 301 | 373 | ||
| 302 | 1. Boot from NFS root | 374 | 1. Boot from NFS root |
| 303 | 375 | ||
| @@ -309,11 +381,11 @@ Load the kernel, and boot the system as follows: | |||
| 309 | 381 | ||
| 310 | and then, | 382 | and then, |
| 311 | 383 | ||
| 312 | # mount /dev/sda2 /media/sda2 | 384 | # mount /dev/sda2 /media/sda2 |
| 313 | # tar -xvjpf core-image-minimal-XXX.tar.bz2 -C /media/sda2 | 385 | # tar -xvjpf core-image-minimal-XXX.tar.bz2 -C /media/sda2 |
| 314 | # cp vmlinux /media/sda2/boot/vmlinux | 386 | # cp vmlinux /media/sda2/boot/vmlinux |
| 315 | # umount /media/sda2 | 387 | # umount /media/sda2 |
| 316 | # reboot | 388 | # reboot |
| 317 | 389 | ||
| 318 | 3. Reboot the board and press a key on the terminal when prompted to get to the U-Boot | 390 | 3. Reboot the board and press a key on the terminal when prompted to get to the U-Boot |
| 319 | command line: | 391 | command line: |
| @@ -322,6 +394,5 @@ Load the kernel, and boot the system as follows: | |||
| 322 | 394 | ||
| 323 | 4. Load the kernel and boot: | 395 | 4. Load the kernel and boot: |
| 324 | 396 | ||
| 325 | => ext2load usb 0:2 $loadaddr boot/vmlinux | 397 | => ext2load usb 0:2 $loadaddr boot/vmlinux |
| 326 | => bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rw rootwait mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom) | 398 | => bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rw rootwait mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom) |
| 327 | |||
