Message ID | 20201023131808.3198005-2-f4bug@amsat.org |
---|---|
State | New |
Headers | show |
Series | tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC | expand |
Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com> Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com> On Fri, Oct 23, 2020 at 3:18 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > This reverts commit b638627c723a8d0d2bb73489bc6bf9ff09b8d53a. > > Currently booting U-Boot on the Orange Pi PC we get: > > console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200) > ... > console: Autoboot in 1 seconds, press <Space> to stop > console: => > console: => setenv extraargs 'printk.time=0 console=ttyS0,115200 > loglevel=7 nosmp systemd.default_timeout_start_sec=9000 > systemd.mask=armbian-zram-config.service > systemd.mask=armbian-ramlog.service' > console: => boot > console: unable to select a mode > console: Device 0: unknown device > console: BOOTP broadcast 1 > console: DHCP client bound to address 10.0.2.15 (12 ms) > console: *** Warning: no boot file name; using '0A00020F.img' > console: Using ethernet@1c30000 device > console: TFTP from server 10.0.2.2; our IP address is 10.0.2.15 > console: Filename '0A00020F.img'. > console: Load address: 0x42000000 > console: Loading: * > console: TFTP error: 'Access violation' (2) > console: Not retrying... > console: missing environment variable: pxeuuid > console: missing environment variable: bootfile > ... > > With commit b638627c723 reverted: > > console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200) > ... > console: Autoboot in 1 seconds, press <Space> to stop > console: => > console: => setenv extraargs 'printk.time=0 console=ttyS0,115200 > loglevel=7 nosmp systemd.default_timeout_start_sec=9000 > systemd.mask=armbian-zram-config.service > systemd.mask=armbian-ramlog.service' > console: => boot > console: switch to partitions #0, OK > console: mmc0 is current device > console: Scanning mmc 0:1... > console: Found U-Boot script /boot/boot.scr > console: 3967 bytes read in 16 ms (241.2 KiB/s) > console: ## Executing script at 43100000 > console: U-boot loaded from SD > console: Boot script loaded from mmc > console: 153 bytes read in 10 ms (14.6 KiB/s) > console: 11185760 bytes read in 6698 ms (1.6 MiB/s) > console: 7788240 bytes read in 2966 ms (2.5 MiB/s) > console: Found mainline kernel configuration > console: 32121 bytes read in 50 ms (627 KiB/s) > console: 4185 bytes read in 23 ms (176.8 KiB/s) > console: Applying kernel provided DT fixup script (sun8i-h3-fixup.scr) > console: ## Executing script at 45000000 > console: ## Loading init Ramdisk from Legacy Image at 43300000 ... > console: Image Name: uInitrd > console: Image Type: ARM Linux RAMDisk Image (gzip compressed) > console: Data Size: 11185696 Bytes = 10.7 MiB > console: Load Address: 00000000 > console: Entry Point: 00000000 > console: Verifying Checksum ... OK > console: ## Flattened Device Tree blob at 43000000 > console: Booting using the fdt blob at 0x43000000 > console: Loading Ramdisk to 49555000, end 49fffe20 ... OK > console: Loading Device Tree to 494e4000, end 49554fff ... OK > console: Starting kernel ... > console: Uncompressing Linux... done, booting the kernel. > > Fixes: b638627c723 ("hw/sd: Fix incorrect populated function switch status > data structure") > Reported-by: Michael Roth <mdroth@linux.vnet.ibm.com> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > hw/sd/sd.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/hw/sd/sd.c b/hw/sd/sd.c > index c3febed2434..c17197785bc 100644 > --- a/hw/sd/sd.c > +++ b/hw/sd/sd.c > @@ -823,12 +823,11 @@ static void sd_function_switch(SDState *sd, uint32_t > arg) > sd->data[11] = 0x43; > sd->data[12] = 0x80; /* Supported group 1 functions */ > sd->data[13] = 0x03; > - > for (i = 0; i < 6; i ++) { > new_func = (arg >> (i * 4)) & 0x0f; > if (mode && new_func != 0x0f) > sd->function_group[i] = new_func; > - sd->data[16 - (i >> 1)] |= new_func << ((i % 2) * 4); > + sd->data[14 + (i >> 1)] = new_func << ((i * 4) & 4); > } > memset(&sd->data[17], 0, 47); > stw_be_p(sd->data + 64, sd_crc16(sd->data, 64)); > -- > 2.26.2 > > -- Niek Linnenbank <div dir="ltr"><div>Tested-by: Niek Linnenbank <<a href="mailto:nieklinnenbank@gmail.com">nieklinnenbank@gmail.com</a>></div><div>Reviewed-by: Niek Linnenbank <<a href="mailto:nieklinnenbank@gmail.com">nieklinnenbank@gmail.com</a>><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 23, 2020 at 3:18 PM Philippe Mathieu-Daudé <<a href="mailto:f4bug@amsat.org">f4bug@amsat.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This reverts commit b638627c723a8d0d2bb73489bc6bf9ff09b8d53a.<br> <br> Currently booting U-Boot on the Orange Pi PC we get:<br> <br> console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200)<br> ...<br> console: Autoboot in 1 seconds, press <Space> to stop<br> console: =><br> console: => setenv extraargs 'printk.time=0 console=ttyS0,115200 loglevel=7 nosmp systemd.default_timeout_start_sec=9000 systemd.mask=armbian-zram-config.service systemd.mask=armbian-ramlog.service'<br> console: => boot<br> console: unable to select a mode<br> console: Device 0: unknown device<br> console: BOOTP broadcast 1<br> console: DHCP client bound to address 10.0.2.15 (12 ms)<br> console: *** Warning: no boot file name; using '0A00020F.img'<br> console: Using ethernet@1c30000 device<br> console: TFTP from server 10.0.2.2; our IP address is 10.0.2.15<br> console: Filename '0A00020F.img'.<br> console: Load address: 0x42000000<br> console: Loading: *<br> console: TFTP error: 'Access violation' (2)<br> console: Not retrying...<br> console: missing environment variable: pxeuuid<br> console: missing environment variable: bootfile<br> ...<br> <br> With commit b638627c723 reverted:<br> <br> console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200)<br> ...<br> console: Autoboot in 1 seconds, press <Space> to stop<br> console: =><br> console: => setenv extraargs 'printk.time=0 console=ttyS0,115200 loglevel=7 nosmp systemd.default_timeout_start_sec=9000 systemd.mask=armbian-zram-config.service systemd.mask=armbian-ramlog.service'<br> console: => boot<br> console: switch to partitions #0, OK<br> console: mmc0 is current device<br> console: Scanning mmc 0:1...<br> console: Found U-Boot script /boot/boot.scr<br> console: 3967 bytes read in 16 ms (241.2 KiB/s)<br> console: ## Executing script at 43100000<br> console: U-boot loaded from SD<br> console: Boot script loaded from mmc<br> console: 153 bytes read in 10 ms (14.6 KiB/s)<br> console: 11185760 bytes read in 6698 ms (1.6 MiB/s)<br> console: 7788240 bytes read in 2966 ms (2.5 MiB/s)<br> console: Found mainline kernel configuration<br> console: 32121 bytes read in 50 ms (627 KiB/s)<br> console: 4185 bytes read in 23 ms (176.8 KiB/s)<br> console: Applying kernel provided DT fixup script (sun8i-h3-fixup.scr)<br> console: ## Executing script at 45000000<br> console: ## Loading init Ramdisk from Legacy Image at 43300000 ...<br> console: Image Name: uInitrd<br> console: Image Type: ARM Linux RAMDisk Image (gzip compressed)<br> console: Data Size: 11185696 Bytes = 10.7 MiB<br> console: Load Address: 00000000<br> console: Entry Point: 00000000<br> console: Verifying Checksum ... OK<br> console: ## Flattened Device Tree blob at 43000000<br> console: Booting using the fdt blob at 0x43000000<br> console: Loading Ramdisk to 49555000, end 49fffe20 ... OK<br> console: Loading Device Tree to 494e4000, end 49554fff ... OK<br> console: Starting kernel ...<br> console: Uncompressing Linux... done, booting the kernel.<br> <br> Fixes: b638627c723 ("hw/sd: Fix incorrect populated function switch status data structure")<br> Reported-by: Michael Roth <<a href="mailto:mdroth@linux.vnet.ibm.com" target="_blank">mdroth@linux.vnet.ibm.com</a>><br> Signed-off-by: Philippe Mathieu-Daudé <<a href="mailto:f4bug@amsat.org" target="_blank">f4bug@amsat.org</a>><br> ---<br> hw/sd/sd.c | 3 +--<br> 1 file changed, 1 insertion(+), 2 deletions(-)<br> <br> diff --git a/hw/sd/sd.c b/hw/sd/sd.c<br> index c3febed2434..c17197785bc 100644<br> --- a/hw/sd/sd.c<br> +++ b/hw/sd/sd.c<br> @@ -823,12 +823,11 @@ static void sd_function_switch(SDState *sd, uint32_t arg)<br> sd->data[11] = 0x43;<br> sd->data[12] = 0x80; /* Supported group 1 functions */<br> sd->data[13] = 0x03;<br> -<br> for (i = 0; i < 6; i ++) {<br> new_func = (arg >> (i * 4)) & 0x0f;<br> if (mode && new_func != 0x0f)<br> sd->function_group[i] = new_func;<br> - sd->data[16 - (i >> 1)] |= new_func << ((i % 2) * 4);<br> + sd->data[14 + (i >> 1)] = new_func << ((i * 4) & 4);<br> }<br> memset(&sd->data[17], 0, 47);<br> stw_be_p(sd->data + 64, sd_crc16(sd->data, 64));<br> -- <br> 2.26.2<br> <br> </blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Niek Linnenbank<br><br></div></div></div></div>
diff --git a/hw/sd/sd.c b/hw/sd/sd.c index c3febed2434..c17197785bc 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -823,12 +823,11 @@ static void sd_function_switch(SDState *sd, uint32_t arg) sd->data[11] = 0x43; sd->data[12] = 0x80; /* Supported group 1 functions */ sd->data[13] = 0x03; - for (i = 0; i < 6; i ++) { new_func = (arg >> (i * 4)) & 0x0f; if (mode && new_func != 0x0f) sd->function_group[i] = new_func; - sd->data[16 - (i >> 1)] |= new_func << ((i % 2) * 4); + sd->data[14 + (i >> 1)] = new_func << ((i * 4) & 4); } memset(&sd->data[17], 0, 47); stw_be_p(sd->data + 64, sd_crc16(sd->data, 64));
This reverts commit b638627c723a8d0d2bb73489bc6bf9ff09b8d53a. Currently booting U-Boot on the Orange Pi PC we get: console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200) ... console: Autoboot in 1 seconds, press <Space> to stop console: => console: => setenv extraargs 'printk.time=0 console=ttyS0,115200 loglevel=7 nosmp systemd.default_timeout_start_sec=9000 systemd.mask=armbian-zram-config.service systemd.mask=armbian-ramlog.service' console: => boot console: unable to select a mode console: Device 0: unknown device console: BOOTP broadcast 1 console: DHCP client bound to address 10.0.2.15 (12 ms) console: *** Warning: no boot file name; using '0A00020F.img' console: Using ethernet@1c30000 device console: TFTP from server 10.0.2.2; our IP address is 10.0.2.15 console: Filename '0A00020F.img'. console: Load address: 0x42000000 console: Loading: * console: TFTP error: 'Access violation' (2) console: Not retrying... console: missing environment variable: pxeuuid console: missing environment variable: bootfile ... With commit b638627c723 reverted: console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200) ... console: Autoboot in 1 seconds, press <Space> to stop console: => console: => setenv extraargs 'printk.time=0 console=ttyS0,115200 loglevel=7 nosmp systemd.default_timeout_start_sec=9000 systemd.mask=armbian-zram-config.service systemd.mask=armbian-ramlog.service' console: => boot console: switch to partitions #0, OK console: mmc0 is current device console: Scanning mmc 0:1... console: Found U-Boot script /boot/boot.scr console: 3967 bytes read in 16 ms (241.2 KiB/s) console: ## Executing script at 43100000 console: U-boot loaded from SD console: Boot script loaded from mmc console: 153 bytes read in 10 ms (14.6 KiB/s) console: 11185760 bytes read in 6698 ms (1.6 MiB/s) console: 7788240 bytes read in 2966 ms (2.5 MiB/s) console: Found mainline kernel configuration console: 32121 bytes read in 50 ms (627 KiB/s) console: 4185 bytes read in 23 ms (176.8 KiB/s) console: Applying kernel provided DT fixup script (sun8i-h3-fixup.scr) console: ## Executing script at 45000000 console: ## Loading init Ramdisk from Legacy Image at 43300000 ... console: Image Name: uInitrd console: Image Type: ARM Linux RAMDisk Image (gzip compressed) console: Data Size: 11185696 Bytes = 10.7 MiB console: Load Address: 00000000 console: Entry Point: 00000000 console: Verifying Checksum ... OK console: ## Flattened Device Tree blob at 43000000 console: Booting using the fdt blob at 0x43000000 console: Loading Ramdisk to 49555000, end 49fffe20 ... OK console: Loading Device Tree to 494e4000, end 49554fff ... OK console: Starting kernel ... console: Uncompressing Linux... done, booting the kernel. Fixes: b638627c723 ("hw/sd: Fix incorrect populated function switch status data structure") Reported-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/sd/sd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)