nmhw21: add ostree env to board settings
values taken from ostree documenation additionally we removed legacy env which are never used on this hardware Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
This commit is contained in:
parent
beb0d6dfd0
commit
a94b7cce1f
|
|
@ -697,6 +697,7 @@ void set_console(void)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0 // remove legacy NRSW stuff ...
|
||||
static void set_devicetree_name(void)
|
||||
{
|
||||
char devicetreename[64];
|
||||
|
|
@ -704,7 +705,7 @@ static void set_devicetree_name(void)
|
|||
/* add hardware versions to environment */
|
||||
if (bd_get_devicetree(devicetreename, sizeof(devicetreename)) != 0) {
|
||||
printf("Devicetree name not found, using default name\n");
|
||||
strcpy(devicetreename, "am335x-vcu-prod1.dtb");
|
||||
strcpy(devicetreename, "am335x-nmhw21-prod1.dtb");
|
||||
}
|
||||
|
||||
setenv("fdt_image", devicetreename);
|
||||
|
|
@ -723,6 +724,7 @@ static void set_root_partition(void)
|
|||
/* mmcblk0p1 => root0, mmcblk0p2 => root1 so +1 */
|
||||
setenv_ulong("root_part", boot_partition + 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void get_hw_version(void)
|
||||
{
|
||||
|
|
@ -896,8 +898,8 @@ int board_late_init(void)
|
|||
|
||||
get_hw_version();
|
||||
get_pmic_version();
|
||||
set_root_partition();
|
||||
set_devicetree_name();
|
||||
// set_root_partition();
|
||||
// set_devicetree_name();
|
||||
|
||||
/* Initialize pins */
|
||||
REQUEST_AND_CLEAR_GPIO(GPIO_WLAN_EN);
|
||||
|
|
|
|||
|
|
@ -55,40 +55,33 @@
|
|||
#define FDT_HIGH_ADDR "0x87000000"
|
||||
#define INIT_RD_ADDR "0x88000000"
|
||||
|
||||
/* TODO: Cleanup, remove NRSW stuff */
|
||||
#define OT_KERNEL_ADDR "0x90000000"
|
||||
#define OT_LOAD_ADDR "0x87000000"
|
||||
#define OT_RD_ADDR "0x83000000"
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"kernel_image=zImage\0" \
|
||||
"fdt_image=am335x-vcu-prod1.dtb\0"\
|
||||
"modeboot=sdboot\0" \
|
||||
"fdt_image=am335x-nmhw21-prod1.dtb\0"\
|
||||
"fdt_addr=" FDT_ADDR "\0" \
|
||||
"fdt_high=" FDT_HIGH_ADDR "\0" \
|
||||
"kernel_addr=" KERNEL_ADDR "\0" \
|
||||
"load_addr=" LOAD_ADDR "\0" \
|
||||
"root_part=1\0" /* Default root partition, overwritten in board file */ \
|
||||
"kernel_addr_r=" OT_KERNEL_ADDR "\0" \
|
||||
"load_addr=" OT_LOAD_ADDR "\0" \
|
||||
"pxefile_addr_r=" PXE_ADDR "\0" \
|
||||
"ramdisk_addr_r=" OT_RD_ADDR "\0" \
|
||||
"defaultconsole=ttyS2\0" /* Default output console */ \
|
||||
"add_sd_bootargs=setenv bootargs $bootargs root=/dev/mmcblk1p$root_part rootfstype=ext4 " \
|
||||
"console=$defaultconsole,115200 rootwait loglevel=4 ti_cpsw.rx_packet_max=1526\0" \
|
||||
"add_version_bootargs=setenv bootargs $bootargs\0" \
|
||||
"fdt_skip_update=yes\0" \
|
||||
"ethprime=cpsw\0" \
|
||||
"sdbringup=echo Try bringup boot && ext4load mmc 1:$root_part $kernel_addr /boot/zImage && " \
|
||||
"ext4load mmc 1:$root_part $fdt_addr /boot/$fdt_image && setenv bootargs $bootargs rw;\0" \
|
||||
"sdprod=ext4load mmc 1:$root_part $kernel_addr /boot/$kernel_image && " \
|
||||
"ext4load mmc 1:$root_part $fdt_addr /boot/$fdt_image && setenv bootargs $bootargs ro;\0" \
|
||||
"sdboot=if mmc dev 1; then echo Copying Linux from SD to RAM...; "\
|
||||
"if test -e mmc 1:$root_part /boot/$kernel_image; then run sdprod; " \
|
||||
"else run sdbringup; fi; " \
|
||||
"run add_sd_bootargs; run add_version_bootargs; " \
|
||||
"bootz $kernel_addr - $fdt_addr; fi\0" \
|
||||
"bootcmd=run sdboot\0" \
|
||||
"bootcmd_otenv=ext4load mmc 1:2 $load_addr /boot/loader/uEnv.txt; " \
|
||||
"env import -t $load_addr $file_size; " \
|
||||
"setenv bootargs $bootargs root=/dev/ram0 console=$defaultconsole,115200 ti_cpsw.rx_packet_max=1526 rw ostree_root=/dev/mmcblk1p2\0" \
|
||||
"bootcmd_rd_in_mmc=ext4load mmc 1:2 $kernel_addr_r /boot$kernel_image; " \
|
||||
"ext4load mmc 1:2 $ramdisk_addr_r /boot$ramdisk_image; " \
|
||||
"bootm $kernel_addr_r $ramdisk_addr_r\0" \
|
||||
"bootcmd=run bootcmd_otenv; run bootcmd_rd_in_mmc\0" \
|
||||
"bootdelay=0\0" \
|
||||
"ipaddr=192.168.1.1\0" \
|
||||
"serverip=192.168.1.254\0" \
|
||||
"pxefile_addr_r=" PXE_ADDR "\0" \
|
||||
"fdt_addr_r=" FDT_ADDR "\0" \
|
||||
"fdt_high=" FDT_HIGH_ADDR "\0" \
|
||||
"kernel_addr_r=" KERNEL_ADDR "\0" \
|
||||
"ramdisk_addr_r=" LOAD_ADDR "\0" \
|
||||
"initrd_high=" INIT_RD_ADDR "\0" \
|
||||
"tftptimeout=2000\0" \
|
||||
"tftptimeoutcountmax=5\0" \
|
||||
"bootpretryperiod=5000\0" \
|
||||
|
|
|
|||
Loading…
Reference in New Issue