swarren_brain_dump
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| swarren_brain_dump [2011/11/20 06:09] – [Using a GPT partition table] swarren | swarren_brain_dump [2012/12/26 07:01] (current) – [Using a GPT partition table] stuw | ||
|---|---|---|---|
| Line 52: | Line 52: | ||
| sudo ./nvflash -r ${downloads} | sudo ./nvflash -r ${downloads} | ||
| - | (For correctness, | + | (For correctness, |
| the nvflash commands. See | the nvflash commands. See | ||
| http:// | http:// | ||
| Line 75: | Line 75: | ||
| cp ac100.bct ac100.bct.orig | cp ac100.bct ac100.bct.orig | ||
| - | dd if=/ | + | dd if=/ |
| If you don't nvflash might fail later with e.g.: | If you don't nvflash might fail later with e.g.: | ||
| Line 87: | Line 87: | ||
| (as of 2011/11/19) | (as of 2011/11/19) | ||
| + | |||
| + | (2012/01/13 UPDATE: most of the patches mentioned are upstream now, see [[uboot]] for the temporary tree with a known working version -- paulf) | ||
| Mainline U-Boot has some Tegra support now. There' | Mainline U-Boot has some Tegra support now. There' | ||
| Line 102: | Line 104: | ||
| patchwork linked above. | patchwork linked above. | ||
| + | < | ||
| tegra2: Add support for Paz00 (Toshiba AC100) | tegra2: Add support for Paz00 (Toshiba AC100) | ||
| tegra2: Fix conflicting pinmux for UARTA | tegra2: Fix conflicting pinmux for UARTA | ||
| Line 128: | Line 131: | ||
| tegra2: Move board_mmc_init into board files | tegra2: Move board_mmc_init into board files | ||
| disk: part_efi: fix regression due to incorrect buffer usage | disk: part_efi: fix regression due to incorrect buffer usage | ||
| + | </ | ||
| ====== Running an updated U-Boot from RAM ====== | ====== Running an updated U-Boot from RAM ====== | ||
| Line 144: | Line 147: | ||
| You can use this command: | You can use this command: | ||
| - | sudo ./nvflash --bl bootloader.bin --bct ac100.bct --odmdata | + | sudo ./nvflash --bl bootloader.bin --bct ac100.bct --odmdata |
| Note: This works for me now. It did not work for me before when ALL of | Note: This works for me now. It did not work for me before when ALL of | ||
| Line 214: | Line 217: | ||
| and ran the following nvflash command to write this to the AC100: | and ran the following nvflash command to write this to the AC100: | ||
| - | + | ||
| bin=bootloader.bin | bin=bootloader.bin | ||
| cfg=flash.cfg | cfg=flash.cfg | ||
| bct=ac100.bct | bct=ac100.bct | ||
| - | odm=0x200c0000 | + | odm=0x800c0085 |
| | | ||
| sudo ./nvflash \ | sudo ./nvflash \ | ||
| Line 241: | Line 244: | ||
| The MMC device has two 1MiB "boot sectors" | The MMC device has two 1MiB "boot sectors" | ||
| + | **Note** from stuw: some ac100 have two 2Mib "boot sectors" | ||
| Note that the term "boot sectors" | Note that the term "boot sectors" | ||
| Line 260: | Line 264: | ||
| In particular, the U-Boot command to read the first sector in the MMC: | In particular, the U-Boot command to read the first sector in the MMC: | ||
| + | mmc dev 0 | ||
| mmc read ${loadaddr} 0 1 | mmc read ${loadaddr} 0 1 | ||
| actually reads from the first sector of the " | actually reads from the first sector of the " | ||
| - | boot-sectors. | + | boot-sectors. However, you can access the boot-sectors by providing an extra parameter to "mmc dev": |
| + | |||
| + | mmc dev 0 1 # First boot sector | ||
| + | mmc dev 0 2 # Second boot sector | ||
| + | |||
| + | If an MMC device had " | ||
| Equally, when (mainline) Linux boots, it creates the following device nodes: | Equally, when (mainline) Linux boots, it creates the following device nodes: | ||
| Line 271: | Line 281: | ||
| / | / | ||
| - | Bear this in mind when trying to validate Flash content from U-Boot or | + | If an MMC device had " |
| - | Linux! | + | |
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | |||
| + | Any or all of those Linux devices may have partition tables, which would space device names such as / | ||
| + | |||
| + | Bear this in mind when trying to validate Flash content | ||
| ====== Partition table support in U-Boot and the kernel ====== | ====== Partition table support in U-Boot and the kernel ====== | ||
| Line 287: | Line 305: | ||
| ====== Using a GPT partition table ====== | ====== Using a GPT partition table ====== | ||
| - | Given the existence of MMC boot-sectors, | + | Given the existence of MMC boot-sectors, |
| - | flash accessed by U-Boot and splits | + | |
| - | Linux, I suggest creating a GPT at 2M into the device and covering until | + | |
| - | the end of the device. Then, write the BCT, Tegra PT, and bootloader | + | |
| - | into the first (or both) bootsector(s). This keeps the GPT-based and | + | |
| - | Tegra-PT-based portions of the flash completely separate. An advantage | + | |
| - | here is that the BCT can be stored right at the start of flash, which is | + | |
| - | where it's supposed to be. | + | |
| A diagram: | A diagram: | ||
| Line 306: | Line 317: | ||
| | | | | ||
| | | | | ||
| - | | | + | | |
| | | | | ||
| | | | | ||
| Line 319: | Line 330: | ||
| Write the BCT, Tegra PT, bootloader to flash as I described above. | Write the BCT, Tegra PT, bootloader to flash as I described above. | ||
| - | Create a disk image for the " | + | Create a disk image for the main partition |
| dd if=/ | dd if=/ | ||
| Line 333: | Line 344: | ||
| The following writes the 34 GPT (512-byte) sectors to the start of the | The following writes the 34 GPT (512-byte) sectors to the start of the | ||
| - | " | + | main partition |
| sudo ./nvflash --bl bootloader.bin --rawdevicewrite 1024 9 image.bin | sudo ./nvflash --bl bootloader.bin --rawdevicewrite 1024 9 image.bin | ||
| Line 347: | Line 358: | ||
| directly into / | directly into / | ||
| this is only for U-Boot updates from a running Linux system, which would | this is only for U-Boot updates from a running Linux system, which would | ||
| - | probably be rare. | + | probably be rare. In order to write to / |
| If on other Tegra systems, the MMC doesn' | If on other Tegra systems, the MMC doesn' | ||
| Line 363: | Line 374: | ||
| | | GPT Partition 1 " | | | GPT Partition 1 " | ||
| | | GPT Partition 2 " | | | GPT Partition 2 " | ||
| - | | | GPT partition 3 LINUX | + | | | GPT partition 3 "LINUX" |
| | | ... | | | | ... | | ||
| | | Backup GPT | | | | Backup GPT | | ||
| Line 371: | Line 382: | ||
| into flash) to match the location that (the " | into flash) to match the location that (the " | ||
| cbootimage uses when moving the BCT (search for | cbootimage uses when moving the BCT (search for | ||
| - | MMC_SECONDARY_BCT_LOCATION_IN_BLOCKS). Also, I /think/ the Tegra boot | + | MMC_SECONDARY_BCT_LOCATION_IN_BLOCKS |
| ROM searches for the BCT at the start of each " | ROM searches for the BCT at the start of each " | ||
| MMC, and apparently they' | MMC, and apparently they' | ||
| Line 381: | Line 392: | ||
| a) Use bct_dump (from cbootimage) to create ac100-cboot.cfg. | a) Use bct_dump (from cbootimage) to create ac100-cboot.cfg. | ||
| - | b) Edit ac100-cboot.cfg to add the following line at the end: | + | b) Edit ac100-cboot.cfg to add the following line **at the end**: |
| BootLoader | BootLoader | ||
swarren_brain_dump.1321765757.txt.gz · Last modified: by swarren · Currently locked by: 216.73.216.211,10.89.1.2
